Commit: 69dd58f210333482e235eaae21bcf193a6903e15
Author: Campbell Barton
Date: Wed Oct 24 13:12:18 2018 +1100
Branches: blender2.8
https://developer.blender.org/rB69dd58f210333482e235eaae21bcf193a6903e15
Fix mapped mesh display skipping generated faces
===================================================================
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 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;
_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs