diff options
author | Sergey Sharybin <sergey@blender.org> | 2022-07-26 13:11:54 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey@blender.org> | 2022-07-27 11:19:42 +0300 |
commit | 4dd409a185e2211e541479d6a878b17d5c7e2bdf (patch) | |
tree | fdf84c5e29c1f79cc165b0faa9a199b258c0d0d3 /source/blender/depsgraph/intern/node/deg_node_operation.cc | |
parent | d706d0460c5721e2b07f18ab6354754267628130 (diff) |
Fix T99976: Animated visibility not rendering properly in viewport
A mistake in the 0dcee6a3866 which made specific driven visibility
to work, but did not properly handle actual time-based visibility.
The basic idea of the change is to preserve recalculation flags of
nodes which were tagged for update but were not evaluated due to
visibility constraints. In the file from the report this makes it
so tagging which is done first time ID is in the dependency graph
are handled when the ID actually becomes visible. This is what
solved the root of the problem from the report: there was missing
geometry update since it was "swallowed" by the evaluation during
the object being invisible. In other configurations this change
allows to handle pending geometry updates due to animated modifiers
be handled when object becomes visible without time change.
This change also solves visibility issue of the synchronization
component which also started to be handled badly since the
previous fix attempt. Basically, the needed exception in its
visibility handling did not happen and a regular logic was used
for it.
Tested with files from the T99733, T99976, and from the Heist
project.
Differential Revision: https://developer.blender.org/D15544
Diffstat (limited to 'source/blender/depsgraph/intern/node/deg_node_operation.cc')
-rw-r--r-- | source/blender/depsgraph/intern/node/deg_node_operation.cc | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/source/blender/depsgraph/intern/node/deg_node_operation.cc b/source/blender/depsgraph/intern/node/deg_node_operation.cc index 3029379d141..de4bc0668cf 100644 --- a/source/blender/depsgraph/intern/node/deg_node_operation.cc +++ b/source/blender/depsgraph/intern/node/deg_node_operation.cc @@ -218,9 +218,13 @@ string OperationNode::full_identifier() const void OperationNode::tag_update(Depsgraph *graph, eUpdateSource source) { - if ((flag & DEPSOP_FLAG_NEEDS_UPDATE) == 0) { - graph->add_entry_tag(this); - } + /* Ensure that there is an entry tag for this update. + * + * Note that the node might already be tagged for an update due invisible state of the node + * during previous dependency evaluation. Here the node gets re-tagged, so we need to give + * the evaluated clues that evaluation needs to happen again. */ + graph->add_entry_tag(this); + /* Tag for update, but also note that this was the source of an update. */ flag |= (DEPSOP_FLAG_NEEDS_UPDATE | DEPSOP_FLAG_DIRECTLY_MODIFIED); switch (source) { |