ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Move the Y position of the vertices of a path from Flat to its original Shape

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Carlo Carboni
Move the Y position of the vertices of a path from Flat to its original Shape
on Jul 21, 2018 at 12:33:39 pm

I'm trying to make this animation via expression ...


I do not know the code well, but I should be able to move all the vertices (N. variables) of a path from a Y "Flat" position to bring them back to their original position drawn by the path.





How can this piece of code be realized? Who can help me?


Return to posts index

Dan Ebberts
Re: Move the Y position of the vertices of a path from Flat to its original Shape
on Jul 21, 2018 at 3:17:20 pm

Probably something like this:


path = thisProperty;
p = path.points(inPoint);
yStart = 700;
pCur = [];
for (i = 0; i < p.length; i++){
y = linear(time,0,2,yStart,p[i][1]);
pCur.push([p[i][0],y])
}
createPath(pCur,path.inTangents(),path.outTangents(),path.isClosed());



Dan



Return to posts index

Carlo Carboni
Re: Move the Y position of the vertices of a path from Flat to its original Shape
on Jul 22, 2018 at 12:33:24 pm

Thank you so much Dan .. the code works perfectly!


Return to posts index

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