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
|
||||
|
||||
/* nla strip->mode, for action blending */
|
||||
enum {
|
||||
POSE_BLEND = 0,
|
||||
POSE_ADD
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
@ -458,10 +458,10 @@ static void blend_pose_strides(bPose *dst, bPose *src, float srcweight, short mo
|
||||
float dstweight;
|
||||
|
||||
switch (mode){
|
||||
case POSE_BLEND:
|
||||
case ACTSTRIPMODE_BLEND:
|
||||
dstweight = 1.0F - srcweight;
|
||||
break;
|
||||
case POSE_ADD:
|
||||
case ACTSTRIPMODE_ADD:
|
||||
dstweight = 1.0F;
|
||||
break;
|
||||
default :
|
||||
@ -563,10 +563,10 @@ void blend_poses(bPose *dst, bPose *src, float srcweight, short mode)
|
||||
int i;
|
||||
|
||||
switch (mode){
|
||||
case POSE_BLEND:
|
||||
case ACTSTRIPMODE_BLEND:
|
||||
dstweight = 1.0F - srcweight;
|
||||
break;
|
||||
case POSE_ADD:
|
||||
case ACTSTRIPMODE_ADD:
|
||||
dstweight = 1.0F;
|
||||
break;
|
||||
default :
|
||||
@ -582,7 +582,7 @@ void blend_poses(bPose *dst, bPose *src, float srcweight, short mode)
|
||||
if (schan->flag & POSE_ROT) {
|
||||
QUATCOPY(dquat, dchan->quat);
|
||||
QUATCOPY(squat, schan->quat);
|
||||
if(mode==POSE_BLEND)
|
||||
if(mode==ACTSTRIPMODE_BLEND)
|
||||
QuatInterpol(dchan->quat, dquat, squat, srcweight);
|
||||
else
|
||||
QuatAdd(dchan->quat, dquat, squat, srcweight);
|
||||
@ -825,10 +825,10 @@ static void blend_ipochannels(ListBase *dst, ListBase *src, float srcweight, int
|
||||
float dstweight;
|
||||
|
||||
switch (mode){
|
||||
case POSE_BLEND:
|
||||
case ACTSTRIPMODE_BLEND:
|
||||
dstweight = 1.0F - srcweight;
|
||||
break;
|
||||
case POSE_ADD:
|
||||
case ACTSTRIPMODE_ADD:
|
||||
dstweight = 1.0F;
|
||||
break;
|
||||
default :
|
||||
|
@ -384,7 +384,7 @@ bool BL_ActionActuator::Update(double curtime, bool frame)
|
||||
|
||||
/* Find percentages */
|
||||
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 */
|
||||
m_blendframe = (curtime - m_blendstart)*KX_FIXED_FRAME_PER_SEC;
|
||||
|
Loading…
Reference in New Issue
Block a user