FORUMS: list search recent posts

Change multiple comps duration script

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Marcelo Schiavon
Change multiple comps duration script
on Apr 27, 2013 at 8:45:40 pm

Hi, first of all, thanks for all the help that you've provided already. But now I'm registering to the forums and making my first post because it seems that this was not asked before. Maybe it's too simple but god knows I googled and googled with no good enough results.

I want to create a simple expression that would allow me to add a specific amount of frames to the selected comps.
I need to add frames to some of the pre-comps on my projects.
Is this doable?

Thanks.
Marcel.


Return to posts index

Dan Ebberts
Re: Change multiple comps duration script
on Apr 27, 2013 at 9:14:45 pm

>Is this doable?

Not with an expression, but a small script like this should work:


{
var numFrames = 10; // number of frames to add
var selectedComps = app.project.selection;
var curComp;
for (var i = 0; i < selectedComps.length; i++){
if (selectedComps[0] instanceof CompItem){
curComp = selectedComps[i];
curComp.duration += numFrames*curComp.frameDuration;
}
}
}



Dan



Return to posts index

Marcelo Schiavon
Re: Change multiple comps duration script
on Apr 27, 2013 at 9:41:14 pm

thanks a lot but I'm sorry but it doesnt seem to work.

I changed the "numFrames" value to a 100 but it does not add any duration to the selected pre-comps.


Return to posts index


Marcelo Schiavon
Re: Change multiple comps duration script
on Apr 27, 2013 at 9:44:30 pm

Dan! my bad! it does work perfectly fine! i was selecting the comps from the timeline and not from the project panel. Thanks a lot!!


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2017 CreativeCOW.net All Rights Reserved
[TOP]