Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions mask shape path to position path

  • Tomas Bumbulevičius

    May 11, 2019 at 12:27 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 = curLayer.property("ADBE Mask Parade").property("ADBE Mask Atom");
    var curMask = curMaskAtom.property("ADBE Mask Shape");
    var posProp = curLayer.property("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.

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