diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2019-09-28 01:19:30 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2019-09-28 01:44:16 +0300 |
commit | ad22d3111f231f172fd3bb4bae4b8a87f69e2026 (patch) | |
tree | bbe3d7e9d457f602201744dff7121d5c028f41f7 /source | |
parent | 6cbfa8d511ffa5828fbc7a703902debbf7133847 (diff) |
Fix T70226 EEVEE: Crash/Assert entering edit mode with instanced meshes...
... and modifiers.
This was caused by wrong mesh being taken into account when in edit mode.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/draw/intern/draw_cache_impl_mesh.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/draw/intern/draw_cache_impl_mesh.c b/source/blender/draw/intern/draw_cache_impl_mesh.c index 6dc2f514f3a..4a69aa3e008 100644 --- a/source/blender/draw/intern/draw_cache_impl_mesh.c +++ b/source/blender/draw/intern/draw_cache_impl_mesh.c @@ -1044,7 +1044,9 @@ void DRW_mesh_batch_cache_create_requested( MBC_EDITUV_FACES_STRETCH_ANGLE | MBC_EDITUV_FACES | MBC_EDITUV_EDGES | MBC_EDITUV_VERTS)) { /* Modifiers will only generate an orco layer if the mesh is deformed. */ if (cache->cd_needed.orco != 0) { - if (CustomData_get_layer(&me->vdata, CD_ORCO) == NULL) { + /* Orco is always extracted from final mesh. */ + Mesh *me_final = (me->edit_mesh) ? me->edit_mesh->mesh_eval_final : me; + if (CustomData_get_layer(&me_final->vdata, CD_ORCO) == NULL) { /* Skip orco calculation */ cache->cd_needed.orco = 0; } |