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

Dave LaRonde
Re: Script to import footage's folder in a Composition.
on Sep 28, 2016 at 1:39:57 pm

A question: how would you determine the layer order in the comp for these files once imported, how would you designate comp length and frame rate, and how would you specify 2D / 3D?

Dave LaRonde
Promotion Producer
KGAN (CBS) & KFXA (Fox) Cedar Rapids, IA


Return to posts index

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

I don't need to determine the order; the lenght and the framerate are pre-set (the footages are some shots of football players on green screen).

I only need to know if there is an expression/script that, in case, I could apply to display or not the layers if their filename match with text.


What I would do is to create a template where I only need to put the file in my directory and write the filename on my text layer to display it.
(Now I used to apply to every footage an opacity's expressions to display it in case the name match)

So I thinked to this solution.


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 >>
© 2017 CreativeCOW.net All Rights Reserved
[TOP]