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:
authorSybren A. Stüvel <sybren@blender.org>2020-03-23 16:54:04 +0300
committerSybren A. Stüvel <sybren@blender.org>2020-03-23 16:54:07 +0300
commitf9855800e08e8049e35e5a7226feca500baf0e3a (patch)
treeca2191d00025695f1ca32dfa71526f497a0523e4 /source/blender/depsgraph
parent7192a1bca315485b53214ba8dd5be22d00a10a90 (diff)
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.
Diffstat (limited to 'source/blender/depsgraph')
-rw-r--r--source/blender/depsgraph/intern/builder/deg_builder_relations.cc4
1 files changed, 4 insertions, 0 deletions
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];