Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Mask Track Offset Position expression
//input variables - pickwhip tPath to your path and offsetPos to your null or expression controller
var tPath = mask("Mask 1").maskPath;
var offsetPos=effect("Mask Position Offset")("Point");
var tPoints=[];
var InTan=[];
var OutTan=[];
var mPos=offsetPos-[thisComp.width/2,thisComp.height/2];
var tClosed=tPath.isClosed();
for(i=0;i<(tPath.points().length);i++)
{
tPoints.push([tPath.points()[i][0]+mPos[0],[tPath.points()[i][1]+mPos[1]]],);
InTan.push([tPath.inTangents()[i][0],[tPath.inTangents()[i][1]]],);
OutTan.push([tPath.outTangents()[i][0],[tPath.outTangents()[i][1]]],);
}
createPath(tPoints, InTan, OutTan,tClosed)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.