ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

sourceRectAtTime with a paragraph text layer

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Joshua Dunson
sourceRectAtTime with a paragraph text layer
on Nov 19, 2018 at 7:30:29 pm

I'm trying to create a text layer that scales relative to the dimensions of any given comp regardless of aspect ratio. I've written the following expression and placed it on the scale attribute of a "paragraph" text layer (paragraph for word-wrapping if needed). The expression works, but seems to ignore the bounding box of my text and looks only at the text written. I'd like it to have my expression scale based on the bounding box dimensions. Any help from all you expression whizzes out there is greatly appreciated! Thanks.

box = thisLayer.sourceRectAtTime(time);

x = (thisComp.width/box.width)*100;

[x,x]


Return to posts index

Kalleheikki Kannisto
Re: sourceRectAtTime with a paragraph text layer
on Nov 20, 2018 at 8:46:40 pm

There's a boolean true or false you can add as a second parameter after time to the sourceRectAtTime input, which return either the size of the box or the extents of the content depending on value.

Kalleheikki Kannisto
Senior Graphic Designer


Return to posts index

Joshua Dunson
Re: sourceRectAtTime with a paragraph text layer
on Nov 20, 2018 at 11:33:42 pm

Thanks a million for taking the time to share that!

I adjusted (time) to read (time, true) and that seemed to be enough. I'm still running it through the gauntlet, but it appears to be holding up.


Return to posts index

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