scatter
Scatter pixels from selected palette indices across a region at a specified density to create deterministic grain and noise textures for stone, dirt, or wood.
Instructions
Randomly scatter pixels from a set of palette indices across a region, at the given coverage density (0-1). For grain and noise: stone, dirt, wood texture. Deterministic for a given seed, so the same call reproduces the same grain. weights biases which indices are picked.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| clip | No | Silently discard out-of-bounds pixels instead of rejecting (default false) | |
| seed | No | RNG seed for reproducibility (default 0) | |
| frame | No | Frame index, 0-based (default: active frame) | |
| layer | No | Layer id or name (default: active layer) | |
| doc_id | Yes | Document id | |
| region | Yes | Region: exactly one of 'rect', 'pixels', or 'selection' | |
| render | No | Include a render of the change (default true) | |
| density | No | Fraction of region pixels to paint (default 0.5) | |
| indices | Yes | Palette indices to scatter (index 0 carves transparent holes) | |
| weights | No | Relative pick weight per index (must match indices length) | |
| ignore_symmetry | No | Skip symmetry mirroring for this call (default false) |