diff options
Diffstat (limited to 'source/blender/makesrna/intern/rna_modifier.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_modifier.c | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_modifier.c b/source/blender/makesrna/intern/rna_modifier.c index 1c5b4618bf8..3bb8be38682 100644 --- a/source/blender/makesrna/intern/rna_modifier.c +++ b/source/blender/makesrna/intern/rna_modifier.c @@ -187,6 +187,11 @@ const EnumPropertyItem rna_enum_object_modifier_type_items[] = { ICON_MOD_WIREFRAME, "Wireframe", "Convert faces into thickened edges"}, + {eModifierType_Weld, + "WELD", + ICON_AUTOMERGE_OFF, + "Weld", + "Finds groups of vertices closer then dist and merges them together"}, {0, "", 0, N_("Deform"), ""}, {eModifierType_Armature, "ARMATURE", @@ -700,6 +705,8 @@ static StructRNA *rna_Modifier_refine(struct PointerRNA *ptr) return &RNA_LaplacianDeformModifier; case eModifierType_Wireframe: return &RNA_WireframeModifier; + case eModifierType_Weld: + return &RNA_WeldModifier; case eModifierType_DataTransfer: return &RNA_DataTransferModifier; case eModifierType_NormalEdit: @@ -803,6 +810,7 @@ RNA_MOD_VGROUP_NAME_SET(WeightVGMix, mask_defgrp_name); RNA_MOD_VGROUP_NAME_SET(WeightVGProximity, defgrp_name); RNA_MOD_VGROUP_NAME_SET(WeightVGProximity, mask_defgrp_name); RNA_MOD_VGROUP_NAME_SET(WeightedNormal, defgrp_name); +RNA_MOD_VGROUP_NAME_SET(Weld, defgrp_name); RNA_MOD_VGROUP_NAME_SET(Wireframe, defgrp_name); static void rna_ExplodeModifier_vgroup_get(PointerRNA *ptr, char *value) @@ -5659,6 +5667,40 @@ static void rna_def_modifier_wireframe(BlenderRNA *brna) RNA_def_property_update(prop, 0, "rna_Modifier_update"); } +static void rna_def_modifier_weld(BlenderRNA *brna) +{ + StructRNA *srna; + PropertyRNA *prop; + + srna = RNA_def_struct(brna, "WeldModifier", "Modifier"); + RNA_def_struct_ui_text(srna, "Weld Modifier", "Weld modifier"); + RNA_def_struct_sdna(srna, "WeldModifierData"); + RNA_def_struct_ui_icon(srna, ICON_AUTOMERGE_OFF); + + 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); + RNA_def_property_ui_range(prop, 0, 1, 0.001, 6); + RNA_def_property_ui_text(prop, "Merge Distance", "Limit below which to merge vertices"); + RNA_def_property_update(prop, 0, "rna_Modifier_update"); + + prop = RNA_def_property(srna, "max_interactions", PROP_INT, PROP_UNSIGNED); + RNA_def_property_int_sdna(prop, NULL, "max_interactions"); + RNA_def_property_ui_text( + prop, + "Duplicate Limit", + "For a better performance, limits the number of elements found per vertex. " + "(0 makes it infinite)"); + RNA_def_property_update(prop, 0, "rna_Modifier_update"); + + prop = RNA_def_property(srna, "vertex_group", PROP_STRING, PROP_NONE); + RNA_def_property_string_sdna(prop, NULL, "defgrp_name"); + RNA_def_property_ui_text( + prop, "Vertex Group", "Vertex group name for selecting the affected areas"); + RNA_def_property_string_funcs(prop, NULL, NULL, "rna_WeldModifier_defgrp_name_set"); + RNA_def_property_update(prop, 0, "rna_Modifier_update"); +} + static void rna_def_modifier_datatransfer(BlenderRNA *brna) { StructRNA *srna; @@ -6368,6 +6410,7 @@ void RNA_def_modifier(BlenderRNA *brna) rna_def_modifier_meshcache(brna); rna_def_modifier_laplaciandeform(brna); rna_def_modifier_wireframe(brna); + rna_def_modifier_weld(brna); rna_def_modifier_datatransfer(brna); rna_def_modifier_normaledit(brna); rna_def_modifier_meshseqcache(brna); |