add_layer
Add an image, group, tilemap, or reference layer to an Aseprite sprite, set its properties, and optionally nest it in a group or place it above or below another layer.
Instructions
Adds an image, group or tilemap layer, optionally inside a group or above/below another layer, with its properties set.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| x | No | Position of 'image' | |
| y | No | ||
| data | No | User data text | |
| name | No | ||
| save | No | Batch mode: write changes back to the sprite file (default true) | |
| type | No | ||
| above | No | Place directly above this layer | |
| below | No | Place directly below this layer | |
| color | No | Timeline color | |
| frame | No | Frame for 'image' (default 1) | |
| image | No | Fill the new layer (image or reference) with this image | |
| parent | No | Group layer to move into; '' moves to the top level | |
| sprite | No | File path, open tab title, or sprite id. Defaults to the active sprite (live). Batch mode needs a file path. | |
| backend | No | auto (default): live Aseprite if connected, else headless batch | |
| opacity | No | ||
| visible | No | ||
| editable | No | false locks the layer | |
| tileSize | No | Tilemap layers: tile size | |
| blendMode | No | normal, multiply, screen, overlay, darken, lighten, color_dodge, color_burn, hard_light, soft_light, difference, exclusion, hue, saturation, color, luminosity, addition, subtract, divide | |
| collapsed | No | Group layers only | |
| continuous | No | ||
| properties | No | User-defined properties to set (object.properties) | |
| stackIndex | No | Position among siblings (1 = bottom) |