forked from bartvdbraak/blender
removing duplicate constants
This commit is contained in:
parent
ecaafbb70c
commit
b903864aa5
@ -153,11 +153,5 @@ float get_action_frame_inv(struct Object *ob, float cframe);
|
|||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* nla strip->mode, for action blending */
|
|
||||||
enum {
|
|
||||||
POSE_BLEND = 0,
|
|
||||||
POSE_ADD
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -458,10 +458,10 @@ static void blend_pose_strides(bPose *dst, bPose *src, float srcweight, short mo
|
|||||||
float dstweight;
|
float dstweight;
|
||||||
|
|
||||||
switch (mode){
|
switch (mode){
|
||||||
case POSE_BLEND:
|
case ACTSTRIPMODE_BLEND:
|
||||||
dstweight = 1.0F - srcweight;
|
dstweight = 1.0F - srcweight;
|
||||||
break;
|
break;
|
||||||
case POSE_ADD:
|
case ACTSTRIPMODE_ADD:
|
||||||
dstweight = 1.0F;
|
dstweight = 1.0F;
|
||||||
break;
|
break;
|
||||||
default :
|
default :
|
||||||
@ -563,10 +563,10 @@ void blend_poses(bPose *dst, bPose *src, float srcweight, short mode)
|
|||||||
int i;
|
int i;
|
||||||
|
|
||||||
switch (mode){
|
switch (mode){
|
||||||
case POSE_BLEND:
|
case ACTSTRIPMODE_BLEND:
|
||||||
dstweight = 1.0F - srcweight;
|
dstweight = 1.0F - srcweight;
|
||||||
break;
|
break;
|
||||||
case POSE_ADD:
|
case ACTSTRIPMODE_ADD:
|
||||||
dstweight = 1.0F;
|
dstweight = 1.0F;
|
||||||
break;
|
break;
|
||||||
default :
|
default :
|
||||||
@ -582,7 +582,7 @@ void blend_poses(bPose *dst, bPose *src, float srcweight, short mode)
|
|||||||
if (schan->flag & POSE_ROT) {
|
if (schan->flag & POSE_ROT) {
|
||||||
QUATCOPY(dquat, dchan->quat);
|
QUATCOPY(dquat, dchan->quat);
|
||||||
QUATCOPY(squat, schan->quat);
|
QUATCOPY(squat, schan->quat);
|
||||||
if(mode==POSE_BLEND)
|
if(mode==ACTSTRIPMODE_BLEND)
|
||||||
QuatInterpol(dchan->quat, dquat, squat, srcweight);
|
QuatInterpol(dchan->quat, dquat, squat, srcweight);
|
||||||
else
|
else
|
||||||
QuatAdd(dchan->quat, dquat, squat, srcweight);
|
QuatAdd(dchan->quat, dquat, squat, srcweight);
|
||||||
@ -825,10 +825,10 @@ static void blend_ipochannels(ListBase *dst, ListBase *src, float srcweight, int
|
|||||||
float dstweight;
|
float dstweight;
|
||||||
|
|
||||||
switch (mode){
|
switch (mode){
|
||||||
case POSE_BLEND:
|
case ACTSTRIPMODE_BLEND:
|
||||||
dstweight = 1.0F - srcweight;
|
dstweight = 1.0F - srcweight;
|
||||||
break;
|
break;
|
||||||
case POSE_ADD:
|
case ACTSTRIPMODE_ADD:
|
||||||
dstweight = 1.0F;
|
dstweight = 1.0F;
|
||||||
break;
|
break;
|
||||||
default :
|
default :
|
||||||
|
@ -384,7 +384,7 @@ bool BL_ActionActuator::Update(double curtime, bool frame)
|
|||||||
|
|
||||||
/* Find percentages */
|
/* Find percentages */
|
||||||
newweight = (m_blendframe/(float)m_blendin);
|
newweight = (m_blendframe/(float)m_blendin);
|
||||||
blend_poses(m_pose, m_blendpose, 1.0 - newweight, POSE_BLEND);
|
blend_poses(m_pose, m_blendpose, 1.0 - newweight, ACTSTRIPMODE_BLEND);
|
||||||
|
|
||||||
/* Increment current blending percentage */
|
/* Increment current blending percentage */
|
||||||
m_blendframe = (curtime - m_blendstart)*KX_FIXED_FRAME_PER_SEC;
|
m_blendframe = (curtime - m_blendstart)*KX_FIXED_FRAME_PER_SEC;
|
||||||
|
Loading…
Reference in New Issue
Block a user