This-n-that – a selection tool

A little time spent on a jig makes the whole job much easier later on.

So here’s a little jig that helps with the sometimes tedious task of selecting layers and keyframes. I often work with comps that have hundreds or even thousands of layers (I wish AE could do instancing like 3D apps do) and even just scrolling to the bottom of the timeline window can take ages, so the job of selecting say, every third layer can fill up an afternoon.

This script lets you select / deselect layers or keyframes with the option to skip any number, starting from an optional start point. You can also use the logic to create more complex patterns.

The layers / keyframes radio buttons determine what will be selected. Keyframes are selected only on selected properties, so you do have to have some keyframes selected to use this mode.

the Select & Deselect buttons determine whether you’re going to be selecting or deselecting things. Note that in the set mode the deselect button will still select things—if you have no layers selected and you choose deselect every 3rd layer starting from 1 it will select layers 2 and 3 and deselect 1 and 4, etc.

Select every controls the selection skipping. You can set it to 1 to select every layer or keyframe. Starting from is the first layer to select. So to select layers 1, 3, 5, 7.… choose select every 2nd layer starting from 1.

Logic controls how it deals with previously selected things. You can use this to build complex selection patterns, if you really have nothing better to do.

  • set: override the current selection—select only if the layer / key is in the new selection set, deselect if it isn’t
  • and (intersect): select/deselect only from selected layers—if the layer is selected and it’s in the new selection
  • or (add): add to any selected layers—if the layer is selected or it’s one of the new selection
  • xor (difference): like difference mode, this mode will select any non selected layers and deselect any selected ones—if the layer is selected or it’s in the new selection, but not both.
  • count selected only. This is like and but counting only the selected ones. Say you want every second layer of the layers you currently have selected.

The random checkbox makes the count random. So if you want to randomly select exactly one third of your layers you’d choose select every 3rd starting from 1, and click this box. Layers before the starting from layer won’t be selected.


You can download this script along with all my other scripts here. Or to download just this script click the download button below.


Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.