From 2127e62c9b2d05351013ceb5996cddc38925b457 Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Tue, 12 Jun 2012 06:22:23 +0000 Subject: "Fix" for [#30704] Action Constraint mapping bug Feature request rather than a real bug: allow constrained bone to use "object" part of the linked action, in addition to "same-named bone" part. --- source/blender/blenkernel/intern/constraint.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'source/blender/blenkernel/intern/constraint.c') diff --git a/source/blender/blenkernel/intern/constraint.c b/source/blender/blenkernel/intern/constraint.c index 9d36a66843b..62fb791df3a 100644 --- a/source/blender/blenkernel/intern/constraint.c +++ b/source/blender/blenkernel/intern/constraint.c @@ -2159,7 +2159,15 @@ static void actcon_get_tarmat(bConstraint *con, bConstraintOb *cob, bConstraintT printf("do Action Constraint %s - Ob %s Pchan %s\n", con->name, cob->ob->id.name + 2, (cob->pchan) ? cob->pchan->name : NULL); /* Get the appropriate information from the action */ - if (cob->type == CONSTRAINT_OBTYPE_BONE) { + if (cob->type == CONSTRAINT_OBTYPE_OBJECT || (data->flag & BONE_USE_OBJECT_ACTION)) { + Object workob; + + /* evaluate using workob */ + // FIXME: we don't have any consistent standards on limiting effects on object... + what_does_obaction(cob->ob, &workob, NULL, data->act, NULL, t); + BKE_object_to_mat4(&workob, ct->matrix); + } + else if (cob->type == CONSTRAINT_OBTYPE_BONE) { Object workob; bPose *pose; bPoseChannel *pchan, *tchan; @@ -2185,14 +2193,6 @@ static void actcon_get_tarmat(bConstraint *con, bConstraintOb *cob, bConstraintT /* Clean up */ BKE_pose_free(pose); } - else if (cob->type == CONSTRAINT_OBTYPE_OBJECT) { - Object workob; - - /* evaluate using workob */ - // FIXME: we don't have any consistent standards on limiting effects on object... - what_does_obaction(cob->ob, &workob, NULL, data->act, NULL, t); - BKE_object_to_mat4(&workob, ct->matrix); - } else { /* behavior undefined... */ puts("Error: unknown owner type for Action Constraint"); -- cgit v1.2.3