pre-compose pro script
đź§© Overview
Pre-Compose Pro is an advanced automation script for Adobe After Effects designed to enhance and streamline the native Pre-compose function.
It gives users more control over how layers are precomposed, adds trimming options, batch processing, localization, and saves user preferences for future sessions.
⚙️ Main Features
1. Interactive Dialog Interface
The script displays a modern dialog box that allows users to fully customize how precomposition is performed:
- New composition name — editable field for naming the new precomp.
- Main options:
- Leave all attributes in the current composition
- Keeps effects and transformations in the main comp (like AE’s native “Leave all attributes” option).
- Move all attributes into the new composition
- Moves all effects, masks, and transformations inside the precomp.
- Additional options:
- Pre-compose each selected layer (Batch mode)
- Creates a separate precomp for each selected layer automatically.
- Use existing layer names for new compositions
- Assigns the same name as the layer to each new precomp.
- Trim new composition to the combined layers’ duration
- Automatically adjusts the new comp length to match the duration range of the selected layers.
- Trim handles (Head / Tail)
- Adds extra time before and after the trimmed range, in seconds.
đź§ Smart Features
🗣️ Automatic Localization
The script automatically detects the user’s After Effects interface language and translates all UI text, tooltips, and messages accordingly.
Supported languages:
- English (en)
- Spanish (es)
- French (fr)
- Italian (it)
- German (de)
- Portuguese (pt)
đź§° Automatic Validation
Before running, the script checks:
- That there’s an active composition open.
- That at least one layer is selected.
- If the selected layer has no source footage, the script disables incompatible options.
- It also displays localized alert messages when requirements are not met.
đź§® How It Works
🔹 Standard Mode
When one or more layers are selected:
- The script collects the layer indices and calculates their combined in/out times.
- It determines the earliest start and latest end points.
- Executes comp.layers.precompose() with the selected option (move attributes or leave them).
- If trimming is enabled:
- The new comp duration is automatically adjusted to match the layer range plus optional handles.
- The resulting precomp layer’s in/out points are corrected accordingly.
- Handles time-stretching correctly (including negative stretch values).
🔹 Batch Mode
When “Pre-compose each selected layer” is enabled:
- The script runs the precompose process individually for every selected layer.
- Optionally uses each layer’s name as the new precomp’s name.
- Great for quickly organizing large projects with multiple precomps.
đź§± Compatibility
- Requires: Adobe After Effects 2020 or newer.
- Fully compatible with: Adobe After Effects 2025.
- The script automatically checks the app version before execution.