[Bf-blender-cvs] [9f8ae130af4] master: Fix T95006: missing modifier update after frame change

Jacques Lucke noreply at git.blender.org
Tue Jan 18 12:58:39 CET 2022


Commit: 9f8ae130af4082538f5859f39439cf3b6b52873e
Author: Jacques Lucke
Date:   Tue Jan 18 12:58:29 2022 +0100
Branches: master
https://developer.blender.org/rB9f8ae130af4082538f5859f39439cf3b6b52873e

Fix T95006: missing modifier update after frame change

The previous optimization did not work in general yet, unfortunately.
This change makes the code more correct, but also brings back
some unnecessary updates (e.g. when creating a node group).

===================================================================

M	source/blender/depsgraph/intern/builder/deg_builder_relations.cc

===================================================================

diff --git a/source/blender/depsgraph/intern/builder/deg_builder_relations.cc b/source/blender/depsgraph/intern/builder/deg_builder_relations.cc
index 38e46ca95c6..cb43ef685d4 100644
--- a/source/blender/depsgraph/intern/builder/deg_builder_relations.cc
+++ b/source/blender/depsgraph/intern/builder/deg_builder_relations.cc
@@ -2542,17 +2542,10 @@ void DepsgraphRelationBuilder::build_nodetree(bNodeTree *ntree)
       bNodeTree *group_ntree = (bNodeTree *)id;
       build_nodetree(group_ntree);
       ComponentKey group_output_key(&group_ntree->id, NodeType::NTREE_OUTPUT);
-      /* The output of the current tree does not necessarily change when the output of the group
-       * changed. The parent node group is currently explicitly tagged for update in
-       * #ED_node_tree_propagate_change. In the future we could move this relation to the
-       * depsgraph, but then the depsgraph has to do some more static analysis of the node tree to
-       * see which groups the output actually depends on.
-       *
-       * Furthermore, shader nodes currently depend on relations being created from e.g. objects to
-       * nodes. Geometry nodes do not depend on these relations, because they are explicitly
-       * created by the modifier (which is the thing that actually depends on the objects). */
-      const int relation_flag = (group_ntree->type == NTREE_SHADER) ? 0 : RELATION_FLAG_NO_FLUSH;
-      add_relation(group_output_key, ntree_output_key, "Group Node", relation_flag);
+      /* This relation is not necessary in all cases (e.g. when the group node is not connected to
+       * the output). Currently, we lack the infrastructure to check for these cases efficiently.
+       * That can be added later. */
+      add_relation(group_output_key, ntree_output_key, "Group Node");
     }
     else {
       BLI_assert_msg(0, "Unknown ID type used for node");



More information about the Bf-blender-cvs mailing list