[Bf-blender-cvs] [969aa7bbfcd] master: Sculpt: Change symmetrize merge threshold and expose in workspace panel

Joseph Eagar noreply at git.blender.org
Thu Nov 10 19:56:21 CET 2022


Commit: 969aa7bbfcdc06e9998160bdcd18981aaffc833a
Author: Joseph Eagar
Date:   Thu Nov 10 10:53:00 2022 -0800
Branches: master
https://developer.blender.org/rB969aa7bbfcdc06e9998160bdcd18981aaffc833a

Sculpt: Change symmetrize merge threshold and expose in workspace panel

The sculpt symmetrize operator's merge threshold now defaults
to 0.0005 instead of 0.001, which tends to be a bit too big for
metric scale.

Also changed its step and precision a bit to be more usable.

===================================================================

M	release/scripts/startup/bl_ui/space_view3d_toolbar.py
M	source/blender/editors/sculpt_paint/sculpt_ops.c

===================================================================

diff --git a/release/scripts/startup/bl_ui/space_view3d_toolbar.py b/release/scripts/startup/bl_ui/space_view3d_toolbar.py
index 111fb0d8bae..8ebc385a8ee 100644
--- a/release/scripts/startup/bl_ui/space_view3d_toolbar.py
+++ b/release/scripts/startup/bl_ui/space_view3d_toolbar.py
@@ -1020,6 +1020,7 @@ class VIEW3D_PT_sculpt_symmetry(Panel, View3DPaintPanel):
 
         layout.prop(sculpt, "symmetrize_direction")
         layout.operator("sculpt.symmetrize")
+        layout.prop(WindowManager.operator_properties_last("sculpt.symmetrize"), "merge_tolerance")
 
 
 class VIEW3D_PT_sculpt_symmetry_for_topbar(Panel):
diff --git a/source/blender/editors/sculpt_paint/sculpt_ops.c b/source/blender/editors/sculpt_paint/sculpt_ops.c
index 8f88035e129..0e7873bc652 100644
--- a/source/blender/editors/sculpt_paint/sculpt_ops.c
+++ b/source/blender/editors/sculpt_paint/sculpt_ops.c
@@ -246,15 +246,17 @@ static void SCULPT_OT_symmetrize(wmOperatorType *ot)
   ot->exec = sculpt_symmetrize_exec;
   ot->poll = sculpt_no_multires_poll;
 
-  RNA_def_float(ot->srna,
-                "merge_tolerance",
-                0.001f,
-                0.0f,
-                FLT_MAX,
-                "Merge Distance",
-                "Distance within which symmetrical vertices are merged",
-                0.0f,
-                1.0f);
+  PropertyRNA *prop = RNA_def_float(ot->srna,
+                                    "merge_tolerance",
+                                    0.0005f,
+                                    0.0f,
+                                    FLT_MAX,
+                                    "Merge Distance",
+                                    "Distance within which symmetrical vertices are merged",
+                                    0.0f,
+                                    1.0f);
+
+  RNA_def_property_ui_range(prop, 0.0, FLT_MAX, 0.001, 5);
 }
 
 /**** Toggle operator for turning sculpt mode on or off ****/



More information about the Bf-blender-cvs mailing list