[Bf-blender-cvs] [f8fd8b07441] master: Depsgraph: Use generic function for shape key driver target

Sergey Sharybin noreply at git.blender.org
Wed Dec 6 10:32:35 CET 2017


Commit: f8fd8b0744104877a579ab4b603e2a8fb596e503
Author: Sergey Sharybin
Date:   Mon Dec 4 14:08:53 2017 +0100
Branches: master
https://developer.blender.org/rBf8fd8b0744104877a579ab4b603e2a8fb596e503

Depsgraph: Use generic function for shape key driver target

===================================================================

M	source/blender/depsgraph/intern/builder/deg_builder_relations.cc
M	source/blender/depsgraph/intern/depsgraph.cc

===================================================================

diff --git a/source/blender/depsgraph/intern/builder/deg_builder_relations.cc b/source/blender/depsgraph/intern/builder/deg_builder_relations.cc
index 2755357e11b..24894663920 100644
--- a/source/blender/depsgraph/intern/builder/deg_builder_relations.cc
+++ b/source/blender/depsgraph/intern/builder/deg_builder_relations.cc
@@ -1022,12 +1022,8 @@ void DepsgraphRelationBuilder::build_driver(ID *id, FCurve *fcu)
 		add_relation(driver_key, target_key, "Driver -> Target");
 	}
 	else if (GS(id->name) == ID_KE && strstr(rna_path, "key_blocks[")) {
-		/* Shape key driver - hook into the base geometry operation. */
-		// XXX: double check where this points
-		Key *shape_key = (Key *)id;
-
-		ComponentKey geometry_key(shape_key->from, DEG_NODE_TYPE_GEOMETRY);
-		add_relation(driver_key, geometry_key, "Driver -> ShapeKey Geom");
+		RNAPathKey target_key(id, rna_path);
+		add_relation(driver_key, target_key, "Driver -> Target");
 	}
 	else if (strstr(rna_path, "key_blocks[")) {
 		ComponentKey geometry_key(id, DEG_NODE_TYPE_GEOMETRY);
diff --git a/source/blender/depsgraph/intern/depsgraph.cc b/source/blender/depsgraph/intern/depsgraph.cc
index ffdd0004727..a1251a4f425 100644
--- a/source/blender/depsgraph/intern/depsgraph.cc
+++ b/source/blender/depsgraph/intern/depsgraph.cc
@@ -202,7 +202,7 @@ static bool pointer_to_component_node_criteria(
 		 * owns it.
 		 */
 		*id = key->from;
-		*type = DEG_NODE_TYPE_PARAMETERS;
+		*type = DEG_NODE_TYPE_GEOMETRY;
 		return true;
 	}
 	else if (RNA_struct_is_a(ptr->type, &RNA_Sequence)) {



More information about the Bf-blender-cvs mailing list