diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2012-06-12 10:22:23 +0400 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2012-06-12 10:22:23 +0400 |
commit | 2127e62c9b2d05351013ceb5996cddc38925b457 (patch) | |
tree | b9de0f36991c7a1588188fa27ee0d055559ae2c5 /source/blender/blenkernel/intern/constraint.c | |
parent | ac5a735e3fe9fe29e38e3a20c20da87b27feb112 (diff) |
"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.
Diffstat (limited to 'source/blender/blenkernel/intern/constraint.c')
-rw-r--r-- | source/blender/blenkernel/intern/constraint.c | 18 |
1 files changed, 9 insertions, 9 deletions
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"); |