Skip to content

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.

Mask display toggle: its help and the status bar say a hidden mask still masks (#43)

islandmed94e61fd2ad6d
diff --git a/docs/guide/shortcuts.md b/docs/guide/shortcuts.md
index 3b1e1bb2..af09427c 100644
--- a/docs/guide/shortcuts.md
+++ b/docs/guide/shortcuts.md
@@ -100,7 +100,7 @@ action registry, the same source as the Controls window.
| Action | Keys | What it does |
|---|---|---|
| Fullscreen | <kbd>F11</kbd> | Fill the screen with SculptForge (again: back to a window). |
-| Mask | <kbd>Ctrl</kbd>+<kbd>H</kbd> | Darken masked areas. |
+| Mask | <kbd>Ctrl</kbd>+<kbd>H</kbd> | Show or hide the mask (masked areas drawn darker). Hiding it keeps the mask: masked areas stay protected from brushes until you clear it. |
| Wireframe | <kbd>Shift</kbd>+<kbd>F</kbd> | Show the mesh's polygons (quads and triangles) over the surface (ZBrush PolyFrame). |
### Script
diff --git a/src/app/Shell.cpp b/src/app/Shell.cpp
index cde291db..5f5760b2 100644
--- a/src/app/Shell.cpp
+++ b/src/app/Shell.cpp
@@ -406,7 +406,17 @@ void App::registerShellActions() {
"Polyframe: show the polygons of the active SubTool (Shift+F).");
flag("view.polygroups", "Groups", ICON_LC_SHAPES, "Render", "", &renderSettings_.showPolygroups,
"Colour each polygroup of the active SubTool.");
- flag("view.mask", "Mask", ICON_LC_DROPLET, "Render", "", &renderSettings_.showMask, "Darken masked areas.");
+ flag("view.mask", "Mask", ICON_LC_DROPLET, "Render", "", &renderSettings_.showMask,
+ "Show or hide the mask (masked areas drawn darker). Hiding it keeps the mask: masked areas stay protected "
+ "from brushes until you clear it.");
+ if (const Action* shown = actions_.find("view.mask")) { // say so, since a hidden mask still protects (#43)
+ Action a = *shown;
+ a.run = [this] {
+ renderSettings_.showMask = !renderSettings_.showMask;
+ status_ = renderSettings_.showMask ? "Mask shown" : "Mask hidden (still masking; Clear Mask removes it)";
+ };
+ actions_.add(std::move(a));
+ }
flag("view.polypaint", "Paint", ICON_LC_PALETTE, "Render", "", &renderSettings_.showPolypaint,
"Show polypaint colours (off: plain material).");
// Shading (Material palette, Tool > Display): the scene's, and the active SubTool's own.