Free, open-source 3D sculpting for Linux, macOS and Windows: dense meshes, remeshing, painting, built-in AI (image/text to 3D), Send to Unreal, game-ready LODs, Gaussian splats and OpenUSD.
C++ 3d3d-sculptingcppdear-imguidigital-sculptingfbxgame-developmentgaussian-splattinggltfimage-to-3dmcpopenglopenusdsculptingtext-to-3dunreal-engine
Stroke popup: hide the brush ring under it, canvas drag in the UI test, shortcuts table, REPORT
islandmed5482e8e4d6c9
diff --git a/REPORT.md b/REPORT.mdnew file mode 100644index 00000000..2efea608--- /dev/null+++ b/REPORT.md@@ -0,0 +1,24 @@+# REPORT: feat/stroke-popup (Discord 11-02 stroke-type popup), 0.10.9++## What+- **Stroke popup**: action `stroke.popup`. Key G in the ZBrush, SculptForge and Maya styles, J in Blender (its G is the Move brush). Also a new left-shelf button under the Stroke tile; layout version 4 adds it to stored layouts.+- A plain 5x2 grid at the cursor (not a pie ring). It opens with the current stroke under the pointer. Top row: the 5 stroke types. Bottom row: Add, Sub, Smooth, Mask, Select, with key hints (Alt / Shift / Ctrl / Ctrl+Shift) and a help line on hover.+- Hold the key, point, let go: picked (a hovering pen works the same). Tap the key: the grid stays open; clicking a stroke picks it and closes, clicking a modifier toggles it and stays open. Esc or a click beside the grid closes it. The click is swallowed and never reaches the model.+- Smooth, Mask and Select latch: `inputMods()` adds Shift / Ctrl / Ctrl+Shift until the same item is picked again or another brush is picked. A "Mask" etc. label shows next to the cursor. Navigation uses the new `inputMods(false)`, so a background drag still orbits: the onMouseDown `nav` branches, orbit snap / roll / alt-pan, Gizmo snap and hover, Kelvinlet capture.+- Core logic, unit-tested: src/core/StrokePopup.{h,cpp} (geometry, hit-test, latch rules). App side: src/app/StrokePopup.cpp. The shelf tile's stroke drawing was refactored into `drawStrokeIcon`.+- "Remember last choice": the grid opens on the current stroke. Persistence is left to fix/inbox-0107's per-brush settings (#78), which already store the stroke per brush, so I dropped my project-file field to avoid two stores fighting.+- Docs: CHANGELOG [Unreleased], whats-new.md "## Version 0.10.9" bullet (rename as needed when merging), sculpting.md "The stroke popup" section, shortcuts.md regenerated (ui_guide_shortcuts passed locally).++## Tests+- New: tests/test_stroke_popup.cpp, tests/test_shell_layout.cpp `shell_left_shelf_stroke_popup`, tests/ui/stroke_popup.sfui, plus `ui_stroke_popup_scaled` (2400x1350, 1.5x UI). New UI-test verb `stroke_popup_item ITEM [click] [pen]` and probes stroke_popup_*, stroke_latch, invert_toggle.+- Ran locally: build green; ui_guide_shortcuts passed. ui_stroke_popup and ui_stroke_popup_scaled passed through line 78: hold/let go, beside/cancel, tap+click, modifiers, the latched Mask stroke masking with moved == 0, and a background drag not inverting the mask.+- The rest of the UI script has NOT run locally. The failure at 79/84 was the test's `drag` verb (a UI drag, so ImGui kept the mouse and swallowed the next key); it's now `view_drag`. The full ctest and the new unit tests have not run locally (queue stopped by the new plan). CI and the merger's combined ctest are the check.+- Screenshots checked at 1x and 1.5x (build/ui-shots/stroke_popup*/). Fixed after looking: the brush ring drew over the popup; it's now hidden while the popup is open.++## Merge notes+- fix/windows-pen-ui conflicts in App.h / Tablet.cpp: it splits `keyMods()` out of `inputMods()`. Resolve as `inputMods(bool latch)` = keyMods() + pen buttons + my latch block at the end; keep both declarations.+- fix/inbox-0107 and feat/view-gizmo-size: no conflicts with this branch (their whats_new.sfui conflict is with main). No branch binds G or J.+- UiLayout version 4: if another branch also bumps the layout version, take the higher number and keep both migrations.++## Files for Tony+REPLY.md: Discord reply draft, no signature. TESTERS.md: #testers checklist (Windows tablets first).diff --git a/docs/guide/shortcuts.md b/docs/guide/shortcuts.mdindex 55e3d1b9..72c57392 100644--- a/docs/guide/shortcuts.md+++ b/docs/guide/shortcuts.md@@ -132,6 +132,7 @@ generated from SculptForge's action registry, the same source as the Controls wi| Action | Keys | What it does ||---|---|---|| Lazy Stroke | <kbd>L</kbd> | Lazy Stroke on or off: the brush trails the cursor on a string, for steady lines. |+| Stroke popup | <kbd>G</kbd> | A grid at the cursor with the stroke types and the modifiers (Add / Sub, Smooth, Mask, Select). Hold the key, point at one and let go; or tap the key and click. Smooth, Mask and Select stay on without holding Shift or Ctrl, until you pick them again or another brush. |### Tooldiff --git a/src/app/App.cpp b/src/app/App.cppindex 11be67f0..cac3b44a 100644--- a/src/app/App.cpp+++ b/src/app/App.cpp@@ -2318,7 +2318,7 @@ void App::drawUi() {const bool ringOff = gizmoActive() || (guidesMode_ && !(inputMods() & SDL_KMOD_SHIFT)) || sculptableHot() || zsphereActive() ||uvToolActive();if (((!ImGui::GetIO().WantCaptureMouse && canvasRect().contains(mouse.x, mouse.y)) || drag_ == Drag::Stroke) &&- !hideBrushCursor_ && radial_.menu < 0 && drag_ != Drag::Select && drag_ != Drag::Guide && // (no ring under a pie)+ !hideBrushCursor_ && radial_.menu < 0 && !strokePopup_.open && drag_ != Drag::Select && drag_ != Drag::Guide && // (no ring under a pie or the stroke popup)(!ringOff || drag_ == Drag::Stroke || ctrlDown(inputMods())))drawBrushCursor();drawSelectionOverlay();diff --git a/tests/ui/stroke_popup.sfui b/tests/ui/stroke_popup.sfuiindex 40d21263..7bfa4d57 100644--- a/tests/ui/stroke_popup.sfui+++ b/tests/ui/stroke_popup.sfui@@ -73,10 +73,11 @@ expect_value masked > 50expect_value moved == 0remember masked m# A drag beside the model turns the view (a held Ctrl would invert the mask there instead).-remember camera_yaw yaw-drag 0.8 0.25 0.85 0.3+expect_value camera_aligned == 1+view_drag 0.65 0.22 0.7 0.27expect_value masked == $m-expect_value camera_yaw != $yaw+expect_value camera_aligned == 0+camera 0 0# Picked again: off. Add back on; a stroke sculpts again.key g