Revision: 19620
          
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=19620
Author:   campbellbarton
Date:     2009-04-09 14:53:56 +0200 (Thu, 09 Apr 2009)

Log Message:
-----------
BGE Py API
- added keyboard senser attribute "events" to replace getEventList()
- fix 2 memory leaks in the python api (was making a list but not returning it)
- setting readonly attributes didnt give a good error message.

Modified Paths:
--------------
    trunk/blender/source/gameengine/PyDoc/GameLogic.py
    trunk/blender/source/gameengine/PyDoc/SCA_2DFilterActuator.py
    trunk/blender/source/gameengine/PyDoc/SCA_KeyboardSensor.py

Modified: trunk/blender/source/gameengine/PyDoc/GameLogic.py
===================================================================
--- trunk/blender/source/gameengine/PyDoc/GameLogic.py  2009-04-09 11:36:12 UTC 
(rev 19619)
+++ trunk/blender/source/gameengine/PyDoc/GameLogic.py  2009-04-09 12:53:56 UTC 
(rev 19620)
@@ -205,9 +205,9 @@
        @type activate: boolean
        @param activate: whether to activate or deactivate the given actuator.
        """
-def sendMessage(subject, body="", to="", from=""):
+def sendMessage(subject, body="", to="", message_from=""):
        """
-       Sends a message.
+       Sends a message to sensors in any active scene.
        
        @param subject: The subject of the message
        @type subject: string
@@ -215,8 +215,8 @@
        @type body: string
        @param to: The name of the object to send the message to (optional)
        @type to: string
-       @param from: The name of the object that the message is coming from 
(optional)
-       @type from: string
+       @param message_from: The name of the object that the message is coming 
from (optional)
+       @type message_from: string
        """
 def getRandomFloat():
        """

Modified: trunk/blender/source/gameengine/PyDoc/SCA_2DFilterActuator.py
===================================================================
--- trunk/blender/source/gameengine/PyDoc/SCA_2DFilterActuator.py       
2009-04-09 11:36:12 UTC (rev 19619)
+++ trunk/blender/source/gameengine/PyDoc/SCA_2DFilterActuator.py       
2009-04-09 12:53:56 UTC (rev 19620)
@@ -20,7 +20,7 @@
        @ivar disableMotionBlur: action on motion blur: 0=enable, 1=disable
        @type disableMotionBlur: integer
        @ivar type: type of 2D filter, use one of the following constants:
-                   RAS_2DFILTER_ENABLED      (-2) : enable the filter that was 
previously disabled
+                               RAS_2DFILTER_ENABLED      (-2) : enable the 
filter that was previously disabled
                                RAS_2DFILTER_DISABLED     (-1) : disable the 
filter that is currently active
                                RAS_2DFILTER_NOFILTER      (0) : disable and 
destroy the filter that is currently active
                                RAS_2DFILTER_MOTIONBLUR    (1) : create and 
enable preset filters

Modified: trunk/blender/source/gameengine/PyDoc/SCA_KeyboardSensor.py
===================================================================
--- trunk/blender/source/gameengine/PyDoc/SCA_KeyboardSensor.py 2009-04-09 
11:36:12 UTC (rev 19619)
+++ trunk/blender/source/gameengine/PyDoc/SCA_KeyboardSensor.py 2009-04-09 
12:53:56 UTC (rev 19620)
@@ -20,11 +20,23 @@
        @type targetProperty: string
        @ivar useAllKeys: Flag to determine whether or not to accept all keys.
        @type useAllKeys: boolean
+       @ivar events: a list of pressed keys that have either been pressed, or 
just released, or are active this frame. (read only).
+
+                       - 'keycode' matches the values in L{GameKeys}.
+                       - 'status' uses...
+                               - L{GameLogic.KX_INPUT_NONE}
+                               - L{GameLogic.KX_INPUT_JUST_ACTIVATED}
+                               - L{GameLogic.KX_INPUT_ACTIVE}
+                               - L{GameLogic.KX_INPUT_JUST_RELEASED}
+                       
+       @type events: list [[keycode, status], ...]
        """
        def getEventList():
                """
                Get a list of pressed keys that have either been pressed, or 
just released, or are active this frame.
                
+               B{DEPRECATED: Use the "events" property instead}.
+               
                @rtype: list of key status. [[keycode, status]]
                @return: A list of keyboard events
                """
@@ -33,18 +45,18 @@
                """
                Get the status of a key.
                
-               @rtype: key state (KX_NO_INPUTSTATUS, KX_JUSTACTIVATED, 
KX_ACTIVE or KX_JUSTRELEASED)
+               @rtype: key state L{GameLogic} members (KX_INPUT_NONE, 
KX_INPUT_JUST_ACTIVATED, KX_INPUT_ACTIVE, KX_INPUT_JUST_RELEASED)
                @return: The state of the given key
                @type keycode: integer
                @param keycode: The code that represents the key you want to 
get the state of
                """
        
-       #--The following methods are deprecated--
+       #--The following methods are DEPRECATED--
        def getKey():
                """
                Returns the key code this sensor is looking for.
                
-               Deprecated: Use the "key" property instead.
+               B{DEPRECATED: Use the "key" property instead}.
                
                @rtype: keycode from L{GameKeys} module
                """
@@ -53,7 +65,7 @@
                """
                Set the key this sensor should listen for.
                
-               Deprecated: Use the "key" property instead.
+               B{DEPRECATED: Use the "key" property instead}.
                
                @type keycode: keycode from L{GameKeys} module
                """
@@ -62,7 +74,7 @@
                """
                Returns the key code for the first modifier this sensor is 
looking for.
                
-               Deprecated: Use the "hold1" property instead.
+               B{DEPRECATED: Use the "hold1" property instead}.
                
                @rtype: keycode from L{GameKeys} module
                """
@@ -71,7 +83,7 @@
                """
                Sets the key code for the first modifier this sensor should 
look for.
                
-               Deprecated: Use the "hold1" property instead.
+               B{DEPRECATED: Use the "hold1" property instead}.
                
                @type keycode: keycode from L{GameKeys} module
                """
@@ -80,7 +92,7 @@
                """
                Returns the key code for the second modifier this sensor is 
looking for.
                
-               Deprecated: Use the "hold2" property instead.
+               B{DEPRECATED: Use the "hold2" property instead}.
                
                @rtype: keycode from L{GameKeys} module
                """
@@ -89,7 +101,7 @@
                """
                Sets the key code for the second modifier this sensor should 
look for.
                
-               Deprecated: Use the "hold2" property instead.
+               B{DEPRECATED: Use the "hold2" property instead.}
                
                @type keycode: keycode from L{GameKeys} module
                """
@@ -98,7 +110,7 @@
                """
                Get a list of keys that have either been pressed, or just 
released this frame.
                
-               Deprecated: Use getEventList() instead.
+               B{DEPRECATED: Use "events" instead.}
                
                @rtype: list of key status. [[keycode, status]]
                """
@@ -107,7 +119,7 @@
                """
                Get a list of currently pressed keys that have either been 
pressed, or just released
                
-               Deprecated: Use getEventList() instead.
+               B{DEPRECATED: Use "events" instead.}
                
                @rtype: list of key status. [[keycode, status]]
                """
\ No newline at end of file


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

Reply via email to