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:
authorAntony Riakiotakis <kalast@gmail.com>2015-07-22 17:58:18 +0300
committerAntony Riakiotakis <kalast@gmail.com>2015-07-22 17:58:18 +0300
commit0b7d0f913d4e5068afb15189bb077d4e84cebfda (patch)
tree7ffd2eaf516918730a59db706ca6a7e091544a4f /source/blender/editors/space_view3d
parent0795f62ddfed50d0836ab42849b791b0a0a43a0b (diff)
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.
Diffstat (limited to 'source/blender/editors/space_view3d')
-rw-r--r--source/blender/editors/space_view3d/drawmesh.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/editors/space_view3d/drawmesh.c b/source/blender/editors/space_view3d/drawmesh.c
index 757eecfe1db..ea1e3178bd0 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) {