[Bf-blender-cvs] [0b7d0f9] master: Fix weight painting + mask not drawing in latest master.

Antony Riakiotakis noreply at git.blender.org
Wed Jul 22 16:58:33 CEST 2015


Commit: 0b7d0f913d4e5068afb15189bb077d4e84cebfda
Author: Antony Riakiotakis
Date:   Wed Jul 22 16:58:18 2015 +0200
Branches: master
https://developer.blender.org/rB0b7d0f913d4e5068afb15189bb077d4e84cebfda

Fix weight painting + mask not drawing in latest master.

Same issue as vertex painting - though one might wonder if we really
need to set material on such occasions.

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

M	source/blender/editors/space_view3d/drawmesh.c

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

diff --git a/source/blender/editors/space_view3d/drawmesh.c b/source/blender/editors/space_view3d/drawmesh.c
index 757eecf..ea1e317 100644
--- a/source/blender/editors/space_view3d/drawmesh.c
+++ b/source/blender/editors/space_view3d/drawmesh.c
@@ -1220,11 +1220,13 @@ static void draw_mesh_paint_light_end(void)
 void draw_mesh_paint_weight_faces(DerivedMesh *dm, const bool use_light,
                                   void *facemask_cb, void *user_data)
 {
+	DMSetMaterial setMaterial = GPU_object_materials_check() ? GPU_enable_material : NULL;
+
 	if (use_light) {
 		draw_mesh_paint_light_begin();
 	}
 
-	dm->drawMappedFaces(dm, (DMSetDrawOptions)facemask_cb, GPU_enable_material, NULL, user_data,
+	dm->drawMappedFaces(dm, (DMSetDrawOptions)facemask_cb, setMaterial, NULL, user_data,
 	                    DM_DRAW_USE_COLORS);
 
 	if (use_light) {




More information about the Bf-blender-cvs mailing list