Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Position based on number of text lines.

  • Position based on number of text lines.

    Posted by Benjamin Thompson on May 13, 2021 at 1:10 am

    I’m revisiting an old project where I used sourceRectAtTime and a null with point controls to move the position of a text layer, depending on number of layers. I’d like to be able to do it with just an expression on the text layer itself, and be more procedural. It does seem like a Pins and Boxes should do it, but I imagine it can be done with an expression.

    I’ve found this on reddit (Pixeldrift)

    https://www.reddit.com/r/AfterEffects/comments/7amvdt/expression_to_adjust_the_position_of_textbased/

    box = thisLayer.sourceRectAtTime(time);

    offset = box.height;
    y = position[1] – offset;

    x = value[0];

    [x, y];


    It works great but I’m struggling with getting it to ignore the ascenders and descenders. Any ideas and help appreciated.

    Thanks!

    Chris Voelz replied 4 years, 11 months ago 2 Members · 1 Reply
  • 1 Reply

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