From 2faf20c4b3ae1ca6c82dd2a942d2f2a580685436 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 16 Jun 2009 18:25:48 +0000 Subject: BGE Action Actuator setChannel() function was broken in a number of ways. * extract_pose_from_pose only checked one of the list items for NULL when looping over them yet its possible they are different sizes. * game_free_pose needed to be used rather then MEM_freeN, channels would never be freed leaking memory. * setChannel() would make a new pose that wasnt aligned with the existing pose, the lists are assumed aligned so when extracting the channels its unlikely this was ever useful. * Added getChannel() - returns pose loc/size/quat * Added option args for setChannel(channel, matrix) or setChannel(channel, loc, size, quat) --- source/gameengine/PyDoc/GameTypes.py | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'source/gameengine/PyDoc') diff --git a/source/gameengine/PyDoc/GameTypes.py b/source/gameengine/PyDoc/GameTypes.py index 4ab175a8f6c..63dd1a7fabf 100644 --- a/source/gameengine/PyDoc/GameTypes.py +++ b/source/gameengine/PyDoc/GameTypes.py @@ -336,15 +336,23 @@ class BL_ActionActuator(SCA_IActuator): @ivar framePropName: The name of the property that is set to the current frame number. @type framePropName: string """ - def setChannel(channel, matrix, mode = False): + def setChannel(channel, matrix): """ - @param channel: A string specifying the name of the bone channel. + Alternative to the 2 arguments, 4 arguments (channel, matrix, loc, size, quat) are also supported. + + @param channel: A string specifying the name of the bone channel, created if missing. @type channel: string @param matrix: A 4x4 matrix specifying the overriding transformation as an offset from the bone's rest position. @type matrix: list [[float]] - @param mode: True for armature/world space, False for bone space - @type mode: boolean + """ + + def getChannel(channel): + """ + @param channel: A string specifying the name of the bone channel. error raised if missing. + @type channel: string + @rtype: tuple + @return: (loc, size, quat) """ #{ Deprecated -- cgit v1.2.3