set_pixels
Paint many pixels at once in an Aseprite canvas using x/y/color batches, applying them as one atomic undo step and returning modified count, bounds, and optional preview.
Instructions
PRIMARY DRAWING TOOL: Paints tens to thousands of pixels in a single batch operation and single atomic undo step. Returns modified count, affected bounding box, and optional updated preview.
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": {
"pixels": "<pixels>"
},
"name": "set_pixels"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pixels | Yes | Batch of pixel coordinates and hex colors to paint | |
| layerName | No | Optional target layer name (defaults to active layer) | |
| layerIndex | No | Optional target layer index | |
| frameNumber | No | Target frame number (1-indexed, defaults to active frame) | |
| previewScale | No | Scale factor for returnPreview (default 1x) | |
| returnPreview | No | When true, returns updated PNG image content in the same response |