setLayerExpression
Set or remove an After Effects expression on a layer property (Position, Scale, Rotation, or Opacity) to control animation like wiggle motion; pass an empty string to clear it.
Instructions
Set or remove an After Effects expression on a layer property (e.g. wiggle(2,20) for gentle handheld motion).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| compIndex | Yes | 1-based index of the composition in the Project panel (see getProjectInfo / listCompositions). | |
| layerIndex | Yes | 1-based index of the layer within the composition. | |
| propertyName | Yes | Property: 'Position', 'Scale', 'Rotation' or 'Opacity'. | |
| expressionString | Yes | The expression. Use "" to remove it. |