Trim comp to longest layer script?

What type of scripts do you need?

Moderator: byronnash

Post Reply
fiveshorts
Posts: 5
Joined: July 10th, 2007, 10:48 am

Hi.

I'm trying to solve this, but just tying my feeble, designer brain in knots...
It's got to be pretty simple, I'm sure:

1. Open comp
2. Identify longest layer (time)
3. Set Work Area to longest layer
4. trim comp to work area
5. Close comp

Any help greatly appreciated :-)
nab
Posts: 203
Joined: November 29th, 2005, 3:00 am
Location: Royan
Contact:

Hi fiveshorts,
I thought it was easy but for some unknown reasons I can't get it to work properly...maybe other enhancers will take look at it.
- you have to close the "timeline frame" (otherwise only the current comp is updated)..
- error occurred if some layers have been shifted beyond the comp duration

here is my test code (ae7), select comps in the project panel and execute the following script:

http://www.nabscripts.com/Forum/Scripts ... rkArea.jsx
fiveshorts
Posts: 5
Joined: July 10th, 2007, 10:48 am

Thanks nab,

It's foxing me too, not that I'm any sort of coder — just trying to script as many annoying, repetitive tasks as possible...

I'm happy for it to be an 'in-comp' script, ie. to only be applicable to an open, active comp, if that's easier?

Let's see if anyone else can shed some light.

thanks again.
fiveshorts
Posts: 5
Joined: July 10th, 2007, 10:48 am

Your script is determining the correct duration of the work area at least... when all layers are inside end point. I couldn't work that one out. Now to get it to see beyond the end, extend the comp duration to the last out point and trim the comp accordingly...
nab
Posts: 203
Joined: November 29th, 2005, 3:00 am
Location: Royan
Contact:

for further reference...
I noticed Jeff also experienced odd behavior with the workAreaDuration attribute in his rd_RenderLayers.jsx
http://www.redefinery.com/ae/view.php?i ... nderLayers
Look into the code to see how he fixed the problem ( "- 0.001" stuff)
Post Reply