ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

mask shape path to position path

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
nadav rock
mask shape path to position path
on May 10, 2019 at 10:21:20 pm

how can i use extend script code to copy the shape path of a mask and copy it to another layer as the position path for seoncd 1-5?

Return to posts index

Tomas Bumbulevičius
Re: mask shape path to position path
on May 11, 2019 at 12:27:09 pm

Use code below, assuming that comp contains a solid, with mask applied.

For the time adjustment - not 100% sure about the roving keyframes, but it might be impossible to move them - only to store values, remove current keys and then add new at different times.

var curComp = app.project.activeItem;
var curLayer = curComp.layer("White Solid 1");
var curMaskAtom ="ADBE Mask Parade").property("ADBE Mask Atom");
var curMask ="ADBE Mask Shape");
var posProp ="ADBE Transform Group").property("ADBE Position");

curMask.selected = true;
app.executeCommand(19); //Copy command
curMask.selected = false;
curMaskAtom.selected = false;

posProp.selected = true;
app.executeCommand(20); //Paste command

Find out more:
After Effects Tutorials: motion design, expressions, scripting.

Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2019 All Rights Reserved