From f9855800e08e8049e35e5a7226feca500baf0e3a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sybren=20A=2E=20St=C3=BCvel?= Date: Mon, 23 Mar 2020 14:54:04 +0100 Subject: 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. --- source/blender/depsgraph/intern/builder/deg_builder_relations.cc | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source/blender/depsgraph') 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]; -- cgit v1.2.3