hi!
I was trying to group some shape props along a bunch of selected layers, but it seems I cannot make it work on all the selected layers, but only on the first one.
Is there a chance to make it work so I can select some layers, and then apply the script so all the contents they have inside get grouped without stoping once the first layer is done? Maybe that’s not possible and it should work on every layer individually?
this is the code I was trying to make work:
var myLayers = app.project.activeItem.selectedLayers;
var myLayer;
for (var i = 0; i < myLayers.length; i++){
myLayer = myLayers[i];
var myContents = myLayer.property("ADBE Root Vectors Group");
myLayer.selected = false;
for (var i = 1; i <= myContents.numProperties; i++){
myContents.property(i).selected = true;
app.executeCommand(3741);//group shapes
}
}
Thanks!