Support multi-paint & show zero-weights as black
authorAlexander Gavrilov <angavrilov@gmail.com>
Mon, 18 Jan 2016 19:00:56 +0000 (22:00 +0300)
committerCampbell Barton <ideasman42@gmail.com>
Wed, 20 Jan 2016 00:43:09 +0000 (11:43 +1100)
Specifically, when only one bone is selected and it's not really active.
(With multiple bones on the other hand that behavior is forced on,
since multi-paint can't modify purely zero weight verts and that's important.)

release/scripts/startup/bl_ui/space_view3d_toolbar.py
source/blender/blenkernel/intern/DerivedMesh.c
source/blender/makesrna/intern/rna_scene.c

index 3c3899d54cdc941166c8796b11cfee82c7633d71..9b6a0d47a40ea40444c43d10cb2847836490daf5 100644 (file)
@@ -1654,7 +1654,6 @@ class VIEW3D_PT_tools_weightpaint_options(Panel, View3DPaintPanel):
 
         col.label("Show Zero Weights:")
         sub = col.row()
-        sub.active = (not tool_settings.use_multipaint)
         sub.prop(tool_settings, "vertex_group_user", expand=True)
 
         self.unified_paint_settings(col, context)
index 9fc438319cb5552813ab49d93d0cfeb016401b52..b5e6b6c4bac6fd8eba87602f1fb36ea7640b9ea7 100644 (file)
@@ -1333,9 +1333,9 @@ typedef struct DMWeightColorInfo {
 
 static int dm_drawflag_calc(const ToolSettings *ts)
 {
-       return ((ts->multipaint ? CALC_WP_MULTIPAINT :
-                                 /* CALC_WP_GROUP_USER_ACTIVE or CALC_WP_GROUP_USER_ALL*/
-                                 (1 << ts->weightuser)) |
+       return ((ts->multipaint ? CALC_WP_MULTIPAINT : 0) |
+               /* CALC_WP_GROUP_USER_ACTIVE or CALC_WP_GROUP_USER_ALL*/
+               (1 << ts->weightuser) |
                (ts->auto_normalize ? CALC_WP_AUTO_NORMALIZE : 0));
 }
 
index 434a6c24952fe38c7db246428518764148b46d2d..2c2b49c8c40e4f34f4571b6757d02c821f2fe72c 100644 (file)
@@ -2109,7 +2109,7 @@ static void rna_def_tool_settings(BlenderRNA  *brna)
        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_ui_text(prop, "Mask Non-Group Vertices", "Display unweighted verticess");
        RNA_def_property_update(prop, 0, "rna_Scene_update_active_object_data");
 
        prop = RNA_def_property(srna, "vertex_group_subset", PROP_ENUM, PROP_NONE);