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.

Cut: own row in the Ctrl+Shift picker (4 wide), two-row shape buttons, shorter hint; cut_tool.sfui releases the drag, Duplicate Part checked first

islandmed3247831a6535
diff --git a/src/app/I18nSpanish.cpp b/src/app/I18nSpanish.cpp
index ad84e033..41f5bf3d 100644
--- a/src/app/I18nSpanish.cpp
+++ b/src/app/I18nSpanish.cpp
@@ -204,7 +204,7 @@ constexpr Entry kSpanish[] = {
{"Pressure > Size", "Presión > Tamaño"},
{"Pressure > Strength", "Presión > Fuerza"},
{"Front faces only", "Solo caras frontales"},
- {"Ctrl+Shift+drag with a Cut shape (Alt flips a line)", "Ctrl+Mayús+arrastrar con una forma de Corte (Alt cambia el lado de la línea)"},
+ {"Ctrl+Shift+drag a Cut shape", "Ctrl+Mayús+arrastrar una forma de Corte"},
{"Depth %.2f", "Profundidad %.2f"},
{"Copy the active Part (%s)", "Copiar la Parte activa (%s)"},
{"Mask Lasso and Mask Rectangle mask only what faces you: the far side and folds turned away stay as they are.",
diff --git a/src/app/PanelCut.cpp b/src/app/PanelCut.cpp
index e8237da2..011fc63a 100644
--- a/src/app/PanelCut.cpp
+++ b/src/app/PanelCut.cpp
@@ -169,8 +169,9 @@ void App::drawCutOverlay() {
}
void App::drawCutSection() {
- ImGui::TextDisabled("%s", tr("Ctrl+Shift+drag with a Cut shape (Alt flips a line)"));
- ui::Segmented(*this, {"cut.line", "cut.lasso", "cut.rect", "cut.polyline"});
+ ImGui::TextDisabled("%s", tr("Ctrl+Shift+drag a Cut shape"));
+ ui::Segmented(*this, {"cut.line", "cut.lasso"}); // two rows: the names fit a narrow tray
+ ui::Segmented(*this, {"cut.rect", "cut.polyline"});
ui::Segmented(*this, {"cut.away", "cut.in", "cut.add"});
if (cutMode_ != 0) {
ImGui::SetNextItemWidth(-1);
diff --git a/src/app/PanelMasking.cpp b/src/app/PanelMasking.cpp
index 5a6157bf..5d7c49e9 100644
--- a/src/app/PanelMasking.cpp
+++ b/src/app/PanelMasking.cpp
@@ -179,7 +179,12 @@ bool App::drawHeldBrushGrid(HeldBrush held, bool strokes) {
const HeldBrushItem* current = heldBrushCurrent(held);
bool picked = false;
int column = 0;
+ bool cutRow = false;
for (const HeldBrushItem& it : heldBrushItems(held)) {
+ if (isCutShape(it.shape) != cutRow) { // the Cut shapes get a row of their own under the selections
+ cutRow = true;
+ column = 0;
+ }
if (column++ > 0) ImGui::SameLine(0.0f, 6.0f);
const char* label = strokes ? it.stroke : it.brush;
const std::string id = std::string(label) + "##held." + it.action;
diff --git a/src/app/Pickers.cpp b/src/app/Pickers.cpp
index 2b65023b..775757fd 100644
--- a/src/app/Pickers.cpp
+++ b/src/app/Pickers.cpp
@@ -1058,7 +1058,7 @@ void drawPickers(App& app) {
const float gridW = 6 * (64.0f * scale + 6.0f) + 20.0f + ImGui::GetStyle().ScrollbarSize;
if (s.held != 0) { // Ctrl / Ctrl+Shift held: the mask or selection brushes (Brush and Stroke only)
if (beginPickerWindow(s.picker == Picker::Brush ? "Brushes##picker" : "Strokes##picker",
- 3 * (64.0f * scale + 6.0f) + 20.0f)) {
+ (s.held == 1 ? 3 : 4) * (64.0f * scale + 6.0f) + 20.0f)) { // Ctrl+Shift: 4 Cut shapes a row
const bool strokes = s.picker == Picker::Stroke;
pickerTitle(strokes ? ICON_LC_SPLINE : ICON_LC_BRUSH,
s.held == 1 ? (strokes ? "Mask stroke (Ctrl)" : "Mask brushes (Ctrl)")
diff --git a/tests/ui/cut_tool.sfui b/tests/ui/cut_tool.sfui
index 8a1a3a75..6d169976 100644
--- a/tests/ui/cut_tool.sfui
+++ b/tests/ui/cut_tool.sfui
@@ -1,6 +1,12 @@
# Cut (#101, #91): the Cut shapes in the Ctrl+Shift brush picker, Tool > Cut's modes, one undo step per cut; and
# Duplicate Part's shortcut (Ctrl+Shift+D).
run new_sphere subdivisions=5
+# Duplicate Part: Ctrl+Shift+D (then the copy goes again).
+expect_value subtools == 1
+key ctrl+shift+d
+expect_value subtools == 2
+run subtool_delete
+expect_value subtools == 1
remember triangles full
hold ctrl+shift
click "##tile.brush"
@@ -18,6 +24,7 @@ hold ctrl+shift
drag_path 0.38 0.36 0.62 0.6 keep
wait 0.1
shot cut-rect-dragging
+release
hold none
wait 0.2
expect_value hidden == 0
@@ -56,7 +63,3 @@ click "Select Rectangle##held.select.rect"
hold none
expect_value hide_shape == 2
-# Duplicate Part: Ctrl+Shift+D.
-expect_value subtools == 1
-key ctrl+shift+d
-expect_value subtools == 2