Layers
layerManage sprite layers with operations like create, rename, delete, reorder, group, merge, duplicate, and set properties. Supports batch operations for efficient rig building.
Instructions
Manage layers. Ops: 'list', 'create', 'rename', 'delete', 'reorder', 'set' (visibility/opacity/blend/lock), 'group', 'ungroup', 'merge', 'duplicate', 'activate'. Pass batch to run several in one undoable action — building a rig in one call is the normal use. A character that will be animated wants its parts on separate layers (head, torso, arm-far, arm-near, leg-far, leg-near) before any frames exist; splitting baked pixels apart later is far more work.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| op | No | Single operation. Use `batch` instead for several. | |
| name | No | ||
| batch | No | Operations applied in order, in one undoable action. Same shape as the single-op arguments. | |
| index | No | Target stack position for 'reorder'; 0 is bottom. | |
| names | No | For 'merge' and bulk 'group'. | |
| parent | No | Group layer to nest under. | |
| 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. | |
| newName | No | ||
| opacity | No | ||
| visible | No | ||
| editable | No | ||
| blendMode | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| layers | No | ||
| sprite | Yes | ||
| applied | No | ||
| activeLayer | No |