Page 1 of 1

Is this possible?

Posted: January 4th, 2013, 10:47 am
by scribling
Could a script do this?

Open a template file; (/path/to/file/template.aet)
select "Footage" in project window;
open "replace footage" dialog (wait for user assisted file selection);
copy name of selected footage;
open comp A;
select "Footage"
(or select all, with all other layers locked to get only the desired layer)
find outpoint;
set work area;
trim comp to work area;
open comp B;
trim comp to work area;
open comp C;
trim ...;
open comp D;
trim ...;

select "Project name comp" in project window;
rename to (clipboard contents)
save project as ...
(quit script)

We do this umpteen times per show. It'd be great if we could script some of this.

Thanks in advance.

Re: Is this possible?

Posted: January 4th, 2013, 12:28 pm
by Klustre
I don't see anything extremely hard going on. Should even be quite a simple script. The only thing that stands out is the "open replace footage dialog", you would have to do this with a file browser, since you can't open the actual dialog.

Re: Is this possible?

Posted: January 7th, 2013, 8:32 am
by drockne
Sounds very possible. I've written a script that does something very similar, only with an XML input instead of a user controlled dialog. The only thing I'm not certain about is finding the out point of footage to trim your comp. Also if you're doing a source replace on footage, won't it trim your footage to the length of what you're replacing?

Best of luck and let us know how it goes!

Re: Is this possible?

Posted: January 7th, 2013, 9:23 am
by Klustre
The footage does get trimmed, but you can easily trim the comp by reading the footage duration with .outPoint (or .duration if the footage starts at 0) and then set the comp's .duration to it. Page 92 and 31 (of the AE CS6 Scripting Guide), respectively.

Re: Is this possible?

Posted: January 7th, 2013, 12:15 pm
by scribling
Can I take a look at your code and what you've done with the xml? I can edit and alter scripts to do what I need I just don't know where to begin.

Thanks