can anyone help me with shape object scripting?
this is my first time posting in the community. i'm sorry if there's a mistake.
so i was working on a javascript that allow you to create a shape adjustment layer and i want to activate the Tool Create Mask in the shape object via javascript without change it manually, but i'm still not understand the logic of "Tool Create Mask". i've already read the scripting guide but i'm still stuck. is there anyone can help me?
here's the script
function addShape(){
app.beginUndoGroup("addShape");
app.executeCommand(3736); //Add Shape Layer
var comp = app.project.activeItem;
var thisLayer = comp.selectedLayers[0];
thisLayer.name = "Adjustment Shape";
thisLayer.adjustmentLayer = true;
thisLayer.transform.position.setValue([0, 0]);
thisLayer.transform.position.expression = "[ thisComp.width/2, thisComp.height/2 ];";
thisLayer.property("ADBE Root Vectors Group").addProperty("ADBE Vector Shape - Rect");
thisLayer.property("ADBE Root Vectors Group").property(1).property("ADBE Vector Rect Size").expression = "[ thisComp.width, thisComp.height ];";
thisLayer.property("ADBE Root Vectors Group").addProperty("ADBE Vector Graphic - Fill");
thisLayer.label = 5;
app.endUndoGroup();
}
addShape();
