use_tool
Draws or selects in Aseprite by applying a chosen tool along given points, with options for color, brush, layer, frame, and opacity.
Instructions
Draws with an Aseprite tool as if the user dragged through 'points' (app.useTool). Tools: pencil, brush-like strokes with eraser/spray/blur/jumble, line, curve (4 points), rectangle, filled_rectangle, ellipse, filled_ellipse, paint_bucket (1 point), gradient, contour, polygon, and selection tools (rectangular_marquee, elliptical_marquee, lasso, polygonal_lasso, magic_wand).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ink | No | ||
| save | No | Batch mode: write changes back to the sprite file (default true) | |
| tool | Yes | ||
| brush | No | Brush: built-in shape and size, or a custom image brush | |
| color | No | Default: foreground color | |
| 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. | |
| button | No | right uses the background color | |
| points | Yes | ||
| 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} | |
| opacity | No | ||
| brushSize | No | ||
| tolerance | No | ||
| contiguous | No | ||
| tilemapMode | No | ||
| tilesetMode | No | ||
| pixelPerfect | No | ||
| selectionMode | No |