[Bf-blender-cvs] [0c4b732ef2c] master: Fix T78225: Vertex Colors not showing in edit mode

Pablo Dobarro noreply at git.blender.org
Mon Sep 7 17:22:10 CEST 2020


Commit: 0c4b732ef2cd5d3b4d6d7dbaa27801d1bfff04ae
Author: Pablo Dobarro
Date:   Sun Sep 6 18:56:40 2020 +0200
Branches: master
https://developer.blender.org/rB0c4b732ef2cd5d3b4d6d7dbaa27801d1bfff04ae

Fix T78225: Vertex Colors not showing in edit mode

This should be using the mesh_cd_ldata_get_from_mesh function in
order to get ldata from BMesh in edit mode.

Reviewed By: sergey

Maniphest Tasks: T78225

Differential Revision: https://developer.blender.org/D8818

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

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 e8a712b6881..c7ba707d403 100644
--- a/source/blender/draw/intern/draw_cache_impl_mesh.c
+++ b/source/blender/draw/intern/draw_cache_impl_mesh.c
@@ -169,7 +169,7 @@ static void mesh_cd_calc_active_vcol_layer(const Mesh *me, DRW_MeshCDMask *cd_us
 static void mesh_cd_calc_active_mloopcol_layer(const Mesh *me, DRW_MeshCDMask *cd_used)
 {
   const Mesh *me_final = editmesh_final_or_this(me);
-  const CustomData *cd_ldata = &me_final->ldata;
+  const CustomData *cd_ldata = mesh_cd_ldata_get_from_mesh(me_final);
 
   int layer = CustomData_get_active_layer(cd_ldata, CD_MLOOPCOL);
   if (layer != -1) {



More information about the Bf-blender-cvs mailing list