Depsgraph: Use generic function for shape key driver target

This commit is contained in:
2017-12-04 14:08:53 +01:00
parent 235a68d8f3
commit f8fd8b0744
2 changed files with 3 additions and 7 deletions

View File

@@ -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);

View File

@@ -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)) {