setLayerExpression
Set a JavaScript expression on an After Effects layer property by composition and layer indices; pass an empty string to remove it.
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": {
"compIndex": "<compIndex>",
"layerIndex": "<layerIndex>",
"propertyName": "<propertyName>",
"expressionString": "<expressionString>"
},
"name": "setLayerExpression"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| compIndex | Yes | Composition index (1-based) | |
| layerIndex | Yes | Layer index (1-based) | |
| propertyName | Yes | Property name | |
| expressionString | Yes | Expression code (empty string to remove) |