diff options
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..aa9ce28850c 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 |= 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? */ |