Skip to main content
nadav_rock
Inspiring
May 9, 2019
Question

mask to path

  • May 9, 2019
  • 1 reply
  • 270 views

how to use code to take the mask applied to one layer and apply it to another layers path between seconds 0-5

This topic has been closed for replies.

1 reply

Participant
May 22, 2019

solved it. if useful for anyone:

var x = app.project.item(2).layer(2).property("ADBE Transform Group").property("ADBE Position");

var maskvertices = (app.project.item(2).layer(1)("Masks")("Mask 1").property("Mask Path").value.vertices);

var totalverticesaspositionos = ((app.project.item(2).layer(1)("Masks")("Mask 1").property("Mask Path").value.vertices).length);

for(i=0; i<totalverticesaspositionos; i++){

    x.setValueAtTime(, [(Math.round( parseFloat((maskvertices[0])))), (Math.round( parseFloat((maskvertices[1]))))]);

   

   

    }