removing duplicate constants
authorCampbell Barton <ideasman42@gmail.com>
Thu, 19 Jul 2007 12:29:28 +0000 (12:29 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Thu, 19 Jul 2007 12:29:28 +0000 (12:29 +0000)
source/blender/blenkernel/BKE_action.h
source/blender/blenkernel/intern/action.c
source/gameengine/Converter/BL_ActionActuator.cpp

index e848ef0a11bb41d966b90ba7191c8a58a7bf0272..3caf0ad2cc64529bbeb20676a8814b9ad493bed2 100644 (file)
@@ -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
 
index bb0953cc1cc1c491d3849497d8c8505a6e0b116f..0ab4c70cdaebb391275bdd5e082ccbce79d0423f 100644 (file)
@@ -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 :
index 2a7503d610d67641a49d56b3cbdc75600b1fb453..cc014b19f09cdeeeb65ad7f11e9deb158b6e88c9 100644 (file)
@@ -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;