[Bf-blender-cvs] [bda0820] master: Support multi-paint & show zero-weights as black

Alexander Gavrilov noreply at git.blender.org
Wed Jan 20 01:52:17 CET 2016


Commit: bda0820d575061fca3514281f81f04870bbd495e
Author: Alexander Gavrilov
Date:   Mon Jan 18 22:00:56 2016 +0300
Branches: master
https://developer.blender.org/rBbda0820d575061fca3514281f81f04870bbd495e

Support multi-paint & show zero-weights as black

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.)

===================================================================

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

===================================================================

diff --git a/release/scripts/startup/bl_ui/space_view3d_toolbar.py b/release/scripts/startup/bl_ui/space_view3d_toolbar.py
index 3c3899d..9b6a0d4 100644
--- a/release/scripts/startup/bl_ui/space_view3d_toolbar.py
+++ b/release/scripts/startup/bl_ui/space_view3d_toolbar.py
@@ -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)
diff --git a/source/blender/blenkernel/intern/DerivedMesh.c b/source/blender/blenkernel/intern/DerivedMesh.c
index 9fc4383..b5e6b6c 100644
--- a/source/blender/blenkernel/intern/DerivedMesh.c
+++ b/source/blender/blenkernel/intern/DerivedMesh.c
@@ -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));
 }
 
diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c
index 434a6c2..2c2b49c 100644
--- a/source/blender/makesrna/intern/rna_scene.c
+++ b/source/blender/makesrna/intern/rna_scene.c
@@ -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);




More information about the Bf-blender-cvs mailing list