Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Keeping shape layer at tip of Trim Path

  • Keeping shape layer at tip of Trim Path

    Posted by Navarro Parker on July 3, 2014 at 6:21 pm

    Trying to get a notched look at the end of a stroked, trimmed Ellipse. So I have another shape layer on top (a black filled rectangle). I’ll later Unmult the comp to get rid of the black.

    How can I get the rectangle to stick to the end of the trim path and also keep its rotation relative so the notch has the same look as the Trim Path is animated to make the path get longer?

    Kevin Camp replied 12 years, 2 months ago 2 Members · 1 Reply
  • 1 Reply
  • Kevin Camp

    July 3, 2014 at 8:28 pm

    this is a bit easier to do with a mask path and the stroke effect, purely because you need to get the square layer to follow the path, and you can easily copy/paste a mask path into the position property and then go from there…

    but you can still use trim paths, you’ll need to create a mask path that is the same as the shape layer’s path that has trim paths on it.

    then you’ll copy/paste the mask path into the position property of the black square.

    then you can use an expression like this to link the position of the black square to the trim paths property of the other shape layer:

    completion = thisComp.layer("Shape Layer 1").content("Rectangle 1").content("Trim Paths 1").end;
    valueAtTime(linear(completion,0,100,0,key(numKeys).time))

    the shape should follow the trim paths end property.

    since your square is offset from the stroke, you may want to apply the expression to a null and parent the square to the null, to make it easier to position it correctly.

    also, you’ll want to set the null to auto orient along path.

    Kevin Camp
    Art Director
    KCPQ, KZJO & KRCW

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