Manage sprites
sprite_manageManage sprites in Aseprite by opening, creating, focusing, resizing, saving, and closing them. Also list open documents and adjust sprite properties.
Instructions
Open, create, focus, resize, save and close sprites in the running Aseprite session. Ops: 'list' (open documents), 'new', 'open', 'activate', 'save', 'save_as', 'close', 'resize_canvas', 'set_properties'. Canvas resize keeps existing pixels — pass an anchor to say where they land.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| op | Yes | ||
| path | No | File path for 'open' and 'save_as'. | |
| force | No | Allow 'close' to discard unsaved changes. Ask the user before setting this. | |
| width | No | ||
| anchor | No | Where existing pixels sit after 'resize_canvas'. | center |
| height | No | ||
| sprite | No | Which sprite: its id as '#7' (what every result reports back, and the only unambiguous form — two unsaved documents are both called 'Sprite'), its filename, or its display name. Omit to use the sprite Aseprite has focused. | |
| colorMode | No | For 'new'. Indexed keeps a sprite honest about its palette. | |
| pixelAspect | No | e.g. '1:1' or '1:2'. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | No | Stable id of the affected document; pass it back as '#<id>'. | |
| op | Yes | ||
| path | No | ||
| width | No | ||
| height | No | ||
| sprite | No | ||
| sprites | No |