Commit: f9855800e08e8049e35e5a7226feca500baf0e3a
Author: Sybren A. Stüvel
Date:   Mon Mar 23 14:54:04 2020 +0100
Branches: master
https://developer.blender.org/rBf9855800e08e8049e35e5a7226feca500baf0e3a

Depsgraph: Driver Relations, skip finding possible relation with one driver

The `build_driver_relations()` function in the depsgraph relations builder
adds relations between drivers that potentially write to the same memory
location. This of course is only useful when there are two or more drivers.

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

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 17de0e0b016..40fbfbc2b99 100644
--- a/source/blender/depsgraph/intern/builder/deg_builder_relations.cc
+++ b/source/blender/depsgraph/intern/builder/deg_builder_relations.cc
@@ -2806,6 +2806,10 @@ void 
DepsgraphRelationBuilder::build_driver_relations(IDNode *id_node)
     // For each node in the driver group, try to connect it to another node
     // in the same group without creating any cycles.
     int num_drivers = prefix_group.second.size();
+    if (num_drivers < 2) {
+      // A relation requires two drivers.
+      continue;
+    }
     for (int from_index = 0; from_index < num_drivers; ++from_index) {
       Node *op_from = prefix_group.second[from_index];

_______________________________________________
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to