ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Sequence Layers with script

COW Forums : Adobe After Effects

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Dan ThomasSequence Layers with script
by on May 8, 2013 at 4:12:09 am

Through jsx scripting, I would like to select some layers in a comp, and sequence them. Manually, this is done by clicking Animation -> Keyframe Assistant -> Sequence Layers. Is there a way to do this through jsx scripting? Thanks!

Return to posts index

Ridley WalkerRe: Sequence Layers with script
by on May 8, 2013 at 5:16:19 am

You might like to look at these 2 scripts:

Return to posts index

John CuevasRe: Sequence Layers with script
by on May 8, 2013 at 1:39:29 pm

Videocopilot had a free seequencer script that you can find in the project files of the 103. 3D Ball Dispersion tutorial.

Johnny Cuevas, Editor

"I have not failed 700 times. I have succeeded in proving that those 700 ways will not work. When I have eliminated the ways that will not work, I will find the way that will work."
---THOMAS EDISON on inventing the light bulb.

Return to posts index

Dan ThomasRe: Sequence Layers with script
by on May 9, 2013 at 11:38:28 pm

Thanks John, from that I was able to do what I wanted. Here is what I ended up with for anyone else who needs it:

var frameRate = 30;
var maxDuration = 10;
var maxWidth = 760;
var maxHeight = 500;
var pixelAspect = 1;
theComp = app.project.items.addComp("out_test", maxWidth, maxHeight, pixelAspect, maxDuration, frameRate);

var comp_folder = findFolder (findFolder(app.project, "scenes"), "my_folder")

comp0 = findItem(comp_folder,"comp0")
comp1 = findItem(comp_folder,"comp1")


var duration = 0;
for (var i = 1; i var thisLayerLen = theComp.layer(i).outPoint
theComp.layer(i).startTime = duration
duration = duration + thisLayerLen
theComp.duration = duration

function findFolder (object, name){
var items = object.items
for (var i = 1; i < items.length; i++){
if ((items[i].name == name ) && (items[i] instanceof FolderItem)){
return items[i]

//Finds an item inside of a folder
function findItem( object, item){
items = object.items
for (var i = 1; i < items.length + 1; i++){
if (items[i].name == item){
return items[i]

Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2017 All Rights Reserved