@@ -218,15 +218,13 @@ blend_poses (
|
|||||||
|
|
||||||
/* Do the transformation blend */
|
/* Do the transformation blend */
|
||||||
for (i=0; i<3; i++){
|
for (i=0; i<3; i++){
|
||||||
if (schan->flag) {
|
if (schan->flag & POSE_LOC)
|
||||||
if (POSE_LOC)
|
|
||||||
dchan->loc[i] = (dchan->loc[i]*dstweight) + (schan->loc[i]*srcweight);
|
dchan->loc[i] = (dchan->loc[i]*dstweight) + (schan->loc[i]*srcweight);
|
||||||
if (POSE_SIZE)
|
if (schan->flag & POSE_SIZE)
|
||||||
dchan->size[i] = 1.0f + ((dchan->size[i]-1.0f)*dstweight) + ((schan->size[i]-1.0f)*srcweight);
|
dchan->size[i] = 1.0f + ((dchan->size[i]-1.0f)*dstweight) + ((schan->size[i]-1.0f)*srcweight);
|
||||||
if (POSE_ROT)
|
if (schan->flag & POSE_ROT)
|
||||||
dchan->quat[i+1] = (dquat[i+1]*dstweight) + (squat[i+1]*srcweight);
|
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 */
|
/* Do one more iteration for the quaternions only and normalize the quaternion if needed */
|
||||||
if (schan->flag & POSE_ROT)
|
if (schan->flag & POSE_ROT)
|
||||||
@@ -852,16 +850,15 @@ bPoseChannel *set_pose_channel (bPose *pose, bPoseChannel *chan){
|
|||||||
/* Determine if an equivalent channel exists already */
|
/* Determine if an equivalent channel exists already */
|
||||||
for (curChan=pose->chanbase.first; curChan; curChan=curChan->next){
|
for (curChan=pose->chanbase.first; curChan; curChan=curChan->next){
|
||||||
if (!strcmp (curChan->name, chan->name)){
|
if (!strcmp (curChan->name, chan->name)){
|
||||||
if (chan->flag) {
|
if (chan->flag & POSE_ROT)
|
||||||
if (POSE_ROT)
|
|
||||||
memcpy (curChan->quat, chan->quat, sizeof(chan->quat));
|
memcpy (curChan->quat, chan->quat, sizeof(chan->quat));
|
||||||
if (POSE_SIZE)
|
if (chan->flag & POSE_SIZE)
|
||||||
memcpy (curChan->size, chan->size, sizeof(chan->size));
|
memcpy (curChan->size, chan->size, sizeof(chan->size));
|
||||||
if (POSE_LOC)
|
if (chan->flag & POSE_LOC)
|
||||||
memcpy (curChan->loc, chan->loc, sizeof(chan->loc));
|
memcpy (curChan->loc, chan->loc, sizeof(chan->loc));
|
||||||
if (PCHAN_DONE)
|
if (chan->flag & PCHAN_DONE)
|
||||||
Mat4CpyMat4 (curChan->obmat, chan->obmat);
|
Mat4CpyMat4 (curChan->obmat, chan->obmat);
|
||||||
}
|
|
||||||
curChan->flag |= chan->flag;
|
curChan->flag |= chan->flag;
|
||||||
MEM_freeN (chan);
|
MEM_freeN (chan);
|
||||||
return curChan;
|
return curChan;
|
||||||
@@ -873,3 +870,4 @@ bPoseChannel *set_pose_channel (bPose *pose, bPoseChannel *chan){
|
|||||||
/* If an equivalent channel doesn't exist, then don't bother setting it. */
|
/* If an equivalent channel doesn't exist, then don't bother setting it. */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user