FORUMS: list search recent posts

Recursive compo length

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
camille lymer
Recursive compo length
on Jun 22, 2014 at 11:55:32 am

Hello there for my first post on this forum.
I try to set the duration of a compo and all of its layers. i want to do same things for all nested sub-compo (recursive).
When i run this script, After effect just freeze!

Reccursive_fit_length = function(Compo,T)
var tgt_AE = ((T+1)/25); //convert time for AE (Divide per FPS)
Compo.duration = tgt_AE; //change duration of the compo
if (Compo.layers.length >= 1)
for (i=1;i&lt;=(Compo.layers.length);i++) //for all layers
var lay = Compo.layers[i];
if (lay.source instanceof CompItem){Reccursive_fit_length((lay.source),T)}//if we have a sub-compo, do the same (recursive)
lay.outPoint = tgt_AE; //set layers to the same duration
}//end loop layers
}//end if at least one layer
}//end fn

Return to posts index

Benoit Kergosien
Re: Recursive compo length
on Jun 22, 2014 at 2:51:38 pm

Hello Camille,

Did you try the script rd: Composition Setter by Jeff Almasol?


Return to posts index

camille lymer
Re: Recursive compo length
on Jun 22, 2014 at 3:52:37 pm

great, It do the job!!

Return to posts index

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