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).
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"compIndex": "<compIndex>",
"layerIndex": "<layerIndex>",
"propertyName": "<propertyName>",
"expressionString": "<expressionString>"
},
"name": "setLayerExpression"
}
}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. |