Selection
selectRead or change the active selection to scope drawing, transforms, and recoloring. Supports rectangle, ellipse, color match, invert, grow, shrink, and combine modes.
Instructions
Read or change the active selection. Ops: 'get', 'none', 'all', 'rect', 'ellipse', 'color' (select every pixel matching a colour), 'invert', 'grow', 'shrink'. A selection scopes draw, transform and recolor, which is usually cheaper and safer than masking by hand.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| op | Yes | ||
| mode | No | How this selection combines with the existing one. | replace |
| rect | No | ||
| color | No | For op 'color'. | |
| frame | No | 1-based frame number. Omit to use the active frame. | |
| layer | No | Layer name. Omit to use the active layer. | |
| amount | No | Pixels, for grow/shrink. | |
| 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. | |
| tolerance | No | ||
| contiguous | No | For op 'color'. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| empty | Yes | ||
| bounds | No | ||
| sprite | Yes | ||
| pixelCount | Yes |