Trim Comp to Contents is Zack Lovatt’s After Effects script for adjusting a composition’s duration to the in and out points of its layers. It can shorten or lengthen the comp without changing the layers’ timing relative to one another.
Layers that begin before the composition or extend past its end can also set the new bounds. By default, all layers count, including locked ones.
Layer selection and composition timing options
Trim to Alluses all layers, or only selected layers when turned off.Ignore Locked Layersexcludes locked layers from the calculation.Crop Nested Compsruns through nested comps and trims them too.Preserve Comp Start Timewhen enabled, keeps the comp’s nonzero start point when its duration changes.
Use it when a comp’s duration no longer fits its contents or when you want to remove extra time before or after the layer range. The aescripts listing names After Effects releases from CS4 through 2026 and provides the product’s compatibility and licensing details.




