From 5cf72833429f4c63d27ea0a72878af1fec6dcf4e Mon Sep 17 00:00:00 2001 From: Henrik Dick Date: Mon, 13 Apr 2020 17:15:16 +0200 Subject: Fix T75032: New complex solidify algorithm handles poorly merging threshold of small geometry details. * Implemented the algortihm that would merge vertices to the weighted center between them. * Exposed the merge threshold to the user. The new default tolerance is 0.0001 (versionning code ensures that previous default value remains in use to avoid any change in existing files). Review and minor changes/cleanups from Bastien Montagne (@mont29). --- source/blender/makesrna/intern/rna_modifier.c | 7 +++++++ 1 file changed, 7 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 176d8e6de91..2c4818eb972 100644 --- a/source/blender/makesrna/intern/rna_modifier.c +++ b/source/blender/makesrna/intern/rna_modifier.c @@ -4523,6 +4523,13 @@ static void rna_def_modifier_solidify(BlenderRNA *brna) RNA_def_property_enum_items(prop, nonmanifold_boundary_mode_items); RNA_def_property_ui_text(prop, "Boundary Shape", "Selects the boundary adjustment algorithm"); RNA_def_property_update(prop, 0, "rna_Modifier_update"); + + prop = RNA_def_property(srna, "nonmanifold_merge_threshold", PROP_FLOAT, PROP_DISTANCE); + RNA_def_property_float_sdna(prop, NULL, "merge_tolerance"); + RNA_def_property_range(prop, 0.0, 1.0); + RNA_def_property_ui_range(prop, 0.0, 1.0, 0.01, 4); + RNA_def_property_ui_text(prop, "Merge Threshold", "Distance within which degenerated geometry is merged"); + RNA_def_property_update(prop, 0, "rna_Modifier_update"); } static void rna_def_modifier_screw(BlenderRNA *brna) -- cgit v1.2.3