[Bf-blender-cvs] [1c655bbd75d] uuid-undo-experiments-swap-reread-datablocks: Cleanup from review.

Bastien Montagne noreply at git.blender.org
Tue Mar 3 18:16:39 CET 2020


Commit: 1c655bbd75da526fdd1238136658caf0229fa2d1
Author: Bastien Montagne
Date:   Tue Mar 3 18:15:53 2020 +0100
Branches: uuid-undo-experiments-swap-reread-datablocks
https://developer.blender.org/rB1c655bbd75da526fdd1238136658caf0229fa2d1

Cleanup from review.

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

M	source/blender/blenloader/intern/readfile.c

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

diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index f92517ad58e..e33339c2747 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -9393,16 +9393,19 @@ static BHead *read_libblock(FileData *fd,
     BLI_remlink(old_lb, id_old);
     BLI_remlink(new_lb, id);
 
+    /* We do not need any remapping from this call here, since no ID pointer is valid in the data
+     * currently (they are all pointing to old addresses, and need to go through `lib_link`
+     * process). So we can pass NULL for the Main pointer parameter. */
     BKE_id_full_swap(NULL, id, id_old);
 
     BLI_addtail(new_lb, id_old);
     BLI_addtail(old_lb, id);
   }
   else if (fd->memfile != NULL) {
-    printf("We had to fully re-recreate ID %s (old addr: %p, new addr: %p)...\n",
-           id->name,
-           id_old,
-           id);
+    DEBUG_PRINTF("We had to fully re-recreate ID %s (old addr: %p, new addr: %p)...\n",
+                 id->name,
+                 id_old,
+                 id);
   }
 
   return (bhead);



More information about the Bf-blender-cvs mailing list