[Bf-blender-cvs] [2393fd3d63e] uuid-undo-experiments: Fix for undoing 'unique id memaddress' branch.

Bastien Montagne noreply at git.blender.org
Fri Feb 28 15:46:07 CET 2020


Commit: 2393fd3d63eadb38ce9c1746da3a2e517547f5b1
Author: Bastien Montagne
Date:   Fri Feb 28 15:36:06 2020 +0100
Branches: uuid-undo-experiments
https://developer.blender.org/rB2393fd3d63eadb38ce9c1746da3a2e517547f5b1

Fix for undoing 'unique id memaddress' branch.

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

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

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

diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index da21b381563..97072310e57 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -9121,12 +9121,6 @@ static BHead *read_libblock(FileData *fd,
           BLI_addtail(new_lb, id_old);
 
           can_finalize_and_return = true;
-
-          const bool is_id_memaddress_already_registered = !BKE_main_idmemhash_register_id(
-              main, NULL, id_old);
-          /* Should never fail, since we re-used an existing ID it should have already been
-           * registered. */
-          BLI_assert(is_id_memaddress_already_registered);
         }
 
         if (can_finalize_and_return) {
@@ -9151,12 +9145,6 @@ static BHead *read_libblock(FileData *fd,
     /* do after read_struct, for dna reconstruct */
     lb = which_libbase(main, idcode);
     if (lb) {
-      /* At this point, we know we are going to keep that newly read & allocated ID, so we need to
-       * reallocate it to ensure we actually get a unique memory address for it. */
-      if (!BKE_main_idmemhash_register_id(main, NULL, id)) {
-        id = BKE_main_idmemhash_unique_realloc(main, NULL, id);
-      }
-
       /* for ID_LINK_PLACEHOLDER check */
       oldnewmap_insert(fd->libmap, id_bhead->old, id, id_bhead->code);



More information about the Bf-blender-cvs mailing list