set_active
Change the active sprite, layer, frame, foreground/background color, tool, brush, editor zoom, or timeline range in Aseprite, mainly in live mode.
Instructions
Changes what is active in the UI: sprite/layer/frame, foreground/background color, tool, brush, editor zoom, and the timeline range (selected frames/layers/colors). Mostly useful in live mode.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tool | No | Tool id, e.g. pencil, eraser, paint_bucket, rectangular_marquee | |
| zoom | No | Editor zoom factor (1 = 100%) | |
| brush | No | Brush: built-in shape and size, or a custom image brush | |
| frame | No | 1-based frame number. Defaults to the active frame (or 1). | |
| layer | No | Layer name, 'Group/Child' path, or 1-based index from get_sprite_info. Defaults to the active layer. | |
| range | No | Timeline/palette selection (live only) | |
| 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 | |
| bgColor | No | '#rrggbb', '#rrggbbaa', a name, a palette index, or {r,g,b,a} / {h,s,v,a} / {h,s,l,a} / {gray,a} | |
| fgColor | No | '#rrggbb', '#rrggbbaa', a name, a palette index, or {r,g,b,a} / {h,s,v,a} / {h,s,l,a} / {gray,a} |