Activity › Forums › Adobe After Effects › How to import footage into After Effects from a script?
-
How to import footage into After Effects from a script?
Posted by Mario Gomes on December 29, 2011 at 1:44 amHi,
I need to write a jsx script that imports footage into an after effects project. I can’t find any information about this. Anyone knows how this can be done?
Thanks
Hayden Klabunde replied 11 years, 1 month ago 4 Members · 3 Replies -
3 Replies
-
John Cuevas
December 29, 2011 at 4:48 amI don’t write scripts, but the first place I would check is the expressions forum here and wait for Dan Ebberts to reply.
He also has some scripting stuff on his webpage:
https://www.motionscript.com/Finally there is a 5 part tutorial on AE tuts you might want to check out:
https://ae.tutsplus.com/tutorials/workflow/introduction-to-writing-scripts-for-ae-expressions-day-1/
Johnny Cuevas, Editor
Thinkck.com“I have not failed 700 times. I have succeeded in proving that those 700 ways will not work. When I have eliminated the ways that will not work, I will find the way that will work.”
—THOMAS EDISON on inventing the light bulb. -
Kaspar Gio
June 21, 2013 at 10:14 amFor my own script I imported multiple tiff-sequences with this:
var path = "~insert your filepath here ~";var io = new ImportOptions(File(path));
if (io.canImportAs(ImportAsType.FOOTAGE));
io.importAs = ImportAsType.FOOTAGE;// if your footage is an image-sequence:
io.sequence = true;
io.forceAlphabetical = true;tiffseq = app.project.importFile(io);
tiffseq.name = 'My automatically imported foorage";theComp = app.project.activeItem; //currently selected composition(example)
theComp.layers.add(tiffseq);Hope it helps!
Layout/compositor for Animation show.
-
Hayden Klabunde
April 1, 2015 at 7:50 pmHello:
I’ve used your script and was able to import a single image and import an image sequence. Is it possible to import an image sequence using file names within an array?(The files are contained within the same folder and I need to call the files multiple times.)var myFileArray= new Array(“file.ext”,”file.ext”,”file.ext”);
var path = “~/Desktop/Folder/”(myFileArray);
var io = new ImportOptions(File(path));if (io.canImportAs(ImportAsType.FOOTAGE));
io.importAs = ImportAsType.FOOTAGE;
io.sequence = true;
io.forceAlphabetical = false;
tiffseq = app.project.importFile(io);
tiffseq.name = “File Name”;alert(“Image Import Complete”);
Reply to this Discussion! Login or Sign Up