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.
This commit is contained in:
2016-07-08 19:53:57 +02:00
parent 282de867d4
commit 8662f583da
4 changed files with 10 additions and 17 deletions

View File

@@ -242,6 +242,7 @@ void BKE_curve_make_local(Curve *cu)
if (cu->id.us == 1) {
id_clear_lib_data(bmain, &cu->id);
BKE_key_make_local(cu->key);
extern_local_curve(cu);
return;
}
@@ -255,6 +256,7 @@ void BKE_curve_make_local(Curve *cu)
if (is_local && is_lib == false) {
id_clear_lib_data(bmain, &cu->id);
BKE_key_make_local(cu->key);
extern_local_curve(cu);
}
else if (is_local && is_lib) {