FORUMS: list search recent posts

Disable all Shape Groups

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Ben Pohl
Disable all Shape Groups
on Jul 8, 2016 at 4:21:06 pm

Hey there COW,

I've got this simple script that will disable (turn off visibility for) any Shape Group named "Group 2"


var myLayers = app.project.activeItem.selectedLayers;
var myLayer;
for (var i = 0; i < myLayers.length; i++){
myLayer = myLayers[i];
if (myLayer instanceof ShapeLayer){
var myContents = myLayer.property("Contents")("Group 2");
for (var j = 1; j <= myContents.numProperties; j++){
myContents.enabled = false;
}
}
}


I'd like to modify it to disable all shape groups: Group 1, Group 2, Group 3, etc...
I'm having trouble adding that functionality. Any tips?
Thanks!


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2017 CreativeCOW.net All Rights Reserved
[TOP]