Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Self resizing text box, alter width

  • Self resizing text box, alter width

    Posted by Nina Mertz on November 11, 2021 at 1:12 pm

    Hi,

    I’m trying to create a self resizing text box with this tutorial:

    https://www.youtube.com/watch?v=vRKJ2HcFmmY&t=219s

    But I’d like to add some extra padding to it, but not the same amount of pixels on the left/right and bottom top. So in other words, I’d like to add more width to the padding than height.

    I’ve got this now > see screenshot. I imagine it’s a quite simple expression, could someone help me out? Thank you so much!

    Some contents or functionalities here are not available due to your cookie preferences!

    This happens because the functionality/content marked as “Google Youtube” uses cookies that you choosed to keep disabled. In order to view this content or use this functionality, please enable cookies: click here to open your cookie preferences.

    Nina Mertz replied 4 years, 9 months ago 2 Members · 2 Replies
  • 2 Replies
  • Andrei Popa

    November 12, 2021 at 6:38 am

    Hi Nina.

    In your expression row 2 is width and row 3 is height. Just add the amount of pixels you need to each row, like this:

    s = thisComp.layer("svo");
    w = s.sourceRectAtTime().width + 50;
    h = s.sourceRectAtTime().height + 20;
    [w,h]
  • Nina Mertz

    November 12, 2021 at 2:55 pm

    Thank you so much! Lifesaver!

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