-
Animate a shape layer's stroke based on the duration's property of a composition
I’m trying to find a way to animate the stroke of a shape layer based on the time duration’s property of a custom composition.
Probably there’s already a script out there but I can’t find it so I’m wondering if there’s a simple way to do it maybe via expressions.
I’d like to:
1 – Import any kind of footage of any length into After Effects
2 – Create a new composition with the selected video
3 – Inside of the composition I would create a Shape Layer, for example an empty Rectangle with the stroke activated, which automatically connects the start/end of the stroke, using trim paths, to the duration of the composition itself.
In this way I would have an animated overlay frame, which in this case it would be the stroke of an empty rectangle, on top of any custom video from the start to the end of any footage.
Imagine it like an automatic loading bar/countdown which works for any footage of random length.
Maybe I’m thinking it wrong but I would really appreciate if someone of you could help me.
Please tell me if the question is not clear, I would try to explain it better.
Thanks in advance
