Skip to content

Paint tool Properties parity: brush, alpha, stencil and material tabs - #863

Draft
Rebornim wants to merge 5 commits into
storytold:mainfrom
Rebornim:feat/brush-props-pass
Draft

Rebornim wants to merge 5 commits into
storytold:mainfrom
Rebornim:feat/brush-props-pass

Conversation

@Rebornim

@Rebornim Rebornim commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

Draft: the snapshot harness, the live brush preview, the one-page layout with jump tabs and the Brush section's bands are in. Pen pressure on Size can now be switched off. Left: the rest of the #862 checklist (Alpha/Stencil/Material sections, stencil on every paint tool, hint lines, popup, Lazy mouse out of Properties), their tests, and the screenshots.

Closes #862.

What this does

Brings the whole Paint tool Properties, and the viewport right-click popup that shows the same panel, to the property-sheet layout the rest of Properties uses: jump tabs (Brush · Alpha · Stencil · Material, Grayscale on a mask) inside one scrolling panel, reference names and order, tooltips instead of hint lines. Same settings keep giving the same pixels; saved projects and brush presets open unchanged.

Commits

  • Snapshot the paint tool's Properties tabs, the mask Grayscale tab and the right-click popup: an ignored capture test (paint_tool_properties_snapshots in crates/ui-egui/tests/ui_snapshots.rs) so the before/after pictures come from the same harness.

  • Paint the brush preview with the current brush's own stamps: the stroke at the top of the panel was a flat line that followed only size, flow and opacity; it now lays down the brush's stamps (alpha, hardness, spacing, flow, angle, follow path, jitters) in the colour the tool paints (or the mask's gray) along a hand-drawn gesture that starts light and presses harder, so Minimum Size shows as a thinner start, as pen pressure does on the model; the sphere takes the tool's metallic and roughness. The picture is cached and rendered again only when the brush, its colours or the panel size change. Tests: brush_stroke_preview::tests (spacing leaves gaps, a softer brush lays down less paint, a bigger brush paints wider, a lower Minimum Size thins the stroke's start).

  • Lay out the paint tool's Properties as one page under jump tabs: Brush, Alpha and Material (Grayscale on a mask) were pages behind icon buttons, one at a time; they are now sections of one scrolling page with the fill Properties' jump tabs on the top strip (docked panel and right-click popup). The Projection tool's stencil moves into its own Stencil section. Rows inside the sections are unchanged in this commit. Tests: paint_tool_tabs (the tabs jump within one page and light the section in view; the Stencil tab on Projection).

  • Lay out the paint tool's Brush section in the reference's bands: Size (Size, Minimum Size, Spacing), Opacity (Flow, Stroke opacity), Orientation (the brush's own stamp on a dial beside Angle, Follow Path switch), Jitter (a strip of the brush's dabs scattered by its jitters above the four sliders) and Projection (Alignment with a picture per mode, Backface culling with its Angle fade greyed while culling is off, Size Space Object | Viewport, Stamp depth) as property-sheet bands, each with its own reset; Particles and Lazy mouse stay as folded bands. Brush presets open from the Brush caption's menu button. Spacing moves from the flow group to Size and screen-space size to Projection, as the reference groups them. Tests: brush_section_reset (each band's reset puts back only its own fields, now in the new grouping), brush_pictures::tests (the stamp turns with Angle, each jitter changes the strip).

  • Turn pen pressure on Size on and off from the Size row: BrushSettings::size_pressure (serde default on, so brushes saved before it keep following the pen and old projects paint the same). Off, a light pen paints at full size in the 3D and 2D views; tool.brush takes and reports sizePressure. The Size band's three rows keep a pen button slot at their end so the values line up; Minimum Size greys while pressure is off; the brush preview's pen taper shows only while it is on. Tests: brush::tests (off keeps a light pen at full size; settings saved without the field load with pressure on), uv_strokes::a_light_pen_paints_at_full_size_with_size_pressure_off, size_pressure (the button flips the setting and greys Minimum Size), brush_stroke_preview::tests::without_size_pressure_the_stroke_keeps_its_width, brush_section_reset (Size's reset includes the switch).

What ran

  • cargo check -p texturecraft-ui-egui --tests (local).
  • The snapshot test on a GitHub runner (job=snapshots) to produce the before pictures.
  • cargo test -p texturecraft-ui-egui --lib on a GitHub runner (texturecraft-builds job=test, Rust 1.96.0): 487 passed.
  • cargo test -p texturecraft-ui-egui --test it on a GitHub runner: 907 passed and the one failure fixed after (paint_tool_tabs rerun green).
  • Brush bands commit: cargo test -p texturecraft-ui-egui on a GitHub runner: lib 490 passed; it 903 passed, 5 failed from tests that read the old layout (fixed test-side: the popup's Size slider, the export menu's slider, the shelf's big-preview check, the band resets), then those files rerun green (34 passed).
  • Size pressure commit, on GitHub runners: -p texturecraft-paint --lib brush 14 passed; -p texturecraft-engine --test it uv_strokes 7 passed; -p texturecraft-ui-egui --lib preview 54 passed; -p texturecraft-ui-egui --test it (size_pressure, brush_section_reset, properties_popup, paint_tool_tabs, alpha_parameters) 23 passed.
  • Not run yet: fork CI, clippy, panic_hunt.

Overlaps

#492 and #505 (test-bit-sys), #736 and #654 / #661 / #662 / #653 / #806 / #648 (vangel76): see #862.

@coderabbitai

coderabbitai Bot commented Nov 26, 2026

Copy link
Copy Markdown
Contributor

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

CodeRabbit Verify

  • Run CodeRabbit Verify to test the changes in this pull request.

@autocraft-bot autocraft-bot Bot added the infra Tests, CI, docs, build, packaging, tooling label Nov 26, 2026
@Rebornim
Rebornim force-pushed the feat/brush-props-pass branch 6 times, most recently from c77faa0 to 326ada7 Compare November 26, 2026 22:58
The stroke at the top of the paint tool's properties was a flat line that only followed size, flow and
opacity. It now lays down the brush's stamps (alpha, hardness, spacing, flow, angle, follow path and the
jitters) in the colour the tool paints, or the mask's gray, and the sphere takes the tool's metallic and
roughness. The picture is rendered again only when the brush, its colours or the panel size change.
The tool's Brush, Alpha and Material (Grayscale on a mask) were three
pages behind icon buttons, one shown at a time. They are now sections of
one scrolling page, with the same jump tabs on the panel's top strip as a
fill's Properties: a tab scrolls to its section, and the section in view
lights its tab, in the docked panel and the right-click popup. The
Projection tool's stencil moves from above the tabs into its own Stencil
section. The rows inside the sections are unchanged for now.
@Rebornim
Rebornim force-pushed the feat/brush-props-pass branch from 326ada7 to 3823b3c Compare November 26, 2026 23:06
Size (Size, Minimum Size, Spacing), Opacity (Flow, Stroke opacity),
Orientation (the brush's stamp on a dial beside Angle, Follow Path),
Jitter (a strip of jittered dabs above the four jitters) and Projection
(Alignment with a picture per mode, Backface culling with its Angle
fade, Size Space, Stamp depth) as property-sheet bands, each with its
own reset. Brush presets open from the Brush caption's menu button.
Particles and Lazy mouse stay, folded.
@Rebornim
Rebornim force-pushed the feat/brush-props-pass branch from abb8bd5 to 8b731b7 Compare November 26, 2026 23:36
BrushSettings gains size_pressure (on by default and for brushes saved
before it existed, so old projects paint as before). Off, a light pen
paints at full size in both views; tool.brush takes and reports
sizePressure. The Size band's rows keep a pen button slot, Minimum Size
greys while pressure is off, and the brush preview drops its pen taper.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

infra Tests, CI, docs, build, packaging, tooling

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Paint tool Properties parity: brush, alpha, stencil and material tabs

1 participant