[Bf-blender-cvs] [3e9cd536872] master: Depsgraph: Cleanup, deduplicate as much as possible in build_driver
Sergey Sharybin
noreply at git.blender.org
Wed Dec 6 10:32:46 CET 2017
Commit: 3e9cd536872c76c291774470addeb12a4e564a34
Author: Sergey Sharybin
Date: Mon Dec 4 18:08:29 2017 +0100
Branches: master
https://developer.blender.org/rB3e9cd536872c76c291774470addeb12a4e564a34
Depsgraph: Cleanup, deduplicate as much as possible in build_driver
===================================================================
M source/blender/depsgraph/intern/builder/deg_builder_relations.cc
===================================================================
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");
More information about the Bf-blender-cvs
mailing list