diff options
author | Brecht Van Lommel <brecht@blender.org> | 2021-04-19 20:38:05 +0300 |
---|---|---|
committer | Brecht Van Lommel <brecht@blender.org> | 2021-04-19 21:00:00 +0300 |
commit | cedd8b8c56b944ffdabadc4339d2d1e5c6651dd6 (patch) | |
tree | 2a248a245ade585858997b8418fdabb33c6960d9 /source/blender/depsgraph/intern/node | |
parent | d7caae56c4e33c21453fdeebab6c519e7cb99de6 (diff) |
Fix T87535, T87295: issues with new persistent data option
Some persistent data code was disable due to a deeper design issue, which
meant some updates were not communicated to renderers.
Dependency graph updates work in two passes, once where Blender scene
animation updates are done, then app handler scripts can run to make further
scene modifications, and then the depsgraph is updated again to take those
into account.
Previously the viewport would update renderers twice when such app handler
scripts were present. Now both viewport and persistent data rendering update
the renderers only once, accumulating updates from both passes.
Diffstat (limited to 'source/blender/depsgraph/intern/node')
-rw-r--r-- | source/blender/depsgraph/intern/node/deg_node_id.cc | 1 | ||||
-rw-r--r-- | source/blender/depsgraph/intern/node/deg_node_id.h | 3 |
2 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/depsgraph/intern/node/deg_node_id.cc b/source/blender/depsgraph/intern/node/deg_node_id.cc index 8e159a7ff08..688afe141e9 100644 --- a/source/blender/depsgraph/intern/node/deg_node_id.cc +++ b/source/blender/depsgraph/intern/node/deg_node_id.cc @@ -90,6 +90,7 @@ void IDNode::init(const ID *id, const char *UNUSED(subdata)) is_collection_fully_expanded = false; has_base = false; is_user_modified = false; + id_cow_recalc_backup = 0; visible_components_mask = 0; previously_visible_components_mask = 0; diff --git a/source/blender/depsgraph/intern/node/deg_node_id.h b/source/blender/depsgraph/intern/node/deg_node_id.h index e2d3b3fc36f..073469598dc 100644 --- a/source/blender/depsgraph/intern/node/deg_node_id.h +++ b/source/blender/depsgraph/intern/node/deg_node_id.h @@ -120,6 +120,9 @@ struct IDNode : public Node { /* Accumulated flag from operation. Is initialized and used during updates flush. */ bool is_user_modified; + /* Accumulate recalc flags from multiple update passes. */ + int id_cow_recalc_backup; + IDComponentsMask visible_components_mask; IDComponentsMask previously_visible_components_mask; |