[Bf-blender-cvs] [00f6e4c9905] blender-v3.1-release: Fix T96180: driver in node tree not updating in real time

Jacques Lucke noreply at git.blender.org
Mon Mar 7 12:37:23 CET 2022


Commit: 00f6e4c99051b6182d9703891278e180366d96c6
Author: Jacques Lucke
Date:   Mon Mar 7 12:37:13 2022 +0100
Branches: blender-v3.1-release
https://developer.blender.org/rB00f6e4c99051b6182d9703891278e180366d96c6

Fix T96180: driver in node tree not updating in real time

Differential Revision: https://developer.blender.org/D14260

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

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 d63d1bafb3e..3b2e0f92700 100644
--- a/source/blender/depsgraph/intern/builder/deg_builder_relations.cc
+++ b/source/blender/depsgraph/intern/builder/deg_builder_relations.cc
@@ -1646,6 +1646,14 @@ void DepsgraphRelationBuilder::build_driver_data(ID *id, FCurve *fcu)
       add_relation(property_exit_key, parameters_key, "Driven Property -> Properties");
     }
   }
+
+  /* Assume drivers on a node tree affect the evaluated output of the node tree. In theory we could
+   * check if the driven value actually affects the output, i.e. if it drives a node that is linked
+   * to the output. */
+  if (GS(id_ptr->name) == ID_NT) {
+    ComponentKey ntree_output_key(id_ptr, NodeType::NTREE_OUTPUT);
+    add_relation(driver_key, ntree_output_key, "Drivers -> NTree Output");
+  }
 }
 
 void DepsgraphRelationBuilder::build_driver_variables(ID *id, FCurve *fcu)



More information about the Bf-blender-cvs mailing list