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.

Blender input style: Ctrl+Shift hides and cuts again (Cut shapes from the brush tile / Ctrl+Shift+B); Ctrl still inverts (thanks dm4nd on Discord)

islandmedc01825d4a4d7
diff --git a/changes/fix-cut-blender-keys.md b/changes/fix-cut-blender-keys.md
new file mode 100644
index 00000000..40909197
--- /dev/null
+++ b/changes/fix-cut-blender-keys.md
@@ -0,0 +1,10 @@
+---
+whats_new: **Blender keys**: Ctrl+Shift hides and cuts again, and Ctrl+Shift+click on the brush tile (or Ctrl+Shift+B) offers the Cut shapes.
+fixed: Blender input style: Ctrl+Shift did nothing on the model (Ctrl is Blender's invert, so Ctrl+Shift became an
+ inverted smooth), so the Cut shapes and the Ctrl+Shift hide/isolate gestures were out of reach. Ctrl+Shift now keeps
+ its meaning in every style (drag: hide or cut; add Alt: inside / the other side; Ctrl+Shift+click the brush tile or
+ Ctrl+Shift+B: the selection and Cut shapes). Ctrl alone still inverts, Shift alone still smooths (thanks dm4nd on Discord).
+testers:
+ - Any OS, Edit > Preferences > Input > Style: Blender. Hold Ctrl+Shift and click the brush tile: pick Cut Rectangle,
+ Ctrl+Shift+drag across the model: a hole, one Ctrl+Z undoes it. Pick Select Rectangle again: Ctrl+Shift+drag hides outside.
+---
diff --git a/docs/guide/cut.md b/docs/guide/cut.md
index 8c170702..a48d9cfc 100644
--- a/docs/guide/cut.md
+++ b/docs/guide/cut.md
@@ -19,6 +19,9 @@ shape next to **Select Rectangle** and **Select Lasso**, or use the shape button
While a Cut shape is picked, <kbd>Ctrl</kbd>+<kbd>Shift</kbd> cuts instead of hiding; pick **Select Rectangle**
or **Select Lasso** again to hide parts of the model.
+The keys are the same in every input style, the [Blender style](shortcuts.md#blender-keys) too: there
+<kbd>Ctrl</kbd> alone inverts the brush, but <kbd>Ctrl</kbd>+<kbd>Shift</kbd> still picks, hides and cuts.
+
## Pick a mode
**Tool > Cut** has four modes:
diff --git a/docs/guide/shortcuts.md b/docs/guide/shortcuts.md
index 93b1ab11..3d55c69d 100644
--- a/docs/guide/shortcuts.md
+++ b/docs/guide/shortcuts.md
@@ -356,6 +356,7 @@ change in the Blender style:
| Clay Strips (Clay Block), Crease, Tendril, Scrape (Flatten) | <kbd>C</kbd>, <kbd>Shift</kbd>+<kbd>C</kbd>, <kbd>K</kbd>, <kbd>Shift</kbd>+<kbd>T</kbd> |
| Mask brush | <kbd>M</kbd>, then drag to mask and <kbd>Ctrl</kbd>+drag to unmask; <kbd>M</kbd> again goes back to your brush |
| Clear / invert the mask | <kbd>Alt</kbd>+<kbd>M</kbd> / <kbd>Ctrl</kbd>+<kbd>I</kbd> |
+| Hide or cut with a rectangle or lasso | <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+drag, as in the other styles (add <kbd>Alt</kbd>: inside); <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+click the brush tile or <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>B</kbd> picks the shape, a [Cut](cut.md) shape too |
| Hide the face group under the cursor | <kbd>H</kbd>; <kbd>Shift</kbd>+<kbd>H</kbd> shows only it (again: everything); <kbd>Alt</kbd>+<kbd>H</kbd> shows everything |
| Lower / higher subdivision level | <kbd>Alt</kbd>+<kbd>1</kbd> / <kbd>Alt</kbd>+<kbd>2</kbd> (<kbd>Shift</kbd>+<kbd>D</kbd> / <kbd>D</kbd> still work) |
| Swap colours / sample colour | <kbd>X</kbd> / <kbd>Shift</kbd>+<kbd>X</kbd> |
diff --git a/src/app/App.cpp b/src/app/App.cpp
index 37958502..75124941 100644
--- a/src/app/App.cpp
+++ b/src/app/App.cpp
@@ -1901,6 +1901,8 @@ bool App::blenderNavigationDown(Uint8 button) {
const SDL_Keymod keys = SDL_GetModState(); // the keyboard itself: blenderMods turns Ctrl into the invert
// Alt+left: Blender 5.1+ masks with it on the model (blenderMods, #77); beside the model, or always with
// Preferences > Input > Emulate 3 Button Mouse, it is the emulated middle button.
+ // Ctrl+Shift+Alt+left is the hide-inside / cut-the-other-side gesture (blenderMods), not the emulated button.
+ if (button == SDL_BUTTON_LEFT && ctrlDown(keys) && (keys & SDL_KMOD_SHIFT) && !uiPrefs_.emulate3Button) return false;
RayHit hit;
const bool emulated = button == SDL_BUTTON_LEFT && (keys & SDL_KMOD_ALT) &&
(uiPrefs_.emulate3Button || (keys & SDL_KMOD_SHIFT) || previewLod_ >= 0 ||
diff --git a/src/app/Config.cpp b/src/app/Config.cpp
index 93af069a..3c0b65b5 100644
--- a/src/app/Config.cpp
+++ b/src/app/Config.cpp
@@ -341,6 +341,9 @@ constexpr Gesture kBlenderGestures[] = {
{"Paint mask", "M for the Mask brush, then drag (Ctrl+drag unmasks); M again goes back"},
{"Invert / clear mask", "Ctrl+I / Alt+M"},
{"Hide face group", "H over it (Shift+H: show only it, again: everything; Alt+H shows all)"},
+ {"Hide outside a rectangle or lasso", "Ctrl+Shift + drag (add Alt: inside; shape in Tool > Visibility); click: "
+ "isolate the face group, the background shows all"},
+ {"Cut", "Pick a Cut shape (Ctrl+Shift + click the brush tile, or Ctrl+Shift+B), then Ctrl+Shift + drag"},
{"Brush radius / strength", "F / Shift+F, then drag or type a number"},
{"Help on any control", "Hold Ctrl and point at it (Ctrl+Alt: scripting parameters)"},
{"Assign a shortcut", "Ctrl+Alt + click any button, then press the key"},
diff --git a/src/app/Input.cpp b/src/app/Input.cpp
index f6a6bcd7..f1e3b0d4 100644
--- a/src/app/Input.cpp
+++ b/src/app/Input.cpp
@@ -469,6 +469,13 @@ SDL_Keymod App::blenderMods(SDL_Keymod keyboard) const {
// With Emulate 3 Button Mouse, Alt is the emulated middle button and means nothing here.
SDL_Keymod out = keyboard & SDL_KMOD_SHIFT;
const bool ctrl = (keyboard & (SDL_KMOD_CTRL | SDL_KMOD_GUI)) != 0;
+ // Ctrl+Shift stays itself: the visibility gestures, the Cut shapes and the selection brushes (Ctrl+Shift+B, the
+ // brush tile), as in every style; Alt with it hides inside / cuts the other side (Discord, dm4nd).
+ if (ctrl && (keyboard & SDL_KMOD_SHIFT)) {
+ out = SDL_Keymod(SDL_KMOD_LCTRL | SDL_KMOD_LSHIFT);
+ if ((keyboard & SDL_KMOD_ALT) && !uiPrefs_.emulate3Button) out = SDL_Keymod(out | SDL_KMOD_LALT);
+ return out;
+ }
if ((keyboard & SDL_KMOD_ALT) && !uiPrefs_.emulate3Button) {
out = SDL_KMOD_LCTRL; // the mask brush Ctrl (not with Shift: that would hide)
if (ctrl) out = SDL_Keymod(out | SDL_KMOD_LALT); // ... unmasking Ctrl+Alt
diff --git a/tests/ui/blender_keys.sfui b/tests/ui/blender_keys.sfui
index 31969dae..bf6d036e 100644
--- a/tests/ui/blender_keys.sfui
+++ b/tests/ui/blender_keys.sfui
@@ -227,6 +227,48 @@ mouse_move 0.5 0.3
key shift+h
expect_value hidden == 0
+# Ctrl+Shift keeps the visibility gestures and the Cut shapes (Discord, dm4nd: Ctrl was the invert, so Ctrl+Shift
+# smoothed inverted and nothing hid or cut): drag hides outside, Alt inside.
+hold ctrl+shift
+drag_path 0.4 0.2 0.6 0.4
+hold none
+wait 0.2
+expect_value hidden > 0
+key alt+h
+expect_value hidden == 0
+hold ctrl+shift+alt
+drag_path 0.4 0.2 0.6 0.4
+hold none
+wait 0.2
+expect_value hidden > 0
+key alt+h
+expect_value hidden == 0
+# The brush tile with Ctrl+Shift held offers the Cut shapes; Ctrl+Shift+drag cuts, one undo step.
+remember triangles t0
+hold ctrl+shift
+click "##tile.brush"
+wait 0.1
+expect "Cut Rectangle##held.cut.rect"
+click "Cut Rectangle##held.cut.rect"
+hold none
+expect_value hide_shape == 5
+hold ctrl+shift
+drag_path 0.38 0.36 0.62 0.6
+hold none
+wait 0.2
+expect_value triangles != $t0
+expect_value hidden == 0
+shot blender-cut
+key ctrl+z
+expect_value triangles == $t0
+# Ctrl+Shift+B: the same picker from the keyboard; back to Select Rectangle.
+hold ctrl+shift
+key ctrl+shift+b
+wait 0.1
+click "Select Rectangle##held.select.rect"
+hold none
+expect_value hide_shape == 2
+
# --- Alt+1 / Alt+2 step the subdivision levels; X swaps the colours; Shift+Z wireframe ---
run subdiv_divide
expect_value sdiv == 2