diff options
author | Benoit Bolsee <benoit.bolsee@online.be> | 2010-08-25 13:25:11 +0400 |
---|---|---|
committer | Benoit Bolsee <benoit.bolsee@online.be> | 2010-08-25 13:25:11 +0400 |
commit | 80a01e8f2a4316266c2753d5d5e1c1bc91591003 (patch) | |
tree | 604ceb3ffd4abb542b1e799549e688535829c192 /source/gameengine | |
parent | 134e2f001c022129eccbc19b87c48476f547bdb8 (diff) |
Fix BGE bug reported by Gilberto: BL_AmartureObject.channels returns only one channel. Fix BL_ArmatureChannel.joint_rotation now that bPoseChannel structure is passed directly to the get function.
Diffstat (limited to 'source/gameengine')
-rw-r--r-- | source/gameengine/Converter/BL_ArmatureChannel.cpp | 3 | ||||
-rw-r--r-- | source/gameengine/Converter/BL_ArmatureObject.h | 2 |
2 files changed, 2 insertions, 3 deletions
diff --git a/source/gameengine/Converter/BL_ArmatureChannel.cpp b/source/gameengine/Converter/BL_ArmatureChannel.cpp index f971a900962..30a70d04d27 100644 --- a/source/gameengine/Converter/BL_ArmatureChannel.cpp +++ b/source/gameengine/Converter/BL_ArmatureChannel.cpp @@ -197,8 +197,7 @@ int BL_ArmatureChannel::py_attr_setattr(void *self_v, const struct KX_PYATTRIBUT PyObject* BL_ArmatureChannel::py_attr_get_joint_rotation(void *self_v, const struct KX_PYATTRIBUTE_DEF *attrdef) { - BL_ArmatureChannel* self= static_cast<BL_ArmatureChannel*>(self_v); - bPoseChannel* pchan = self->m_posechannel; + bPoseChannel* pchan = static_cast<bPoseChannel*>(self_v); // decompose the pose matrix in euler rotation float rest_mat[3][3]; float pose_mat[3][3]; diff --git a/source/gameengine/Converter/BL_ArmatureObject.h b/source/gameengine/Converter/BL_ArmatureObject.h index 6ad7de03489..646e9d45365 100644 --- a/source/gameengine/Converter/BL_ArmatureObject.h +++ b/source/gameengine/Converter/BL_ArmatureObject.h @@ -94,7 +94,7 @@ public: BL_ArmatureConstraint* GetConstraint(int index); // for pose channel python API void LoadChannels(); - size_t GetChannelNumber() const { return m_constraintNumber; } + size_t GetChannelNumber() const { return m_channelNumber; } BL_ArmatureChannel* GetChannel(bPoseChannel* channel); BL_ArmatureChannel* GetChannel(const char* channel); BL_ArmatureChannel* GetChannel(int index); |