diff options
author | Campbell Barton <ideasman42@gmail.com> | 2017-03-20 01:25:39 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2017-03-20 01:32:40 +0300 |
commit | 3f818c7898af20eed05b05e911a697a25287c432 (patch) | |
tree | 74715f36df2a0b26e6e4f52b7ed6d0e27316f336 /source/blender/blenkernel/intern/DerivedMesh.c | |
parent | 4137f30928dcfda4539d3d80df2c3e079eed12ec (diff) | |
parent | df76616d7450b99938f265283fad443186da4039 (diff) |
Merge branch 'master' into blender2.8
Diffstat (limited to 'source/blender/blenkernel/intern/DerivedMesh.c')
-rw-r--r-- | source/blender/blenkernel/intern/DerivedMesh.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/source/blender/blenkernel/intern/DerivedMesh.c b/source/blender/blenkernel/intern/DerivedMesh.c index 9022faba181..b9cc9540cf7 100644 --- a/source/blender/blenkernel/intern/DerivedMesh.c +++ b/source/blender/blenkernel/intern/DerivedMesh.c @@ -2913,9 +2913,6 @@ DerivedMesh *editbmesh_get_derived_base(Object *obedit, BMEditMesh *em, CustomDa /* get derived mesh from an object, using editbmesh if available. */ DerivedMesh *object_get_derived_final(Object *ob, const bool for_render) { - Mesh *me = ob->data; - BMEditMesh *em = me->edit_btmesh; - if (for_render) { /* TODO(sergey): use proper derived render here in the future. */ return ob->derivedFinal; @@ -2923,9 +2920,13 @@ DerivedMesh *object_get_derived_final(Object *ob, const bool for_render) /* only return the editmesh if its from this object because * we don't a mesh from another object's modifier stack: T43122 */ - if (em && (em->ob == ob)) { - DerivedMesh *dm = em->derivedFinal; - return dm; + if (ob->type == OB_MESH) { + Mesh *me = ob->data; + BMEditMesh *em = me->edit_btmesh; + if (em && (em->ob == ob)) { + DerivedMesh *dm = em->derivedFinal; + return dm; + } } return ob->derivedFinal; |