Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Select vertex with SliderControl, add vertex with another SliderControl

  • Select vertex with SliderControl, add vertex with another SliderControl

    Posted by BayarUgrakh Batzorig on August 13, 2022 at 6:39 pm

    s = Math.round(effect(“Sellect”)(“Slider”).value);

    numPts = Math.round(effect(“Duplicate”)(“Slider”).value);

    sPt = content(“Shape 1”).content(“Path 1”).path.points()[s];

    Path1= content(“Shape 2”).content(“Path 1”).path.points();

    allPts = [];

    for(i=0; i <= s;i++){

    allPts.push(content(“Shape 1”).content(“Path 1”).path.points()[i]);

    }

    for(i=0; i < numPts;i++){

    allPts.push(sPt);

    }

    for(i = 0; i < Path1.length; i++){

    u=s+i;

    allPts.push(content(“Shape 1”).content(“Path 1”).path.points()[u]);

    }

    createPath(allPts,[],[],false);

    I have tried like this so far but not really working.

    Is it possible with the working tangent?🙏

    BayarUgrakh Batzorig replied 3 years, 11 months ago 1 Member · 1 Reply
  • 1 Reply
  • BayarUgrakh Batzorig

    August 14, 2022 at 7:19 am

    s = Math.round(effect(“Sellect 2”)(“Slider”).value);

    numPts = Math.round(effect(“Duplicate”)(“Slider”).value);

    Path = content(“Shape 1”).content(“Path 2”).path;

    newP = [];

    newIt = [];

    newOt = [];

    for(i=0; i <= s;i++){

    newP.push(Path.points()[i]);

    newIt.push(Path.inTangents()[i]);

    newOt.push(Path.outTangents()[i]);

    }

    for(i=0; i < numPts;i++){

    newP.push(Path.points()[s]);

    newIt.push(Path.inTangents()[s]);

    newOt.push(Path.outTangents()[s]);

    }

    for(i = s; i < Path.points().length; i++){

    newP.push(Path.points()[i]);

    newIt.push(Path.inTangents()[i]);

    newOt.push(Path.outTangents()[i]);

    }

    createPath(newP,newIt,newOt,false);

    I got it.

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