diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-10-23 05:50:43 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-10-23 05:53:42 +0300 |
commit | dbdf653f8e477f8b23185b236667c774549a0f93 (patch) | |
tree | f2f35a2995685ae316c6a6ddc7d3e7d39ad0292d /source/blender/draw | |
parent | e3013fdc3b9bb9747ffd44a08d5afe16617816c2 (diff) |
Fix bad origindex layers for editmode modifiers
Reverts workaround from last commit.
Diffstat (limited to 'source/blender/draw')
-rw-r--r-- | source/blender/draw/intern/draw_cache_impl_mesh.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/source/blender/draw/intern/draw_cache_impl_mesh.c b/source/blender/draw/intern/draw_cache_impl_mesh.c index 32c3acbec22..e27bc84c565 100644 --- a/source/blender/draw/intern/draw_cache_impl_mesh.c +++ b/source/blender/draw/intern/draw_cache_impl_mesh.c @@ -4427,10 +4427,7 @@ static GPUIndexBuf **mesh_batch_cache_get_triangles_in_order_split_by_material( BMFace **ftable = bm_mapped->ftable; for (uint i = 0; i < poly_len; i++) { const int p_orig = p_origindex_mapped[i]; - /* TODO(campbell): fix origindex layer. */ - if ((p_orig >= bm_mapped->totface) || - ((p_orig != ORIGINDEX_NONE) && !BM_elem_flag_test(ftable[p_orig], BM_ELEM_HIDDEN))) - { + if ((p_orig != ORIGINDEX_NONE) && !BM_elem_flag_test(ftable[p_orig], BM_ELEM_HIDDEN)) { const MPoly *mp = &rdata->mpoly[i]; ; const short ma_id = mp->mat_nr < mat_len ? mp->mat_nr : 0; mat_tri_len[ma_id] += (mp->totloop - 2); @@ -4476,10 +4473,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]; ; - /* TODO(campbell): fix origindex layer. */ - if ((p_orig >= bm_mapped->totface) || - ((p_orig != ORIGINDEX_NONE) && !BM_elem_flag_test(ftable[p_orig], BM_ELEM_HIDDEN))) - { + if ((p_orig != ORIGINDEX_NONE) && !BM_elem_flag_test(ftable[p_orig], BM_ELEM_HIDDEN)) { const short ma_id = mp->mat_nr < mat_len ? mp->mat_nr : 0; for (int j = 2; j < mp->totloop; j++) { GPU_indexbuf_add_tri_verts(&elb[ma_id], nidx + 0, nidx + 1, nidx + 2); |