diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2018-05-14 15:23:11 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2018-05-14 15:25:13 +0300 |
commit | eabfd031fa055dc064c751b4cd2cb6a783a24cfd (patch) | |
tree | 0a1708e5cb6bdfa207b2989c7606a5844ab1eb3f /source/blender/blenkernel/intern/mesh.c | |
parent | 63c23971717d8a578e737c26796b92479c160f23 (diff) |
Fix T55031: add explicit copy flag to force deep-copying shapekey datablock with 'parent' one.
Chose to change defaut behavior (0-flag one) here, for sake of
consistency. Default behavior of simple BKE_id_copy() remains unchanged
though.
Diffstat (limited to 'source/blender/blenkernel/intern/mesh.c')
-rw-r--r-- | source/blender/blenkernel/intern/mesh.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/mesh.c b/source/blender/blenkernel/intern/mesh.c index b16a5a6d75d..a64eb5aa071 100644 --- a/source/blender/blenkernel/intern/mesh.c +++ b/source/blender/blenkernel/intern/mesh.c @@ -558,7 +558,7 @@ void BKE_mesh_copy_data(Main *bmain, Mesh *me_dst, const Mesh *me_src, const int me_dst->bb = MEM_dupallocN(me_dst->bb); /* TODO Do we want to add flag to prevent this? */ - if (me_src->key) { + if (me_src->key && (flag & LIB_ID_COPY_SHAPEKEY)) { BKE_id_copy_ex(bmain, &me_src->key->id, (ID **)&me_dst->key, flag, false); } } @@ -661,7 +661,7 @@ Mesh * BKE_mesh_new_nomain_from_template( Mesh *BKE_mesh_copy(Main *bmain, const Mesh *me) { Mesh *me_copy; - BKE_id_copy_ex(bmain, &me->id, (ID **)&me_copy, 0, false); + BKE_id_copy_ex(bmain, &me->id, (ID **)&me_copy, LIB_ID_COPY_SHAPEKEY, false); return me_copy; } |