From 0b500ba1479550c9d6696889f74b945ad0c0dbd5 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Tue, 16 Jan 2018 11:53:34 +0100 Subject: Depsgraph: Fix fake cyclic dependencies for node tree drivers There was a fake cyclic dependency happening when node of node tree is driving another node of the same tree. This is related to T53794, but more fixes is needed here. --- .../depsgraph/intern/builder/deg_builder_relations.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'source/blender/depsgraph/intern/builder/deg_builder_relations.h') diff --git a/source/blender/depsgraph/intern/builder/deg_builder_relations.h b/source/blender/depsgraph/intern/builder/deg_builder_relations.h index 9558a726402..1a761f76744 100644 --- a/source/blender/depsgraph/intern/builder/deg_builder_relations.h +++ b/source/blender/depsgraph/intern/builder/deg_builder_relations.h @@ -276,9 +276,22 @@ protected: DepsNodeHandle create_node_handle(const KeyType& key, const char *default_name = ""); + /* Check whether two keys correponds to the same bone from same armature. + * + * This is used by drivers relations builder to avoid possible fake + * dependency cycle when one bone property drives another property of the + * same bone. + */ template bool is_same_bone_dependency(const KeyFrom& key_from, const KeyTo& key_to); + /* Similar to above, but used to check whether driver is using node from + * the same node tree as a driver variable. + */ + template + bool is_nodetree_node_dependency(const KeyFrom& key_from, + const KeyTo& key_to); + private: /* State which never changes, same for the whole builder time. */ Main *bmain_; -- cgit v1.2.3