It’s tedious setting the duration of a comp to fit layers that extend past the end or before the beginning, and it would be nice if you didn’t have to do the I-B-O-N + Right-click + Trim Comp To Work Area dance when you want crop a comp’s timespan to fit the length of one layer. So I created a script that does it with one click. It even has a GUI that you can dock somewhere.
My first working extendscript project, complete with A GUI, fancy that!
Download it below, then install it by putting the file in your Script_UI Panels folder which is in the After Effects application folder.
On a Mac it’s in
/Applications/Adobe/Adobe After Effects <version>/Scripts/ScriptUI Panels
on a PC it’s
C:\Program Files\Adobe\Adobe After Effects <version>\Support Files\Scripts\ScriptUI Panels
To use it you go to the After Effects’ Window menu and it should appear in the list down the bottom of that menu (if you have AE running when you install it you’ll need to restart AE). It will initially open as a floating palette – you may want to dock it somewhere.
With the Trim to selected layers checkbox unchecked it will trim the comp’s in or out to the beginning of the first layer, the end of the last layer, or both. If you check the box it will trim the comp’s in-n-out to the selected layers. Really? Did I need to explain that to you? Just hit the buttons like a starving monkey in a lab cage and see what pops out of the chute, that’s what I do.