Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Expression help for lower third underline

  • Expression help for lower third underline

  • Chris Breaux

    January 19, 2023 at 3:58 pm

    As you can tell my under line is not center with my text.

    My text is right aligned and the tracking animates.

    The underline has the anchor point set to the right corner.

    The underline layer is parented to the text layer.

    As the text moves to the left the underline grows from the center instead of the right and this is somehow throwing off the underline..

    How can I modify my expression to so that the underline grows only from the right and does not bleed into the title safe margin?

    Here is the code I’m using:

    // Paste this to ShapePath -> Size

    margin = 50;

    text_width = thisComp.layer(“Text”).sourceRectAtTime().width;

    text_height = thisComp.layer(“Text”).sourceRectAtTime().height;

    box_width = text_width + margin*2;

    box_height = text_height + margin*2;

    [box_width, box_height]

    // Paste this to ShapePath -> Position

    text_height = thisComp.layer(“Text”).sourceRectAtTime().height;

    [0, text_height/2]

    // Paste this to Shape->Transform->Positon

    t = thisComp.layer(“Text”);

    tRect = t.sourceRectAtTime(time,false);

    tUL = t.toComp([tRect.left,tRect.top]);

    tLR = t.toComp([tRect.left+tRect.width,tRect.top+tRect.height]);

    tCenter = (tUL + tLR)/10

    myRect = sourceRectAtTime(time,false);

    myUL = toComp([myRect.left,myRect.top]);

    myLR = toComp([myRect.left+myRect.width,myRect.top+myRect.height]);

    myCenter = (myUL + myLR)/10

    delta = myCenter – tCenter;

    value – delta

  • Yoan Boisjoli

    January 27, 2023 at 1:49 am

    I think this could be achieved really fast with the Plug-in Pins & Boxes.

    Or you could animate the line with a trim path and use the “path follow nulls” included with after effects and have the ends of the stroke follow the nulls.

Viewing 1 - 2 of 2 posts

Log in to reply.

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