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:
authorCampbell Barton <ideasman42@gmail.com>2013-02-22 08:09:04 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-02-22 08:09:04 +0400
commitb00c3b801bf07a67b98b604ee834e2d93dff0f39 (patch)
treecb7c4c4aacdec65b6d5ee2b79891f64bffc34f08 /source/blender/makesrna/intern
parent6bac47f8544a6bdc66d439d1d61b4a850d4ad20a (diff)
new weight paint draw option to display unweighted vertices with the option to check on the active group or all groups.
notes: - vertices with zero weights are considered the same as vertices outside of a group. - currently these show black but this can be made a theme color. - multi-paint overrides this option (noted in description)
Diffstat (limited to 'source/blender/makesrna/intern')
-rw-r--r--source/blender/makesrna/intern/rna_scene.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c
index afee72ff873..a9d1f6e0f34 100644
--- a/source/blender/makesrna/intern/rna_scene.c
+++ b/source/blender/makesrna/intern/rna_scene.c
@@ -1528,6 +1528,13 @@ static void rna_def_tool_settings(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}
};
+ static EnumPropertyItem draw_groupuser_items[] = {
+ {OB_DRAW_GROUPUSER_NONE, "NONE", 0, "None", ""},
+ {OB_DRAW_GROUPUSER_ACTIVE, "ACTIVE", 0, "Active", "Show vertices with no weights in the actuve group"},
+ {OB_DRAW_GROUPUSER_ALL, "ALL", 0, "All", "Show vertices with no weights in the any group"},
+ {0, NULL, 0, NULL, NULL}
+ };
+
srna = RNA_def_struct(brna, "ToolSettings", NULL);
RNA_def_struct_path_func(srna, "rna_ToolSettings_path");
RNA_def_struct_ui_text(srna, "Tool Settings", "");
@@ -1550,6 +1557,13 @@ static void rna_def_tool_settings(BlenderRNA *brna)
"weight painting");
RNA_def_property_update(prop, 0, "rna_Scene_update_active_object_data");
+ prop = RNA_def_property(srna, "vertex_group_user", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_sdna(prop, NULL, "weightuser");
+ RNA_def_property_enum_items(prop, draw_groupuser_items);
+ RNA_def_property_ui_text(prop, "Mask Non-Group Vertices", "Display unweighted vertices (multi-paint overrides)");
+ RNA_def_property_update(prop, 0, "rna_Scene_update_active_object_data");
+
+
prop = RNA_def_property(srna, "vertex_paint", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "vpaint");
RNA_def_property_ui_text(prop, "Vertex Paint", "");