-
how to add a file to a composition ?
This is my first time creating a script for After Effect.
var photosFolder = app.project.importFileWithDialog();var proj = app.project;
var PhotoComp1 = proj.items.addComp("Photo Comp1", 320, 180, 1, 08, 30);
var PhotoComp2 = proj.items.addComp("Photo Comp2", 320, 180, 1, 08, 30);
var PhotoComp3 = proj.items.addComp("Photo Comp3", 320, 180, 1, 08, 30);var newObj = PhotoComp1.layers.add.photosFolder(01.jpg); // my stupid guessing and of course it doesn't work
//importing a folder with a name “Photos”. Inside this “Photos” Folder there are six different pictures with the name 01.jpg until 06.jpg … but these are not a sequenced scenes.
//I want to add 01.jpg and 02.jpg from the “Photos” project bin (after imported to the project) into the Photo Comp1. These two layers need to be in 3D in the timeline, while the 02.jpg Z position is 1.
I’ve been thinking to make a loop three times, so it happen the same for Photo Comp2 with 03.jpg and 04.jpg and for Photo Comp3 with 05.jpg and 06.jpg, but I don’t know how to write the language to do that at all.
After that I will make a New Comp
var MainComp = proj.items.addComp("Main Comp", 1280, 720, 1, 08, 30);Then I want to put the Photo Comp1 into the Main Comp with a keyframe X rotation value = 0 degree at the third second and 180 degree at the fourth second.
Apply Trapcode Echospace to the Photo Comp1 layer. From this part, I’ve been thinking in two way :
A. Save an Animation Presets after I tweak the Echospace control, then call the animation preset via the script.
or
B. Tweak the Echospace control within the script.
This way I think it’s more difficult as I also need to know further what is the script language for putting the value in any of the Echospace control.But to be honest, I’m interested in both ways.
Any kind of help would be greatly appreciated.
Thank you in advanced.
(I’m sorry for my broken English)regards.