add_expression_control
Adds a slider/checkbox/color/point/angle/layer expression control to a layer, optionally sets its value, and auto-links target property expressions for rigging.
Instructions
Add an expression control effect (Slider / Checkbox / Color / Point / 3D Point / Angle / Layer) to a layer — the backbone of a rig. Optionally rename it (name — this also becomes the effect("...") accessor name), set its initial value (value), and AUTO-LINK it: pass linkTo {layer, prop} to point that property's expression at this control. The link is force-evaluated and its expressionError is returned inline (empty string = it evaluated cleanly). The link target must be in the same comp as the control for it to resolve. Returns { effectName, type, valueStream, valueSet, linkedTo, expression, expressionError, linkEnabled }.
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": {
"layer": "<layer>",
"type": "<type>"
},
"name": "add_expression_control"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| comp | No | Comp: name (string), or { id: N } for duplicate-name-safe stable-id addressing. Defaults to active comp. | |
| name | No | Rename the control effect. Also becomes the name used in the auto-link accessor (effect("<name>")). | |
| type | Yes | Which control effect to add. | |
| layer | Yes | Layer: name (string), 1-based index (integer), or { id: N } for duplicate-name-safe stable-id addressing. | |
| value | No | Initial value for the control's value stream: number (slider/angle), 0|1 or boolean (checkbox), [r,g,b,a] 0..1 (color), [x,y] (point), [x,y,z] (point3d), 1-based layer index (layer). | |
| linkTo | No | Optional. Target property whose expression will be set to reference this control. Must be in the same comp as the control. | |
| instance | No | Target a specific AE when more than one is connected (e.g. "2026", "2025", or a major like "26"). Omit when only one AE is open — see list_instances. |