set-layer-parent
Set or clear a layer's parent within its composition to inherit position, rotation, and scale. Specify target and parent layers, or clear existing parent.
Instructions
Set (or clear) a layer's parent within its composition - the standard After Effects parent/child rig, where the child inherits the parent's position/rotation/scale. Select the target layer and, to set a parent, the parent layer; to remove an existing parent instead, set clearParent to true (parentLayerIndex/parentLayerName are then ignored).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| compName | No | Composition name (or active comp if omitted). | |
| compIndex | No | 1-based comp index, if compName is omitted. | |
| layerName | No | Name of the layer to parent (alternative to layerIndex). | |
| layerIndex | No | 1-based index of the layer to parent. | |
| clearParent | No | Remove the layer's existing parent instead of setting a new one. | |
| parentLayerName | No | Name of the layer to parent to (alternative to parentLayerIndex). | |
| parentLayerIndex | No | 1-based index of the layer to parent to. |