Participant
August 2, 2020
Answered
How to add mask by plugin?
- August 2, 2020
- 1 reply
- 502 views
not sure what you want to do but if it helps this is a function to create a mask
// a= project item, b= layer
// c, vertice 1, x d= vertice 1 y= vertice 2 x, f= vertice 2 y g= vetrice 3 x, h= vertice 3 y, i = veirtice 4 x , j = vertice 4y
// h= feather
function mask_2(a346,b346,c346,d346,e346,f346,g346,h346,i346,j346){
var x346 = app.project.item(a346).layer(b346);
newMask346 = x346.Masks.addProperty("Mask");
myMaskShape346 = newMask346.property("maskShape");
myShape346 = myMaskShape346.value;
myShape346.vertices = [[c346,d346],[e346,f346],[g346,h346],[i346,j346]];
myShape346.closed = true;
myMaskShape346.setValue(myShape346);
app.project.item(a346).layer(b346).property("Masks").property(1).property("Mask Feather").setValueAtTime([0], [h346/10,h346/10]);
}
mask_2(2,2,100,100,200,100,200,200,100,200,20)
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.