Page MenuHome
Paste P887

Fix T56545 (fallback to active UV layer)
ActivePublic

Authored by Campbell Barton (campbellbarton) on Jan 8 2019, 2:59 PM.
diff --git a/source/blender/draw/intern/draw_cache_impl_mesh.c b/source/blender/draw/intern/draw_cache_impl_mesh.c
index 9d9f7c47b14..fd9c44431b7 100644
--- a/source/blender/draw/intern/draw_cache_impl_mesh.c
+++ b/source/blender/draw/intern/draw_cache_impl_mesh.c
@@ -434,6 +434,11 @@ static void mesh_cd_calc_used_gpu_layers(
layer = (name[0] != '\0') ?
CustomData_get_named_layer(cd_ldata, CD_MLOOPUV, name) :
CustomData_get_active_layer(cd_ldata, CD_MLOOPUV);
+
+ /* Only fallback to orco (below) when we have no UV layers, see: T56545 */
+ if (layer == -1 && name[0] != '\0') {
+ layer = CustomData_get_active_layer(cd_ldata, CD_MLOOPUV);
+ }
}
if (layer != -1) {
cd_lused[CD_TANGENT] |= (1 << layer);

Event Timeline

Campbell Barton (campbellbarton) changed the title of this paste from Fix T56545 other option. to Fix T56545 (fallback to active UV layer).Jan 8 2019, 3:11 PM