-
add a definied comp in another comp with javascript
Hi every one
I wrote a script where I create a new comp, then I want to import a definied comp in this new one, but I can’t find the way to do this.
myProject = app.project;
myProject.items.addComp("surComp",1920,1080,1,15,25);var myComp = new Array();
for (i=1; i <= myProject.numItems; i++)
{
if (myProject.item(i).name == "Comp 1")
{ myCompNum = i - 1;
}
}for (i=1; i <= myProject.numItems; i++)
{
if (myProject.item(i).name == "surComp")
{
myProject.item(i).openInViewer();
//Add "Comp 1" as layer in this new Comp ???
}
}Can you help me ??
Thank you so much
PH…