What It Does

pt_CropPrecomps crops nested compositions to match the bounding box of their visible content. This becomes particularly useful when importing Photoshop files into After Effects, where precomps often default to full document size regardless of actual image content.

The script calculates the smallest area that contains visible pixels and resizes the composition accordingly. Bounding boxes match the actual images, making precomp layers easier to position and animate. Reducing processed areas can also speed up rendering.

Key Features

Retain Border option. Expands the crop area beyond the image boundary, preserving space for animation or effects that extend beyond the original content.

Works with 2D layers. Processes text layers, shape layers, and standard footage. Ignores adjustment layers outside composition boundaries but includes layers that are turned off.

Photoshop and Illustrator support. Handles Photoshop files imported using the ‘Cropped Layers’ or ‘Retain Layer Sizes’ option. For Illustrator files, import as layers using ‘Composition, Layer Size’, pre-compose them, then run the script.

Selective cropping. Version 2.1 added the ability to crop only selected precomp layers rather than processing all nested compositions.

Vector mask support. Recognizes Photoshop vector masks when calculating crop boundaries.

Who It’s For

This script was written for screen graphics designer Mark Coleran, whose work appears in films like The Bourne Identity and Tomb Raider. Coleran designs complex user interfaces in Photoshop with many layers nested into groups before importing them into After Effects.

Useful for motion designers working with multi-layered Photoshop files, particularly those creating user interfaces, kinetic graphics, or animations that require precise control over nested composition boundaries.

Pricing

pt_CropPrecomps uses a pay-what-you-want model with a suggested minimum of $9.99. Individual users can pay any amount they choose. Businesses and teams must pay the suggested price to receive a valid license.

Technical Notes

The script is intended for newly imported or created layers. It will not work correctly on layers that have been scaled, rotated, or have position keyframes in After Effects. Only works with 2D layers. Does not support non-square pixel aspect ratios in versions prior to 2.1.