diff options
-rw-r--r-- | source/blender/editors/undo/memfile_undo.c | 14 |
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; |