FORUMS: list search recent posts

Trim Paths on shape to match size of text

COW Forums : Adobe After Effects

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Andy Hilbourne
Trim Paths on shape to match size of text
on Jun 20, 2017 at 7:58:34 am

Hi there,

I use a template to have questions appear on screen regularly, what happens is a line grows from the centre using a trim paths and then the text rises up from behind it.

What I want to do is have the trim paths % match the size of the text box.

So if say the question is "what" I want the line to stop growing at the width of the word, if the question is "what is a development" I want the line to go across all the words.

Any suggestions I've fiddled with pistol-whipping but found no solution

Thanks


Return to posts index

Philip Neves
Re: Trim Paths on shape to match size of text
on Jun 20, 2017 at 1:46:07 pm

Here's one possible solution:

1. Make your line shape layer the width of the comp (because I don't know how to get the length of a line).
2. Apply this expression to the line's scale:


s=thisComp.layer("Text");
pad = 0;
line = s.sourceRectAtTime(time,true).width+pad;
q = 100*(line/thisComp.width);
[q,100]


3. Change the "s" variable to target your text layer.
4. Animate Trim Paths Start and End properties in whatever way you prefer.

You can change the pad variable in that expression to add some extra length to each side of the line.

Does that work?


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2017 CreativeCOW.net All Rights Reserved
[TOP]