ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Max Width Scale Text Layer

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Benjamin Thompson
Max Width Scale Text Layer
on Sep 20, 2017 at 7:46:21 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 16x9 1920x1080. Type layer is centered and position would remain constant.

Suggestions? Possible?


Return to posts index

Kevin Camp
Re: Max Width Scale Text Layer
on Sep 20, 2017 at 8:45:20 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


Return to posts index

Benjamin Thompson
Re: Max Width Scale Text Layer
on Sep 20, 2017 at 9:06:37 pm

Beautiful. Thank you!

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

b


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2017 CreativeCOW.net All Rights Reserved
[TOP]