Page 1 of 1

How to add all comps to another comp ?

Posted: April 22nd, 2008, 4:36 am
by Red_Fox
Pliz , help me
how to do it using script ?

Thx!

Re: How to add all comps to another comp ?

Posted: April 24th, 2008, 6:51 am
by lloydalvarez
Hey Red_Fox,

This script should do what you want.. there is no error correction so you might need to add that. Note that you will need to select the Comps themselves, not their enclosing folders.

Code: Select all

var selItems = app.project.selection;
var newComp= app.project.items.addComp(selItems[0].name,selItems[0].width, selItems[0].height,selItems[0].pixelAspect,selItems[0].duration,selItems[0].frameRate);//make new comp based on 1st item settings
for (i=0; i <= selItems.length-1; i++) {  //loop throught the selected items
newComp.layers.add(selItems[i]);  add each item to the newly created comp
}


-Lloyd

Re: How to add all comps to another comp ?

Posted: April 25th, 2008, 12:59 am
by Red_Fox
Very Thx! :)