-
Import multiple files and create a comp for each one
Hi, I’m new to scripting in After Effects and I have a little problem.
It’s possible to import multiple files at the same time and create a comp for each one?
What i have it’s great but only for one file and I need to import different files and create a different comp for each one. Also, the number of files to be imported is always different.
Do you have any ideas?
This is the code I have right now:var myfile = app.project.importFileWithDialog(); //the file is stored in array index 1//Get file Attributes and set them to variables
var myfileWidth = myfile[0].width;
var myfileHeight = myfile[0].height;
var myfileFrameRate = myfile[0].pixelAspect;
var myfileFrameRate = myfile[0].duration;
var myfileFrameRate = myfile[0].frameRate;
var myfileName = myfile[0].name;//Create comp with attributes of the file
var myComp = app.project.items.addComp( myfile[0].name, myfile[0].width, myfile[0].height, myfile[0].pixelAspect,myfile[0].duration,myfile[0].frameRate);