Copy link to clipboard
Copied
Hi,
I have a curve (shape). I would like to use the new script to move the points of the shape around using nulls. I would then also like to assign another null to the curve to use as a motion path. I do NOT want to copy and paste the shape of the path into the position of my null as I want to use the changing shape of the curve to drive the motion of the null.
In Maya, I would assign an object to a curve as a motion path, and then it would move linearly across that path as time went on (or I could adjust the shape). Is there any way to do something similar here?
All my googling just turns up "make a shape and then copy and paste it into the position" which is not what I want to do, as the curve shape will change, either over time, or as a user changes the position of the nulls.
Any ideas?
Thx!
Finally, just discovered the pointOnPath method in this document: Expression and Scripting Improvements in After Effects CC (October 2017).pdf
That will do it.
myPath = thisComp.layer("Shape Layer 1").content("Shape 1").content("Path 1").path;
myValue = toComp(myPath.pointOnPath(time));
[myValue[0],myValue[1]];
Copy link to clipboard
Copied
Finally, just discovered the pointOnPath method in this document: Expression and Scripting Improvements in After Effects CC (October 2017).pdf
That will do it.
myPath = thisComp.layer("Shape Layer 1").content("Shape 1").content("Path 1").path;
myValue = toComp(myPath.pointOnPath(time));
[myValue[0],myValue[1]];