[Bf-blender-cvs] [aa02a05bc7a] blender-v2.83-release: Fix T75977: Lower the merge limit in the bisect/mirror operation in symmetrize

Pablo Dobarro noreply at git.blender.org
Wed May 20 03:33:16 CEST 2020


Commit: aa02a05bc7a841b5762b34537c8cd27a25781177
Author: Pablo Dobarro
Date:   Tue May 19 00:12:05 2020 +0200
Branches: blender-v2.83-release
https://developer.blender.org/rBaa02a05bc7a841b5762b34537c8cd27a25781177

Fix T75977: Lower the merge limit in the bisect/mirror operation in symmetrize

This operation is using the code of the mirror modifier, so no default
is guaranteed to work in all cases. This value matches the defaults of
the mirror modifier.

Reviewed By: jbakker

Maniphest Tasks: T75977

Differential Revision: https://developer.blender.org/D7495

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

M	source/blender/editors/sculpt_paint/sculpt.c

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

diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c
index 69345b70d1c..afd39abb6f0 100644
--- a/source/blender/editors/sculpt_paint/sculpt.c
+++ b/source/blender/editors/sculpt_paint/sculpt.c
@@ -7373,7 +7373,7 @@ static bool sculpt_no_multires_poll(bContext *C)
   return false;
 }
 
-static int sculpt_symmetrize_exec(bContext *C, wmOperator *UNUSED(op))
+static int sculpt_symmetrize_exec(bContext *C, wmOperator *op)
 {
   Object *ob = CTX_data_active_object(C);
   const Sculpt *sd = CTX_data_tool_settings(C)->sculpt;
@@ -7424,7 +7424,7 @@ static int sculpt_symmetrize_exec(bContext *C, wmOperator *UNUSED(op))
       MirrorModifierData mmd = {{0}};
       int axis = 0;
       mmd.flag = 0;
-      mmd.tolerance = 0.005f;
+      mmd.tolerance = RNA_float_get(op->ptr, "merge_tolerance");
       switch (sd->symmetrize_direction) {
         case BMO_SYMMETRIZE_NEGATIVE_X:
           axis = 0;
@@ -7481,6 +7481,16 @@ static void SCULPT_OT_symmetrize(wmOperatorType *ot)
   /* API callbacks. */
   ot->exec = sculpt_symmetrize_exec;
   ot->poll = sculpt_no_multires_poll;
+
+  RNA_def_float(ot->srna,
+                "merge_tolerance",
+                0.001f,
+                0.0f,
+                1.0f,
+                "Merge Limit",
+                "Distance within which symmetrical vertices are merged",
+                0.0f,
+                FLT_MAX);
 }
 
 /**** Toggle operator for turning sculpt mode on or off ****/



More information about the Bf-blender-cvs mailing list