Files
tono/docs/nodes/Draw Mask.md
2026-03-30 23:10:42 -07:00

29 lines
1.1 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Draw Mask
Paint a binary mask directly over an image preview. Pen size controls newly drawn strokes, the Clear Mask button removes all strokes, and invert flips the final binary output.
## Inputs
| Name | Type | Required | Description |
|------|------|----------|-------------|
| field | DATA_FIELD | Yes | Background field whose dimensions define the mask size |
## Outputs
| Name | Type | Description |
|------|------|-------------|
| mask | IMAGE | Binary mask image (painted regions = white, background = black, or inverted) |
## Controls
| Name | Type | Default | Description |
|------|------|---------|-------------|
| pen_size | INT | 12 | Brush diameter in pixels for newly drawn strokes (1128) |
| invert | BOOLEAN | False | When enabled, swaps painted and unpainted regions |
| clear_mask | BUTTON | — | Clears all painted strokes |
## Limitations
- Strokes are stored as path data; very long painting sessions with many strokes may accumulate large state.
- The mask resolution matches the input field resolution and cannot be changed independently.