Graphics

 View Only
Expand all | Collapse all

Text Alignment - Ctr Justifed

  • 1.  Text Alignment - Ctr Justifed

    Posted 04-27-2017 19:11
    Right - So in a lower 3rd I need to have the main text center justified in each panel. Above the main text is a header, which for this purpose is a twitter handle, but it could really be anything. The header text needs to stay aligned to the left edge of the main text below it. However, in trying to divine a VL setup for this, the center justification of the main text is creating a problem with maintaining this alignment.

    What to do?


  • 2.  RE: Text Alignment - Ctr Justifed

    Posted 04-27-2017 20:37
    Well, I don't seem to really begetting the love here, but I did mostly sort out the problem... Using Text (Bounding Box Width) with a -1 Multiplier and an offset attached to the header's X Position (L justified) gave me at least the desired movement, but now I need the header to text to not continue to change position once the auto squeeze limit is reached on the main text below.
    #XPression


  • 3.  RE: Text Alignment - Ctr Justifed

    Posted 04-27-2017 22:28
    In situations where you want something to stop moving when a certain value is reached, you need to have an equals node (comparing the value change) plugged into an input selector, with the varying input value plugged into 0 and the value that's being changed plugged into 1 as well as being the output of the input selector. I hope that makes sense (hard to explain without a pic, but I don't have access to our XPression machine at the moment).
    #XPression


  • 4.  RE: Text Alignment - Ctr Justifed

    Posted 04-27-2017 23:32
    Thanks! It does kinda make sense, but it sounds almost like I would have a Node connected to both the 1 and the output of the input selector? Right now, my Node setup is (for example) Name 2 [Bounding Box Right] -> Multiply [Base] *-1 -> Offset [+24] -> Header 2 [Position X] .

    So, if I am reading you right, I need to add an Equal To and an Input Selector, and attach the entirety of my original node string except Header 2 [Position X] into the 1 input of that Selection, the Equal To plugged into the Selector's Index... but that seems to be missing something. I feel I will need a value node indicating the position at which the header text needs to stop moving, based on its X-Position when the main text below is at the limits of auto-squeeze.. but I'm not sure where to plug that in... maybe that goes into the 1 of the input selector, or maybe the input of the 'equal to'. Sorry I'm not quite connecting on this, I've been using XPression for all of about 2 weeks....
    #XPression


  • 5.  RE: Text Alignment - Ctr Justifed

    Posted 04-28-2017 00:11

    This should do what you want. It handles the autosqueeze limit.


    #XPression


  • 6.  RE: Text Alignment - Ctr Justifed

    Posted 04-28-2017 00:46
    Thanks, Mr Ford. Unfortunately that didn't seem to work. I plugged everything in exactly as per your image, but the top line isn't moving at all as I increase / decrease the the number of characters in the bottom line. Puzzling

    In my case, my original setup which is BottomLine [BoundingBox.Right] -> Multiply [-1] -> Offset -> TopLine [Positon.X] was necessary as the BottomLine text is center justified, the TopLine text is Left Justified and needs to be 'pinned' of you will to the L most character of the BottomLine Text. BoundingBox.WidthScaled was returning an uneven relationship, due entirely as I found to the center justification of that bottom text. This works perfectly until the BottomLine text exceeds its max width. Just putting all of this out there so you can see how I arrived where I am now.

    In any event, I well and truly appreciate the help offered by you and HopeJr. I'm sure we can get to the bottom of this.
    #XPression


  • 7.  RE: Text Alignment - Ctr Justifed

    Posted 04-28-2017 03:01
    There must be a mistake somewhere, can you upload your scene? It works perfectly for me.

    Are you sure you enabled the "blue diamond" on the viewport which enables Visual Logic to be active in the scene.
    The "bounding box width scaled" should not be affected by the justification, as it simply returns the overall width of the text object (limited by the autosqueeze).

    You don't have the top or bottom line objects as children of each other do you? For my logic to work they must be at the same level of the scene tree.

    Also would be helpful for you to mention what version of XPression you are using, incase it is an older version that may have a bug in it.

    #XPression


  • 8.  RE: Text Alignment - Ctr Justifed

    Posted 04-28-2017 03:42
    Well, I'm home now, but I will see if I can do that tomorrow morning. I can answer a couple of questions though.

    Yes I do have continuous animations displayed, and all the other VL is working fine.

    The top and bottom line objects are at the same level of the scene tree.

    I am using Version 6.5

    I agree that it is odd the center justification of the bottom line text is throwing a wrench into things. I tested the setup with the bottom line text justified both right and left, and it worked fine, including the auto squeeze recognition, but when set to center, the toppling text displayed the odd behavior... almost an exponential curve. Switching from width scaled to right solved it completely, or so I thought until I tested the auto squeeze. Mayhaps a bug?


    #XPression


  • 9.  RE: Text Alignment - Ctr Justifed

    Posted 04-28-2017 14:47
    It could be a bug.. When I get a copy of your scene I can confirm for sure or not..
    #XPression


  • 10.  RE: Text Alignment - Ctr Justifed

    Posted 04-28-2017 17:19
    I don't think my client would want me posting a scene file on a public forum, is there a private channel I could get it to you through?
    #XPression


  • 11.  RE: Text Alignment - Ctr Justifed

    Posted 04-30-2017 23:03
    Hi Willie. Yes, a value node is needed on the second input to the equals node.
    #XPression