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:
authorSergey Sharybin <sergey.vfx@gmail.com>2018-01-17 20:00:54 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2018-01-17 20:02:51 +0300
commit46204f843b5710dabb99e194aee5e3202b9688e4 (patch)
tree872b2c14e02862950786b65f3b319b8ad6148655 /source/blender/depsgraph/intern/builder/deg_builder_relations.h
parent5d4ffb42a327b08542e3556e7a98f1bc14d21c70 (diff)
Depsgraph: Fix for fake dependency cycle being created for shape key drivers
One thing i'm not fully happy with is all this is_same_* functions. Need to get rid of this by probably adding explicit entry/init/whatever nodes and maybe making node criteria aware of whether key will be used as "from" or as "to" node.
Diffstat (limited to 'source/blender/depsgraph/intern/builder/deg_builder_relations.h')
-rw-r--r--source/blender/depsgraph/intern/builder/deg_builder_relations.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/source/blender/depsgraph/intern/builder/deg_builder_relations.h b/source/blender/depsgraph/intern/builder/deg_builder_relations.h
index 1a761f76744..de13ee19122 100644
--- a/source/blender/depsgraph/intern/builder/deg_builder_relations.h
+++ b/source/blender/depsgraph/intern/builder/deg_builder_relations.h
@@ -276,6 +276,8 @@ protected:
DepsNodeHandle create_node_handle(const KeyType& key,
const char *default_name = "");
+ /* TODO(sergey): All those is_same* functions are to be generalized. */
+
/* Check whether two keys correponds to the same bone from same armature.
*
* This is used by drivers relations builder to avoid possible fake
@@ -289,7 +291,14 @@ protected:
* the same node tree as a driver variable.
*/
template <typename KeyFrom, typename KeyTo>
- bool is_nodetree_node_dependency(const KeyFrom& key_from,
+ bool is_same_nodetree_node_dependency(const KeyFrom& key_from,
+ const KeyTo& key_to);
+
+ /* Similar to above, but used to check whether driver is using key from
+ * the same key datablock as a driver variable.
+ */
+ template <typename KeyFrom, typename KeyTo>
+ bool is_same_shapekey_dependency(const KeyFrom& key_from,
const KeyTo& key_to);
private: