setLayerExpression
Set or remove After Effects layer property expressions (e.g., Position, Opacity) by specifying composition, layer, property, and expression string. Automate animations without manual keyframing.
Instructions
Set or remove an expression for a specific layer property.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| compIndex | Yes | 1-based index of the target composition in the project panel. | |
| layerIndex | Yes | 1-based index of the target layer within the composition. | |
| propertyName | Yes | Name of the property to apply the expression to (e.g., 'Position', 'Scale', 'Rotation', 'Opacity'). | |
| expressionString | Yes | The JavaScript expression string. Provide an empty string ("") to remove the expression. |