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:
authorClément Foucault <foucault.clem@gmail.com>2020-05-25 12:48:31 +0300
committerClément Foucault <foucault.clem@gmail.com>2020-05-25 12:48:31 +0300
commite76ff4df4123b5517599930629dbcf0507b582e9 (patch)
tree3cf9a67f3a3a05c678f39a04533da81f56e66c02 /source/blender/editors/sculpt_paint/sculpt.c
parent15dd6cb66887eb83fcc3ecf44c3b42a53161e390 (diff)
parent528f0b95c4462b2e429600a566ca0434c90310f6 (diff)
Merge branch 'master' into tmp-widget-optitmp-widget-opti
# Conflicts: # source/blender/gpu/shaders/gpu_shader_2D_widget_base_vert.glsl
Diffstat (limited to 'source/blender/editors/sculpt_paint/sculpt.c')
-rw-r--r--source/blender/editors/sculpt_paint/sculpt.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c
index 045fd54b46a..855e7503e3b 100644
--- a/source/blender/editors/sculpt_paint/sculpt.c
+++ b/source/blender/editors/sculpt_paint/sculpt.c
@@ -7389,7 +7389,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;
@@ -7440,7 +7440,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;
@@ -7497,6 +7497,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,
+ FLT_MAX,
+ "Merge Limit",
+ "Distance within which symmetrical vertices are merged",
+ 0.0f,
+ 1.0f);
}
/**** Toggle operator for turning sculpt mode on or off ****/