animation_setKeyframe
Set a keyframe value on any Moho layer animation channel at a specified frame. Supports numbers for rotation, opacity, shear and {x, y} objects for translation, scale.
Instructions
Set a keyframe value on an animation channel. For vec2 channels (translation, scale), pass value as {x, y}. For scalar channels (rotation, opacity, shear), pass a number.
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>",
"channel": "<channel>",
"frame": "<frame>",
"value": "<value>"
},
"name": "animation_setKeyframe"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| frame | Yes | The frame number to set the keyframe at | |
| value | Yes | The keyframe value — number for scalar channels, {x, y} for vec2 channels | |
| channel | Yes | The animation channel name (e.g. "translation", "rotation", "scale", "opacity", "shear") | |
| layerId | Yes | The numeric ID of the layer |