Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity › Forums › Adobe After Effects Expressions › sourceRectAtTime with a paragraph text layer

  • sourceRectAtTime with a paragraph text layer

    Posted by Joshua Dunson on November 19, 2018 at 7:30 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]

    Joshua Dunson replied 7 years, 10 months ago 2 Members · 2 Replies
  • 2 Replies
  • Kalleheikki Kannisto

    November 20, 2018 at 8:46 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

  • Joshua Dunson

    November 20, 2018 at 11:33 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.

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