Changeset View
Changeset View
Standalone View
Standalone View
source/blender/makesrna/intern/rna_modifier.c
- This file is larger than 256 KB, so syntax highlighting is disabled by default.
| Show First 20 Lines • Show All 6,312 Lines • ▼ Show 20 Lines | static void rna_def_modifier_laplaciandeform(BlenderRNA *brna) | ||||
| RNA_def_property_update(prop, 0, "rna_Modifier_update"); | RNA_def_property_update(prop, 0, "rna_Modifier_update"); | ||||
| } | } | ||||
| static void rna_def_modifier_weld(BlenderRNA *brna) | static void rna_def_modifier_weld(BlenderRNA *brna) | ||||
| { | { | ||||
| StructRNA *srna; | StructRNA *srna; | ||||
| PropertyRNA *prop; | PropertyRNA *prop; | ||||
| static const EnumPropertyItem mode_items[] = { | |||||
| {MOD_WELD_SIMPLE_MODE, "SIMPLE", 0, "Simple", "Only merge along the edges."}, | |||||
| {MOD_WELD_FULL_MODE, "FULL", 0, "Full", "Full merge by distance (slow)."}, | |||||
| {0, NULL, 0, NULL, NULL}, | |||||
brecht: Perhaps better naming would be:
* Connected: Only merged connected vertices within the distance… | |||||
weaselAuthorUnsubmitted Done Inline ActionsAgreed. @Germano Cavalcante (mano-wii) as you want to work on the names later anyway, should I do it now or do you want to do this? weasel: Agreed. @mano-wii as you want to work on the names later anyway, should I do it now or do you… | |||||
| }; | |||||
| srna = RNA_def_struct(brna, "WeldModifier", "Modifier"); | srna = RNA_def_struct(brna, "WeldModifier", "Modifier"); | ||||
| RNA_def_struct_ui_text(srna, "Weld Modifier", "Weld modifier"); | RNA_def_struct_ui_text(srna, "Weld Modifier", "Weld modifier"); | ||||
| RNA_def_struct_sdna(srna, "WeldModifierData"); | RNA_def_struct_sdna(srna, "WeldModifierData"); | ||||
| RNA_def_struct_ui_icon(srna, ICON_AUTOMERGE_OFF); | RNA_def_struct_ui_icon(srna, ICON_AUTOMERGE_OFF); | ||||
| RNA_define_lib_overridable(true); | RNA_define_lib_overridable(true); | ||||
| prop = RNA_def_property(srna, "merge_threshold", PROP_FLOAT, PROP_DISTANCE); | prop = RNA_def_property(srna, "merge_threshold", PROP_FLOAT, PROP_DISTANCE); | ||||
| RNA_def_property_float_sdna(prop, NULL, "merge_dist"); | RNA_def_property_float_sdna(prop, NULL, "merge_dist"); | ||||
| RNA_def_property_range(prop, 0, FLT_MAX); | RNA_def_property_range(prop, 0, FLT_MAX); | ||||
| RNA_def_property_ui_range(prop, 0, 1, 0.001, 6); | 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_ui_text(prop, "Merge Distance", "Limit below which to merge vertices"); | ||||
| RNA_def_property_update(prop, 0, "rna_Modifier_update"); | RNA_def_property_update(prop, 0, "rna_Modifier_update"); | ||||
| prop = RNA_def_property(srna, "max_interactions", PROP_INT, PROP_UNSIGNED); | prop = RNA_def_property(srna, "max_interactions", PROP_INT, PROP_UNSIGNED); | ||||
| RNA_def_property_int_sdna(prop, NULL, "max_interactions"); | RNA_def_property_int_sdna(prop, NULL, "max_interactions"); | ||||
| RNA_def_property_ui_text( | RNA_def_property_ui_text( | ||||
| prop, | prop, | ||||
| "Duplicate Limit", | "Duplicate Limit", | ||||
| "For a better performance, limits the number of elements found per vertex. " | "For a better performance, limits the number of elements found per vertex. " | ||||
| "(0 makes it infinite)"); | "(0 makes it infinite)"); | ||||
| RNA_def_property_update(prop, 0, "rna_Modifier_update"); | RNA_def_property_update(prop, 0, "rna_Modifier_update"); | ||||
| 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, "vertex_group", PROP_STRING, PROP_NONE); | prop = RNA_def_property(srna, "vertex_group", PROP_STRING, PROP_NONE); | ||||
| RNA_def_property_string_sdna(prop, NULL, "defgrp_name"); | RNA_def_property_string_sdna(prop, NULL, "defgrp_name"); | ||||
| RNA_def_property_ui_text( | RNA_def_property_ui_text( | ||||
| prop, "Vertex Group", "Vertex group name for selecting the affected areas"); | 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_string_funcs(prop, NULL, NULL, "rna_WeldModifier_defgrp_name_set"); | ||||
| RNA_def_property_update(prop, 0, "rna_Modifier_update"); | RNA_def_property_update(prop, 0, "rna_Modifier_update"); | ||||
| prop = RNA_def_property(srna, "invert_vertex_group", PROP_BOOLEAN, PROP_NONE); | prop = RNA_def_property(srna, "invert_vertex_group", PROP_BOOLEAN, PROP_NONE); | ||||
| ▲ Show 20 Lines • Show All 876 Lines • Show Last 20 Lines | |||||
Perhaps better naming would be:
Simple & Full don't really explain what this does, and I think merging only connected geometry may in some cases be the desired behavior rather than just a performance optimization.