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:
authorHenrik Dick <hen-di@web.de>2020-12-09 03:10:15 +0300
committerCampbell Barton <ideasman42@gmail.com>2020-12-09 04:29:48 +0300
commit9b11a7776f2ab8ac42e835a17ed7566fd80a4b8c (patch)
tree6e8eeb9092f4ad6587a1ff807e88b0f2cfa810d3 /source/blender/makesrna/intern/rna_modifier.c
parente17967f890a09c3bd810632c2c3244f9f988919f (diff)
Modifier: Add "Connected" mode to the weld modifier
Implement improvement from T73139 for merging along edges. It is now called "Connected" mode, while the default is called "All". With the recent performance improvement, the Connected Mode is in some cases only double the speed than the usual merge all strategy but in other cases it may be even faster. The bottleneck is somewhere further down the line of merging geometry. The motivation for this patch came from T80897, because the merging in complex solidify is making it very slow. Now merging can be removed from solidify without greater consequences, as this is just a quicker and more advanced algorithm to do the same thing that solidify currently does slowly. Reviewed by: mano-wii, campbellbarton Ref D8966
Diffstat (limited to 'source/blender/makesrna/intern/rna_modifier.c')
-rw-r--r--source/blender/makesrna/intern/rna_modifier.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_modifier.c b/source/blender/makesrna/intern/rna_modifier.c
index f0836ae59ad..4ce859ddce9 100644
--- a/source/blender/makesrna/intern/rna_modifier.c
+++ b/source/blender/makesrna/intern/rna_modifier.c
@@ -6231,6 +6231,12 @@ static void rna_def_modifier_weld(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
+ static const EnumPropertyItem mode_items[] = {
+ {MOD_WELD_ALL_MODE, "ALL", 0, "All", "Full merge by distance"},
+ {MOD_WELD_CONNECTED_MODE, "CONNECTED", 0, "Connected", "Only merge along the edges"},
+ {0, NULL, 0, NULL, NULL},
+ };
+
srna = RNA_def_struct(brna, "WeldModifier", "Modifier");
RNA_def_struct_ui_text(srna, "Weld Modifier", "Weld modifier");
RNA_def_struct_sdna(srna, "WeldModifierData");
@@ -6238,6 +6244,11 @@ static void rna_def_modifier_weld(BlenderRNA *brna)
RNA_define_lib_overridable(true);
+ prop = RNA_def_property(srna, "mode", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_items(prop, mode_items);
+ RNA_def_property_ui_text(prop, "Mode", "Mode defines the merge rule");
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
+
prop = RNA_def_property(srna, "merge_threshold", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "merge_dist");
RNA_def_property_range(prop, 0, FLT_MAX);