Layers
layerSeparate character parts onto distinct Aseprite layers with create, rename, reorder, group, merge, and batch operations to prepare for animation.
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 | Array of operation objects, each shaped like the single-op arguments. Applied in order. | |
| 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 | Sprite filename or id. 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 |