Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions pathpoint to pathpoint expression

  • pathpoint to pathpoint expression

    Posted by Alex Weil on December 9, 2019 at 5:38 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

    Alex Weil replied 6 years, 4 months ago 2 Members · 4 Replies
  • 4 Replies
  • Dan Ebberts

    December 9, 2019 at 5:55 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]

  • Dan Ebberts

    December 9, 2019 at 5:59 pm

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

    Dan

  • Alex Weil

    December 10, 2019 at 8:49 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?

  • Alex Weil

    December 10, 2019 at 9:00 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

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