diff options
author | Jacques Lucke <jacques@blender.org> | 2020-04-09 12:59:24 +0300 |
---|---|---|
committer | Jacques Lucke <jacques@blender.org> | 2020-04-09 12:59:24 +0300 |
commit | dabd59ba23f877f68aaf73e79f0d58118723d9b7 (patch) | |
tree | e5a161e9bfe31645e711350fa071ea470673c506 /source/blender/depsgraph/intern/depsgraph_tag.cc | |
parent | 43f895a59247ea4058cb3f019cd4dabd9ad9b0e4 (diff) | |
parent | 80255e67e30c4d77be64a5fa8dc68c0a55f39ebc (diff) |
Merge branch 'master' into functions
Diffstat (limited to 'source/blender/depsgraph/intern/depsgraph_tag.cc')
-rw-r--r-- | source/blender/depsgraph/intern/depsgraph_tag.cc | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/source/blender/depsgraph/intern/depsgraph_tag.cc b/source/blender/depsgraph/intern/depsgraph_tag.cc index f1180c16a87..627a93b5869 100644 --- a/source/blender/depsgraph/intern/depsgraph_tag.cc +++ b/source/blender/depsgraph/intern/depsgraph_tag.cc @@ -622,6 +622,10 @@ void id_tag_update(Main *bmain, ID *id, int flag, eUpdateSource update_source) for (DEG::Depsgraph *depsgraph : DEG::get_all_registered_graphs(bmain)) { graph_id_tag_update(bmain, depsgraph, id, flag, update_source); } + + /* Accumulate all tags for an ID between two undo steps, so they can be + * replayed for undo. */ + id->recalc_undo_accumulated |= deg_recalc_flags_effective(NULL, flag); } void graph_id_tag_update( @@ -820,13 +824,10 @@ void DEG_ids_check_recalc( static void deg_graph_clear_id_recalc_flags(ID *id) { - /* Keep incremental track of used recalc flags, to get proper update when undoing. */ - id->recalc_undo_accumulated |= id->recalc; id->recalc &= ~ID_RECALC_ALL; bNodeTree *ntree = ntreeFromID(id); /* Clear embedded node trees too. */ if (ntree) { - ntree->id.recalc_undo_accumulated |= ntree->id.recalc; ntree->id.recalc &= ~ID_RECALC_ALL; } /* XXX And what about scene's master collection here? */ |