Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Montagne <montagne29@wanadoo.fr>2016-07-08 20:53:57 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2016-07-08 20:53:57 +0300
commit8662f583da216b56cf8f4dbe5f68c9da7999a9f1 (patch)
treed13a385fb3462dd1aecb4d4f69448730a166bdd5 /source/blender/blenkernel/intern/library.c
parent282de867d48fea9cf930e68ef9553ed5d31cc5fd (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/library.c')
-rw-r--r--source/blender/blenkernel/intern/library.c17
1 files changed, 4 insertions, 13 deletions
diff --git a/source/blender/blenkernel/intern/library.c b/source/blender/blenkernel/intern/library.c
index 445e841eafc..e83f462ed79 100644
--- a/source/blender/blenkernel/intern/library.c
+++ b/source/blender/blenkernel/intern/library.c
@@ -142,7 +142,7 @@ void BKE_id_lib_local_paths(Main *bmain, Library *lib, ID *id)
void id_lib_extern(ID *id)
{
- if (id) {
+ if (id && ID_IS_LINKED_DATABLOCK(id)) {
BLI_assert(BKE_idcode_is_linkable(GS(id->name)));
if (id->tag & LIB_TAG_INDIRECT) {
id->tag -= LIB_TAG_INDIRECT;
@@ -267,16 +267,10 @@ bool id_make_local(Main *bmain, ID *id, bool test)
if (!test) BKE_object_make_local(bmain, (Object *)id);
return true;
case ID_ME:
- if (!test) {
- BKE_mesh_make_local(bmain, (Mesh *)id);
- BKE_key_make_local(((Mesh *)id)->key);
- }
+ if (!test) BKE_mesh_make_local(bmain, (Mesh *)id);
return true;
case ID_CU:
- if (!test) {
- BKE_curve_make_local((Curve *)id);
- BKE_key_make_local(((Curve *)id)->key);
- }
+ if (!test) BKE_curve_make_local((Curve *)id);
return true;
case ID_MB:
if (!test) BKE_mball_make_local((MetaBall *)id);
@@ -291,10 +285,7 @@ bool id_make_local(Main *bmain, ID *id, bool test)
if (!test) BKE_image_make_local((Image *)id);
return true;
case ID_LT:
- if (!test) {
- BKE_lattice_make_local((Lattice *)id);
- BKE_key_make_local(((Lattice *)id)->key);
- }
+ if (!test) BKE_lattice_make_local((Lattice *)id);
return true;
case ID_LA:
if (!test) BKE_lamp_make_local((Lamp *)id);