setLayerExpression
Set, update, or clear expressions on a layer property to automate animation and dynamic values in Adobe After Effects.
Instructions
Add, modify, or remove an expression on a layer property
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": {
"propertyName": "<propertyName>",
"expression": "<expression>"
},
"name": "setLayerExpression"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| enabled | No | Whether the expression is enabled (default: true) | |
| compName | No | Composition name | |
| layerName | No | Layer name | |
| expression | Yes | Expression string (e.g. "wiggle(2, 20)"), or null/empty string to remove expression | |
| layerIndex | No | Layer index | |
| propertyName | Yes | Property name (e.g. "Position", "Opacity", "Rotation") |