diff options
author | Bastien Montagne <b.mont29@gmail.com> | 2020-03-17 14:09:06 +0300 |
---|---|---|
committer | Bastien Montagne <b.mont29@gmail.com> | 2020-03-17 14:10:52 +0300 |
commit | b02a25b7e10e5713052f5a6ccf4127ad4d995f25 (patch) | |
tree | 6cc49eb98bba6d624c0cbf2ee61bd3a755df41a1 /source/blender/depsgraph | |
parent | 055863d9c1f0195765f421b1f87e445dd070ea00 (diff) |
Add accumulated recalc flags to IDs.
Those accumulated flags get cleared every time an undo step is written
to memfile.
Preliminary work for undo-speedup.
Part of T60695/D6580.
Diffstat (limited to 'source/blender/depsgraph')
-rw-r--r-- | source/blender/depsgraph/intern/depsgraph_tag.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/depsgraph/intern/depsgraph_tag.cc b/source/blender/depsgraph/intern/depsgraph_tag.cc index b019c079dab..8decb9f6b87 100644 --- a/source/blender/depsgraph/intern/depsgraph_tag.cc +++ b/source/blender/depsgraph/intern/depsgraph_tag.cc @@ -814,12 +814,16 @@ 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? */ } void DEG_ids_clear_recalc(Main *UNUSED(bmain), Depsgraph *depsgraph) |