[Bf-blender-cvs] [6830adaaabb] master: Fix proxy remapping on make local failing for more than one object.
Brecht Van Lommel
noreply at git.blender.org
Tue Apr 16 01:57:01 CEST 2019
Commit: 6830adaaabbd7f33e7a90608bcfb6bfad1957ecc
Author: Brecht Van Lommel
Date: Tue Apr 16 01:50:35 2019 +0200
Branches: master
https://developer.blender.org/rB6830adaaabbd7f33e7a90608bcfb6bfad1957ecc
Fix proxy remapping on make local failing for more than one object.
===================================================================
M source/blender/blenkernel/intern/library.c
===================================================================
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
More information about the Bf-blender-cvs
mailing list