diff options
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/depsgraph/intern/builder/deg_builder_relations.cc | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/source/blender/depsgraph/intern/builder/deg_builder_relations.cc b/source/blender/depsgraph/intern/builder/deg_builder_relations.cc index 4fb893b350c..182404a848b 100644 --- a/source/blender/depsgraph/intern/builder/deg_builder_relations.cc +++ b/source/blender/depsgraph/intern/builder/deg_builder_relations.cc @@ -1453,6 +1453,9 @@ void DepsgraphRelationBuilder::build_driver_data(ID *id, FCurve *fcu) * which will affect the evaluation of corresponding pose bones. */ Bone *bone = (Bone *)property_entry_key.ptr.data; if (bone != nullptr) { + const char *prop_identifier = RNA_property_identifier(property_entry_key.prop); + const bool driver_targets_bbone = STRPREFIX(prop_identifier, "bbone_"); + /* Find objects which use this, and make their eval callbacks * depend on this. */ for (IDNode *to_node : graph_->id_nodes) { @@ -1462,8 +1465,9 @@ void DepsgraphRelationBuilder::build_driver_data(ID *id, FCurve *fcu) if (object->data == id_ptr && object->pose != nullptr) { bPoseChannel *pchan = BKE_pose_channel_find_name(object->pose, bone->name); if (pchan != nullptr) { - OperationKey bone_key( - &object->id, NodeType::BONE, pchan->name, OperationCode::BONE_LOCAL); + OperationCode target_op = driver_targets_bbone ? OperationCode::BONE_SEGMENTS : + OperationCode::BONE_LOCAL; + OperationKey bone_key(&object->id, NodeType::BONE, pchan->name, target_op); add_relation(driver_key, bone_key, "Arm Bone -> Driver -> Bone"); } } |