From 69dd58f210333482e235eaae21bcf193a6903e15 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 24 Oct 2018 13:12:18 +1100 Subject: Fix mapped mesh display skipping generated faces --- source/blender/draw/intern/draw_cache_impl_mesh.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source/blender/draw') diff --git a/source/blender/draw/intern/draw_cache_impl_mesh.c b/source/blender/draw/intern/draw_cache_impl_mesh.c index 018a1e915d7..63c93e95754 100644 --- a/source/blender/draw/intern/draw_cache_impl_mesh.c +++ b/source/blender/draw/intern/draw_cache_impl_mesh.c @@ -4423,7 +4423,7 @@ static GPUIndexBuf **mesh_batch_cache_get_triangles_in_order_split_by_material( BM_mesh_elem_table_ensure(bm_mapped, BM_FACE); for (uint i = 0; i < poly_len; i++) { const int p_orig = p_origindex_mapped[i]; - if ((p_orig != ORIGINDEX_NONE) && + if ((p_orig == ORIGINDEX_NONE) || !BM_elem_flag_test(BM_face_at_index(bm_mapped, p_orig), BM_ELEM_HIDDEN)) { const MPoly *mp = &rdata->mpoly[i]; ; @@ -4470,7 +4470,7 @@ static GPUIndexBuf **mesh_batch_cache_get_triangles_in_order_split_by_material( for (uint i = 0; i < poly_len; i++) { const int p_orig = p_origindex_mapped[i]; const MPoly *mp = &rdata->mpoly[i]; - if ((p_orig != ORIGINDEX_NONE) && + if ((p_orig == ORIGINDEX_NONE) || !BM_elem_flag_test(BM_face_at_index(bm_mapped, p_orig), BM_ELEM_HIDDEN)) { const short ma_id = mp->mat_nr < mat_len ? mp->mat_nr : 0; -- cgit v1.2.3