[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [31575] trunk/blender/source/gameengine/ Converter: Fix BGE bug reported by Gilberto: BL_AmartureObject. channels returns only one channel.

Benoit Bolsee benoit.bolsee at online.be
Wed Aug 25 11:25:11 CEST 2010


Revision: 31575
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=31575
Author:   ben2610
Date:     2010-08-25 11:25:11 +0200 (Wed, 25 Aug 2010)

Log Message:
-----------
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.

Modified Paths:
--------------
    trunk/blender/source/gameengine/Converter/BL_ArmatureChannel.cpp
    trunk/blender/source/gameengine/Converter/BL_ArmatureObject.h

Modified: trunk/blender/source/gameengine/Converter/BL_ArmatureChannel.cpp
===================================================================
--- trunk/blender/source/gameengine/Converter/BL_ArmatureChannel.cpp	2010-08-25 08:57:42 UTC (rev 31574)
+++ trunk/blender/source/gameengine/Converter/BL_ArmatureChannel.cpp	2010-08-25 09:25:11 UTC (rev 31575)
@@ -197,8 +197,7 @@
 
 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];

Modified: trunk/blender/source/gameengine/Converter/BL_ArmatureObject.h
===================================================================
--- trunk/blender/source/gameengine/Converter/BL_ArmatureObject.h	2010-08-25 08:57:42 UTC (rev 31574)
+++ trunk/blender/source/gameengine/Converter/BL_ArmatureObject.h	2010-08-25 09:25:11 UTC (rev 31575)
@@ -94,7 +94,7 @@
 	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);





More information about the Bf-blender-cvs mailing list