pencil2d_add_frame
Add or replace a keyframe image in a Pencil2D bitmap layer, optionally positioning it or supplying base64 image data.
Instructions
Add or replace a keyframe image in a Pencil2D project bitmap layer.
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": {
"project_path": "<project_path>",
"frame": "<frame>"
},
"name": "pencil2d_add_frame"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| frame | Yes | Keyframe number (1-based index). | |
| image_path | No | Absolute path to a PNG/JPEG image file to insert. | |
| layer_name | No | Name or ID of the bitmap layer (defaults to first bitmap layer). | |
| top_left_x | No | Canvas X offset (default centers image: -width/2). | |
| top_left_y | No | Canvas Y offset (default centers image: -height/2). | |
| base64_data | No | Optional base64-encoded image data (if image_path is not used). | |
| project_path | Yes | Path to the .pclx file. |