Set attributes
cavalry_set_attributesSet one or more attribute values on a layer at the current frame without creating keyframes, validating each path before writing to avoid ignored updates.
Instructions
Set one or more attribute values on a layer at the current frame (does not create keyframes). Every path is checked first, because Cavalry silently ignores writes to unknown paths. In 2D, rotate with "rotation.z".
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": {
"layerId": "<layerId>",
"attributes": "<attributes>"
},
"name": "cavalry_set_attributes"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| layerId | Yes | Cavalry layer id, e.g. "basicShape#1". Use cavalry_list_layers to find ids. | |
| attributes | Yes | Map of attribute path to value, e.g. {"position": [100, 200], "rotation.z": 45, "material.materialColor": "#ff4d00"}. | |
| skipValidation | No | Skip the attribute-path check (only for paths the check wrongly rejects). Defaults to false. |