[Bf-blender-cvs] [cfa09640be4] undo-experiments-swap-reread-datablocks: Merge branch 'undo-experiments' into undo-experiments-swap-reread-datablocks
Bastien Montagne
noreply at git.blender.org
Fri Feb 14 19:14:33 CET 2020
Commit: cfa09640be46e9a3fd5c1dfcd1570e64755f722f
Author: Bastien Montagne
Date: Fri Feb 14 19:05:32 2020 +0100
Branches: undo-experiments-swap-reread-datablocks
https://developer.blender.org/rBcfa09640be46e9a3fd5c1dfcd1570e64755f722f
Merge branch 'undo-experiments' into undo-experiments-swap-reread-datablocks
Conflicts:
source/blender/blenloader/intern/readfile.c
===================================================================
===================================================================
diff --cc source/blender/blenloader/intern/readfile.c
index 95201eeb532,b305ec9ea71..95c4f297d4e
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@@ -9234,18 -9220,6 +9240,13 @@@ static BHead *read_libblock(FileData *f
id->newid = NULL; /* Needed because .blend may have been saved with crap value here... */
id->orig_id = NULL;
+ if (do_id_swap) {
+ const bool is_id_memaddress_already_registered = !BKE_main_idmemset_register_id(main, 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);
+ }
- else {
- const bool is_id_memaddress_unique = BKE_main_idmemset_register_id(main, id);
- /* Note: this is likely to fail at some point with current undo/redo code! */
- BLI_assert(is_id_memaddress_unique);
- }
+
/* this case cannot be direct_linked: it's just the ID part */
if (id_bhead->code == ID_LINK_PLACEHOLDER) {
/* That way, we know which data-lock needs do_versions (required currently for linking). */
More information about the Bf-blender-cvs
mailing list