Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Disable all Shape Groups

  • Disable all Shape Groups

    Posted by Ben Pohl on July 8, 2016 at 4:21 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!

    Ben Pohl replied 9 years, 10 months ago 1 Member · 0 Replies
  • 0 Replies

Sorry, there were no replies found.

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy