Animatic

After Effects
April 4, 2025

/*
Sequences selected image layers in the order they are selected,
sets each layer to last one second, and arranges them sequentially
in the After Effects timeline.
Script by Jack Vaughan (jackvaughan.com/tools)
*/

(function() {
   var comp = app.project.activeItem;
   if (!(comp && comp instanceof CompItem)) {
       alert("Please select an active composition.");
       return;
   }

   var selectedLayers = comp.selectedLayers;
   if (selectedLayers.length === 0) {
       alert("No layers selected.");
       return;
   }

   app.beginUndoGroup("Sequence Layers");

   // Sort layers by index ascending to match selection order
   selectedLayers.sort(function(a, b) {
       return a.index - b.index;
   });

   var currentTime = 0;
   var duration = 1; // one second

   for (var i = 0; i < selectedLayers.length; i++) {
       var layer = selectedLayers[i];
       layer.startTime = currentTime;
       layer.outPoint = currentTime + duration;
       currentTime += duration;
   }

   app.endUndoGroup();
})();

How to use the script

Always check code before running it on your computer. Even basic scripts like this one. If you’re not a developer, ask an LLM like ChatGPT, Claude, or Gemini to verify it for you.

Option 1: Install to your AE Folder

Download and install the below .jsx file in your After Effects Script folder. You can then run it using the scripts menu, or by using a launcher like Quick Menu 3.

Option 2: Adapt the script yourself

Alternatively copy the code below and develop your own version. If you’re not a developer you can do this easily with an LLM like ChatGPT.

How to use the script

Always check code before running it on your computer. Even basic scripts like this one. If you’re not a developer, ask an LLM like ChatGPT, Claude, or Gemini to verify it for you.

Option 1: Install to your AE Folder

Download and install the below .jsx file in your After Effects Script folder. You can then run it using the scripts menu, or by using a launcher like Quick Menu 3.

Option 2: Adapt the script yourself

Alternatively copy the code below and develop your own version. If you’re not a developer you can do this easily with an LLM like ChatGPT.

Research, interviews, and tools for modern motion designers.

Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.