Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoseph Eagar <joeedh@gmail.com>2022-11-10 21:53:00 +0300
committerJoseph Eagar <joeedh@gmail.com>2022-11-10 21:55:09 +0300
commit969aa7bbfcdc06e9998160bdcd18981aaffc833a (patch)
tree8310c6e1f60b198c3b9d8e1029438679ce402cde
parent659de90a324946f75e02fa8e45afe1b48937f455 (diff)
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.
-rw-r--r--release/scripts/startup/bl_ui/space_view3d_toolbar.py1
-rw-r--r--source/blender/editors/sculpt_paint/sculpt_ops.c20
2 files changed, 12 insertions, 9 deletions
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 ****/