Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenoit Bolsee <benoit.bolsee@online.be>2008-12-29 19:36:58 +0300
committerBenoit Bolsee <benoit.bolsee@online.be>2008-12-29 19:36:58 +0300
commit1c663bbc7e53cda1fe35579302574b0d98aa8db3 (patch)
tree4c0d3be6453932c01a9dc0fee0f820275cd6701d /source/gameengine/PyDoc
parentd91daaa5f690645153adf647c371262c9c6cb009 (diff)
First batch of GE API cleanup.
The principle is to replace most get/set methods of logic bricks by direct property access. To make porting of game code easier, the properties have usually the same type and use than the return values/parameters of the get/set methods. More details on http://wiki.blender.org/index.php/GameEngineDev/Python_API_Clean_Up Old methods are still available but will produce deprecation warnings on the console: "<method> is deprecated, use the <property> property instead" You can avoid these messages by turning on the "Ignore deprecation warnings" option in Game menu. PyDoc is updated to include the new properties and display a deprecation warning for the get/set methods that are being deprecated.
Diffstat (limited to 'source/gameengine/PyDoc')
-rw-r--r--source/gameengine/PyDoc/KX_ActuatorSensor.py7
-rw-r--r--source/gameengine/PyDoc/SCA_DelaySensor.py17
-rw-r--r--source/gameengine/PyDoc/SCA_ILogicBrick.py9
-rw-r--r--source/gameengine/PyDoc/SCA_ISensor.py34
-rw-r--r--source/gameengine/PyDoc/SCA_JoystickSensor.py59
-rw-r--r--source/gameengine/PyDoc/SCA_KeyboardSensor.py65
-rw-r--r--source/gameengine/PyDoc/SCA_MouseSensor.py11
-rw-r--r--source/gameengine/PyDoc/SCA_PropertyActuator.py11
-rw-r--r--source/gameengine/PyDoc/SCA_PropertySensor.py17
-rw-r--r--source/gameengine/PyDoc/SCA_PythonController.py10
-rw-r--r--source/gameengine/PyDoc/SCA_RandomActuator.py32
11 files changed, 259 insertions, 13 deletions
diff --git a/source/gameengine/PyDoc/KX_ActuatorSensor.py b/source/gameengine/PyDoc/KX_ActuatorSensor.py
index cdfbf27576e..b0e138a8009 100644
--- a/source/gameengine/PyDoc/KX_ActuatorSensor.py
+++ b/source/gameengine/PyDoc/KX_ActuatorSensor.py
@@ -8,15 +8,22 @@ class KX_ActuatorSensor(SCA_ISensor):
Actuator sensor detect change in actuator state of the parent object.
It generates a positive pulse if the corresponding actuator is activated
and a negative pulse if the actuator is deactivated.
+
+ Properties:
+
+ @ivar actuator: the name of the actuator that the sensor is monitoring.
+ @type actuator: string
"""
def getActuator():
"""
+ DEPRECATED: use the actuator property
Return the Actuator with which the sensor operates.
@rtype: string
"""
def setActuator(name):
"""
+ DEPRECATED: use the actuator property
Sets the Actuator with which to operate. If there is no Actuator
of this name, the function has no effect.
diff --git a/source/gameengine/PyDoc/SCA_DelaySensor.py b/source/gameengine/PyDoc/SCA_DelaySensor.py
index 19df589ea7b..b99ed08bed5 100644
--- a/source/gameengine/PyDoc/SCA_DelaySensor.py
+++ b/source/gameengine/PyDoc/SCA_DelaySensor.py
@@ -13,9 +13,21 @@ class SCA_DelaySensor(SCA_ISensor):
The sensor runs the OFF-ON cycle once unless the repeat option is set: the
OFF-ON cycle repeats indefinately (or the OFF cycle if duration is 0).
Use SCA_ISensor::reset() at any time to restart sensor.
+
+ Properties:
+
+ @ivar delay: length of the initial OFF period as number of frame, 0 for immediate trigger.
+ @type delay: integer.
+ @ivar duration: length of the ON period in number of frame after the initial OFF period.
+ If duration is greater than 0, a negative trigger is sent at the end of the ON pulse.
+ @type duration: integer
+ @ivar repeat: 1 if the OFF-ON cycle should be repeated indefinately, 0 if it should run once.
+ @type repeat: integer
+
"""
def setDelay(delay):
"""
+ DEPRECATED: use the delay property
Set the initial delay before the positive trigger.
@param delay: length of the initial OFF period as number of frame, 0 for immediate trigger
@@ -23,6 +35,7 @@ class SCA_DelaySensor(SCA_ISensor):
"""
def setDuration(duration):
"""
+ DEPRECATED: use the duration property
Set the duration of the ON pulse after initial delay and the generation of the positive trigger.
If duration is greater than 0, a negative trigger is sent at the end of the ON pulse.
@@ -31,6 +44,7 @@ class SCA_DelaySensor(SCA_ISensor):
"""
def setRepeat(repeat):
"""
+ DEPRECATED: use the repeat property
Set if the sensor repeat mode.
@param repeat: 1 if the OFF-ON cycle should be repeated indefinately, 0 if it should run once.
@@ -38,18 +52,21 @@ class SCA_DelaySensor(SCA_ISensor):
"""
def getDelay():
"""
+ DEPRECATED: use the delay property
Return the delay parameter value.
@rtype: integer
"""
def getDuration():
"""
+ DEPRECATED: use the duration property
Return the duration parameter value
@rtype: integer
"""
def getRepeat():
"""
+ DEPRECATED: use the repeat property
Return the repeat parameter value
@rtype: KX_TRUE or KX_FALSE
diff --git a/source/gameengine/PyDoc/SCA_ILogicBrick.py b/source/gameengine/PyDoc/SCA_ILogicBrick.py
index ea09fcaea37..18cb900f28d 100644
--- a/source/gameengine/PyDoc/SCA_ILogicBrick.py
+++ b/source/gameengine/PyDoc/SCA_ILogicBrick.py
@@ -5,6 +5,9 @@ from KX_GameObject import *
class SCA_ILogicBrick:
"""
Base class for all logic bricks.
+
+ @ivar executePriority: This determines the order controllers are evaluated, and actuators are activated (lower priority is executed first).
+ @type executePriority: int
"""
def getOwner():
@@ -13,6 +16,8 @@ class SCA_ILogicBrick:
@rtype: L{KX_GameObject}
"""
+
+ #--The following methods are deprecated--
def setExecutePriority(priority):
"""
Sets the priority of this logic brick.
@@ -20,6 +25,8 @@ class SCA_ILogicBrick:
This determines the order controllers are evaluated, and actuators are activated.
Bricks with lower priority will be executed first.
+ Deprecated: Use the "executePriority" property instead.
+
@type priority: integer
@param priority: the priority of this logic brick.
"""
@@ -27,6 +34,8 @@ class SCA_ILogicBrick:
"""
Gets the execution priority of this logic brick.
+ Deprecated: Use the "executePriority" property instead.
+
@rtype: integer
@return: this logic bricks current priority.
"""
diff --git a/source/gameengine/PyDoc/SCA_ISensor.py b/source/gameengine/PyDoc/SCA_ISensor.py
index 14858505e24..ab35996aa50 100644
--- a/source/gameengine/PyDoc/SCA_ISensor.py
+++ b/source/gameengine/PyDoc/SCA_ISensor.py
@@ -5,8 +5,35 @@ from SCA_ILogicBrick import *
class SCA_ISensor(SCA_ILogicBrick):
"""
Base class for all sensor logic bricks.
+
+ @ivar usePosPulseMode: Flag to turn positive pulse mode on and off.
+ @type usePosPulseMode: boolean
+ @ivar useNegPulseMode: Flag to turn negative pulse mode on and off.
+ @type useNegPulseMode: boolean
+ @ivar frequency: The frequency for pulse mode sensors.
+ @type frequency: int
+ @ivar level: Flag to set whether to detect level or edge transition when entering a state.
+ It makes a difference only in case of logic state transition (state actuator).
+ A level detector will immediately generate a pulse, negative or positive
+ depending on the sensor condition, as soon as the state is activated.
+ A edge detector will wait for a state change before generating a pulse.
+ @type level: boolean
+ @ivar invert: Flag to set if this sensor activates on positive or negative events.
+ @type invert: boolean
+ @ivar triggered: True if this sensor brick is in a positive state. (Read only)
+ @type triggered: boolean
+ @ivar positive: True if this sensor brick is in a positive state. (Read only)
+ @type positive: boolean
"""
+ def reset():
+ """
+ Reset sensor internal state, effect depends on the type of sensor and settings.
+
+ The sensor is put in its initial state as if it was just activated.
+ """
+
+ #--The following methods are deprecated--
def isPositive():
"""
True if this sensor brick is in a positive state.
@@ -82,10 +109,3 @@ class SCA_ISensor(SCA_ILogicBrick):
@param level: Detect level instead of edge? (KX_TRUE, KX_FALSE)
@type level: boolean
"""
- def reset():
- """
- Reset sensor internal state, effect depends on the type of sensor and settings.
-
- The sensor is put in its initial state as if it was just activated.
- """
-
diff --git a/source/gameengine/PyDoc/SCA_JoystickSensor.py b/source/gameengine/PyDoc/SCA_JoystickSensor.py
index d1dab9afcaf..111ee7f4cfa 100644
--- a/source/gameengine/PyDoc/SCA_JoystickSensor.py
+++ b/source/gameengine/PyDoc/SCA_JoystickSensor.py
@@ -5,15 +5,58 @@ from SCA_ISensor import *
class SCA_JoystickSensor(SCA_ISensor):
"""
This sensor detects player joystick events.
+
+ Properties:
+
+ @ivar axisPosition: (read-only) The state of the joysticks axis as a list of 4 values, each spesifying the value of an axis between -32767 and 32767 depending on how far the axis is pushed, 0 for nothing.
+ The first 2 values are used by most joysticks and gamepads for directional control. 3rd and 4th values are only on some joysticks and can be used for arbitary controls.
+ left:[-32767, 0, ...], right:[32767, 0, ...], up:[0, -32767, ...], down:[0, 32767, ...]
+ @type axisPosition: [integer, integer, integer, integer]
+ @ivar numAxis: (read-only) The number of axes for the joystick at this index.
+ @type numAxis: integer
+ @ivar numButtons: (read-only) The number of buttons for the joystick at this index.
+ @type numButtons: integer
+ @ivar numHats: (read-only) The number of hats for the joystick at this index.
+ @type numHats: integer
+ @ivar connected: (read-only) True if a joystick is connected at this joysticks index.
+ @type connected: boolean
+ @ivar index: The joystick index to use (from 0 to 7). The first joystick is always 0.
+ @type index: integer
+ @ivar threshold: Axis threshold. Joystick axis motion below this threshold wont trigger an event. Use values between (0 and 32767), lower values are more sensitive.
+ @type threshold: integer
+ @ivar button: The button index the sensor reacts to (first button = 0). When the "All Events" toggle is set, this option has no effect.
+ @type button: integer
+ @ivar axis: The axis this sensor reacts to, as a list of two values [axisIndex, axisDirection]
+ axisIndex: the axis index to use when detecting axis movement, 1=primary directional control, 2=secondary directional control.
+ axisDirection: 0=right, 1=up, 2=left, 3=down
+ @type axis: [integer, integer]
+ @ivar hat: The hat the sensor reacts to, as a list of two values: [hatIndex, hatDirection]
+ hatIndex: the hat index to use when detecting hat movement, 1=primary hat, 2=secondary hat.
+ hatDirection: 0-11
+ @type hat: [integer, integer]
"""
+ def getButtonActiveList():
+ """
+ Returns a list containing the indicies of the currently pressed buttons.
+ @rtype: list
+ """
+ def getButtonStatus(buttonIndex):
+ """
+ Returns a bool of the current pressed state of the specified button.
+ @param buttonIndex: the button index, 0=first button
+ @type buttonIndex: integer
+ @rtype: bool
+ """
def getIndex():
"""
+ DEPRECATED: use the 'index' property.
Returns the joystick index to use (from 1 to 8).
@rtype: integer
"""
def setIndex(index):
"""
+ DEPRECATED: use the 'index' property.
Sets the joystick index to use.
@param index: The index of this joystick sensor, Clamped between 1 and 8.
@type index: integer
@@ -21,6 +64,7 @@ class SCA_JoystickSensor(SCA_ISensor):
"""
def getAxis():
"""
+ DEPRECATED: use the 'axis' property.
Returns the current axis this sensor reacts to. See L{getAxisValue()<SCA_JoystickSensor.getAxisValue>} for the current axis state.
@rtype: list
@return: 2 values returned are [axisIndex, axisDirection] - see L{setAxis()<SCA_JoystickSensor.setAxis>} for their purpose.
@@ -28,6 +72,7 @@ class SCA_JoystickSensor(SCA_ISensor):
"""
def setAxis(axisIndex, axisDirection):
"""
+ DEPRECATED: use the 'axis' property.
@param axisIndex: Set the axis index to use when detecting axis movement.
@type axisIndex: integer from 1 to 2
@param axisDirection: Set the axis direction used for detecting motion. 0:right, 1:up, 2:left, 3:down.
@@ -36,6 +81,7 @@ class SCA_JoystickSensor(SCA_ISensor):
"""
def getAxisValue():
"""
+ DEPRECATED: use the 'axisPosition' property.
Returns the state of the joysticks axis. See differs to L{getAxis()<SCA_JoystickSensor.getAxis>} returning the current state of the joystick.
@rtype: list
@return: 4 values, each spesifying the value of an axis between -32767 and 32767 depending on how far the axis is pushed, 0 for nothing.
@@ -47,60 +93,71 @@ class SCA_JoystickSensor(SCA_ISensor):
"""
def getThreshold():
"""
+ DEPRECATED: use the 'threshold' property.
Get the axis threshold. See L{setThreshold()<SCA_JoystickSensor.setThreshold>} for details.
@rtype: integer
"""
def setThreshold(threshold):
"""
+ DEPRECATED: use the 'threshold' property.
Set the axis threshold.
@param threshold: Joystick axis motion below this threshold wont trigger an event. Use values between (0 and 32767), lower values are more sensitive.
@type threshold: integer
"""
def getButton():
"""
+ DEPRECATED: use the 'button' property.
Returns the button index the sensor reacts to. See L{getButtonValue()<SCA_JoystickSensor.getButtonValue>} for a list of pressed buttons.
@rtype: integer
@note: When the "All Events" toggle is set, this option has no effect.
"""
def setButton(index):
"""
+ DEPRECATED: use the 'button' property.
Sets the button index the sensor reacts to when the "All Events" option is not set.
@note: When the "All Events" toggle is set, this option has no effect.
"""
def getButtonValue():
"""
+ DEPRECATED: use the 'getButtonActiveList' method.
Returns a list containing the indicies of the currently pressed buttons.
@rtype: list
"""
def getHat():
"""
+ DEPRECATED: use the 'hat' property.
Returns the current hat direction this sensor is set to.
[hatNumber, hatDirection].
@rtype: list
@note: When the "All Events" toggle is set, this option has no effect.
"""
- def setHat(index):
+ def setHat(index,direction):
"""
+ DEPRECATED: use the 'hat' property.
Sets the hat index the sensor reacts to when the "All Events" option is not set.
@type index: integer
"""
def getNumAxes():
"""
+ DEPRECATED: use the 'numAxis' property.
Returns the number of axes for the joystick at this index.
@rtype: integer
"""
def getNumButtons():
"""
+ DEPRECATED: use the 'numButtons' property.
Returns the number of buttons for the joystick at this index.
@rtype: integer
"""
def getNumHats():
"""
+ DEPRECATED: use the 'numHats' property.
Returns the number of hats for the joystick at this index.
@rtype: integer
"""
def isConnected():
"""
+ DEPRECATED: use the 'connected' property.
Returns True if a joystick is detected at this joysticks index.
@rtype: bool
"""
diff --git a/source/gameengine/PyDoc/SCA_KeyboardSensor.py b/source/gameengine/PyDoc/SCA_KeyboardSensor.py
index 2f741f7d6a2..f6a7a7d8a97 100644
--- a/source/gameengine/PyDoc/SCA_KeyboardSensor.py
+++ b/source/gameengine/PyDoc/SCA_KeyboardSensor.py
@@ -7,44 +7,99 @@ class SCA_KeyboardSensor(SCA_ISensor):
A keyboard sensor detects player key presses.
See module L{GameKeys} for keycode values.
+
+ @ivar key: The key code this sensor is looking for.
+ @type key: keycode from L{GameKeys} module
+ @ivar hold1: The key code for the first modifier this sensor is looking for.
+ @type hold1: keycode from L{GameKeys} module
+ @ivar hold2: The key code for the second modifier this sensor is looking for.
+ @type hold2: keycode from L{GameKeys} module
+ @ivar toggleProperty: The name of the property that indicates whether or not to log keystrokes as a string.
+ @type toggleProperty: string
+ @ivar targetProperty: The name of the property that receives keystrokes in case in case a string is logged.
+ @type targetProperty: string
+ @ivar useAllKeys: Flag to determine whether or not to accept all keys.
+ @type useAllKeys: boolean
"""
+ def getEventList():
+ """
+ Get a list of pressed keys that have either been pressed, or just released, or are active this frame.
+
+ @rtype: list of key status. [[keycode, status]]
+ @return: A list of keyboard events
+ """
+
+ def getKeyStatus(keycode):
+ """
+ Get the status of a key.
+
+ @rtype: key state (KX_NO_INPUTSTATUS, KX_JUSTACTIVATED, KX_ACTIVE or KX_JUSTRELEASED)
+ @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--
def getKey():
"""
Returns the key code this sensor is looking for.
+
+ Deprecated: Use the "key" property instead.
+
+ @rtype: keycode from L{GameKeys} module
"""
def setKey(keycode):
"""
Set the key this sensor should listen for.
+ Deprecated: Use the "key" property instead.
+
@type keycode: keycode from L{GameKeys} module
"""
def getHold1():
"""
Returns the key code for the first modifier this sensor is looking for.
+
+ Deprecated: Use the "hold1" property instead.
+
+ @rtype: keycode from L{GameKeys} module
"""
- def setHold1():
+ def setHold1(keycode):
"""
Sets the key code for the first modifier this sensor should look for.
+
+ Deprecated: Use the "hold1" property instead.
+
+ @type keycode: keycode from L{GameKeys} module
"""
def getHold2():
"""
Returns the key code for the second modifier this sensor is looking for.
+
+ Deprecated: Use the "hold2" property instead.
+
+ @rtype: keycode from L{GameKeys} module
"""
- def setHold2():
+ def setHold2(keycode):
"""
Sets the key code for the second modifier this sensor should look for.
+
+ Deprecated: Use the "hold2" property instead.
+
+ @type keycode: keycode from L{GameKeys} module
"""
def getPressedKeys():
"""
Get a list of keys that have either been pressed, or just released this frame.
+ Deprecated: Use getEventList() instead.
+
@rtype: list of key status. [[keycode, status]]
"""
@@ -52,7 +107,7 @@ class SCA_KeyboardSensor(SCA_ISensor):
"""
Get a list of currently pressed keys that have either been pressed, or just released
+ Deprecated: Use getEventList() instead.
+
@rtype: list of key status. [[keycode, status]]
- """
-
-
+ """ \ No newline at end of file
diff --git a/source/gameengine/PyDoc/SCA_MouseSensor.py b/source/gameengine/PyDoc/SCA_MouseSensor.py
index 06b261f67fa..9550cbb4105 100644
--- a/source/gameengine/PyDoc/SCA_MouseSensor.py
+++ b/source/gameengine/PyDoc/SCA_MouseSensor.py
@@ -5,10 +5,20 @@ from SCA_ISensor import *
class SCA_MouseSensor(SCA_ISensor):
"""
Mouse Sensor logic brick.
+
+ Properties:
+
+ @ivar position: current [x,y] coordinates of the mouse, in frame coordinates (pixels)
+ @type position: [integer,interger]
+ @ivar mode: sensor mode: 1=KX_MOUSESENSORMODE_LEFTBUTTON 2=KX_MOUSESENSORMODE_MIDDLEBUTTON
+ 3=KX_MOUSESENSORMODE_RIGHTBUTTON 4=KX_MOUSESENSORMODE_WHEELUP
+ 5=KX_MOUSESENSORMODE_WHEELDOWN 9=KX_MOUSESENSORMODE_MOVEMENT
+ @type mode: integer
"""
def getXPosition():
"""
+ DEPRECATED: use the position property
Gets the x coordinate of the mouse.
@rtype: integer
@@ -16,6 +26,7 @@ class SCA_MouseSensor(SCA_ISensor):
"""
def getYPosition():
"""
+ DEPRECATED: use the position property
Gets the y coordinate of the mouse.
@rtype: integer
diff --git a/source/gameengine/PyDoc/SCA_PropertyActuator.py b/source/gameengine/PyDoc/SCA_PropertyActuator.py
index dc1233ddfb7..52aefcae651 100644
--- a/source/gameengine/PyDoc/SCA_PropertyActuator.py
+++ b/source/gameengine/PyDoc/SCA_PropertyActuator.py
@@ -5,9 +5,17 @@ from SCA_IActuator import *
class SCA_PropertyActuator(SCA_IActuator):
"""
Property Actuator
+
+ Properties:
+
+ @ivar property: the property on which to operate.
+ @type property: string
+ @ivar value: the value with which the actuator operates.
+ @type value: string
"""
def setProperty(prop):
"""
+ DEPRECATED: use the 'property' property
Set the property on which to operate.
If there is no property of this name, the call is ignored.
@@ -17,12 +25,14 @@ class SCA_PropertyActuator(SCA_IActuator):
"""
def getProperty():
"""
+ DEPRECATED: use the 'property' property
Returns the name of the property on which to operate.
@rtype: string
"""
def setValue(value):
"""
+ DEPRECATED: use the 'value' property
Set the value with which the actuator operates.
If the value is not compatible with the type of the
@@ -32,6 +42,7 @@ class SCA_PropertyActuator(SCA_IActuator):
"""
def getValue():
"""
+ DEPRECATED: use the 'value' property
Gets the value with which this actuator operates.
@rtype: string
diff --git a/source/gameengine/PyDoc/SCA_PropertySensor.py b/source/gameengine/PyDoc/SCA_PropertySensor.py
index 22de8d8b986..949ffd3b703 100644
--- a/source/gameengine/PyDoc/SCA_PropertySensor.py
+++ b/source/gameengine/PyDoc/SCA_PropertySensor.py
@@ -5,10 +5,22 @@ from SCA_ISensor import *
class SCA_PropertySensor(SCA_ISensor):
"""
Activates when the game object property matches.
+
+ Properties:
+
+ @ivar type: type of check on the property:
+ KX_PROPSENSOR_EQUAL(1), KX_PROPSENSOR_NOTEQUAL(2), KX_PROPSENSOR_INTERVAL(3),
+ KX_PROPSENSOR_CHANGED(4), KX_PROPSENSOR_EXPRESSION(5)
+ @type type: integer
+ @ivar property: the property with which the sensor operates.
+ @type property: string
+ @ivar value: the value with which the sensor compares to the value of the property.
+ @type value: string
"""
def getType():
"""
+ DEPRECATED: use the type property
Gets when to activate this sensor.
@return: KX_PROPSENSOR_EQUAL, KX_PROPSENSOR_NOTEQUAL,
@@ -18,6 +30,7 @@ class SCA_PropertySensor(SCA_ISensor):
def setType(checktype):
"""
+ DEPRECATED: use the type property
Set the type of check to perform.
@type checktype: KX_PROPSENSOR_EQUAL, KX_PROPSENSOR_NOTEQUAL,
@@ -27,6 +40,7 @@ class SCA_PropertySensor(SCA_ISensor):
def getProperty():
"""
+ DEPRECATED: use the property property
Return the property with which the sensor operates.
@rtype: string
@@ -34,6 +48,7 @@ class SCA_PropertySensor(SCA_ISensor):
"""
def setProperty(name):
"""
+ DEPRECATED: use the property property
Sets the property with which to operate. If there is no property
of that name, this call is ignored.
@@ -41,6 +56,7 @@ class SCA_PropertySensor(SCA_ISensor):
"""
def getValue():
"""
+ DEPRECATED: use the value property
Return the value with which the sensor compares to the value of the property.
@rtype: string
@@ -48,6 +64,7 @@ class SCA_PropertySensor(SCA_ISensor):
"""
def setValue(value):
"""
+ DEPRECATED: use the value property
Set the value with which the sensor operates. If the value
is not compatible with the type of the property, the subsequent
action is ignored.
diff --git a/source/gameengine/PyDoc/SCA_PythonController.py b/source/gameengine/PyDoc/SCA_PythonController.py
index 6d91736d636..06f2b7e9d1d 100644
--- a/source/gameengine/PyDoc/SCA_PythonController.py
+++ b/source/gameengine/PyDoc/SCA_PythonController.py
@@ -6,6 +6,14 @@ class SCA_PythonController(SCA_IController):
"""
A Python controller uses a Python script to activate it's actuators,
based on it's sensors.
+
+ Properties:
+
+ @ivar script: the Python script this controller executes
+ @type script: string, read-only
+ @ivar state: the controllers state bitmask.
+ This can be used with the GameObject's state to test if the controller is active.
+ @type state: integer
"""
def getSensors():
@@ -36,6 +44,7 @@ class SCA_PythonController(SCA_IController):
"""
def getScript():
"""
+ DEPRECATED: use the script property
Gets the Python script this controller executes.
@rtype: string
@@ -48,6 +57,7 @@ class SCA_PythonController(SCA_IController):
"""
def getState():
"""
+ DEPRECATED: use the state property
Get the controllers state bitmask, this can be used with the GameObject's state to test if the the controller is active.
This for instance will always be true however you could compare with a previous state to see when the state was activated.
GameLogic.getCurrentController().getState() & GameLogic.getCurrentController().getOwner().getState()
diff --git a/source/gameengine/PyDoc/SCA_RandomActuator.py b/source/gameengine/PyDoc/SCA_RandomActuator.py
index 353b398b1ff..000a1af7846 100644
--- a/source/gameengine/PyDoc/SCA_RandomActuator.py
+++ b/source/gameengine/PyDoc/SCA_RandomActuator.py
@@ -5,9 +5,35 @@ from SCA_IActuator import *
class SCA_RandomActuator(SCA_IActuator):
"""
Random Actuator
+
+ Properties:
+
+ @ivar seed: Seed of the random number generator.
+ Equal seeds produce equal series. If the seed is 0,
+ the generator will produce the same value on every call.
+ @type seed: integer
+ @ivar para1: the first parameter of the active distribution.
+ Refer to the documentation of the generator types for the meaning
+ of this value.
+ @type para1: float, read-only
+ @ivar para2: the second parameter of the active distribution.
+ Refer to the documentation of the generator types for the meaning
+ of this value.
+ @type para2: float, read-only
+ @ivar distribution: distribution type:
+ KX_RANDOMACT_BOOL_CONST, KX_RANDOMACT_BOOL_UNIFORM, KX_RANDOMACT_BOOL_BERNOUILLI,
+ KX_RANDOMACT_INT_CONST, KX_RANDOMACT_INT_UNIFORM, KX_RANDOMACT_INT_POISSON,
+ KX_RANDOMACT_FLOAT_CONST, KX_RANDOMACT_FLOAT_UNIFORM, KX_RANDOMACT_FLOAT_NORMAL,
+ KX_RANDOMACT_FLOAT_NEGATIVE_EXPONENTIAL
+ @type distribution: integer, read-only
+ @ivar property: the name of the property to set with the random value.
+ If the generator and property types do not match, the assignment is ignored.
+ @type property: string
+
"""
def setSeed(seed):
"""
+ DEPRECATED: use the seed property
Sets the seed of the random number generator.
Equal seeds produce equal series. If the seed is 0,
@@ -17,12 +43,14 @@ class SCA_RandomActuator(SCA_IActuator):
"""
def getSeed():
"""
+ DEPRECATED: use the seed property
Returns the initial seed of the generator.
@rtype: integer
"""
def getPara1():
"""
+ DEPRECATED: use the para1 property
Returns the first parameter of the active distribution.
Refer to the documentation of the generator types for the meaning
@@ -32,6 +60,7 @@ class SCA_RandomActuator(SCA_IActuator):
"""
def getPara2():
"""
+ DEPRECATED: use the para2 property
Returns the second parameter of the active distribution.
Refer to the documentation of the generator types for the meaning
@@ -41,6 +70,7 @@ class SCA_RandomActuator(SCA_IActuator):
"""
def getDistribution():
"""
+ DEPRECATED: use the distribution property
Returns the type of random distribution.
@rtype: distribution type
@@ -51,6 +81,7 @@ class SCA_RandomActuator(SCA_IActuator):
"""
def setProperty(property):
"""
+ DEPRECATED: use the property property
Set the property to which the random value is assigned.
If the generator and property types do not match, the assignment is ignored.
@@ -60,6 +91,7 @@ class SCA_RandomActuator(SCA_IActuator):
"""
def getProperty():
"""
+ DEPRECATED: use the property property
Returns the name of the property to set.
@rtype: string