Layer Selection Array
  • I'm trying to get my script to select all of the layers in an active comp. My current code selects the last layer because I'm using numLayers to find how many layers there are in the comp. From here I would like to store an array of layer indexes and then use the array to go into the selected layer properties to find out which layers have position keyframes and then deselect the layers that have no keyframes. 

    This is my current function. If there's a better way I'm all ears. I should also add that I do not want to have to manually select the layers before running the script. Thanks

    var activeItemLayers = app.project.activeItem.numLayers;
                
                function onBtnClick()
                {
                    var myLayer = app.project.activeItem.layer(activeItemLayers);
                    myLayer.selected = true;
                   
                 }


This discussion has been closed.
All Discussions