set_keyframe
Creates editable OpenToonz keyframes for layers, pegs, or cameras at a specified frame, setting position, rotation, scale, depth, and interpolation.
Instructions
Keyframe a layer, peg, or 'camera' (real OpenToonz keys, editable in GUI Function Editor). x/y: px offset from rest (+y down). rotation: deg CCW. scale*: 1.0=100%. z: depth. interp (segment starting at this key): ease | linear | constant | speed | exp. Camera: scale<1 zooms IN; use exp interp for trucks (natural zoom).
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": {
"scene": "<scene>",
"target": "<target>",
"frame": "<frame>"
},
"name": "set_keyframe"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| x | No | ||
| y | No | ||
| z | No | ||
| frame | Yes | ||
| scale | No | ||
| scene | Yes | ||
| interp | No | ease | |
| target | Yes | ||
| scale_x | No | ||
| scale_y | No | ||
| rotation | No |