Depsgraph: Fix wrong relations built for drivers
When target was changed from bone to regular object, new dependency graph was still trying to build relations as if driver was using bone.
This commit is contained in:
@@ -1088,7 +1088,10 @@ void DepsgraphRelationBuilder::build_driver_variables(ID *id, FCurve *fcu)
|
||||
continue;
|
||||
}
|
||||
/* Special handling for directly-named bones. */
|
||||
if ((dtar->flag & DTAR_FLAG_STRUCT_REF) && (dtar->pchan_name[0])) {
|
||||
if ((dtar->flag & DTAR_FLAG_STRUCT_REF) &&
|
||||
(((Object *)dtar->id)->type == OB_ARMATURE) &&
|
||||
(dtar->pchan_name[0]))
|
||||
{
|
||||
Object *object = (Object *)dtar->id;
|
||||
bPoseChannel *target_pchan =
|
||||
BKE_pose_channel_find_name(object->pose,
|
||||
|
||||
Reference in New Issue
Block a user