diff options
author | Rohan Rathi <rohanrathi08@gmail.com> | 2018-07-02 21:01:19 +0300 |
---|---|---|
committer | Rohan Rathi <rohanrathi08@gmail.com> | 2018-07-02 21:01:19 +0300 |
commit | 31e43d021fdc55c6ec6741d382f4bbb05d1d62e9 (patch) | |
tree | 8ad72888c5516dcc0eb982d629a732c406177c83 /source/blender/draw/intern/draw_cache_impl_mesh.c | |
parent | 368a64fe041ee0950584f5b51e2f64036edb31d0 (diff) | |
parent | 31c9bd35bc9bb913b7a786da9c80751dbc60e006 (diff) |
Merge branch 'blender2.8' into soc-2018-bevel
Diffstat (limited to 'source/blender/draw/intern/draw_cache_impl_mesh.c')
-rw-r--r-- | source/blender/draw/intern/draw_cache_impl_mesh.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/source/blender/draw/intern/draw_cache_impl_mesh.c b/source/blender/draw/intern/draw_cache_impl_mesh.c index 8e45833026d..687f116bbbf 100644 --- a/source/blender/draw/intern/draw_cache_impl_mesh.c +++ b/source/blender/draw/intern/draw_cache_impl_mesh.c @@ -44,7 +44,6 @@ #include "BKE_customdata.h" #include "BKE_deform.h" -#include "BKE_DerivedMesh.h" #include "BKE_editmesh.h" #include "BKE_editmesh_tangent.h" #include "BKE_mesh.h" @@ -2149,7 +2148,13 @@ static Gwn_VertBuf *mesh_batch_cache_get_tri_uv_active( { BLI_assert(rdata->types & (MR_DATATYPE_VERT | MR_DATATYPE_LOOPTRI | MR_DATATYPE_LOOP | MR_DATATYPE_LOOPUV)); + if (cache->tri_aligned_uv == NULL) { + const MLoopUV *mloopuv = rdata->mloopuv; + if (mloopuv == NULL) { + return NULL; + } + uint vidx = 0; static Gwn_VertFormat format = { 0 }; @@ -2166,7 +2171,6 @@ static Gwn_VertBuf *mesh_batch_cache_get_tri_uv_active( int vbo_len_used = 0; GWN_vertbuf_data_alloc(vbo, vbo_len_capacity); - const MLoopUV *mloopuv = rdata->mloopuv; BMEditMesh *embm = rdata->edit_bmesh; /* get uv's from active UVMap */ |