Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Boxtext expression

  • Boxtext expression

    Posted by Wick Van den belt on October 7, 2016 at 4:41 pm

    Hi all, I’ve been fiddling with an expression with some time but I can’t seem to figure it out.

    I have a shape layer with a variable size (which is depending on the length of the title-text layer).
    Now I also have a body text, that is in a textbox. How can it be possible to change the size of the textbox according to the size of the shape layer? So I’m not looking at how to change the size of a shape layer depending on the text, rather the opposite way)

    Let’s say the shape layer is called “Box” and the text layer is called “Body Text”, what would be the expression for the text layer?

    I’ve illustrated what I mean, hope that can explain what I’m trying to achieve.

    (My guess it’s an expression on the sourcetext, most likely something with “BoxText” but I can’t find it. )

    Thanks a bunch!

    Dan Ebberts replied 9 years, 11 months ago 3 Members · 2 Replies
  • 2 Replies
  • Kevin Camp

    October 7, 2016 at 10:07 pm

    the only way i think this could be done with expressions would be to use point text (rather than area text) and then have an expression of the source text that would parse the text by words and then rebuild the text word-by-word until the width exceeded the width of the box and then add a hard return and continue building the text in the same manor, adding hard returns until it runs out of words….

    since expression are evaluated every frame, with a lot of text, the expression would likely be rather slow… and you wouldn’t be able to use justified text (it would have to be right, left or centered aligned)

    you might be able to do this with a script. i don’t have a link, but i’m pretty sure that there is a scripting guide for after effects. if you can find that you might be able to see if there are handles to use to set/change the size of a text box.

    Kevin Camp
    Art Director
    KCPQ, KZJO & KRCW

  • Dan Ebberts

    October 7, 2016 at 10:55 pm

    Yes, box text size can be manipulated with a script, but not with an expression.

    Dan

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy