diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2019-04-16 02:50:35 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2019-04-16 02:51:32 +0300 |
commit | 6830adaaabbd7f33e7a90608bcfb6bfad1957ecc (patch) | |
tree | aec88024bd2ec368bbd23fbee7ff6b41dc5f1e11 /source/blender | |
parent | 5ac7675f4c9c06b9c3b5598dff4b9ce1a7a56cbe (diff) |
Fix proxy remapping on make local failing for more than one object.
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/blenkernel/intern/library.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/source/blender/blenkernel/intern/library.c b/source/blender/blenkernel/intern/library.c index 517ecd78558..c505188d421 100644 --- a/source/blender/blenkernel/intern/library.c +++ b/source/blender/blenkernel/intern/library.c @@ -1745,8 +1745,6 @@ void BKE_library_make_local( Main *bmain, const Library *lib, GHash *old_to_new_ids, const bool untagged_only, const bool set_fake) { ListBase *lbarray[MAX_LIBARRAY]; - ID *id; - int a; LinkNode *todo_ids = NULL; LinkNode *copied_ids = NULL; @@ -1766,8 +1764,8 @@ void BKE_library_make_local( #endif /* Step 1: Detect datablocks to make local. */ - for (a = set_listbasepointers(bmain, lbarray); a--; ) { - id = lbarray[a]->first; + for (int a = set_listbasepointers(bmain, lbarray); a--; ) { + ID *id = lbarray[a]->first; /* Do not explicitly make local non-linkable IDs (shapekeys, in fact), they are assumed to be handled * by real datablocks responsible of them. */ @@ -1841,7 +1839,7 @@ void BKE_library_make_local( * which involves more complex checks and might instead create a local copy of original linked ID. */ for (LinkNode *it = todo_ids, *it_next; it; it = it_next) { it_next = it->next; - id = it->link; + ID *id = it->link; if (id->tag & LIB_TAG_DOIT) { /* We know all users of this object are local or will be made fully local, even if currently there are @@ -1893,7 +1891,7 @@ void BKE_library_make_local( * using again main->relations mapping, but... this implies BKE_libblock_remap & co to be able to update * main->relations on the fly. Have to think about it a bit more, and see whether new code is OK first, anyway. */ for (LinkNode *it = copied_ids; it; it = it->next) { - id = it->link; + ID *id = it->link; BLI_assert(id->newid != NULL); BLI_assert(id->lib != NULL); @@ -1917,6 +1915,8 @@ void BKE_library_make_local( /* Step 5: proxy 'remapping' hack. */ for (LinkNode *it = copied_ids; it; it = it->next) { + ID *id = it->link; + /* Attempt to re-link copied proxy objects. This allows appending of an entire scene * from another blend file into this one, even when that blend file contains proxified * armatures that have local references. Since the proxified object needs to be linked |