Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Sharybin <sergey@blender.org>2022-05-27 13:09:14 +0300
committerSergey Sharybin <sergey@blender.org>2022-05-27 13:09:14 +0300
commite5c65709a264fcd07170d6f1287c73d601a3add4 (patch)
tree3aad8ab3bde08a4a1f045efa32226ff55c1d2aa3 /source/blender/depsgraph
parent5625a21fc7cf3738278f02038cb6d8a3c2344584 (diff)
Fix T98379: Wrong evaluation when deactivating/activating collections
This is a regression caused by a230445caec6. The internal cause of the issue was that the synchronization component was no longer tagged as visible (and hence not evaluated) as it not connected to any directly visible IDs. Changed the logic in a way that if any component of an ID is evaluated the synchronization component will be evaluated as well. The naming of the flag in the component node is a bit confusing, but for the simplicity of the change for the upcoming release left it unchanged.
Diffstat (limited to 'source/blender/depsgraph')
-rw-r--r--source/blender/depsgraph/intern/builder/deg_builder.cc15
1 files changed, 15 insertions, 0 deletions
diff --git a/source/blender/depsgraph/intern/builder/deg_builder.cc b/source/blender/depsgraph/intern/builder/deg_builder.cc
index 8ee94ab0a34..56117a00b73 100644
--- a/source/blender/depsgraph/intern/builder/deg_builder.cc
+++ b/source/blender/depsgraph/intern/builder/deg_builder.cc
@@ -136,8 +136,22 @@ void deg_graph_build_flush_visibility(Depsgraph *graph)
for (IDNode *id_node : graph->id_nodes) {
for (ComponentNode *comp_node : id_node->components.values()) {
comp_node->affects_directly_visible |= id_node->is_directly_visible;
+
+ /* Enforce "visibility" of the syncronization component.
+ *
+ * This component is never connected to other ID nodes, and hence can not be handled in the
+ * same way as other components needed for evaluation. It is only needed for proper
+ * evaluation of the ID node it belongs to.
+ *
+ * The design is such that the synchronization is supposed to happen whenever any part of the
+ * ID changed/evaluated. Here we mark the component as "visible" so that genetic recalc flag
+ * flushing and scheduling will handle the component in a generic manner. */
+ if (comp_node->type == NodeType::SYNCHRONIZATION) {
+ comp_node->affects_directly_visible = true;
+ }
}
}
+
for (OperationNode *op_node : graph->operations) {
op_node->custom_flags = 0;
op_node->num_links_pending = 0;
@@ -151,6 +165,7 @@ void deg_graph_build_flush_visibility(Depsgraph *graph)
op_node->custom_flags |= DEG_NODE_VISITED;
}
}
+
while (!BLI_stack_is_empty(stack)) {
OperationNode *op_node;
BLI_stack_pop(stack, &op_node);