diff options
Diffstat (limited to 'source/blender/blenkernel/intern/action.c')
-rw-r--r-- | source/blender/blenkernel/intern/action.c | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/source/blender/blenkernel/intern/action.c b/source/blender/blenkernel/intern/action.c index 9f5de3f34fa..ccaabbff144 100644 --- a/source/blender/blenkernel/intern/action.c +++ b/source/blender/blenkernel/intern/action.c @@ -218,12 +218,14 @@ blend_poses ( /* Do the transformation blend */ for (i=0; i<3; i++){ - if (schan->flag & POSE_LOC) + if (schan->flag) { + if (POSE_LOC) dchan->loc[i] = (dchan->loc[i]*dstweight) + (schan->loc[i]*srcweight); - if (schan->flag & POSE_SIZE) + if (POSE_SIZE) dchan->size[i] = 1.0f + ((dchan->size[i]-1.0f)*dstweight) + ((schan->size[i]-1.0f)*srcweight); - if (schan->flag & POSE_ROT) + if (POSE_ROT) dchan->quat[i+1] = (dquat[i+1]*dstweight) + (squat[i+1]*srcweight); + } } /* Do one more iteration for the quaternions only and normalize the quaternion if needed */ @@ -850,15 +852,16 @@ bPoseChannel *set_pose_channel (bPose *pose, bPoseChannel *chan){ /* Determine if an equivalent channel exists already */ for (curChan=pose->chanbase.first; curChan; curChan=curChan->next){ if (!strcmp (curChan->name, chan->name)){ - if (chan->flag & POSE_ROT) + if (chan->flag) { + if (POSE_ROT) memcpy (curChan->quat, chan->quat, sizeof(chan->quat)); - if (chan->flag & POSE_SIZE) + if (POSE_SIZE) memcpy (curChan->size, chan->size, sizeof(chan->size)); - if (chan->flag & POSE_LOC) + if (POSE_LOC) memcpy (curChan->loc, chan->loc, sizeof(chan->loc)); - if (chan->flag & PCHAN_DONE) + if (PCHAN_DONE) Mat4CpyMat4 (curChan->obmat, chan->obmat); - + } curChan->flag |= chan->flag; MEM_freeN (chan); return curChan; @@ -870,4 +873,3 @@ bPoseChannel *set_pose_channel (bPose *pose, bPoseChannel *chan){ /* If an equivalent channel doesn't exist, then don't bother setting it. */ } - |