-
“Butt Cap” to “Round Cap” with a Script (But it doesn’t work)
Hi guys! I don’t know what i’m doing wrong, this should be working, anyone can help me?
I’m trying to change the “Butt Cap” of selected shape layers to “Round Cap” but i can’t figure it out why is not working, here is the code:
var project = app.project;
var comp = project.activeItem;
app.beginUndoGroup("Process");
var myLayers = comp.selectedLayers;
var myLayer;
for (var i = 0; i < myLayers.length; i++){
myLayer = myLayers[i];
if (myLayer instanceof ShapeLayer){
var myContents = myLayer.property("ADBE Root Vectors Group");
for (var j = 1; j <= myContents.numProperties; j++){
myContents.property(j).property("ADBE Vector Group").property("ADBE Vectors Group").property("ADBE Vector Shape - Group").property("ADBE Vector Shape").property("ADBE Vector Graphic - Stroke").property("ADBE Vector Stroke Line Cap").setValue(2);
}
}
}
app.endUndoGroup();