Distribute layers
distribute_layersSpace three or more layers evenly along a horizontal or vertical axis while keeping the outermost layers fixed, using equal centers, equal gaps, or a fixed pixel spacing.
Instructions
Space 3+ layers evenly along an axis, keeping the outermost ones in place: by centers (default) or equal gaps; or with an explicit pixel 'spacing' gap starting from the first layer (2+ layers). Bounds = axis-aligned box of the layer's content (sourceRectAtTime) after scale/rotation/parenting, in comp pixels. Rotated layers are aligned by their rotated bounding box. 3D layers are measured through the active camera and moved iteratively (approximate). Animated positions are shifted as a whole (all keyframes). Cameras/lights are not allowed.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "distribute_layers"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| by | No | Equal center distances or equal gaps between boxes (default center). | |
| axis | No | Default horizontal. | |
| comp | No | Composition name, 'Folder/Name' path, or item id. Omit to use the active composition. | |
| time | No | Comp time at which content bounds and transforms are measured (default: current time). | |
| layers | No | Layers: array of layer refs, or 'selected' (default) or 'all'. | |
| spacing | No | Fixed gap in px between consecutive layers' boxes. |