It’s tedious trimming the length of a comp to the length of a layer, particularly if the layer extends past the beginning or end of a comp.
My first ever After Effects script makes it much easier.
Trimming comps is tedious, and if you have nested comps that you also want to extend, you have to walk your way down them all to adjust their length, and into their nested comps and so on. Apart from being soo duuull, it’s super easy to miss a nested layer somewhere, leading to unexpectedly disappearing layers.
So this is a tool that lets you do several things:
- choose a layer or several, and then trim the comp to the last out-point and/or the first in-point of the layers.
- For layers that are media layers (movie files etc.) you can trim to the full source length,
- trim the start or end of the comp to the current time with one click
- Extend any layers that currently go to the beginning / end of the comp so that they extend to the new beginning / end
- Recurse into nested comps, extending or trimming them, so that they match the new length
One thing that it doesn’t do, because extendscript doesn’t have the capability is to zoom out the time view to the length of the newly extended comp. So if you click the button, and it looks like nothing happened, try zooming out your timeline.
Installation
Click the image to download and unzip the zip archive
Install as you would any other After Effects script.
If you have a recent version of After Effects use the File>Scripts>Install Script UI Panel menu, and after Effects will automatically put it in the right place.
Otherwise, on a PC move to the After Effects folder in the ScriptUI Panels subfolder. That’s usually:
C:\Program Files\Adobe AfterEffects <version>\Support files\scripts\ScriptUI Panels\
On a Mac it’s in the After Effects Folder in the subfolder:
/Applications/Adobe AfterEffects <version>/scripts/ScriptUI Panels/.
Delia
Hi!
I am extremely interested in your FirstNLast script; unfortunately, the download link seems to be dead 🙁 Would you mind updating the link on your site or alternately sending me a download link? I would greatly appreciate it.
Also, you have a beautifully designed site.
Thank you!
stib
Fixed the link. Hope it’s useful. There may be some bugs with the recursion function.
stib
Update: I fixed the bugs.
All the scripts – blob
[…] first-n-last.jsx – trims the comp to the first and / or last layers, selected layers, or the current playhead position. Also lets you recursively trim and extend nested layers in a comp at the same time. […]
Rich
Update trying to use on AE 2020, bug comes up – “Unable to execute script at line 179. Invalid image data.”
Gram
same here. really hope this guy’s still around
Pi
I had a similar error message, in line 179, but fixed by manually copying the UI image source folder that comes in the download with the .jsx into C:/Users/(name)/AppData/Roaming/Adobe/After Effects/(AEversion)/Scripts/ScriptUI Panels/
ole
I just installed the script on 23.6.0 and it works without a hitch.
Stib, I’d love to buy you a beer for this. Where in Oz are you based?
Pi
Super! Thanks so much for making this, it works great and saves a lot of time.