Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Max Width Scale Text Layer

  • Max Width Scale Text Layer

    Posted by Benjamin Thompson on September 20, 2017 at 7:46 pm

    Looking for some help or to see if this is possible.

    I’ll be running lots of comps through comps from spreadsheets. I’d like to add an expression to the main text layer to scale down to say 80% of screen width. 80% able to change via expression I imagine. I’d like to scale rather than wrap because the majority of them will be names. Comps would be 16×9 1920×1080. Type layer is centered and position would remain constant.

    Suggestions? Possible?

    Benjamin Thompson replied 8 years, 7 months ago 2 Members · 2 Replies
  • 2 Replies
  • Kevin Camp

    September 20, 2017 at 8:45 pm

    try this:

    maxW = 80; // in percentage of comp width
    rect = sourceRectAtTime();
    if ( 100 * rect.width / thisComp.width > maxW ) s = maxW * thisComp.width / rect.width;
    else s = 100;
    [ s, s ]

    Kevin Camp
    Art Director
    KCPQ, KZJO & KRCW

  • Benjamin Thompson

    September 20, 2017 at 9:06 pm

    Beautiful. Thank you!

    I’ll work through understanding how it works but I appreciate it!

    b

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