Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Montagne <bastien@blender.org>2020-05-20 11:39:50 +0300
committerBastien Montagne <bastien@blender.org>2020-05-20 11:39:50 +0300
commit3360db83c45ea225162080b43632549dd4f902f0 (patch)
tree260180b628f6d14855e49217156e1e26daa38d4f /source/blender/blenloader
parentdb6e267bfc73767446515be3f802065abbf633e8 (diff)
Fix T76883: Zero users scenes after undo.
Some tags need to be preserved when we reuse existing ID entirely. AFAICT, currently this is only the EXTRAUSER one.
Diffstat (limited to 'source/blender/blenloader')
-rw-r--r--source/blender/blenloader/intern/readfile.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index 45ebc10e8a2..22862fc1d0d 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -9539,7 +9539,8 @@ static void read_libblock_undo_restore_identical(
BLI_assert((fd->skip_flags & BLO_READ_SKIP_UNDO_OLD_MAIN) == 0);
BLI_assert(id_old != NULL);
- id_old->tag = tag;
+ /* Some tags need to be preserved here. */
+ id_old->tag = tag | (id_old->tag & LIB_TAG_EXTRAUSER);
id_old->lib = main->curlib;
id_old->us = ID_FAKE_USERS(id_old);
/* Do not reset id->icon_id here, memory allocated for it remains valid. */