Revision: 39826
          
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=39826
Author:   moguri
Date:     2011-08-31 22:32:14 +0000 (Wed, 31 Aug 2011)
Log Message:
-----------
BGE Animations: The return type for KX_GameObject.getActionFrame() was an 
integer when it should have been a float. I've fixed this and converted the 
tabs in the new BGE animation docs to space. I have also added more info on 
return types for KX_GameObject.getActionFrame() and 
KX_GameObject.isPlayingAction().

Modified Paths:
--------------
    trunk/blender/doc/python_api/rst/bge.types.rst
    trunk/blender/source/gameengine/Ketsji/KX_GameObject.cpp

Modified: trunk/blender/doc/python_api/rst/bge.types.rst
===================================================================
--- trunk/blender/doc/python_api/rst/bge.types.rst      2011-08-31 18:53:49 UTC 
(rev 39825)
+++ trunk/blender/doc/python_api/rst/bge.types.rst      2011-08-31 22:32:14 UTC 
(rev 39826)
@@ -1542,59 +1542,63 @@
    .. method:: playAction(name, start_frame, end_frame, layer=0, priority=0 
blendin=0, play_mode=ACT_MODE_PLAY, layer_weight=0.0, ipo_flags=0, speed=1.0)
 
       Plays an action.
-         
+      
       :arg name: the name of the action
-         :type name: string
+      :type name: string
       :arg start: the start frame of the action
-         :type start: float
+      :type start: float
       :arg end: the end frame of the action
-         :type end: float
+      :type end: float
       :arg layer: the layer the action will play in (actions in different 
layers are added/blended together)
-         :type layer: integer
+      :type layer: integer
       :arg priority: only play this action if there isn't an action currently 
playing in this layer with a higher (lower number) priority
-         :type priority: integer
+      :type priority: integer
       :arg blendin: the amount of blending between this animation and the 
previous one on this layer
-         :type blendin: float
+      :type blendin: float
       :arg play_mode: the play mode
-         :type play_mode: KX_ACTION_PLAY, KX_ACTION_LOOP, or 
KX_ACTION_PING_PONG
+      :type play_mode: KX_ACTION_PLAY, KX_ACTION_LOOP, or KX_ACTION_PING_PONG
       :arg layer_weight: how much of the previous layer to use for blending (0 
= add)
-         :type layer_weight: float
+      :type layer_weight: float
       :arg ipo_flags: flags for the old IPO behaviors (force, etc)
-         :type ipo_flags: int bitfield
+      :type ipo_flags: int bitfield
       :arg speed: the playback speed of the action as a factor (1.0 = normal 
speed, 2.0 = 2x speed, etc)
-         :type speed: float
+      :type speed: float
 
    .. method:: stopAction(layer=0)
       
-         Stop playing the action on the given layer.
-         
-         :arg layer: The layer to stop playing.
-         :type layer: integer
-         
+      Stop playing the action on the given layer.
+      
+      :arg layer: The layer to stop playing.
+      :type layer: integer
+      
    .. method:: getActionFrame(layer=0)
    
       Gets the current frame of the action playing in the supplied layer.
-         
-         :arg layer: The layer that you want to get the frame from.
-         :type layer: integer
-         
-         :return: The current frame of the action
-         
+      
+      :arg layer: The layer that you want to get the frame from.
+      :type layer: integer
+      
+      :return: The current frame of the action
+      :rtype: float
+      
    .. method:: setActionFrame(frame, layer=0)
    
       Set the current frame of the action playing in the supplied layer.
-         
-         :arg layer: The layer where you want to set the frame
-         :type layer: integer
-         :arg frame: The frame to set the action to
-         :type frame: float
+      
+      :arg layer: The layer where you want to set the frame
+      :type layer: integer
+      :arg frame: The frame to set the action to
+      :type frame: float
 
    .. method:: isPlayingAction(layer=0)
    
        Checks to see if there is an action playing in the given layer.
-          
-          :arg layer: The layer to check for a playing action.
-          :type layer: integer
+       
+       :arg layer: The layer to check for a playing action.
+       :type layer: integer
+       
+       :return: Whether or not the action is playing
+       :rtype: boolean
 
 .. class:: KX_IpoActuator(SCA_IActuator)
 

Modified: trunk/blender/source/gameengine/Ketsji/KX_GameObject.cpp
===================================================================
--- trunk/blender/source/gameengine/Ketsji/KX_GameObject.cpp    2011-08-31 
18:53:49 UTC (rev 39825)
+++ trunk/blender/source/gameengine/Ketsji/KX_GameObject.cpp    2011-08-31 
22:32:14 UTC (rev 39826)
@@ -3124,7 +3124,7 @@
 
        layer_check(layer, "getActionFrame");
 
-       return PyLong_FromLong(GetActionFrame(layer));
+       return PyFloat_FromDouble(GetActionFrame(layer));
 }
 
 KX_PYMETHODDEF_DOC(KX_GameObject, setActionFrame,

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to