Created
October 18, 2017 23:15
-
-
Save anonymous/c3b4591c11cc9fc12d4bdf36b931940f to your computer and use it in GitHub Desktop.
Mask Track Offset Position expression
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//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