Center layers in comp
center_layersCenters selected layers' visible content horizontally, vertically, or both in a composition, using measured bounds so rotated and 3D layers align by their actual content.
Instructions
Center layers' visible content in the composition, horizontally, vertically or both. 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": "center_layers"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| axis | No | x = horizontal only, y = vertical only (default both). | |
| 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'. |