set_expression
Apply expressions to layer properties in After Effects compositions to automate animations and effects. Specify composition ID, layer index, property path, and expression code.
Instructions
Set 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": {
"compId": "<compId>",
"layerIndex": "<layerIndex>",
"propertyPath": "<propertyPath>",
"expression": "<expression>"
},
"name": "set_expression"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| compId | Yes | ID of the composition | |
| layerIndex | Yes | Index of the layer | |
| propertyPath | Yes | Property path (e.g., 'Transform.Position', 'Transform.Scale', 'Effects.Gaussian Blur.Blurriness') | |
| expression | Yes | The expression code to set | |
| enabled | No | Whether the expression should be enabled |