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>2017-12-04 20:08:29 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2017-12-06 12:21:33 +0300
commit3e9cd536872c76c291774470addeb12a4e564a34 (patch)
tree61fd3d53c082d7b9843a3931ac22802035a4e167 /source/blender/depsgraph
parent8c4363e3b1abe13bdd3936aeeac261dc891d849a (diff)
Depsgraph: Cleanup, deduplicate as much as possible in build_driver
Diffstat (limited to 'source/blender/depsgraph')
-rw-r--r--source/blender/depsgraph/intern/builder/deg_builder_relations.cc20
1 files changed, 1 insertions, 19 deletions
diff --git a/source/blender/depsgraph/intern/builder/deg_builder_relations.cc b/source/blender/depsgraph/intern/builder/deg_builder_relations.cc
index 1f6d0f4ff56..df69c64f9aa 100644
--- a/source/blender/depsgraph/intern/builder/deg_builder_relations.cc
+++ b/source/blender/depsgraph/intern/builder/deg_builder_relations.cc
@@ -966,18 +966,12 @@ void DepsgraphRelationBuilder::build_driver(ID *id, FCurve *fcu)
/* Driver -> data components (for interleaved evaluation
* bones/constraints/modifiers).
*/
- // XXX: this probably should probably be moved out into a separate function.
- if (strstr(rna_path, "pose.bones[") != NULL) {
- RNAPathKey target_key(id, rna_path);
- add_relation(driver_key, target_key, "Driver -> Target");
- }
- else if (GS(id->name) == ID_AR && strstr(rna_path, "bones[")) {
+ if (GS(id->name) == ID_AR && strstr(rna_path, "bones[")) {
/* Drivers on armature-level bone settings (i.e. bbone stuff),
* which will affect the evaluation of corresponding pose bones.
*/
IDDepsNode *arm_node = graph_->find_id_node(id);
char *bone_name = BLI_str_quoted_substrN(rna_path, "bones[");
-
if (arm_node && bone_name) {
/* Find objects which use this, and make their eval callbacks
* depend on this.
@@ -1011,18 +1005,6 @@ void DepsgraphRelationBuilder::build_driver(ID *id, FCurve *fcu)
rna_path);
}
}
- else if (GS(id->name) == ID_OB && strstr(rna_path, "modifiers[")) {
- RNAPathKey target_key(id, rna_path);
- add_relation(driver_key, target_key, "Driver -> Target");
- }
- else if (GS(id->name) == ID_KE && strstr(rna_path, "key_blocks[")) {
- RNAPathKey target_key(id, rna_path);
- add_relation(driver_key, target_key, "Driver -> Target");
- }
- else if (strstr(rna_path, "key_blocks[")) {
- RNAPathKey target_key(id, rna_path);
- add_relation(driver_key, target_key, "Driver -> Target");
- }
else {
RNAPathKey target_key(id, rna_path);
add_relation(driver_key, target_key, "Driver -> Target");