diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2016-07-08 20:53:57 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2016-07-08 20:53:57 +0300 |
commit | 8662f583da216b56cf8f4dbe5f68c9da7999a9f1 (patch) | |
tree | d13a385fb3462dd1aecb4d4f69448730a166bdd5 /source/blender/blenkernel/intern/mesh.c | |
parent | 282de867d48fea9cf930e68ef9553ed5d31cc5fd (diff) |
Fix (unreported) broken shapekeys after 'make_local' of datablocks used both directly and directly.
At first thought it was own recent work, but think issue is there since ages actually...
Basically, id_make_local() would always localize mesh/curve/lattice shapekeys, even in case
obdata localization actually made a local copy instead of localizing original datablock.
This was causing shapekeys being localized twice, and other odd nasty effects.
Diffstat (limited to 'source/blender/blenkernel/intern/mesh.c')
-rw-r--r-- | source/blender/blenkernel/intern/mesh.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/source/blender/blenkernel/intern/mesh.c b/source/blender/blenkernel/intern/mesh.c index 69c1cb43185..f00e5123f35 100644 --- a/source/blender/blenkernel/intern/mesh.c +++ b/source/blender/blenkernel/intern/mesh.c @@ -585,10 +585,7 @@ static int extern_local_mesh_callback( { /* We only tag usercounted ID usages as extern... Why? */ if ((cd_flag & IDWALK_USER) && *id_pointer) { - /* Exception: skip shapekeys, those are supposed to be made local immediately after anyway. */ - if (GS((*id_pointer)->name) != ID_KE) { - id_lib_extern(*id_pointer); - } + id_lib_extern(*id_pointer); } return IDWALK_NOP; } @@ -645,6 +642,7 @@ void BKE_mesh_make_local(Main *bmain, Mesh *me) if (is_local) { if (!is_lib) { id_clear_lib_data(bmain, &me->id); + BKE_key_make_local(me->key); expand_local_mesh(me); } else { |