Quantcast
Channel: Adobe Community : Unanswered Discussions - After Effects
Viewing all articles
Browse latest Browse all 30854

Can someone assist me with this AE script?

$
0
0

I came across this script, which extends the layer selection to the top layers.   It works great!..  but  Is it possible to modify this such that its reversed?  To extend the selection to the bottom layer in the comp?

 

I've been trying to modify this myself without success,.

 

Thanks for any help

 

Jeff

 

 

 

var activeItem = app.project.activeItem;

if (activeItem != null && activeItem instanceof CompItem) {

   if (activeItem.selectedLayers.length > 0) {

      var selectedIndex = activeItem.selectedLayers[0].index-1;

      while (selectedIndex > 0) {

         activeItem.layer(selectedIndex).selected = true;

         selectedIndex --;

      }

   }

}


Viewing all articles
Browse latest Browse all 30854

Trending Articles