ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

pathpoint to pathpoint expression

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Alex Weil
pathpoint to pathpoint expression
on Dec 9, 2019 at 5:38:53 pm

hey,

i got 2 Ellipses and one path with 4 points on the same Shape layer. now i want to connect the first 2 Pathpoints of the Shapelayer to the first and third Pathpoints of the first Ellipse. With the last 2 Pathpoints of the Path i want to do the same with Ellipse number 2. so i tried to write this expression, but i failed.


var targetPath1 = content("Ellipse 1").content("Path 1").path;
var targetPath2 = content("Ellipse 2").content("Path 1").path;

createPath(points = [targetPath1[0], targetPath1[2], targetPath2[0], targetPath1[2]], inTangents = [], outTangents = [], is_closed = true)


any suggestion?

cheers
Alex


Return to posts index

Dan Ebberts
Re: pathpoint to pathpoint expression
on Dec 9, 2019 at 5:55:28 pm

I think you just need to change the way you're accessing the points on the ellipse paths. From this:

targetPath1[0]


to this:

targetPath1.points()[0]



Return to posts index

Dan Ebberts
Re: pathpoint to pathpoint expression
on Dec 9, 2019 at 5:59:28 pm

Also, I noticed that the 4th point you reference is from targetPath1, but it should be for targetPath2.


Dan



Return to posts index


Alex Weil
Re: pathpoint to pathpoint expression
on Dec 10, 2019 at 8:49:22 am

just wow ☺ thanks Dan

i made this now, and it kind of works.

var targetPath1 = content("Ellipse 1").content("Path 1").path;
var targetPath2 = content("Ellipse 2").content("Path 1").path;

createPath(points = [targetPath1.points()[0], targetPath1.points()[2], targetPath2.points()[2], targetPath2.points()[0]], inTangents = [], outTangents = [], is_closed = true)


the Points dont line up very well, do i have a toComp() somewhere?



Return to posts index

Alex Weil
Re: pathpoint to pathpoint expression
on Dec 10, 2019 at 9:00:51 am

ahh okay, i figured out that the expression just reacts to the path but not to the transformation of the Ellipse. Maybe i need to find a way to calculate this in


Return to posts index

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