[Bf-blender-cvs] [5a3c44937f6] master: Fix T64764: 'Reload' on linked libraries disconnects proxy armature datablocks.

Bastien Montagne noreply at git.blender.org
Wed May 22 23:37:53 CEST 2019


Commit: 5a3c44937f64776099125577126766c67f96139a
Author: Bastien Montagne
Date:   Wed May 22 09:23:17 2019 +0200
Branches: master
https://developer.blender.org/rB5a3c44937f64776099125577126766c67f96139a

Fix T64764: 'Reload' on linked libraries disconnects proxy armature datablocks.

Note that this only fixes the core issue reported (caused by own dummy
mistake in rBd0df7fb3b94ea), investigating that report uncovered at leat
two more issues, including a crasher (when reloading after an undo)...

===================================================================

M	source/blender/blenkernel/intern/library_query.c
M	source/blender/windowmanager/intern/wm_files_link.c

===================================================================

diff --git a/source/blender/blenkernel/intern/library_query.c b/source/blender/blenkernel/intern/library_query.c
index a95069a2af9..085051f633c 100644
--- a/source/blender/blenkernel/intern/library_query.c
+++ b/source/blender/blenkernel/intern/library_query.c
@@ -591,7 +591,7 @@ static void library_foreach_ID_link(Main *bmain,
         CALLBACK_INVOKE(object->parent, IDWALK_CB_NEVER_SELF);
         CALLBACK_INVOKE(object->track, IDWALK_CB_NEVER_SELF);
         /* object->proxy is refcounted, but not object->proxy_group... *sigh* */
-        CALLBACK_INVOKE(object->proxy, IDWALK_CB_NEVER_SELF);
+        CALLBACK_INVOKE(object->proxy, IDWALK_CB_USER | IDWALK_CB_NEVER_SELF);
         CALLBACK_INVOKE(object->proxy_group, IDWALK_CB_NOP);
 
         /* Special case!
diff --git a/source/blender/windowmanager/intern/wm_files_link.c b/source/blender/windowmanager/intern/wm_files_link.c
index 0cb3e5e3088..1a46a4550d9 100644
--- a/source/blender/windowmanager/intern/wm_files_link.c
+++ b/source/blender/windowmanager/intern/wm_files_link.c
@@ -729,7 +729,10 @@ static void lib_relocate_do(Main *bmain,
     }
     if (new_id) {
 #ifdef PRINT_DEBUG
-      printf("before remap, old_id users: %d, new_id users: %d\n", old_id->us, new_id->us);
+      printf("before remap of %s, old_id users: %d, new_id users: %d\n",
+             old_id->name,
+             old_id->us,
+             new_id->us);
 #endif
       BKE_libblock_remap_locked(bmain, old_id, new_id, remap_flags);
 
@@ -739,7 +742,10 @@ static void lib_relocate_do(Main *bmain,
       }
 
 #ifdef PRINT_DEBUG
-      printf("after remap, old_id users: %d, new_id users: %d\n", old_id->us, new_id->us);
+      printf("after remap of %s, old_id users: %d, new_id users: %d\n",
+             old_id->name,
+             old_id->us,
+             new_id->us);
 #endif
 
       /* In some cases, new_id might become direct link, remove parent of library in this case. */



More information about the Bf-blender-cvs mailing list