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
path: root/source
diff options
context:
space:
mode:
authorBastien Montagne <bastien@blender.org>2021-06-23 17:58:15 +0300
committerBastien Montagne <bastien@blender.org>2021-06-23 18:00:17 +0300
commit7dd7849dddb6392969f8fc858d8b9b376fb72049 (patch)
treedd6bcc41523d1a672e20ad0786c2ee9b6ef167ff /source
parent7561e3dad064332a430ace005f21c9d3aca5535d (diff)
Memfile Undo: aslo tag embedded IDs for update.
This is again in the fuzzy area of how embedded IDs are handled respectively by partial undo code and depsgraph... Should not be necessary currently, but better be safe and explicit, and also tag those embeded IDs from re-used owner ID.
Diffstat (limited to 'source')
-rw-r--r--source/blender/editors/undo/memfile_undo.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/source/blender/editors/undo/memfile_undo.c b/source/blender/editors/undo/memfile_undo.c
index 9189adaf4d1..7c6ce56eab0 100644
--- a/source/blender/editors/undo/memfile_undo.c
+++ b/source/blender/editors/undo/memfile_undo.c
@@ -224,9 +224,21 @@ static void memfile_undosys_step_decode(struct bContext *C,
/* Tag depsgraph to update data-block for changes that happened between the
* current and the target state, see direct_link_id_restore_recalc(). */
- if (id->recalc) {
+ if (id->recalc != 0) {
DEG_id_tag_update_ex(bmain, id, id->recalc);
}
+
+ bNodeTree *nodetree = ntreeFromID(id);
+ if (nodetree != NULL && nodetree->id.recalc != 0) {
+ DEG_id_tag_update_ex(bmain, &nodetree->id, nodetree->id.recalc);
+ }
+ if (GS(id->name) == ID_SCE) {
+ Scene *scene = (Scene *)id;
+ if (scene->master_collection != NULL && scene->master_collection->id.recalc != 0) {
+ DEG_id_tag_update_ex(
+ bmain, &scene->master_collection->id, scene->master_collection->id.recalc);
+ }
+ }
}
FOREACH_MAIN_ID_END;