move_region
Moves or copies a rectangular block of pixels within an Aseprite sprite by a given offset, optionally placing it on another layer or frame and clipping off-canvas pixels.
Instructions
Move (or with copy, duplicate) the pixels of a layer inside rect by (dx, dy).
rect is in canvas coordinates and is clipped to the canvas first; outside its cel the layer counts as transparent. The source area is cleared unless copy is true, then the block is drawn at the destination, so overlapping moves work. Pixels whose destination is off the canvas are dropped and counted in clipped. With target_layer or target_frame the block lands there (the cel is created or grown as needed). Indexed and grayscale pixel values are copied as they are. A background layer stays opaque: its cleared source turns black and a block from another layer is blended onto it. Linked cels get their own copy first, so other frames never change.
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>",
"dx": "<dx>",
"dy": "<dy>"
},
"name": "move_region"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dx | Yes | Pixels to move by; negative goes left or up | |
| dy | Yes | Pixels to move by; negative goes left or up | |
| copy | No | Leave the source pixels where they are | |
| path | Yes | Sprite file. Relative paths resolve against the server root. | |
| rect | Yes | Canvas rectangle to move | |
| blend | No | false: the moved block replaces what is under it, transparent pixels included; true: it is alpha-blended over it | |
| frame | No | 1-based frame number | |
| layer | Yes | Layer name, or a 'group/child' path for nested layers | |
| target_frame | No | Frame to put the pixels in; default the same frame | |
| target_layer | No | Layer to put the pixels on; default the same layer |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||