Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Double trim path. Acces to end second trim path for text position.

  • Dan Ebberts

    June 17, 2025 at 4:06 pm

    First you need to convert the ellipse to bezier (right click on Ellipse Path 1 > Convert to Bezier Path). Then this expression for the the text layer’s position should work:

    L = thisComp.layer("Shape Layer 1");
    ellipse = L.content("Ellipse 1");
    p = ellipse.content("Path 1").path;
    end1 = ellipse.content("Trim Paths 1").end;
    end2 = ellipse.content("Trim Paths 2").end;
    offset1 = L.transform.anchorPoint;
    offset2 = [-20,20];
    L.toComp(p.pointOnPath((end1/100)*(end2/100))+ offset1 + offset2)

    Adjust offset2 to move the text slightly off the path (or set it to [0,0] if you want the text right on the trim path end point)

  • Smet Kira

    June 18, 2025 at 3:44 am

    Thank you again. And if, for example, I have trim path 1 start = 15%, and trim path 2 start = 30%, do I need to multiply them in this way too?

    L.to Comp(p.pointOnPath((end1/100)*(end2/100)*(start1/100)*(start2/100))+ offset 1 + offset 2)

  • Dan Ebberts

    June 18, 2025 at 2:14 pm

    Ah, yes. I didn’t consider that. I’d try it like this:

    L = thisComp.layer("Shape Layer 1");
    ellipse = L.content("Ellipse 1");
    p = ellipse.content("Path 1").path;
    start1 = ellipse.content("Trim Paths 1").start;
    end1 = ellipse.content("Trim Paths 1").end;
    end2 = ellipse.content("Trim Paths 2").end;
    offset1 = L.transform.anchorPoint;
    offset2 = [-20,20];
    L.toComp(p.pointOnPath(start1/100 + ((end1-start1)/100)*(end2/100))+ offset1 + offset2)
  • Smet Kira

    June 19, 2025 at 2:51 am

    Thank you for help,sir!

  • Joel Bellagamba

    July 11, 2025 at 9:50 am

    To control the second trim path expand both trim paths in the layer and keyframe the End value of the second one separately. Rename layers to avoid confusion.

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