diff options
Diffstat (limited to 'source/blender/blenkernel/intern/mesh.c')
-rw-r--r-- | source/blender/blenkernel/intern/mesh.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/mesh.c b/source/blender/blenkernel/intern/mesh.c index ff8c0076f7b..b58bf58750e 100644 --- a/source/blender/blenkernel/intern/mesh.c +++ b/source/blender/blenkernel/intern/mesh.c @@ -576,6 +576,7 @@ void BKE_mesh_copy_data(Main *bmain, Mesh *me_dst, const Mesh *me_src, const int /* This is a direct copy of a main mesh, so for now it has the same topology. */ me_dst->runtime.deformed_only = 1; } + me_dst->runtime.is_original = false; me_dst->mselect = MEM_dupallocN(me_dst->mselect); me_dst->bb = MEM_dupallocN(me_dst->bb); @@ -709,7 +710,7 @@ Mesh *BKE_mesh_copy_for_eval(struct Mesh *source, bool reference) } Mesh *result; - BKE_id_copy_ex( NULL, &source->id, (ID **)&result, flags, false); + BKE_id_copy_ex(NULL, &source->id, (ID **)&result, flags, false); return result; } @@ -770,10 +771,13 @@ Mesh *BKE_mesh_from_editmesh_with_coords_thin_wrap( BMEditMesh *em, CustomDataMask data_mask, float (*vertexCos)[3]) { Mesh *me = BKE_mesh_from_bmesh_for_eval_nomain(em->bm, data_mask); + /* Use editmesh directly where possible. */ + me->runtime.is_original = true; if (vertexCos) { /* We will own this array in the future. */ BKE_mesh_apply_vert_coords(me, vertexCos); MEM_freeN(vertexCos); + me->runtime.is_original = false; } return me; } |