How to add all comps to another comp ?

Find out why the . goes before the /

Moderator: Paul Tuersley

Post Reply
Red_Fox
Posts: 3
Joined: April 22nd, 2008, 4:22 am

Pliz , help me
how to do it using script ?

Thx!
Attachments
pix1.png
pix1.png (44.65 KiB) Viewed 8180 times
User avatar
lloydalvarez
Enhancement master
Posts: 460
Joined: June 17th, 2004, 9:27 am
Location: New York City, NY
Contact:

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
Red_Fox
Posts: 3
Joined: April 22nd, 2008, 4:22 am

Very Thx! :)
Post Reply