erase_region
Clears all pixels inside a rectangular area on a layer across selected frames, making them transparent (or opaque black on background layers). Use it to remove unwanted sprite regions in batch.
Instructions
Make the pixels of a layer inside rect transparent in each of the frames.
On the background layer, which cannot be transparent, they turn opaque black. Cel content beyond the canvas edge inside rect is erased too. Frames where the layer has no cel are skipped and counted. Linked cels in other frames keep their pixels.
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": {
"path": "<path>",
"layer": "<layer>",
"rect": "<rect>"
},
"name": "erase_region"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Sprite file. Relative paths resolve against the server root. | |
| rect | Yes | Canvas rectangle to clear | |
| layer | Yes | Layer name, or a 'group/child' path for nested layers | |
| frames | No | Frames: a number, "1-4", "1-4,7" or "all" (1-based) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||