FORUMS: list search recent posts

Script to import footage's folder in a Composition.

COW Forums : Adobe After Effects

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Dario De Angelis
Script to import footage's folder in a Composition.
on Sep 28, 2016 at 1:26:53 pm
Last Edited By Dario De Angelis on Sep 28, 2016 at 1:27:17 pm

Hi guys, I was trying (helping with some past thread) to write a script to import an entire folder's footage in my composition, but for now i'm only be able to import a single file in my project (and not in composition), can someone help me?

This is the code that I wrote:

var path = "D:/MYFILEPATH/MYFILE.MOV";
var io = new ImportOptions(File(path));
var proj = app.project;
proj.importFile(io)


How can I convert this to import all folder's file and insert it in a specified Comp?


Return to posts index

Walter Soyka
Re: Script to import footage's folder in a Composition.
on Sep 28, 2016 at 2:08:30 pm

What's your familiarity with scripting?

Your code imports only a single file, D:/MYFILEPATH/MYFILE.MOV, because that's all that you specify.

Without writing the code, here's a rough list of the steps you have to take:
- Select a folder
- Get a list of all the files in the folder
- Step through the list and import each file into the project, saving a list of the project items you import
- Create or locate a comp
- Add new layers to the comp using the list of new project items as the sources

Walter Soyka
Designer & Mad Scientist at Keen Live [link]
Motion Graphics, Widescreen Events, Presentation Design, and Consulting
@keenlive [twitter]   |   RenderBreak [blog]   |   Profile [LinkedIn]


Return to posts index

Dario De Angelis
Re: Script to import footage's folder in a Composition.
on Sep 28, 2016 at 2:37:23 pm

Not so much familiarity, i'm trying in these day to experiment with expressions and scripts.

I know that my code imports only a single file, but I don't know how to change the path to import all folder files (if I don't write "MYFILE.MOV" at the end of the path, it give me path's error).

I will try to follow your instruction.


Return to posts index


Walter Soyka
Re: Script to import footage's folder in a Composition.
on Sep 28, 2016 at 2:55:49 pm

[Dario De Angelis] "Not so much familiarity, i'm trying in these day to experiment with expressions and scripts."

The CS6 scripting guide is a tremendous resource:
http://www.adobe.com/devnet/aftereffects.html

For your specific task here, take a look at the "Smart Import.jsx" script that ships with After Effects.

Walter Soyka
Designer & Mad Scientist at Keen Live [link]
Motion Graphics, Widescreen Events, Presentation Design, and Consulting
@keenlive [twitter]   |   RenderBreak [blog]   |   Profile [LinkedIn]


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2019 CreativeCOW.net All Rights Reserved
[TOP]