[Bf-blender-cvs] [1456b413067] master: Fix T64420 Weight Paint colours not visible

Clément Foucault noreply at git.blender.org
Fri May 10 15:03:46 CEST 2019


Commit: 1456b4130676b709a07e82f40a18ed46c445fe2d
Author: Clément Foucault
Date:   Fri May 10 15:03:18 2019 +0200
Branches: master
https://developer.blender.org/rB1456b4130676b709a07e82f40a18ed46c445fe2d

Fix T64420 Weight Paint colours not visible

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

M	source/blender/draw/intern/draw_cache_impl_mesh.c

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

diff --git a/source/blender/draw/intern/draw_cache_impl_mesh.c b/source/blender/draw/intern/draw_cache_impl_mesh.c
index 0ccd53fe39e..92e24e72954 100644
--- a/source/blender/draw/intern/draw_cache_impl_mesh.c
+++ b/source/blender/draw/intern/draw_cache_impl_mesh.c
@@ -4296,7 +4296,7 @@ GPUBatch *DRW_mesh_batch_cache_get_loose_edges(Mesh *me)
 GPUBatch *DRW_mesh_batch_cache_get_surface_weights(Mesh *me)
 {
   MeshBatchCache *cache = mesh_batch_cache_get(me);
-  mesh_batch_cache_add_request(cache, MBC_LOOSE_EDGES);
+  mesh_batch_cache_add_request(cache, MBC_SURFACE_WEIGHTS);
   return DRW_batch_request(&cache->batch.surface_weights);
 }
 
@@ -4912,7 +4912,7 @@ void DRW_mesh_batch_cache_create_requested(
 
   if (cache->batch_requested & MBC_SURFACE_WEIGHTS) {
     /* Check vertex weights. */
-    if ((cache->batch.surface_weights != 0) && (ts != NULL)) {
+    if ((cache->batch.surface_weights != NULL) && (ts != NULL)) {
       struct DRW_MeshWeightState wstate;
       BLI_assert(ob->type == OB_MESH);
       drw_mesh_weight_state_extract(ob, me, ts, is_paint_mode, &wstate);



More information about the Bf-blender-cvs mailing list