From 00ec99050ea435cb255bb81437b381e5a42660af Mon Sep 17 00:00:00 2001 From: Falk David Date: Thu, 22 Apr 2021 15:25:41 +1000 Subject: Fix T85051: Add bisect distance as a parameter to the mirror modifier The `bisect_distance` in the mirror modifier was hard-coded to `0.001`. This would result in some unexpected behavior like vertices close to the mirror plane being deleted or merged. The fix now adds a parameter to the mirror modifier to expose the bisect distance to the user. The default is set to the previous hard-coded value to not "change" previous files. Ref D10201 --- source/blender/makesrna/intern/rna_modifier.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'source/blender/makesrna') diff --git a/source/blender/makesrna/intern/rna_modifier.c b/source/blender/makesrna/intern/rna_modifier.c index 67335b81a31..e3fb443951f 100644 --- a/source/blender/makesrna/intern/rna_modifier.c +++ b/source/blender/makesrna/intern/rna_modifier.c @@ -2226,6 +2226,14 @@ static void rna_def_modifier_mirror(BlenderRNA *brna) prop, "Merge Distance", "Distance within which mirrored vertices are merged"); RNA_def_property_update(prop, 0, "rna_Modifier_update"); + prop = RNA_def_property(srna, "bisect_threshold", PROP_FLOAT, PROP_DISTANCE); + RNA_def_property_float_sdna(prop, NULL, "bisect_threshold"); + RNA_def_property_range(prop, 0, FLT_MAX); + RNA_def_property_ui_range(prop, 0, 1, 0.01, 6); + RNA_def_property_ui_text( + prop, "Bisect Distance", "Distance from the bisect plane within which vertices are removed"); + RNA_def_property_update(prop, 0, "rna_Modifier_update"); + prop = RNA_def_property(srna, "mirror_object", PROP_POINTER, PROP_NONE); RNA_def_property_pointer_sdna(prop, NULL, "mirror_ob"); RNA_def_property_ui_text(prop, "Mirror Object", "Object to use as mirror"); -- cgit v1.2.3