un pre-compose
đź§© Overview
UnPre-Comp is a professional After Effects script that performs the reverse operation of Pre-compose:
it extracts all layers from a precomposition and places them back into the parent composition, preserving their original properties, timing, and appearance.
It’s designed to give users precise control over how precomposed layers are unpacked, maintaining layer hierarchy, effects, masks, and transform attributes.
⚙️ Main Features
1. Interactive Dialog Interface
The script opens a simple, clean dialog window.
From here, the user can configure how the un-precompose operation behaves:
- “Keep precomp attributes (transform, effects, etc.)”
- When enabled, the script copies all key transforms, effects, masks, styles, and other properties from the layers inside the precomp to the newly created layers in the parent comp.
- OK / Cancel Buttons
- Start or cancel the operation. The process is wrapped in a full undo group for safety.
đź§ Smart Automation
🔹 Automatic Detection
Before running, the script validates:
- That there’s an active composition open.
- That at least one layer is selected.
- That each selected layer is a precomposition (a layer whose source is a CompItem).
If these checks fail, clear alerts are shown to guide the user.
🔹 Automatic Layer Extraction
For each selected precomp layer:
- The script iterates through all layers inside the precomposition, from bottom to top.
- For each internal layer:
- It creates a duplicate of the layer’s source directly inside the parent comp.
- Sets its startTime, inPoint, and outPoint relative to the original precomp’s placement in the timeline.
- If the “Keep attributes” option is enabled, it clones:
- Transform properties (Position, Scale, Rotation, Opacity, etc.)
- Masks
- Effects and their keyframes
- Layer styles (e.g., drop shadows, strokes)
- Parenting relationships
- Time remapping
- Blending modes
- Each restored layer is inserted just before the original precomp layer to maintain visual stacking order.
- After all layers are recreated, the precomp layer is removed.
Finally, a completion alert confirms: “Extraction completed.”
đź§® Processing Logic
🔹 Step-by-step Workflow
- The user selects one or more precomp layers in the timeline.
- The script reads the source of each selected layer (precompLayer.source).
- It iterates through all layers inside the precomposition.
- For each internal layer:
- A corresponding layer is created in the parent comp.
- Timing and keyframes are adjusted relative to the original precomp layer’s position in time.
- Optionally, attributes are copied for visual consistency.
- The original precomp layer is deleted once its contents are fully extracted.
The entire process runs inside a single undo group, allowing the user to revert the operation with one Ctrl+Z (or Cmd+Z) if needed.
đź§± Compatibility
- Requires: Adobe After Effects 2020 or newer.
- Fully compatible with: Adobe After Effects 2025.
- Tested for both 2D and 3D layers, text layers, shape layers, and footage layers.