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:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2009-04-20 19:06:46 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2009-04-20 19:06:46 +0400
commit874c29cea8e6f9bc411fccf2d6f4cb07e94328d0 (patch)
tree5971e577cf7c02e05a1e37b5ad058c71a6744877 /source/gameengine/PyDoc
parent7555bfa793a2b0fc187c6211c56986f35b2d7b09 (diff)
parentc5bc4e4fb1a33eda8c31f2ea02e91f32f74c8fa5 (diff)
2.50: svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r19323:HEAD
Notes: * blenderbuttons and ICON_SNAP_PEEL_OBJECT were not merged.
Diffstat (limited to 'source/gameengine/PyDoc')
-rw-r--r--source/gameengine/PyDoc/BL_ActionActuator.py8
-rw-r--r--source/gameengine/PyDoc/BL_Shader.py228
-rw-r--r--source/gameengine/PyDoc/BL_ShapeActionActuator.py3
-rw-r--r--source/gameengine/PyDoc/CListValue.py59
-rw-r--r--source/gameengine/PyDoc/GameKeys.py26
-rw-r--r--source/gameengine/PyDoc/GameLogic.py53
-rw-r--r--source/gameengine/PyDoc/GameTypes.py75
-rw-r--r--source/gameengine/PyDoc/KX_BlenderMaterial.py38
-rw-r--r--source/gameengine/PyDoc/KX_CDActuator.py23
-rw-r--r--source/gameengine/PyDoc/KX_Camera.py22
-rw-r--r--source/gameengine/PyDoc/KX_ConstraintActuator.py69
-rw-r--r--source/gameengine/PyDoc/KX_ConstraintWrapper.py28
-rw-r--r--source/gameengine/PyDoc/KX_GameActuator.py7
-rw-r--r--source/gameengine/PyDoc/KX_GameObject.py137
-rw-r--r--source/gameengine/PyDoc/KX_IpoActuator.py47
-rw-r--r--source/gameengine/PyDoc/KX_LightObject.py (renamed from source/gameengine/PyDoc/KX_Light.py)2
-rw-r--r--source/gameengine/PyDoc/KX_MeshProxy.py9
-rw-r--r--source/gameengine/PyDoc/KX_MouseFocusSensor.py53
-rw-r--r--source/gameengine/PyDoc/KX_NetworkMessageActuator.py13
-rw-r--r--source/gameengine/PyDoc/KX_NetworkMessageSensor.py17
-rw-r--r--source/gameengine/PyDoc/KX_ParentActuator.py7
-rw-r--r--source/gameengine/PyDoc/KX_PhysicsObjectWrapper.py47
-rw-r--r--source/gameengine/PyDoc/KX_RaySensor.py25
-rw-r--r--source/gameengine/PyDoc/KX_SCA_AddObjectActuator.py22
-rw-r--r--source/gameengine/PyDoc/KX_SCA_DynamicActuator.py30
-rw-r--r--source/gameengine/PyDoc/KX_SCA_ReplaceMeshActuator.py24
-rw-r--r--source/gameengine/PyDoc/KX_Scene.py16
-rw-r--r--source/gameengine/PyDoc/KX_SceneActuator.py14
-rw-r--r--source/gameengine/PyDoc/KX_SoundActuator.py56
-rw-r--r--source/gameengine/PyDoc/KX_StateActuator.py18
-rw-r--r--source/gameengine/PyDoc/KX_TouchSensor.py4
-rw-r--r--source/gameengine/PyDoc/KX_TrackToActuator.py11
-rw-r--r--source/gameengine/PyDoc/KX_VehicleWrapper.py166
-rw-r--r--source/gameengine/PyDoc/KX_VertexProxy.py26
-rw-r--r--source/gameengine/PyDoc/KX_VisibilityActuator.py11
-rw-r--r--source/gameengine/PyDoc/SCA_2DFilterActuator.py44
-rw-r--r--source/gameengine/PyDoc/SCA_ActuatorSensor.py (renamed from source/gameengine/PyDoc/KX_ActuatorSensor.py)5
-rw-r--r--source/gameengine/PyDoc/SCA_ILogicBrick.py6
-rw-r--r--source/gameengine/PyDoc/SCA_JoystickSensor.py30
-rw-r--r--source/gameengine/PyDoc/SCA_KeyboardSensor.py37
-rw-r--r--source/gameengine/PyDoc/SCA_MouseSensor.py10
-rw-r--r--source/gameengine/PyDoc/SCA_NANDController.py11
-rw-r--r--source/gameengine/PyDoc/SCA_NORController.py11
-rw-r--r--source/gameengine/PyDoc/SCA_RandomSensor.py7
-rw-r--r--source/gameengine/PyDoc/SCA_XNORController.py11
-rw-r--r--source/gameengine/PyDoc/SCA_XORController.py11
-rw-r--r--source/gameengine/PyDoc/SConscript45
-rw-r--r--source/gameengine/PyDoc/WhatsNew.py2
-rw-r--r--source/gameengine/PyDoc/bge_api_validate_py.txt110
-rwxr-xr-x[-rw-r--r--]source/gameengine/PyDoc/epy_docgen.sh2
50 files changed, 1588 insertions, 148 deletions
diff --git a/source/gameengine/PyDoc/BL_ActionActuator.py b/source/gameengine/PyDoc/BL_ActionActuator.py
index 3e95befe16b..480681dc14a 100644
--- a/source/gameengine/PyDoc/BL_ActionActuator.py
+++ b/source/gameengine/PyDoc/BL_ActionActuator.py
@@ -1,7 +1,9 @@
# $Id$
# Documentation for BL_ActionActuator
+import SCA_ILogicBrick
from SCA_IActuator import *
+
class BL_ActionActuator(SCA_IActuator):
"""
Action Actuators apply an action to an actor.
@@ -10,7 +12,7 @@ class BL_ActionActuator(SCA_IActuator):
@type action: string
@ivar start: Specifies the starting frame of the animation.
@type start: float
- @type end: Specifies the ending frame of the animation.
+ @ivar end: Specifies the ending frame of the animation.
@type end: float
@ivar blendin: Specifies the number of frames of animation to generate when making transitions between actions.
@type blendin: float
@@ -25,9 +27,7 @@ class BL_ActionActuator(SCA_IActuator):
@ivar blendTime: Sets the internal frame timer. This property must be in
the range from 0.0 to blendin.
@type blendTime: float
- @ivar type: The operation mode of the actuator.
- KX_ACTIONACT_PLAY, KX_ACTIONACT_PROPERTY, KX_ACTIONACT_FLIPPER,
- KX_ACTIONACT_LOOPSTOP, KX_ACTIONACT_LOOPEND
+ @ivar type: The operation mode of the actuator. KX_ACTIONACT_PLAY, KX_ACTIONACT_PROPERTY, KX_ACTIONACT_FLIPPER, KX_ACTIONACT_LOOPSTOP, KX_ACTIONACT_LOOPEND
@type type: integer
@ivar continue: The actions continue option, True or False.
When True, the action will always play from where last left off,
diff --git a/source/gameengine/PyDoc/BL_Shader.py b/source/gameengine/PyDoc/BL_Shader.py
new file mode 100644
index 00000000000..182b73d437b
--- /dev/null
+++ b/source/gameengine/PyDoc/BL_Shader.py
@@ -0,0 +1,228 @@
+class BL_Shader: # (PyObjectPlus)
+ """
+ BL_Shader GLSL shaders.
+
+ All placeholders have a __ prefix
+ """
+
+ def __setUniformfv(val):
+ """
+ TODO - Description
+
+ @param val: the starting frame of the animation
+ @type val: float
+
+ @rtype: integer
+ @return: TODO Description
+ """
+
+ def __delSource(val):
+ """
+ TODO - Description
+
+ @param val: the starting frame of the animation
+ @type val: float
+
+ @rtype: integer
+ @return: TODO Description
+ """
+ def __getFragmentProg(val):
+ """
+ TODO - Description
+
+ @param val: the starting frame of the animation
+ @type val: float
+
+ @rtype: integer
+ @return: TODO Description
+ """
+ def __getVertexProg(val):
+ """
+ TODO - Description
+
+ @param val: the starting frame of the animation
+ @type val: float
+
+ @rtype: integer
+ @return: TODO Description
+ """
+ def __isValid(val):
+ """
+ TODO - Description
+
+ @param val: the starting frame of the animation
+ @type val: float
+
+ @rtype: integer
+ @return: TODO Description
+ """
+ def __setAttrib(val):
+ """
+ TODO - Description
+
+ @param val: the starting frame of the animation
+ @type val: float
+
+ @rtype: integer
+ @return: TODO Description
+ """
+ def __setNumberOfPasses(val):
+ """
+ TODO - Description
+
+ @param val: the starting frame of the animation
+ @type val: float
+
+ @rtype: integer
+ @return: TODO Description
+ """
+ def __setSampler(val):
+ """
+ TODO - Description
+
+ @param val: the starting frame of the animation
+ @type val: float
+
+ @rtype: integer
+ @return: TODO Description
+ """
+ def __setSource(val):
+ """
+ TODO - Description
+
+ @param val: the starting frame of the animation
+ @type val: float
+
+ @rtype: integer
+ @return: TODO Description
+ """
+ def __setUniform1f(val):
+ """
+ TODO - Description
+
+ @param val: the starting frame of the animation
+ @type val: float
+
+ @rtype: integer
+ @return: TODO Description
+ """
+ def __setUniform1i(val):
+ """
+ TODO - Description
+
+ @param val: the starting frame of the animation
+ @type val: float
+
+ @rtype: integer
+ @return: TODO Description
+ """
+ def __setUniform2f(val):
+ """
+ TODO - Description
+
+ @param val: the starting frame of the animation
+ @type val: float
+
+ @rtype: integer
+ @return: TODO Description
+ """
+ def __setUniform2i(val):
+ """
+ TODO - Description
+
+ @param val: the starting frame of the animation
+ @type val: float
+
+ @rtype: integer
+ @return: TODO Description
+ """
+ def __setUniform3f(val):
+ """
+ TODO - Description
+
+ @param val: the starting frame of the animation
+ @type val: float
+
+ @rtype: integer
+ @return: TODO Description
+ """
+ def __setUniform3i(val):
+ """
+ TODO - Description
+
+ @param val: the starting frame of the animation
+ @type val: float
+
+ @rtype: integer
+ @return: TODO Description
+ """
+ def __setUniform4f(val):
+ """
+ TODO - Description
+
+ @param val: the starting frame of the animation
+ @type val: float
+
+ @rtype: integer
+ @return: TODO Description
+ """
+ def __setUniform4i(val):
+ """
+ TODO - Description
+
+ @param val: the starting frame of the animation
+ @type val: float
+
+ @rtype: integer
+ @return: TODO Description
+ """
+ def __setUniformDef(val):
+ """
+ TODO - Description
+
+ @param val: the starting frame of the animation
+ @type val: float
+
+ @rtype: integer
+ @return: TODO Description
+ """
+ def __setUniformMatrix3(val):
+ """
+ TODO - Description
+
+ @param val: the starting frame of the animation
+ @type val: float
+
+ @rtype: integer
+ @return: TODO Description
+ """
+ def __setUniformMatrix4(val):
+ """
+ TODO - Description
+
+ @param val: the starting frame of the animation
+ @type val: float
+
+ @rtype: integer
+ @return: TODO Description
+ """
+ def __setUniformiv(val):
+ """
+ TODO - Description
+
+ @param val: the starting frame of the animation
+ @type val: float
+
+ @rtype: integer
+ @return: TODO Description
+ """
+ def __validate(val):
+ """
+ TODO - Description
+
+ @param val: the starting frame of the animation
+ @type val: float
+
+ @rtype: integer
+ @return: TODO Description
+ """
diff --git a/source/gameengine/PyDoc/BL_ShapeActionActuator.py b/source/gameengine/PyDoc/BL_ShapeActionActuator.py
index 209ff4e5580..e1e8b039749 100644
--- a/source/gameengine/PyDoc/BL_ShapeActionActuator.py
+++ b/source/gameengine/PyDoc/BL_ShapeActionActuator.py
@@ -1,6 +1,7 @@
# $Id$
# Documentation for BL_ShapeActionActuator
from SCA_IActuator import *
+from SCA_ILogicBrick import *
class BL_ShapeActionActuator(SCA_IActuator):
"""
@@ -10,7 +11,7 @@ class BL_ShapeActionActuator(SCA_IActuator):
@type action: string
@ivar start: Specifies the starting frame of the shape animation.
@type start: float
- @type end: Specifies the ending frame of the shape animation.
+ @ivar end: Specifies the ending frame of the shape animation.
@type end: float
@ivar blendin: Specifies the number of frames of animation to generate when making transitions between actions.
@type blendin: float
diff --git a/source/gameengine/PyDoc/CListValue.py b/source/gameengine/PyDoc/CListValue.py
new file mode 100644
index 00000000000..e9fc4215bb6
--- /dev/null
+++ b/source/gameengine/PyDoc/CListValue.py
@@ -0,0 +1,59 @@
+class CListValue: # (PyObjectPlus)
+ """
+ CListValue
+
+ This is a list like object used in the game engine internally that behaves similar to a python list in most ways.
+
+ As well as the normal index lookup.
+ C{val= clist[i]}
+
+ CListValue supports string lookups.
+ C{val= scene.objects["OBCube"]}
+
+ Other operations such as C{len(clist), list(clist), clist[0:10]} are also supported.
+ """
+ def append(val):
+ """
+ Add an item to the list (like pythons append)
+
+ Warning: Appending values to the list can cause crashes when the list is used internally by the game engine.
+ """
+
+ def count(val):
+ """
+ Count the number of instances of a value in the list.
+
+ @rtype: integer
+ @return: number of instances
+ """
+ def index(val):
+ """
+ Return the index of a value in the list.
+
+ @rtype: integer
+ @return: The index of the value in the list.
+ """
+ def reverse():
+ """
+ Reverse the order of the list.
+ """
+ def from_id(id):
+ """
+ This is a funtion especially for the game engine to return a value with a spesific id.
+
+ Since object names are not always unique, the id of an object can be used to get an object from the CValueList.
+
+ Example.
+
+ C{myObID = id(gameObject)}
+
+ C{...}
+
+ C{ob= scene.objects.from_id(myObID)}
+
+ Where myObID is an int or long from the id function.
+
+ This has the advantage that you can store the id in places you could not store a gameObject.
+
+ Warning: the id is derived from a memory location and will be different each time the game engine starts.
+ """ \ No newline at end of file
diff --git a/source/gameengine/PyDoc/GameKeys.py b/source/gameengine/PyDoc/GameKeys.py
index 1a0a737718e..310f2b0d506 100644
--- a/source/gameengine/PyDoc/GameKeys.py
+++ b/source/gameengine/PyDoc/GameKeys.py
@@ -134,26 +134,20 @@ Example::
co = GameLogic.getCurrentController()
# 'Keyboard' is a keyboard sensor
sensor = co.getSensor('Keyboard')
- sensor.setKey(GameKeys.F1KEY)
+ sensor.key = GameKeys.F1KEY
Example::
# Do the all keys thing
import GameLogic
import GameKeys
-
- # status: these should be added to a module somewhere
- KX_NO_INPUTSTATUS = 0
- KX_JUSTACTIVATED = 1
- KX_ACTIVE = 2
- KX_JUSTRELEASED = 3
-
+
co = GameLogic.getCurrentController()
# 'Keyboard' is a keyboard sensor
sensor = co.getSensor('Keyboard')
- keylist = sensor.getPressedKeys()
+ keylist = sensor.events
for key in keylist:
# key[0] == GameKeys.keycode, key[1] = status
- if key[1] == KX_JUSTACTIVATED:
+ if key[1] == GameLogic.KX_INPUT_JUST_ACTIVATED:
if key[0] == GameKeys.WKEY:
# Activate Forward!
if key[0] == GameKeys.SKEY:
@@ -173,3 +167,15 @@ def EventToString(event):
@param event: key event from GameKeys or the keyboard sensor.
@rtype: string
"""
+
+def EventToCharacter(event, shift):
+ """
+ Return the string name of a key event. Returns an empty string if the event cant be represented as a character.
+
+ @type event: int
+ @param event: key event from GameKeys or the keyboard sensor.
+ @type event: bool
+ @param event: set to true if shift is held.
+ @rtype: string
+ """
+
diff --git a/source/gameengine/PyDoc/GameLogic.py b/source/gameengine/PyDoc/GameLogic.py
index 0524a9df355..1996aa3f8a9 100644
--- a/source/gameengine/PyDoc/GameLogic.py
+++ b/source/gameengine/PyDoc/GameLogic.py
@@ -3,10 +3,17 @@
Documentation for the GameLogic Module.
=======================================
- There are only three importable modules in the game engine:
+ Modules available in the game engine:
- GameLogic
- L{GameKeys}
- L{Rasterizer}
+ - L{GameTypes}
+
+ Undocumented modules:
+ - VideoTexture
+ - CValue
+ - Expression
+ - PhysicsConstraints
All the other modules are accessible through the methods in GameLogic.
@@ -18,7 +25,7 @@ Documentation for the GameLogic Module.
# To get the game object this controller is on:
obj = co.getOwner()
- L{KX_GameObject} and L{KX_Camera} or L{KX_Light} methods are
+ L{KX_GameObject} and L{KX_Camera} or L{KX_LightObject} methods are
available depending on the type of object::
# To get a sensor linked to this controller.
# "sensorname" is the name of the sensor as defined in the Blender interface.
@@ -72,6 +79,7 @@ Documentation for the GameLogic Module.
- L{SoundActuator<KX_SoundActuator.KX_SoundActuator>}
- L{TrackToActuator<KX_TrackToActuator.KX_TrackToActuator>}
- L{VisibilityActuator<KX_VisibilityActuator.KX_VisibilityActuator>}
+ - L{DynamicActuator<KX_SCA_DynamicActuator.KX_SCA_DynamicActuator>}
Most logic brick's methods are accessors for the properties available in the logic buttons.
Consult the logic bricks documentation for more information on how each logic brick works.
@@ -148,9 +156,35 @@ Documentation for the GameLogic Module.
@var KX_RADAR_AXIS_NEG_X: See L{KX_RadarSensor}
@var KX_RADAR_AXIS_NEG_Y: See L{KX_RadarSensor}
@var KX_RADAR_AXIS_NEG_Z: See L{KX_RadarSensor}
-"""
+
+@group Ray Sensor: KX_RAY_AXIS_POS_X, KX_RAY_AXIS_POS_Y, KX_RAY_AXIS_POS_Z, KX_RAY_AXIS_NEG_X, KX_RAY_AXIS_NEG_Y, KX_RAY_AXIS_NEG_Z
+@var KX_RAY_AXIS_POS_X: See L{KX_RaySensor}
+@var KX_RAY_AXIS_POS_Y: See L{KX_RaySensor}
+@var KX_RAY_AXIS_POS_Z: See L{KX_RaySensor}
+@var KX_RAY_AXIS_NEG_X: See L{KX_RaySensor}
+@var KX_RAY_AXIS_NEG_Y: See L{KX_RaySensor}
+@var KX_RAY_AXIS_NEG_Z: See L{KX_RaySensor}
+
+@group Dynamic Actuator: KX_DYN_RESTORE_DYNAMICS, KX_DYN_DISABLE_DYNAMICS, KX_DYN_ENABLE_RIGID_BODY, KX_DYN_DISABLE_RIGID_BODY, KX_DYN_SET_MASS
+@var KX_DYN_RESTORE_DYNAMICS: See L{KX_SCA_DynamicActuator}
+@var KX_DYN_DISABLE_DYNAMICS: See L{KX_SCA_DynamicActuator}
+@var KX_DYN_ENABLE_RIGID_BODY: See L{KX_SCA_DynamicActuator}
+@var KX_DYN_DISABLE_RIGID_BODY: See L{KX_SCA_DynamicActuator}
+@var KX_DYN_SET_MASS: See L{KX_SCA_DynamicActuator}
+
+@group Input Status: KX_INPUT_NONE, KX_INPUT_JUST_ACTIVATED, KX_INPUT_ACTIVE, KX_INPUT_JUST_RELEASED
+@var KX_INPUT_NONE: See L{SCA_MouseSensor}
+@var KX_INPUT_JUST_ACTIVATED: See L{SCA_MouseSensor}
+@var KX_INPUT_ACTIVE: See L{SCA_MouseSensor}
+@var KX_INPUT_JUST_RELEASED: See L{SCA_MouseSensor}
+@group Mouse Buttons: KX_MOUSE_BUT_LEFT, KX_MOUSE_BUT_MIDDLE, KX_MOUSE_BUT_RIGHT
+@var KX_MOUSE_BUT_LEFT: See L{SCA_MouseSensor}
+@var KX_MOUSE_BUT_MIDDLE: See L{SCA_MouseSensor}
+@var KX_MOUSE_BUT_RIGHT: See L{SCA_MouseSensor}
+"""
+
def getCurrentController():
"""
Gets the Python controller associated with this Python script.
@@ -171,6 +205,19 @@ def addActiveActuator(actuator, activate):
@type activate: boolean
@param activate: whether to activate or deactivate the given actuator.
"""
+def sendMessage(subject, body="", to="", message_from=""):
+ """
+ Sends a message to sensors in any active scene.
+
+ @param subject: The subject of the message
+ @type subject: string
+ @param body: The body of the message (optional)
+ @type body: string
+ @param to: The name of the object to send the message to (optional)
+ @type to: string
+ @param message_from: The name of the object that the message is coming from (optional)
+ @type message_from: string
+ """
def getRandomFloat():
"""
Returns a random floating point value in the range [0...1)
diff --git a/source/gameengine/PyDoc/GameTypes.py b/source/gameengine/PyDoc/GameTypes.py
new file mode 100644
index 00000000000..2b07a18247c
--- /dev/null
+++ b/source/gameengine/PyDoc/GameTypes.py
@@ -0,0 +1,75 @@
+# $Id$
+"""
+GameEngine Types
+================
+@var BL_ActionActuator: L{BL_ActionActuator<BL_ActionActuator.BL_ActionActuator>}
+@var BL_Shader: L{BL_Shader<BL_Shader.BL_Shader>}
+@var BL_ShapeActionActuator: L{BL_ShapeActionActuator<BL_ShapeActionActuator.BL_ShapeActionActuator>}
+@var CListValue: L{CListValue<CListValue.CListValue>}
+@var CValue: L{CValue<CValue.CValue>}
+@var KX_BlenderMaterial: L{KX_BlenderMaterial<KX_BlenderMaterial.KX_BlenderMaterial>}
+@var KX_CDActuator: L{KX_CDActuator<KX_CDActuator.KX_CDActuator>}
+@var KX_Camera: L{KX_Camera<KX_Camera.KX_Camera>}
+@var KX_CameraActuator: L{KX_CameraActuator<KX_CameraActuator.KX_CameraActuator>}
+@var KX_ConstraintActuator: L{KX_ConstraintActuator<KX_ConstraintActuator.KX_ConstraintActuator>}
+@var KX_ConstraintWrapper: L{KX_ConstraintWrapper<KX_ConstraintWrapper.KX_ConstraintWrapper>}
+@var KX_GameActuator: L{KX_GameActuator<KX_GameActuator.KX_GameActuator>}
+@var KX_GameObject: L{KX_GameObject<KX_GameObject.KX_GameObject>}
+@var KX_IpoActuator: L{KX_IpoActuator<KX_IpoActuator.KX_IpoActuator>}
+@var KX_LightObject: L{KX_LightObject<KX_LightObject.KX_LightObject>}
+@var KX_MeshProxy: L{KX_MeshProxy<KX_MeshProxy.KX_MeshProxy>}
+@var KX_MouseFocusSensor: L{KX_MouseFocusSensor<KX_MouseFocusSensor.KX_MouseFocusSensor>}
+@var KX_NearSensor: L{KX_NearSensor<KX_NearSensor.KX_NearSensor>}
+@var KX_NetworkMessageActuator: L{KX_NetworkMessageActuator<KX_NetworkMessageActuator.KX_NetworkMessageActuator>}
+@var KX_NetworkMessageSensor: L{KX_NetworkMessageSensor<KX_NetworkMessageSensor.KX_NetworkMessageSensor>}
+@var KX_ObjectActuator: L{KX_ObjectActuator<KX_ObjectActuator.KX_ObjectActuator>}
+@var KX_ParentActuator: L{KX_ParentActuator<KX_ParentActuator.KX_ParentActuator>}
+@var KX_PhysicsObjectWrapper: L{KX_PhysicsObjectWrapper<KX_PhysicsObjectWrapper.KX_PhysicsObjectWrapper>}
+@var KX_PolyProxy: L{KX_PolyProxy<KX_PolyProxy.KX_PolyProxy>}
+@var KX_PolygonMaterial: L{KX_PolygonMaterial<KX_PolygonMaterial.KX_PolygonMaterial>}
+@var KX_RadarSensor: L{KX_RadarSensor<KX_RadarSensor.KX_RadarSensor>}
+@var KX_RaySensor: L{KX_RaySensor<KX_RaySensor.KX_RaySensor>}
+@var KX_SCA_AddObjectActuator: L{KX_SCA_AddObjectActuator<KX_SCA_AddObjectActuator.KX_SCA_AddObjectActuator>}
+@var KX_SCA_DynamicActuator: L{KX_SCA_DynamicActuator<KX_SCA_DynamicActuator.KX_SCA_DynamicActuator>}
+@var KX_SCA_EndObjectActuator: L{KX_SCA_EndObjectActuator<KX_SCA_EndObjectActuator.KX_SCA_EndObjectActuator>}
+@var KX_SCA_ReplaceMeshActuator: L{KX_SCA_ReplaceMeshActuator<KX_SCA_ReplaceMeshActuator.KX_SCA_ReplaceMeshActuator>}
+@var KX_Scene: L{KX_Scene<KX_Scene.KX_Scene>}
+@var KX_SceneActuator: L{KX_SceneActuator<KX_SceneActuator.KX_SceneActuator>}
+@var KX_SoundActuator: L{KX_SoundActuator<KX_SoundActuator.KX_SoundActuator>}
+@var KX_StateActuator: L{KX_StateActuator<KX_StateActuator.KX_StateActuator>}
+@var KX_TouchSensor: L{KX_TouchSensor<KX_TouchSensor.KX_TouchSensor>}
+@var KX_TrackToActuator: L{KX_TrackToActuator<KX_TrackToActuator.KX_TrackToActuator>}
+@var KX_VehicleWrapper: L{KX_VehicleWrapper<KX_VehicleWrapper.KX_VehicleWrapper>}
+@var KX_VertexProxy: L{KX_VertexProxy<KX_VertexProxy.KX_VertexProxy>}
+@var KX_VisibilityActuator: L{KX_VisibilityActuator<KX_VisibilityActuator.KX_VisibilityActuator>}
+@var PyObjectPlus: L{PyObjectPlus<PyObjectPlus.PyObjectPlus>}
+@var SCA_2DFilterActuator: L{SCA_2DFilterActuator<SCA_2DFilterActuator.SCA_2DFilterActuator>}
+@var SCA_ANDController: L{SCA_ANDController<SCA_ANDController.SCA_ANDController>}
+@var SCA_ActuatorSensor: L{SCA_ActuatorSensor<SCA_ActuatorSensor.SCA_ActuatorSensor>}
+@var SCA_AlwaysSensor: L{SCA_AlwaysSensor<SCA_AlwaysSensor.SCA_AlwaysSensor>}
+@var SCA_DelaySensor: L{SCA_DelaySensor<SCA_DelaySensor.SCA_DelaySensor>}
+@var SCA_ILogicBrick: L{SCA_ILogicBrick<SCA_ILogicBrick.SCA_ILogicBrick>}
+@var SCA_IObject: L{SCA_IObject<SCA_IObject.SCA_IObject>}
+@var SCA_ISensor: L{SCA_ISensor<SCA_ISensor.SCA_ISensor>}
+@var SCA_JoystickSensor: L{SCA_JoystickSensor<SCA_JoystickSensor.SCA_JoystickSensor>}
+@var SCA_KeyboardSensor: L{SCA_KeyboardSensor<SCA_KeyboardSensor.SCA_KeyboardSensor>}
+@var SCA_MouseSensor: L{SCA_MouseSensor<SCA_MouseSensor.SCA_MouseSensor>}
+@var SCA_NANDController: L{SCA_NANDController<SCA_NANDController.SCA_NANDController>}
+@var SCA_NORController: L{SCA_NORController<SCA_NORController.SCA_NORController>}
+@var SCA_ORController: L{SCA_ORController<SCA_ORController.SCA_ORController>}
+@var SCA_PropertyActuator: L{SCA_PropertyActuator<SCA_PropertyActuator.SCA_PropertyActuator>}
+@var SCA_PropertySensor: L{SCA_PropertySensor<SCA_PropertySensor.SCA_PropertySensor>}
+@var SCA_PythonController: L{SCA_PythonController<SCA_PythonController.SCA_PythonController>}
+@var SCA_RandomActuator: L{SCA_RandomActuator<SCA_RandomActuator.SCA_RandomActuator>}
+@var SCA_RandomSensor: L{SCA_RandomSensor<SCA_RandomSensor.SCA_RandomSensor>}
+@var SCA_XNORController: L{SCA_XNORController<SCA_XNORController.SCA_XNORController>}
+@var SCA_XORController: L{SCA_XORController<SCA_XORController.SCA_XORController>}
+"""
+
+if 0:
+ # Use to print out all the links
+ for i in a.split('\n'):
+ if i.startswith('@var'):
+ var = i.split(' ')[1].split(':')[0]
+ print '@var %s: L{%s<%s.%s>}' % (var, var, var, var)
+
diff --git a/source/gameengine/PyDoc/KX_BlenderMaterial.py b/source/gameengine/PyDoc/KX_BlenderMaterial.py
new file mode 100644
index 00000000000..21417db1802
--- /dev/null
+++ b/source/gameengine/PyDoc/KX_BlenderMaterial.py
@@ -0,0 +1,38 @@
+class KX_BlenderMaterial: # (PyObjectPlus)
+ """
+ KX_BlenderMaterial
+
+ All placeholders have a __ prefix
+ """
+
+ def __getShader(val):
+ """
+ TODO - Description
+
+ @param val: the starting frame of the animation
+ @type val: float
+
+ @rtype: integer
+ @return: TODO Description
+ """
+
+ def __setBlending(val):
+ """
+ TODO - Description
+
+ @param val: the starting frame of the animation
+ @type val: float
+
+ @rtype: integer
+ @return: TODO Description
+ """
+ def __getMaterialIndex(val):
+ """
+ TODO - Description
+
+ @param val: the starting frame of the animation
+ @type val: float
+
+ @rtype: integer
+ @return: TODO Description
+ """
diff --git a/source/gameengine/PyDoc/KX_CDActuator.py b/source/gameengine/PyDoc/KX_CDActuator.py
index 2c202476584..e1067674e7e 100644
--- a/source/gameengine/PyDoc/KX_CDActuator.py
+++ b/source/gameengine/PyDoc/KX_CDActuator.py
@@ -3,6 +3,15 @@
from SCA_IActuator import *
class KX_CDActuator(SCA_IActuator):
+ """
+ CD Controller actuator.
+ @ivar volume: controls the volume to set the CD to. 0.0 = silent, 1.0 = max volume.
+ @type volume: float
+ @ivar track: the track selected to be played
+ @type track: integer
+ @ivar gain: the gain (volume) of the CD between 0.0 and 1.0.
+ @type gain: float
+ """
def startCD():
"""
Starts the CD playing.
@@ -15,8 +24,21 @@ class KX_CDActuator(SCA_IActuator):
"""
Pauses the CD.
"""
+ def resumeCD():
+ """
+ Resumes the CD after a pause.
+ """
+ def playAll():
+ """
+ Plays the CD from the beginning.
+ """
+ def playTrack(trackNumber):
+ """
+ Plays the track selected.
+ """
def setGain(gain):
"""
+ DEPRECATED: Use the volume property.
Sets the gain (volume) of the CD.
@type gain: float
@@ -24,6 +46,7 @@ class KX_CDActuator(SCA_IActuator):
"""
def getGain():
"""
+ DEPRECATED: Use the volume property.
Gets the current gain (volume) of the CD.
@rtype: float
diff --git a/source/gameengine/PyDoc/KX_Camera.py b/source/gameengine/PyDoc/KX_Camera.py
index 4cadf1c0ed0..f5d0d45f968 100644
--- a/source/gameengine/PyDoc/KX_Camera.py
+++ b/source/gameengine/PyDoc/KX_Camera.py
@@ -185,3 +185,25 @@ class KX_Camera(KX_GameObject):
@param matrix: The new projection matrix for this camera.
"""
+ def enableViewport(viewport):
+ """
+ Use this camera to draw a viewport on the screen (for split screen games or overlay scenes). The viewport region is defined with L{setViewport}.
+
+ @type viewport: bool
+ @param viewport: the new viewport status
+ """
+ def setOnTop():
+ """
+ Set this cameras viewport ontop of all other viewport.
+ """
+ def setViewport(left, bottom, right, top):
+ """
+ Sets the region of this viewport on the screen in pixels.
+
+ Use L{Rasterizer.getWindowHeight} L{Rasterizer.getWindowWidth} to calculate values relative to the entire display.
+
+ @type left: int
+ @type bottom: int
+ @type right: int
+ @type top: int
+ """
diff --git a/source/gameengine/PyDoc/KX_ConstraintActuator.py b/source/gameengine/PyDoc/KX_ConstraintActuator.py
index 7c7ad5aa0fa..a30b859548b 100644
--- a/source/gameengine/PyDoc/KX_ConstraintActuator.py
+++ b/source/gameengine/PyDoc/KX_ConstraintActuator.py
@@ -5,6 +5,75 @@ from SCA_IActuator import *
class KX_ConstraintActuator(SCA_IActuator):
"""
A constraint actuator limits the position, rotation, distance or orientation of an object.
+
+ Properties:
+
+ @ivar damp: time constant of the constraint expressed in frame (not use by Force field constraint)
+ @type damp: integer
+
+ @ivar rotDamp: time constant for the rotation expressed in frame (only for the distance constraint)
+ 0 = use damp for rotation as well
+ @type rotDamp: integer
+
+ @ivar direction: the reference direction in world coordinate for the orientation constraint
+ @type direction: 3-tuple of float: [x,y,z]
+
+ @ivar option: Binary combination of the following values:
+ Applicable to Distance constraint:
+ KX_ACT_CONSTRAINT_NORMAL ( 64) : Activate alignment to surface
+ KX_ACT_CONSTRAINT_DISTANCE ( 512) : Activate distance control
+ KX_ACT_CONSTRAINT_LOCAL (1024) : direction of the ray is along the local axis
+ Applicable to Force field constraint:
+ KX_ACT_CONSTRAINT_DOROTFH (2048) : Force field act on rotation as well
+ Applicable to both:
+ KX_ACT_CONSTRAINT_MATERIAL ( 128) : Detect material rather than property
+ KX_ACT_CONSTRAINT_PERMANENT ( 256) : No deactivation if ray does not hit target
+ @type option: integer
+
+ @ivar time: activation time of the actuator. The actuator disables itself after this many frame.
+ If set to 0, the actuator is not limited in time.
+ @type time: integer
+
+ @ivar property: the name of the property or material for the ray detection of the distance constraint.
+ @type property: string
+
+ @ivar min: The lower bound of the constraint
+ For the rotation and orientation constraint, it represents radiant
+ @type min: float
+
+ @ivar distance: the target distance of the distance constraint
+ @type distance: float
+
+ @ivar max: the upper bound of the constraint.
+ For rotation and orientation constraints, it represents radiant.
+ @type max: float
+
+ @ivar rayLength: the length of the ray of the distance constraint.
+ @type rayLength: float
+
+ @ivar limit: type of constraint, use one of the following constant:
+ KX_ACT_CONSTRAINT_LOCX ( 1) : limit X coord
+ KX_ACT_CONSTRAINT_LOCY ( 2) : limit Y coord
+ KX_ACT_CONSTRAINT_LOCZ ( 3) : limit Z coord
+ KX_ACT_CONSTRAINT_ROTX ( 4) : limit X rotation
+ KX_ACT_CONSTRAINT_ROTY ( 5) : limit Y rotation
+ KX_ACT_CONSTRAINT_ROTZ ( 6) : limit Z rotation
+ KX_ACT_CONSTRAINT_DIRPX ( 7) : set distance along positive X axis
+ KX_ACT_CONSTRAINT_DIRPY ( 8) : set distance along positive Y axis
+ KX_ACT_CONSTRAINT_DIRPZ ( 9) : set distance along positive Z axis
+ KX_ACT_CONSTRAINT_DIRNX (10) : set distance along negative X axis
+ KX_ACT_CONSTRAINT_DIRNY (11) : set distance along negative Y axis
+ KX_ACT_CONSTRAINT_DIRNZ (12) : set distance along negative Z axis
+ KX_ACT_CONSTRAINT_ORIX (13) : set orientation of X axis
+ KX_ACT_CONSTRAINT_ORIY (14) : set orientation of Y axis
+ KX_ACT_CONSTRAINT_ORIZ (15) : set orientation of Z axis
+ KX_ACT_CONSTRAINT_FHPX (16) : set force field along positive X axis
+ KX_ACT_CONSTRAINT_FHPY (17) : set force field along positive Y axis
+ KX_ACT_CONSTRAINT_FHPZ (18) : set force field along positive Z axis
+ KX_ACT_CONSTRAINT_FHNX (19) : set force field along negative X axis
+ KX_ACT_CONSTRAINT_FHNY (20) : set force field along negative Y axis
+ KX_ACT_CONSTRAINT_FHNZ (21) : set force field along negative Z axis
+ @type limit: integer
"""
def setDamp(time):
"""
diff --git a/source/gameengine/PyDoc/KX_ConstraintWrapper.py b/source/gameengine/PyDoc/KX_ConstraintWrapper.py
new file mode 100644
index 00000000000..5b34e1609e8
--- /dev/null
+++ b/source/gameengine/PyDoc/KX_ConstraintWrapper.py
@@ -0,0 +1,28 @@
+class KX_ConstraintWrapper: # (PyObjectPlus)
+ """
+ KX_ConstraintWrapper
+
+ All placeholders have a __ prefix
+ """
+ def __getConstraintId(val):
+ """
+ TODO - Description
+
+ @param val: the starting frame of the animation
+ @type val: float
+
+ @rtype: integer
+ @return: TODO Description
+ """
+
+ def __testMethod(val):
+ """
+ TODO - Description
+
+ @param val: the starting frame of the animation
+ @type val: float
+
+ @rtype: integer
+ @return: TODO Description
+ """
+
diff --git a/source/gameengine/PyDoc/KX_GameActuator.py b/source/gameengine/PyDoc/KX_GameActuator.py
index b916b3b5617..fc5bd6005fc 100644
--- a/source/gameengine/PyDoc/KX_GameActuator.py
+++ b/source/gameengine/PyDoc/KX_GameActuator.py
@@ -5,15 +5,22 @@ from SCA_IActuator import *
class KX_GameActuator(SCA_IActuator):
"""
The game actuator loads a new .blend file, restarts the current .blend file or quits the game.
+
+ Properties:
+
+ @ivar file: the new .blend file to load
+ @type file: string.
"""
def getFile():
"""
+ DEPRECATED: use the file property
Returns the filename of the new .blend file to load.
@rtype: string
"""
def setFile(filename):
"""
+ DEPRECATED: use the file property
Sets the new .blend file to load.
@param filename: The file name this actuator will load.
diff --git a/source/gameengine/PyDoc/KX_GameObject.py b/source/gameengine/PyDoc/KX_GameObject.py
index 4f389a1ae4f..21ddf439924 100644
--- a/source/gameengine/PyDoc/KX_GameObject.py
+++ b/source/gameengine/PyDoc/KX_GameObject.py
@@ -1,29 +1,86 @@
# $Id$
# Documentation for game objects
-class KX_GameObject:
+# from SCA_IObject import *
+# from SCA_ISensor import *
+# from SCA_IController import *
+# from SCA_IActuator import *
+
+
+class KX_GameObject: # (SCA_IObject)
"""
All game objects are derived from this class.
Properties assigned to game objects are accessible as attributes of this class.
-
+ - note: Calling ANY method or attribute on an object that has been removed from a scene will raise a RuntimeError, if an object may have been removed since last accessing it use the L{isValid} attribute to check.
+
@ivar name: The object's name. (Read only)
+ - note: Currently (Blender 2.49) the prefix "OB" is added to all objects name. This may change in blender 2.5.
@type name: string.
- @ivar mass: The object's mass (provided the object has a physics controller). Read only.
+ @ivar mass: The object's mass
+ - note: The object must have a physics controller for the mass to be applied, otherwise the mass value will be returned as 0.0
@type mass: float
+ @ivar linVelocityMin: Enforces the object keeps moving at a minimum velocity.
+ - note: Applies to dynamic and rigid body objects only.
+ - note: A value of 0.0 disables this option.
+ - note: While objects are stationary the minimum velocity will not be applied.
+ @type linVelocityMin: float
+ @ivar linVelocityMax: Clamp the maximum linear velocity to prevent objects moving beyond a set speed.
+ - note: Applies to dynamic and rigid body objects only.
+ - note: A value of 0.0 disables this option (rather then setting it stationary).
+ @type linVelocityMax: float
+ @ivar localInertia: the object's inertia vector in local coordinates. Read only.
+ @type localInertia: list [ix, iy, iz]
@ivar parent: The object's parent object. (Read only)
- @type parent: L{KX_GameObject}
+ @type parent: L{KX_GameObject} or None
@ivar visible: visibility flag.
+ - note: Game logic will still run for invisible objects.
@type visible: boolean
+ @ivar occlusion: occlusion capability flag.
+ @type occlusion: boolean
@ivar position: The object's position.
- @type position: list [x, y, z]
- @ivar orientation: The object's orientation. 3x3 Matrix.
- You can also write a Quaternion or Euler vector.
- @type orientation: 3x3 Matrix [[float]]
+ DEPRECATED: use localPosition and worldPosition
+ @type position: list [x, y, z] On write: local position, on read: world position
+ @ivar orientation: The object's orientation. 3x3 Matrix. You can also write a Quaternion or Euler vector.
+ DEPRECATED: use localOrientation and worldOrientation
+ @type orientation: 3x3 Matrix [[float]] On write: local orientation, on read: world orientation
@ivar scaling: The object's scaling factor. list [sx, sy, sz]
- @type scaling: list [sx, sy, sz]
+ DEPRECATED: use localScaling and worldScaling
+ @type scaling: list [sx, sy, sz] On write: local scaling, on read: world scaling
+ @ivar localOrientation: The object's local orientation. 3x3 Matrix. You can also write a Quaternion or Euler vector.
+ @type localOrientation: 3x3 Matrix [[float]]
+ @ivar worldOrientation: The object's world orientation. Read-only.
+ @type worldOrientation: 3x3 Matrix [[float]]
+ @ivar localScaling: The object's local scaling factor.
+ @type localScaling: list [sx, sy, sz]
+ @ivar worldScaling: The object's world scaling factor. Read-only
+ @type worldScaling: list [sx, sy, sz]
+ @ivar localPosition: The object's local position.
+ @type localPosition: list [x, y, z]
+ @ivar worldPosition: The object's world position.
+ @type worldPosition: list [x, y, z]
@ivar timeOffset: adjust the slowparent delay at runtime.
@type timeOffset: float
+ @ivar state: the game object's state bitmask, using the first 30 bits, one bit must always be set.
+ @type state: int
+ @ivar meshes: a list meshes for this object.
+ - note: Most objects use only 1 mesh.
+ - note: Changes to this list will not update the KX_GameObject.
+ @type meshes: list of L{KX_MeshProxy}
+ @ivar sensors: a list of L{SCA_ISensor} objects.
+ - note: This attribute is experemental and may be removed (but probably wont be).
+ - note: Changes to this list will not update the KX_GameObject.
+ @type sensors: list
+ @ivar controllers: a list of L{SCA_IController} objects.
+ - note: This attribute is experemental and may be removed (but probably wont be).
+ - note: Changes to this list will not update the KX_GameObject.
+ @type controllers: list of L{SCA_ISensor}.
+ @ivar actuators: a list of L{SCA_IActuator} objects.
+ - note: This attribute is experemental and may be removed (but probably wont be).
+ - note: Changes to this list will not update the KX_GameObject.
+ @type actuators: list
+ @ivar isValid: Retuerns fails when the object has been removed from the scene and can no longer be used.
+ @type isValid: bool
"""
def endObject(visible):
"""
@@ -37,33 +94,43 @@ class KX_GameObject:
"""
def getVisible():
"""
- Gets the game object's visible flag.
+ Gets the game object's visible flag. (B{deprecated})
@rtype: boolean
"""
- def setVisible(visible):
+ def setVisible(visible, recursive):
"""
Sets the game object's visible flag.
@type visible: boolean
+ @type recursive: boolean
+ @param recursive: optional argument to set all childrens visibility flag too.
+ """
+ def setOcclusion(occlusion, recursive):
+ """
+ Sets the game object's occlusion capability.
+
+ @type visible: boolean
+ @type recursive: boolean
+ @param recursive: optional argument to set all childrens occlusion flag too.
"""
def getState():
"""
- Gets the game object's state bitmask.
+ Gets the game object's state bitmask. (B{deprecated})
@rtype: int
@return: the objects state.
"""
def setState(state):
"""
- Sets the game object's state flag.
- The bitmasks for states from 1 to 30 can be set with (1<<0, 1<<1, 1<<2 ... 1<<29)
+ Sets the game object's state flag. (B{deprecated}).
+ The bitmasks for states from 1 to 30 can be set with (1<<0, 1<<1, 1<<2 ... 1<<29)
@type state: integer
"""
def setPosition(pos):
"""
- Sets the game object's position.
+ Sets the game object's position. (B{deprecated})
Global coordinates for root object, local for child objects.
@@ -79,14 +146,14 @@ class KX_GameObject:
"""
def getPosition():
"""
- Gets the game object's position.
+ Gets the game object's position. (B{deprecated})
@rtype: list [x, y, z]
@return: the object's position in world coordinates.
"""
def setOrientation(orn):
"""
- Sets the game object's orientation.
+ Sets the game object's orientation. (B{deprecated})
@type orn: 3x3 rotation matrix, or Quaternion.
@param orn: a rotation matrix specifying the new rotation.
@@ -117,7 +184,7 @@ class KX_GameObject:
"""
def getOrientation():
"""
- Gets the game object's orientation.
+ Gets the game object's orientation. (B{deprecated})
@rtype: 3x3 rotation matrix
@return: The game object's rotation matrix
@@ -133,7 +200,7 @@ class KX_GameObject:
@param local: - False: you get the "global" movement ie: relative to world orientation (default).
- True: you get the "local" movement ie: relative to object orientation.
"""
- def applyRotation(movement, local = 0):
+ def applyRotation(rotation, local = 0):
"""
Sets the game object's rotation.
@@ -231,7 +298,7 @@ class KX_GameObject:
"""
def getMass():
"""
- Gets the game object's mass.
+ Gets the game object's mass. (B{deprecated})
@rtype: float
@return: the object's mass.
@@ -243,6 +310,8 @@ class KX_GameObject:
The reaction force is the force applied to this object over the last simulation timestep.
This also includes impulses, eg from collisions.
+ (B{This is not implimented for bullet physics at the moment})
+
@rtype: list [fx, fy, fz]
@return: the reaction force of this object.
"""
@@ -280,7 +349,7 @@ class KX_GameObject:
"""
def getParent():
"""
- Gets this object's parent.
+ Gets this object's parent. (B{deprecated})
@rtype: L{KX_GameObject}
@return: this object's parent object, or None if this object has no parent.
@@ -299,13 +368,13 @@ class KX_GameObject:
def getChildren():
"""
Return a list of immediate children of this object.
- @rtype: list
+ @rtype: L{CListValue<CListValue.CListValue>} of L{KX_GameObject<KX_GameObject.KX_GameObject>}
@return: a list of all this objects children.
"""
def getChildrenRecursive():
"""
Return a list of children of this object, including all their childrens children.
- @rtype: list
+ @rtype: L{CListValue<CListValue.CListValue>} of L{KX_GameObject<KX_GameObject.KX_GameObject>}
@return: a list of all this objects children recursivly.
"""
def getMesh(mesh):
@@ -413,5 +482,23 @@ class KX_GameObject:
If no hit, returns (None,None,None) or (None,None,None,None)
If the object hit is not a static mesh, polygon is None
"""
-
-
+ def setCollisionMargin(margin):
+ """
+ Set the objects collision margin.
+
+ note: If this object has no physics controller (a physics ID of zero), this function will raise RuntimeError.
+
+ @type margin: float
+ @param margin: the collision margin distance in blender units.
+ """
+ def sendMessage(subject, body="", to=""):
+ """
+ Sends a message.
+
+ @param subject: The subject of the message
+ @type subject: string
+ @param body: The body of the message (optional)
+ @type body: string
+ @param to: The name of the object to send the message to (optional)
+ @type to: string
+ """
diff --git a/source/gameengine/PyDoc/KX_IpoActuator.py b/source/gameengine/PyDoc/KX_IpoActuator.py
index e2fe3b289e3..ebc0b855f0a 100644
--- a/source/gameengine/PyDoc/KX_IpoActuator.py
+++ b/source/gameengine/PyDoc/KX_IpoActuator.py
@@ -5,10 +5,29 @@ from SCA_IActuator import *
class KX_IpoActuator(SCA_IActuator):
"""
IPO actuator activates an animation.
+
+ @ivar startFrame: Start frame.
+ @type startFrame: float
+ @ivar endFrame: End frame.
+ @type endFrame: float
+ @ivar propName: Use this property to define the Ipo position
+ @type propName: string
+ @ivar framePropName: Assign this property this action current frame number
+ @type framePropName: string
+ @ivar type: Play mode for the ipo. (In GameLogic.KX_IPOACT_PLAY, KX_IPOACT_PINGPONG, KX_IPOACT_FLIPPER, KX_IPOACT_LOOPSTOP, KX_IPOACT_LOOPEND, KX_IPOACT_FROM_PROP)
+ @type type: int
+ @ivar useIpoAsForce: Apply Ipo as a global or local force depending on the local option (dynamic objects only)
+ @type useIpoAsForce: bool
+ @ivar useIpoAdd: Ipo is added to the current loc/rot/scale in global or local coordinate according to Local flag
+ @type useIpoAdd: bool
+ @ivar useIpoLocal: Let the ipo acts in local coordinates, used in Force and Add mode.
+ @type useIpoLocal: bool
+ @ivar useChildren: Update IPO on all children Objects as well
+ @type useChildren: bool
"""
def set(mode, startframe, endframe, force):
"""
- Sets the properties of the actuator.
+ Sets the properties of the actuator. (B{deprecated})
@param mode: "Play", "PingPong", "Flipper", "LoopStop", "LoopEnd" or "FromProp"
@type mode: string
@@ -21,70 +40,70 @@ class KX_IpoActuator(SCA_IActuator):
"""
def setProperty(property):
"""
- Sets the name of the property to be used in FromProp mode.
+ Sets the name of the property to be used in FromProp mode. (B{deprecated})
@type property: string
"""
def setStart(startframe):
"""
- Sets the frame from which the IPO starts playing.
+ Sets the frame from which the IPO starts playing. (B{deprecated})
@type startframe: integer
"""
def getStart():
"""
- Returns the frame from which the IPO starts playing.
+ Returns the frame from which the IPO starts playing. (B{deprecated})
@rtype: integer
"""
def setEnd(endframe):
"""
- Sets the frame at which the IPO stops playing.
+ Sets the frame at which the IPO stops playing. (B{deprecated})
@type endframe: integer
"""
def getEnd():
"""
- Returns the frame at which the IPO stops playing.
+ Returns the frame at which the IPO stops playing. (B{deprecated})
@rtype: integer
"""
def setIpoAsForce(force):
"""
- Set whether to interpret the ipo as a force rather than a displacement.
+ Set whether to interpret the ipo as a force rather than a displacement. (B{deprecated})
@type force: boolean
@param force: KX_TRUE or KX_FALSE
"""
def getIpoAsForce():
"""
- Returns whether to interpret the ipo as a force rather than a displacement.
+ Returns whether to interpret the ipo as a force rather than a displacement. (B{deprecated})
@rtype: boolean
"""
def setIpoAdd(add):
"""
- Set whether to interpret the ipo as additive rather than absolute.
+ Set whether to interpret the ipo as additive rather than absolute. (B{deprecated})
@type add: boolean
@param add: KX_TRUE or KX_FALSE
"""
def getIpoAdd():
"""
- Returns whether to interpret the ipo as additive rather than absolute.
+ Returns whether to interpret the ipo as additive rather than absolute. (B{deprecated})
@rtype: boolean
"""
def setType(mode):
"""
- Sets the operation mode of the actuator.
+ Sets the operation mode of the actuator. (B{deprecated})
@param mode: KX_IPOACT_PLAY, KX_IPOACT_PINGPONG, KX_IPOACT_FLIPPER, KX_IPOACT_LOOPSTOP, KX_IPOACT_LOOPEND
@type mode: string
"""
def getType():
"""
- Returns the operation mode of the actuator.
+ Returns the operation mode of the actuator. (B{deprecated})
@rtype: integer
@return: KX_IPOACT_PLAY, KX_IPOACT_PINGPONG, KX_IPOACT_FLIPPER, KX_IPOACT_LOOPSTOP, KX_IPOACT_LOOPEND
@@ -92,7 +111,7 @@ class KX_IpoActuator(SCA_IActuator):
def setForceIpoActsLocal(local):
"""
Set whether to apply the force in the object's local
- coordinates rather than the world global coordinates.
+ coordinates rather than the world global coordinates. (B{deprecated})
@param local: Apply the ipo-as-force in the object's local
coordinates? (KX_TRUE, KX_FALSE)
@@ -101,5 +120,5 @@ class KX_IpoActuator(SCA_IActuator):
def getForceIpoActsLocal():
"""
Return whether to apply the force in the object's local
- coordinates rather than the world global coordinates.
+ coordinates rather than the world global coordinates. (B{deprecated})
"""
diff --git a/source/gameengine/PyDoc/KX_Light.py b/source/gameengine/PyDoc/KX_LightObject.py
index ff0cf071d2d..8cc1787887b 100644
--- a/source/gameengine/PyDoc/KX_Light.py
+++ b/source/gameengine/PyDoc/KX_LightObject.py
@@ -2,7 +2,7 @@
# Documentation for Light game objects.
from KX_GameObject import *
-class KX_Light(KX_GameObject):
+class KX_LightObject(KX_GameObject):
"""
A Light object.
diff --git a/source/gameengine/PyDoc/KX_MeshProxy.py b/source/gameengine/PyDoc/KX_MeshProxy.py
index 03bc36b6ac1..e8839ac484c 100644
--- a/source/gameengine/PyDoc/KX_MeshProxy.py
+++ b/source/gameengine/PyDoc/KX_MeshProxy.py
@@ -45,7 +45,14 @@ class KX_MeshProxy:
m_i += 1
mesh = obj.getMesh(m_i)
-
+ @ivar materials:
+ @type materials: list of L{KX_BlenderMaterial} or L{KX_PolygonMaterial} types
+
+ @ivar numPolygons:
+ @type numPolygons: integer
+
+ @ivar numMaterials:
+ @type numMaterials: integer
"""
def getNumMaterials():
diff --git a/source/gameengine/PyDoc/KX_MouseFocusSensor.py b/source/gameengine/PyDoc/KX_MouseFocusSensor.py
index 28d584037f8..24f7716218b 100644
--- a/source/gameengine/PyDoc/KX_MouseFocusSensor.py
+++ b/source/gameengine/PyDoc/KX_MouseFocusSensor.py
@@ -8,19 +8,60 @@ class KX_MouseFocusSensor(SCA_MouseSensor):
The mouse focus sensor works by transforming the mouse coordinates from 2d device
space to 3d space then raycasting away from the camera.
+
+ @ivar raySource: The worldspace source of the ray (the view position)
+ @type raySource: list (vector of 3 floats)
+ @ivar rayTarget: The worldspace target of the ray.
+ @type rayTarget: list (vector of 3 floats)
+ @ivar rayDirection: The L{rayTarget} - L{raySource} normalized.
+ @type rayDirection: list (normalized vector of 3 floats)
+ @ivar hitObject: the last object the mouse was over.
+ @type hitObject: L{KX_GameObject<KX_GameObject.KX_GameObject>} or None
+ @ivar hitPosition: The worldspace position of the ray intersecton.
+ @type hitPosition: list (vector of 3 floats)
+ @ivar hitNormal: the worldspace normal from the face at point of intersection.
+ @type hitNormal: list (normalized vector of 3 floats)
"""
- def GetRayTarget():
+ def getHitNormal():
+ """
+ Returns the normal (in worldcoordinates) at the point of collision where the object was hit by this ray. (B{deprecated})
+
+ @rtype: list [x, y, z]
+ @return: the ray collision normal.
+ """
+ def getHitObject():
+ """
+ Returns the object that was hit by this ray or None. (B{deprecated})
+
+ @rtype: L{KX_GameObject} or None
+ @return: the collision object.
+ """
+ def getHitPosition():
"""
- Returns the end point of the sensor ray.
+ Returns the position (in worldcoordinates) at the point of collision where the object was hit by this ray. (B{deprecated})
@rtype: list [x, y, z]
- @return: the end point of the sensor ray, in world coordinates.
+ @return: the ray collision position.
"""
- def GetRaySource():
+ def getRayDirection():
"""
- Returns the start point of the sensor ray.
+ Returns the normalized direction (in worldcoordinates) of the ray cast by the mouse. (B{deprecated})
@rtype: list [x, y, z]
- @return: the start point of the sensor ray, in world coordinates.
+ @return: the ray direction.
"""
+ def getRaySource():
+ """
+ Returns the position (in worldcoordinates) the ray was cast from by the mouse. (B{deprecated})
+
+ @rtype: list [x, y, z]
+ @return: the ray source.
+ """
+ def getRayTarget():
+ """
+ Returns the target of the ray (in worldcoordinates) that seeks the focus object. (B{deprecated})
+
+ @rtype: list [x, y, z]
+ @return: the ray target.
+ """ \ No newline at end of file
diff --git a/source/gameengine/PyDoc/KX_NetworkMessageActuator.py b/source/gameengine/PyDoc/KX_NetworkMessageActuator.py
index aecd2897743..c9f48d47eb8 100644
--- a/source/gameengine/PyDoc/KX_NetworkMessageActuator.py
+++ b/source/gameengine/PyDoc/KX_NetworkMessageActuator.py
@@ -5,21 +5,33 @@ from SCA_IActuator import *
class KX_NetworkMessageActuator(SCA_IActuator):
"""
Message Actuator
+
+ @ivar propName: Messages will only be sent to objects with the given property name.
+ @type propName: string
+ @ivar subject: The subject field of the message.
+ @type subject: string
+ @ivar body: The body of the message.
+ @type body: string
+ @ivar usePropBody: Send a property instead of a regular body message.
+ @type usePropBody: boolean
"""
def setToPropName(name):
"""
+ DEPRECATED: Use the propName property instead.
Messages will only be sent to objects with the given property name.
@type name: string
"""
def setSubject(subject):
"""
+ DEPRECATED: Use the subject property instead.
Sets the subject field of the message.
@type subject: string
"""
def setBodyType(bodytype):
"""
+ DEPRECATED: Use the usePropBody property instead.
Sets the type of body to send.
@type bodytype: boolean
@@ -27,6 +39,7 @@ class KX_NetworkMessageActuator(SCA_IActuator):
"""
def setBody(body):
"""
+ DEPRECATED: Use the body property instead.
Sets the message body.
@type body: string
diff --git a/source/gameengine/PyDoc/KX_NetworkMessageSensor.py b/source/gameengine/PyDoc/KX_NetworkMessageSensor.py
index 8f5f3609df7..0fecad58437 100644
--- a/source/gameengine/PyDoc/KX_NetworkMessageSensor.py
+++ b/source/gameengine/PyDoc/KX_NetworkMessageSensor.py
@@ -7,9 +7,22 @@ class KX_NetworkMessageSensor(SCA_ISensor):
The Message Sensor logic brick.
Currently only loopback (local) networks are supported.
+
+ @ivar subject: The subject the sensor is looking for.
+ @type subject: string
+ @ivar frameMessageCount: The number of messages received since the last frame.
+ (Read-only)
+ @type framemessageCount: int
+ @ivar subjects: The list of message subjects received. (Read-only)
+ @type subjects: list of strings
+ @ivar bodies: The list of message bodies received. (Read-only)
+ @type bodies: list of strings
"""
+
+
def setSubjectFilterText(subject):
"""
+ DEPRECATED: Use the subject property instead.
Change the message subject text that this sensor is listening to.
@type subject: string
@@ -18,24 +31,28 @@ class KX_NetworkMessageSensor(SCA_ISensor):
def getFrameMessageCount():
"""
+ DEPRECATED: Use the frameMessageCount property instead.
Get the number of messages received since the last frame.
@rtype: integer
"""
def getBodies():
"""
+ DEPRECATED: Use the bodies property instead.
Gets the list of message bodies.
@rtype: list
"""
def getSubject():
"""
+ DEPRECATED: Use the subject property instead.
Gets the message subject this sensor is listening for from the Subject: field.
@rtype: string
"""
def getSubjects():
"""
+ DEPRECATED: Use the subjects property instead.
Gets the list of message subjects received.
@rtype: list
diff --git a/source/gameengine/PyDoc/KX_ParentActuator.py b/source/gameengine/PyDoc/KX_ParentActuator.py
index 7b5625ec82d..2f5d9515d0b 100644
--- a/source/gameengine/PyDoc/KX_ParentActuator.py
+++ b/source/gameengine/PyDoc/KX_ParentActuator.py
@@ -1,16 +1,16 @@
-# $Id: KX_ParentActuator.py 2615 2004-06-02 12:43:27Z kester $
+# $Id$
# Documentation for KX_ParentActuator
from SCA_IActuator import *
class KX_ParentActuator(SCA_IActuator):
"""
- The parent actuator can set or remove an objects parent object.
-
+ The parent actuator can set or remove an objects parent object.
@ivar object: the object this actuator sets the parent too.
@type object: KX_GameObject or None
"""
def setObject(object):
"""
+ DEPRECATED: Use the object property.
Sets the object to set as parent.
Object can be either a L{KX_GameObject} or the name of the object.
@@ -19,6 +19,7 @@ class KX_ParentActuator(SCA_IActuator):
"""
def getObject(name_only = 1):
"""
+ DEPRECATED: Use the object property.
Returns the name of the object to change to.
@type name_only: bool
@param name_only: optional argument, when 0 return a KX_GameObject
diff --git a/source/gameengine/PyDoc/KX_PhysicsObjectWrapper.py b/source/gameengine/PyDoc/KX_PhysicsObjectWrapper.py
new file mode 100644
index 00000000000..2171cf4c7b6
--- /dev/null
+++ b/source/gameengine/PyDoc/KX_PhysicsObjectWrapper.py
@@ -0,0 +1,47 @@
+class KX_PhysicsObjectWrapper: # (PyObjectPlus)
+ """
+ KX_PhysicsObjectWrapper
+
+ All placeholders have a __ prefix
+ """
+ def __setActive(val):
+ """
+ TODO - Description
+
+ @param val: the starting frame of the animation
+ @type val: float
+
+ @rtype: integer
+ @return: TODO Description
+ """
+
+ def __setAngularVelocity(val):
+ """
+ TODO - Description
+
+ @param val: the starting frame of the animation
+ @type val: float
+
+ @rtype: integer
+ @return: TODO Description
+ """
+ def __setLinearVelocity(val):
+ """
+ TODO - Description
+
+ @param val: the starting frame of the animation
+ @type val: float
+
+ @rtype: integer
+ @return: TODO Description
+ """
+ def __setPosition(val):
+ """
+ TODO - Description
+
+ @param val: the starting frame of the animation
+ @type val: float
+
+ @rtype: integer
+ @return: TODO Description
+ """
diff --git a/source/gameengine/PyDoc/KX_RaySensor.py b/source/gameengine/PyDoc/KX_RaySensor.py
index e487edcb655..b9de54e92a5 100644
--- a/source/gameengine/PyDoc/KX_RaySensor.py
+++ b/source/gameengine/PyDoc/KX_RaySensor.py
@@ -5,28 +5,53 @@ from SCA_ISensor import *
class KX_RaySensor(SCA_ISensor):
"""
A ray sensor detects the first object in a given direction.
+
+ @ivar property: The property the ray is looking for.
+ @type property: string
+ @ivar range: The distance of the ray.
+ @type range: float
+ @ivar useMaterial: Whether or not to look for a material (false = property)
+ @type useMaterial: boolean
+ @ivar useXRay: Whether or not to use XRay.
+ @type useXRay: boolean
+ @ivar hitObject: The game object that was hit by the ray. (Read-only)
+ @type hitObject: KX_GameObject
+ @ivar hitPosition: The position (in worldcoordinates) where the object was hit by the ray. (Read-only)
+ @type hitPosition: list [x, y, z]
+ @ivar hitNormal: The normal (in worldcoordinates) of the object at the location where the object was hit by the ray. (Read-only)
+ @type hitNormal: list [x, y, z]
+ @ivar rayDirection: The direction from the ray (in worldcoordinates). (Read-only)
+ @type rayDirection: list [x, y, z]
+ @ivar axis: The axis the ray is pointing on.
+ @type axis: int from 0 to 5
+ KX_RAY_AXIS_POS_X, KX_RAY_AXIS_POS_Y, KX_RAY_AXIS_POS_Z,
+ KX_RAY_AXIS_NEG_X, KX_RAY_AXIS_NEG_Y, KX_RAY_AXIS_NEG_Z
"""
def getHitObject():
"""
+ DEPRECATED: Use the hitObject property instead.
Returns the game object that was hit by this ray.
@rtype: KX_GameObject
"""
def getHitPosition():
"""
+ DEPRECATED: Use the hitPosition property instead.
Returns the position (in worldcoordinates) where the object was hit by this ray.
@rtype: list [x, y, z]
"""
def getHitNormal():
"""
+ DEPRECATED: Use the hitNormal property instead.
Returns the normal (in worldcoordinates) of the object at the location where the object was hit by this ray.
@rtype: list [nx, ny, nz]
"""
def getRayDirection():
"""
+ DEPRECATED: Use the rayDirection property instead.
Returns the direction from the ray (in worldcoordinates)
@rtype: list [dx, dy, dz]
diff --git a/source/gameengine/PyDoc/KX_SCA_AddObjectActuator.py b/source/gameengine/PyDoc/KX_SCA_AddObjectActuator.py
index 56068fa641a..572b864ff0a 100644
--- a/source/gameengine/PyDoc/KX_SCA_AddObjectActuator.py
+++ b/source/gameengine/PyDoc/KX_SCA_AddObjectActuator.py
@@ -9,6 +9,12 @@ class KX_SCA_AddObjectActuator(SCA_IActuator):
@type object: KX_GameObject or None
@ivar objectLastCreated: the last added object from this actuator (read only).
@type objectLastCreated: KX_GameObject or None
+ @ivar time: the lifetime of added objects, in frames.
+ @type time: integer
+ @ivar linearVelocity: the initial linear velocity of added objects.
+ @type linearVelocity: list [vx, vy, vz]
+ @ivar angularVelocity: the initial angular velocity of added objects.
+ @type angularVelocity: list [vx, vy, vz]
@warning: An Add Object actuator will be ignored if at game start, the linked object doesn't exist
(or is empty) or the linked object is in an active layer.
@@ -19,6 +25,7 @@ class KX_SCA_AddObjectActuator(SCA_IActuator):
"""
def setObject(object):
"""
+ DEPRECATED: use the object property
Sets the game object to add.
A copy of the object will be added to the scene when the actuator is activated.
@@ -31,6 +38,7 @@ class KX_SCA_AddObjectActuator(SCA_IActuator):
"""
def getObject(name_only = 0):
"""
+ DEPRECATED: use the object property
Returns the name of the game object to be added.
Returns None if no game object has been assigned to be added.
@@ -40,6 +48,7 @@ class KX_SCA_AddObjectActuator(SCA_IActuator):
"""
def setTime(time):
"""
+ DEPRECATED: use the time property
Sets the lifetime of added objects, in frames.
If time == 0, the object will last forever.
@@ -49,12 +58,14 @@ class KX_SCA_AddObjectActuator(SCA_IActuator):
"""
def getTime():
"""
+ DEPRECATED: use the time property
Returns the lifetime of the added object, in frames.
@rtype: integer
"""
def setLinearVelocity(vx, vy, vz):
"""
+ DEPRECATED: use the linearVelocity property
Sets the initial linear velocity of added objects.
@type vx: float
@@ -66,12 +77,14 @@ class KX_SCA_AddObjectActuator(SCA_IActuator):
"""
def getLinearVelocity():
"""
+ DEPRECATED: use the linearVelocity property
Returns the initial linear velocity of added objects.
@rtype: list [vx, vy, vz]
"""
def setAngularVelocity(vx, vy, vz):
"""
+ DEPRECATED: use the angularVelocity property
Sets the initial angular velocity of added objects.
@type vx: float
@@ -83,14 +96,23 @@ class KX_SCA_AddObjectActuator(SCA_IActuator):
"""
def getAngularVelocity():
"""
+ DEPRECATED: use the angularVelocity property
Returns the initial angular velocity of added objects.
@rtype: list [vx, vy, vz]
"""
def getLastCreatedObject():
"""
+ DEPRECATED: use the objectLastCreated property
Returns the last object created by this actuator.
@rtype: L{KX_GameObject}
@return: A L{KX_GameObject} or None if no object has been created.
"""
+ def instantAddObject():
+ """
+ Returns the last object created by this actuator. The object can then be accessed from L{objectLastCreated}.
+
+ @rtype: None
+ """
+
diff --git a/source/gameengine/PyDoc/KX_SCA_DynamicActuator.py b/source/gameengine/PyDoc/KX_SCA_DynamicActuator.py
new file mode 100644
index 00000000000..22da159ce71
--- /dev/null
+++ b/source/gameengine/PyDoc/KX_SCA_DynamicActuator.py
@@ -0,0 +1,30 @@
+# $Id$
+# Documentation for KX_SCA_DynamicActuator
+from SCA_IActuator import *
+
+class KX_SCA_DynamicActuator(SCA_IActuator):
+ """
+ Dynamic Actuator.
+ @ivar operation: the type of operation of the actuator, 0-4
+ KX_DYN_RESTORE_DYNAMICS, KX_DYN_DISABLE_DYNAMICS,
+ KX_DYN_ENABLE_RIGID_BODY, KX_DYN_DISABLE_RIGID_BODY, KX_DYN_SET_MASS
+ @type operation: integer
+ @ivar mass: the mass value for the KX_DYN_SET_MASS operation
+ @type mass: float
+ """
+ def setOperation(operation):
+ """
+ DEPRECATED: Use the operation property instead.
+ Set the type of operation when the actuator is activated:
+ - 0 = restore dynamics
+ - 1 = disable dynamics
+ - 2 = enable rigid body
+ - 3 = disable rigid body
+ - 4 = set mass
+ """
+ def getOperation():
+ """
+ DEPRECATED: Use the operation property instead.
+ return the type of operation
+ """
+
diff --git a/source/gameengine/PyDoc/KX_SCA_ReplaceMeshActuator.py b/source/gameengine/PyDoc/KX_SCA_ReplaceMeshActuator.py
index 498f6072e23..951c118a99a 100644
--- a/source/gameengine/PyDoc/KX_SCA_ReplaceMeshActuator.py
+++ b/source/gameengine/PyDoc/KX_SCA_ReplaceMeshActuator.py
@@ -18,13 +18,13 @@ class KX_SCA_ReplaceMeshActuator(SCA_IActuator):
# Mesh (name, near, far)
# Meshes overlap so that they don't 'pop' when on the edge of the distance.
meshes = ((".Hi", 0.0, -20.0),
- (".Med", -15.0, -50.0),
- (".Lo", -40.0, -100.0)
- )
+ (".Med", -15.0, -50.0),
+ (".Lo", -40.0, -100.0)
+ )
co = GameLogic.getCurrentController()
obj = co.getOwner()
- act = co.getActuator("LOD." + obj.getName())
+ act = co.getActuator("LOD." + obj.name)
cam = GameLogic.getCurrentScene().active_camera
def Depth(pos, plane):
@@ -39,10 +39,10 @@ class KX_SCA_ReplaceMeshActuator(SCA_IActuator):
for mesh in meshes:
if depth < mesh[1] and depth > mesh[2]:
newmesh = mesh
- if "ME" + obj.getName() + mesh[0] == act.getMesh():
+ if "ME" + obj.name + mesh[0] == act.getMesh():
curmesh = mesh
- if newmesh != None and "ME" + obj.getName() + newmesh[0] != act.getMesh():
+ if newmesh != None and "ME" + obj.name + newmesh[0] != act.getMesh():
# The mesh is a different mesh - switch it.
# Check the current mesh is not a better fit.
if curmesh == None or curmesh[1] < depth or curmesh[2] > depth:
@@ -55,9 +55,14 @@ class KX_SCA_ReplaceMeshActuator(SCA_IActuator):
This will generate a warning in the console:
C{ERROR: GameObject I{OBName} ReplaceMeshActuator I{ActuatorName} without object}
+
+ @ivar mesh: L{KX_MeshProxy} or the name of the mesh that will replace the current one
+ Set to None to disable actuator
+ @type mesh: L{KX_MeshProxy} or None if no mesh is set
"""
def setMesh(name):
"""
+ DEPRECATED: Use the mesh property instead.
Sets the name of the mesh that will replace the current one.
When the name is None it will unset the mesh value so no action is taken.
@@ -65,10 +70,15 @@ class KX_SCA_ReplaceMeshActuator(SCA_IActuator):
"""
def getMesh():
"""
+ DEPRECATED: Use the mesh property instead.
Returns the name of the mesh that will replace the current one.
Returns None if no mesh has been scheduled to be added.
@rtype: string or None
"""
-
+ def instantReplaceMesh():
+ """
+ Immediately replace mesh without delay.
+ @rtype: None
+ """ \ No newline at end of file
diff --git a/source/gameengine/PyDoc/KX_Scene.py b/source/gameengine/PyDoc/KX_Scene.py
index 5e357e6eefc..5dcd560ee96 100644
--- a/source/gameengine/PyDoc/KX_Scene.py
+++ b/source/gameengine/PyDoc/KX_Scene.py
@@ -16,14 +16,14 @@ class KX_Scene:
scene = GameLogic.getCurrentScene()
# print all the objects in the scene
- for obj in scene.getObjectList():
- print obj.getName()
+ for obj in scene.objects:
+ print obj.name
# get an object named 'Cube'
- obj = scene.getObjectList()["OBCube"]
+ obj = scene.objects["OBCube"]
# get the first object in the scene.
- obj = scene.getObjectList()[0]
+ obj = scene.objects[0]
Example::
# Get the depth of an object in the camera view.
@@ -39,8 +39,8 @@ class KX_Scene:
@ivar name: The scene's name
@type name: string
- @type objects: A list of objects in the scene.
- @type objects: list [L{KX_GameObject}]
+ @ivar objects: A list of objects in the scene.
+ @type objects: L{CListValue<CListValue.CListValue>} of L{KX_GameObject<KX_GameObject.KX_GameObject>}
@ivar active_camera: The current active camera
@type active_camera: L{KX_Camera}
@ivar suspended: True if the scene is suspended.
@@ -55,7 +55,7 @@ class KX_Scene:
"""
Returns the list of lights in the scene.
- @rtype: list [L{KX_Light}]
+ @rtype: list [L{KX_LightObject}]
"""
def getObjectList():
"""
@@ -70,7 +70,7 @@ class KX_Scene:
@rtype: string
"""
- def addObject(object, other, time=0)
+ def addObject(object, other, time=0):
"""
Adds an object to the scene like the Add Object Actuator would, and returns the created object.
diff --git a/source/gameengine/PyDoc/KX_SceneActuator.py b/source/gameengine/PyDoc/KX_SceneActuator.py
index cfb40ae072f..6e27257533e 100644
--- a/source/gameengine/PyDoc/KX_SceneActuator.py
+++ b/source/gameengine/PyDoc/KX_SceneActuator.py
@@ -8,25 +8,34 @@ class KX_SceneActuator(SCA_IActuator):
@warning: Scene actuators that use a scene name will be ignored if at game start, the
named scene doesn't exist or is empty
-
+
This will generate a warning in the console:
C{ERROR: GameObject I{OBName} has a SceneActuator I{ActuatorName} (SetScene) without scene}
+
+ @ivar scene: the name of the scene to change to/overlay/underlay/remove/suspend/resume
+ @type scene: string.
+ @ivar camera: the camera to change to.
+ When setting the attribute, you can use either a L{KX_Camera} or the name of the camera.
+ @type camera: L{KX_Camera} on read, string or L{KX_Camera} on write
"""
def setUseRestart(flag):
"""
+ DEPRECATED
Set flag to True to restart the scene.
@type flag: boolean
"""
def setScene(scene):
"""
+ DEPRECATED: use the scene property instead
Sets the name of the scene to change to/overlay/underlay/remove/suspend/resume.
@type scene: string
"""
def setCamera(camera):
"""
+ DEPRECATED: use the camera property instead
Sets the camera to change to.
Camera can be either a L{KX_Camera} or the name of the camera.
@@ -35,12 +44,14 @@ class KX_SceneActuator(SCA_IActuator):
"""
def getUseRestart():
"""
+ DEPRECATED
Returns True if the scene will be restarted.
@rtype: boolean
"""
def getScene():
"""
+ DEPRECATED: use the scene property instead
Returns the name of the scene to change to/overlay/underlay/remove/suspend/resume.
Returns an empty string ("") if no scene has been set.
@@ -49,6 +60,7 @@ class KX_SceneActuator(SCA_IActuator):
"""
def getCamera():
"""
+ DEPRECATED: use the camera property instead
Returns the name of the camera to change to.
@rtype: string
diff --git a/source/gameengine/PyDoc/KX_SoundActuator.py b/source/gameengine/PyDoc/KX_SoundActuator.py
index 072af5b816c..37ae3c6640d 100644
--- a/source/gameengine/PyDoc/KX_SoundActuator.py
+++ b/source/gameengine/PyDoc/KX_SoundActuator.py
@@ -7,18 +7,55 @@ class KX_SoundActuator(SCA_IActuator):
Sound Actuator.
The L{startSound()}, L{pauseSound()} and L{stopSound()} do not require
- the actuator to be activated - they act instantly.
+ the actuator to be activated - they act instantly provided that the actuator has
+ been activated once at least.
+
+ @ivar filename: Sets the filename of the sound this actuator plays.
+ @type filename: string
+
+ @ivar volume: Sets the volume (gain) of the sound.
+ @type volume: float
+
+ @ivar pitch: Sets the pitch of the sound.
+ @type pitch: float
+
+ @ivar rollOffFactor: Sets the roll off factor. Rolloff defines the rate of attenuation as the sound gets further away.
+ @type rollOffFactor: float
+
+ @ivar looping: Sets the loop mode of the actuator.
+ @type looping: integer
+
+ @ivar position: Sets the position of the sound.
+ @type position: float array
+
+ @ivar velocity: Sets the speed of the sound; The speed of the sound alter the pitch.
+ @type velocity: float array
+
+ @ivar orientation: Sets the orientation of the sound. When setting the orientation you can
+ also use quaternion [float,float,float,float] or euler angles [float,float,float]
+ @type orientation: 3x3 matrix [[float]]
+
+ @ivar type: Sets the operation mode of the actuator. You can use one of the following constant:
+ KX_SOUNDACT_PLAYSTOP (1)
+ KX_SOUNDACT_PLAYEND (2)
+ KX_SOUNDACT_LOOPSTOP (3)
+ KX_SOUNDACT_LOOPEND (4)
+ KX_SOUNDACT_LOOPBIDIRECTIONAL (5)
+ KX_SOUNDACT_LOOPBIDIRECTIONAL_STOP (6)
+ @type type: integer
- @group Play Methods: startSound, pauseSound, stopSound
+ @group Play Methods: startSound, pauseSound, stopSound.
"""
def setFilename(filename):
"""
- Sets the filename of the sound this actuator plays.
+ DEPRECATED: Use the filename property instead.
+ Sets the filename of the sound this actuator plays.
@type filename: string
"""
def getFilename():
"""
+ DEPRECATED: Use the filename property instead.
Returns the filename of the sound this actuator plays.
@rtype: string
@@ -37,6 +74,7 @@ class KX_SoundActuator(SCA_IActuator):
"""
def setGain(gain):
"""
+ DEPRECATED: Use the volume property instead
Sets the gain (volume) of the sound
@type gain: float
@@ -44,24 +82,28 @@ class KX_SoundActuator(SCA_IActuator):
"""
def getGain():
"""
+ DEPRECATED: Use the volume property instead.
Gets the gain (volume) of the sound.
@rtype: float
"""
def setPitch(pitch):
"""
+ DEPRECATED: Use the pitch property instead.
Sets the pitch of the sound.
@type pitch: float
"""
def getPitch():
"""
+ DEPRECATED: Use the pitch property instead.
Returns the pitch of the sound.
@rtype: float
"""
def setRollOffFactor(rolloff):
"""
+ DEPRECATED: Use the rollOffFactor property instead.
Sets the rolloff factor for the sounds.
Rolloff defines the rate of attenuation as the sound gets further away.
@@ -71,12 +113,14 @@ class KX_SoundActuator(SCA_IActuator):
"""
def getRollOffFactor():
"""
+ DEPRECATED: Use the rollOffFactor property instead.
Returns the rolloff factor for the sound.
@rtype: float
"""
def setLooping(loop):
"""
+ DEPRECATED: Use the looping property instead.
Sets the loop mode of the actuator.
@bug: There are no constants defined for this method!
@@ -90,12 +134,14 @@ class KX_SoundActuator(SCA_IActuator):
"""
def getLooping():
"""
+ DEPRECATED: Use the looping property instead.
Returns the current loop mode of the actuator.
@rtype: integer
"""
def setPosition(x, y, z):
"""
+ DEPRECATED: Use the position property instead.
Sets the position this sound will come from.
@type x: float
@@ -107,6 +153,7 @@ class KX_SoundActuator(SCA_IActuator):
"""
def setVelocity(vx, vy, vz):
"""
+ DEPRECATED: Use the velocity property instead.
Sets the velocity this sound is moving at.
The sound's pitch is determined from the velocity.
@@ -120,6 +167,7 @@ class KX_SoundActuator(SCA_IActuator):
"""
def setOrientation(o11, o12, o13, o21, o22, o23, o31, o32, o33):
"""
+ DEPRECATED: Use the orientation property instead.
Sets the orientation of the sound.
The nine parameters specify a rotation matrix::
@@ -130,6 +178,7 @@ class KX_SoundActuator(SCA_IActuator):
def setType(mode):
"""
+ DEPRECATED: Use the type property instead.
Sets the operation mode of the actuator.
@param mode: KX_SOUNDACT_PLAYSTOP, KX_SOUNDACT_PLAYEND, KX_SOUNDACT_LOOPSTOP, KX_SOUNDACT_LOOPEND, KX_SOUNDACT_LOOPBIDIRECTIONAL, KX_SOUNDACT_LOOPBIDIRECTIONAL_STOP
@@ -138,6 +187,7 @@ class KX_SoundActuator(SCA_IActuator):
def getType():
"""
+ DEPRECATED: Use the type property instead.
Returns the operation mode of the actuator.
@rtype: integer
diff --git a/source/gameengine/PyDoc/KX_StateActuator.py b/source/gameengine/PyDoc/KX_StateActuator.py
index fb6ae5a3621..fe3669d3809 100644
--- a/source/gameengine/PyDoc/KX_StateActuator.py
+++ b/source/gameengine/PyDoc/KX_StateActuator.py
@@ -5,9 +5,26 @@ from SCA_IActuator import *
class KX_StateActuator(SCA_IActuator):
"""
State actuator changes the state mask of parent object.
+
+ Property:
+
+ @ivar operation: type of bit operation to be applied on object state mask.
+ You can use one of the following constant:
+ KX_STATE_OP_CPY (0) : Copy state mask
+ KX_STATE_OP_SET (1) : Add bits to state mask
+ KX_STATE_OP_CLR (2) : Substract bits to state mask
+ KX_STATE_OP_NEG (3) : Invert bits to state mask
+ @type operation: integer
+
+ @ivar mask: value that defines the bits that will be modified by the operation.
+ The bits that are 1 in the mask will be updated in the object state,
+ the bits that are 0 are will be left unmodified expect for the Copy operation
+ which copies the mask to the object state
+ @type mask: integer
"""
def setOperation(op):
"""
+ DEPRECATED: Use the operation property instead.
Set the type of bit operation to be applied on object state mask.
Use setMask() to specify the bits that will be modified.
@@ -16,6 +33,7 @@ class KX_StateActuator(SCA_IActuator):
"""
def setMask(mask):
"""
+ DEPRECATED: Use the mask property instead.
Set the value that defines the bits that will be modified by the operation.
The bits that are 1 in the value will be updated in the object state,
the bits that are 0 are will be left unmodified expect for the Copy operation
diff --git a/source/gameengine/PyDoc/KX_TouchSensor.py b/source/gameengine/PyDoc/KX_TouchSensor.py
index d7277be4c2a..f4fcbeefc62 100644
--- a/source/gameengine/PyDoc/KX_TouchSensor.py
+++ b/source/gameengine/PyDoc/KX_TouchSensor.py
@@ -17,7 +17,7 @@ class KX_TouchSensor(SCA_ISensor):
@ivar objectHit: The last collided object. (Read Only)
@type objectHit: L{KX_GameObject} or None
@ivar objectHitList: A list of colliding objects. (Read Only)
- @type objectHitList: list
+ @type objectHitList: L{CListValue<CListValue.CListValue>} of L{KX_GameObject<KX_GameObject.KX_GameObject>}
"""
#--The following methods are deprecated, please use properties instead.
@@ -53,7 +53,7 @@ class KX_TouchSensor(SCA_ISensor):
Only objects that have the requisite material/property are listed.
- @rtype: list [L{KX_GameObject}]
+ @rtype: L{CListValue<CListValue.CListValue>} of L{KX_GameObject<KX_GameObject.KX_GameObject>}
"""
def getTouchMaterial():
"""
diff --git a/source/gameengine/PyDoc/KX_TrackToActuator.py b/source/gameengine/PyDoc/KX_TrackToActuator.py
index 730ab21166b..ee2dc5d6144 100644
--- a/source/gameengine/PyDoc/KX_TrackToActuator.py
+++ b/source/gameengine/PyDoc/KX_TrackToActuator.py
@@ -15,9 +15,15 @@ class KX_TrackToActuator(SCA_IActuator):
@ivar object: the object this actuator tracks.
@type object: KX_GameObject or None
+ @ivar time: the time in frames with which to delay the tracking motion
+ @type time: integer
+ @ivar use3D: the tracking motion to use 3D
+ @type use3D: boolean
+
"""
def setObject(object):
"""
+ DEPRECATED: Use the object property.
Sets the object to track.
@type object: L{KX_GameObject}, string or None
@@ -25,6 +31,7 @@ class KX_TrackToActuator(SCA_IActuator):
"""
def getObject(name_only):
"""
+ DEPRECATED: Use the object property.
Returns the name of the object to track.
@type name_only: bool
@@ -33,18 +40,21 @@ class KX_TrackToActuator(SCA_IActuator):
"""
def setTime(time):
"""
+ DEPRECATED: Use the time property.
Sets the time in frames with which to delay the tracking motion.
@type time: integer
"""
def getTime():
"""
+ DEPRECATED: Use the time property.
Returns the time in frames with which the tracking motion is delayed.
@rtype: integer
"""
def setUse3D(use3d):
"""
+ DEPRECATED: Use the use3D property.
Sets the tracking motion to use 3D.
@type use3d: boolean
@@ -53,6 +63,7 @@ class KX_TrackToActuator(SCA_IActuator):
"""
def getUse3D():
"""
+ DEPRECATED: Use the use3D property.
Returns True if the tracking motion will track in the z direction.
@rtype: boolean
diff --git a/source/gameengine/PyDoc/KX_VehicleWrapper.py b/source/gameengine/PyDoc/KX_VehicleWrapper.py
new file mode 100644
index 00000000000..087aa167475
--- /dev/null
+++ b/source/gameengine/PyDoc/KX_VehicleWrapper.py
@@ -0,0 +1,166 @@
+class KX_VehicleWrapper: # (PyObjectPlus)
+ """
+ KX_VehicleWrapper
+
+ All placeholders have a __ prefix
+ """
+
+ def addWheel(wheel, attachPos, attachDir, axleDir, suspensionRestLength, wheelRadius, hasSteering):
+
+ """
+ TODO - Description
+
+ @param wheel: The object to use as a wheel.
+ @type wheel: L{KX_GameObject<KX_GameObject.KX_GameObject>} or a KX_GameObject name
+ @param attachPos: The position that this wheel will attach to.
+ @type attachPos: vector of 3 floats
+ @param attachDir: The direction this wheel points.
+ @type attachDir: vector of 3 floats
+ @param axleDir: The direction of this wheels axle.
+ @type axleDir: vector of 3 floats
+ @param suspensionRestLength: TODO - Description
+ @type suspensionRestLength: float
+ @param wheelRadius: The size of the wheel.
+ @type wheelRadius: float
+ """
+
+ def __applyBraking(val):
+ """
+ TODO - Description
+
+ @param val: the starting frame of the animation
+ @type val: float
+
+ @rtype: integer
+ @return: TODO Description
+ """
+ def __applyEngineForce(val):
+ """
+ TODO - Description
+
+ @param val: the starting frame of the animation
+ @type val: float
+
+ @rtype: integer
+ @return: TODO Description
+ """
+ def __getConstraintId(val):
+ """
+ TODO - Description
+
+ @param val: the starting frame of the animation
+ @type val: float
+
+ @rtype: integer
+ @return: TODO Description
+ """
+ def __getConstraintType(val):
+ """
+ TODO - Description
+
+ @param val: the starting frame of the animation
+ @type val: float
+
+ @rtype: integer
+ @return: TODO Description
+ """
+ def __getNumWheels(val):
+ """
+ TODO - Description
+
+ @param val: the starting frame of the animation
+ @type val: float
+
+ @rtype: integer
+ @return: TODO Description
+ """
+ def __getWheelOrientationQuaternion(val):
+ """
+ TODO - Description
+
+ @param val: the starting frame of the animation
+ @type val: float
+
+ @rtype: integer
+ @return: TODO Description
+ """
+ def __getWheelPosition(val):
+ """
+ TODO - Description
+
+ @param val: the starting frame of the animation
+ @type val: float
+
+ @rtype: integer
+ @return: TODO Description
+ """
+ def __getWheelRotation(val):
+ """
+ TODO - Description
+
+ @param val: the starting frame of the animation
+ @type val: float
+
+ @rtype: integer
+ @return: TODO Description
+ """
+ def __setRollInfluence(val):
+ """
+ TODO - Description
+
+ @param val: the starting frame of the animation
+ @type val: float
+
+ @rtype: integer
+ @return: TODO Description
+ """
+ def __setSteeringValue(val):
+ """
+ TODO - Description
+
+ @param val: the starting frame of the animation
+ @type val: float
+
+ @rtype: integer
+ @return: TODO Description
+ """
+ def __setSuspensionCompression(val):
+ """
+ TODO - Description
+
+ @param val: the starting frame of the animation
+ @type val: float
+
+ @rtype: integer
+ @return: TODO Description
+ """
+ def __setSuspensionDamping(val):
+ """
+ TODO - Description
+
+ @param val: the starting frame of the animation
+ @type val: float
+
+ @rtype: integer
+ @return: TODO Description
+ """
+ def __setSuspensionStiffness(val):
+ """
+ TODO - Description
+
+ @param val: the starting frame of the animation
+ @type val: float
+
+ @rtype: integer
+ @return: TODO Description
+ """
+ def __setTyreFriction(val):
+ """
+ TODO - Description
+
+ @param val: the starting frame of the animation
+ @type val: float
+
+ @rtype: integer
+ @return: TODO Description
+ """
diff --git a/source/gameengine/PyDoc/KX_VertexProxy.py b/source/gameengine/PyDoc/KX_VertexProxy.py
index 8dc2752c037..7ee5087b316 100644
--- a/source/gameengine/PyDoc/KX_VertexProxy.py
+++ b/source/gameengine/PyDoc/KX_VertexProxy.py
@@ -34,6 +34,11 @@ class KX_VertexProxy:
@ivar v: The v texture coordinate of the vertex.
@type v: float
+ @ivar u2: The second u texture coordinate of the vertex.
+ @type u2: float
+ @ivar v2: The second v texture coordinate of the vertex.
+ @type v2: float
+
@group Colour: r, g, b, a
@ivar r: The red component of the vertex colour. 0.0 <= r <= 1.0
@type r: float
@@ -72,6 +77,19 @@ class KX_VertexProxy:
@type uv: list [u, v]
"""
+ def getUV2():
+ """
+ Gets the 2nd UV (texture) coordinates of this vertex.
+
+ @rtype: list [u, v]
+ @return: this vertexes UV (texture) coordinates.
+ """
+ def setUV2(uv):
+ """
+ Sets the 2nd UV (texture) coordinates of this vertex.
+
+ @type uv: list [u, v]
+ """
def getRGBA():
"""
Gets the colour of this vertex.
@@ -120,3 +138,11 @@ class KX_VertexProxy:
@rtype: list [nx, ny, nz]
@return: normalised normal vector.
"""
+ def setNormal(normal):
+ """
+ Sets the normal vector of this vertex.
+
+ @type normal: sequence of floats [r, g, b]
+ @param normal: the new normal of this vertex.
+ """
+
diff --git a/source/gameengine/PyDoc/KX_VisibilityActuator.py b/source/gameengine/PyDoc/KX_VisibilityActuator.py
index 22499f25d81..36f25b2423c 100644
--- a/source/gameengine/PyDoc/KX_VisibilityActuator.py
+++ b/source/gameengine/PyDoc/KX_VisibilityActuator.py
@@ -5,13 +5,18 @@ from SCA_IActuator import *
class KX_VisibilityActuator(SCA_IActuator):
"""
Visibility Actuator.
+ @ivar visibility: whether the actuator makes its parent object visible or invisible
+ @type visibility: boolean
+ @ivar occlusion: whether the actuator makes its parent object an occluder or not
+ @type occlusion: boolean
+ @ivar recursion: whether the visibility/occlusion should be propagated to all children of the object
+ @type recursion: boolean
"""
def set(visible):
"""
+ DEPRECATED: Use the visibility property instead.
Sets whether the actuator makes its parent object visible or invisible.
-
+
@param visible: - True: Makes its parent visible.
- False: Makes its parent invisible.
"""
-
- \ No newline at end of file
diff --git a/source/gameengine/PyDoc/SCA_2DFilterActuator.py b/source/gameengine/PyDoc/SCA_2DFilterActuator.py
new file mode 100644
index 00000000000..9a010e8f221
--- /dev/null
+++ b/source/gameengine/PyDoc/SCA_2DFilterActuator.py
@@ -0,0 +1,44 @@
+# $Id$
+# Documentation for SCA_2DFilterActuator
+from SCA_IActuator import *
+from SCA_ILogicBrick import *
+
+class SCA_2DFilterActuator(SCA_IActuator):
+ """
+ Create, enable and disable 2D filters
+
+ Properties:
+
+ The following properties don't have an immediate effect.
+ You must active the actuator to get the result.
+ The actuator is not persistent: it automatically stops itself after setting up the filter
+ but the filter remains active. To stop a filter you must activate the actuator with 'type'
+ set to RAS_2DFILTER_DISABLED or RAS_2DFILTER_NOFILTER.
+
+ @ivar shaderText: shader source code for custom shader
+ @type shaderText: string
+ @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_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
+ RAS_2DFILTER_BLUR (2)
+ RAS_2DFILTER_SHARPEN (3)
+ RAS_2DFILTER_DILATION (4)
+ RAS_2DFILTER_EROSION (5)
+ RAS_2DFILTER_LAPLACIAN (6)
+ RAS_2DFILTER_SOBEL (7)
+ RAS_2DFILTER_PREWITT (8)
+ RAS_2DFILTER_GRAYSCALE (9)
+ RAS_2DFILTER_SEPIA (10)
+ RAS_2DFILTER_INVERT (11)
+ RAS_2DFILTER_CUSTOMFILTER (12) : customer filter, the code code is set via shaderText property
+ @type type: integer
+ @ivar passNb: order number of filter in the stack of 2D filters. Filters are executed in increasing order of passNb.
+ Only be one filter can be defined per passNb.
+ @type passNb: integer (0-100)
+ @ivar value: argument for motion blur filter
+ @type value: float (0.0-100.0)
+ """
diff --git a/source/gameengine/PyDoc/KX_ActuatorSensor.py b/source/gameengine/PyDoc/SCA_ActuatorSensor.py
index b0e138a8009..515354e8716 100644
--- a/source/gameengine/PyDoc/KX_ActuatorSensor.py
+++ b/source/gameengine/PyDoc/SCA_ActuatorSensor.py
@@ -1,9 +1,10 @@
# $Id$
-# Documentation for KX_ActuatorSensor
+# Documentation for SCA_ActuatorSensor
from SCA_IActuator import *
from SCA_ISensor import *
+from SCA_ILogicBrick import *
-class KX_ActuatorSensor(SCA_ISensor):
+class SCA_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
diff --git a/source/gameengine/PyDoc/SCA_ILogicBrick.py b/source/gameengine/PyDoc/SCA_ILogicBrick.py
index 18cb900f28d..4688ba12bb6 100644
--- a/source/gameengine/PyDoc/SCA_ILogicBrick.py
+++ b/source/gameengine/PyDoc/SCA_ILogicBrick.py
@@ -8,13 +8,17 @@ class SCA_ILogicBrick:
@ivar executePriority: This determines the order controllers are evaluated, and actuators are activated (lower priority is executed first).
@type executePriority: int
+ @ivar owner: The game object this logic brick is attached to (read only).
+ @type owner: L{KX_GameObject<KX_GameObject.KX_GameObject>} or None in exceptional cases.
"""
def getOwner():
"""
Gets the game object associated with this logic brick.
- @rtype: L{KX_GameObject}
+ Deprecated: Use the "owner" property instead.
+
+ @rtype: L{KX_GameObject<KX_GameObject.KX_GameObject>}
"""
#--The following methods are deprecated--
diff --git a/source/gameengine/PyDoc/SCA_JoystickSensor.py b/source/gameengine/PyDoc/SCA_JoystickSensor.py
index 111ee7f4cfa..13b006e8dd6 100644
--- a/source/gameengine/PyDoc/SCA_JoystickSensor.py
+++ b/source/gameengine/PyDoc/SCA_JoystickSensor.py
@@ -1,4 +1,4 @@
-# $Id: SCA_RandomSensor.py 15444 2008-07-05 17:05:05Z lukep $
+# $Id$
# Documentation for SCA_RandomSensor
from SCA_ISensor import *
@@ -8,10 +8,16 @@ class SCA_JoystickSensor(SCA_ISensor):
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 axisValues: (read-only) The state of the joysticks axis as a list of values L{numAxis} long.
+ 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 axisValues: list of ints
+
+ @ivar axisSingle: (read-only) like L{axisValues} but returns a single axis value that is set by the sensor.
+ Only use this for "Single Axis" type sensors otherwise it will raise an error.
+ @type axisSingle: int
+
@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.
@@ -41,13 +47,13 @@ class SCA_JoystickSensor(SCA_ISensor):
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 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.
diff --git a/source/gameengine/PyDoc/SCA_KeyboardSensor.py b/source/gameengine/PyDoc/SCA_KeyboardSensor.py
index f6a7a7d8a97..8abb1fda762 100644
--- a/source/gameengine/PyDoc/SCA_KeyboardSensor.py
+++ b/source/gameengine/PyDoc/SCA_KeyboardSensor.py
@@ -20,31 +20,34 @@ class SCA_KeyboardSensor(SCA_ISensor):
@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.
-
- @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)
+ @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 +56,7 @@ class SCA_KeyboardSensor(SCA_ISensor):
"""
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 +65,7 @@ class SCA_KeyboardSensor(SCA_ISensor):
"""
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 +74,7 @@ class SCA_KeyboardSensor(SCA_ISensor):
"""
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 +83,7 @@ class SCA_KeyboardSensor(SCA_ISensor):
"""
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 +92,7 @@ class SCA_KeyboardSensor(SCA_ISensor):
"""
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 +101,7 @@ class SCA_KeyboardSensor(SCA_ISensor):
"""
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 +110,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.
+ B{DEPRECATED: Use "events" 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 9550cbb4105..278ebe63b8a 100644
--- a/source/gameengine/PyDoc/SCA_MouseSensor.py
+++ b/source/gameengine/PyDoc/SCA_MouseSensor.py
@@ -32,3 +32,13 @@ class SCA_MouseSensor(SCA_ISensor):
@rtype: integer
@return: the current y coordinate of the mouse, in frame coordinates (pixels).
"""
+ def getButtonStatus(button):
+ """
+ Get the mouse button status.
+
+ @type button: int
+ @param button: value in GameLogic members KX_MOUSE_BUT_LEFT, KX_MOUSE_BUT_MIDDLE, KX_MOUSE_BUT_RIGHT
+
+ @rtype: integer
+ @return: value in GameLogic members KX_INPUT_NONE, KX_INPUT_NONE, KX_INPUT_JUST_ACTIVATED, KX_INPUT_ACTIVE, KX_INPUT_JUST_RELEASED
+ """
diff --git a/source/gameengine/PyDoc/SCA_NANDController.py b/source/gameengine/PyDoc/SCA_NANDController.py
new file mode 100644
index 00000000000..a864ff2981c
--- /dev/null
+++ b/source/gameengine/PyDoc/SCA_NANDController.py
@@ -0,0 +1,11 @@
+# $Id$
+# Documentation for SCA_NANDController
+from SCA_IController import *
+
+class SCA_NANDController(SCA_IController):
+ """
+ An NAND controller activates when all linked sensors are not active.
+
+ There are no special python methods for this controller.
+ """
+
diff --git a/source/gameengine/PyDoc/SCA_NORController.py b/source/gameengine/PyDoc/SCA_NORController.py
new file mode 100644
index 00000000000..0bc0a71d7b1
--- /dev/null
+++ b/source/gameengine/PyDoc/SCA_NORController.py
@@ -0,0 +1,11 @@
+# $Id$
+# Documentation for SCA_NORController
+from SCA_IController import *
+
+class SCA_NORController(SCA_IController):
+ """
+ An NOR controller activates only when all linked sensors are de-activated.
+
+ There are no special python methods for this controller.
+ """
+
diff --git a/source/gameengine/PyDoc/SCA_RandomSensor.py b/source/gameengine/PyDoc/SCA_RandomSensor.py
index 940b8f879ff..6dc0a3c23c0 100644
--- a/source/gameengine/PyDoc/SCA_RandomSensor.py
+++ b/source/gameengine/PyDoc/SCA_RandomSensor.py
@@ -5,6 +5,11 @@ from SCA_ISensor import *
class SCA_RandomSensor(SCA_ISensor):
"""
This sensor activates randomly.
+
+ @ivar lastDraw: The seed of the random number generator.
+ @type lastDraw: int
+ @ivar seed: The seed of the random number generator.
+ @type seed: int
"""
def setSeed(seed):
@@ -25,4 +30,6 @@ class SCA_RandomSensor(SCA_ISensor):
def getLastDraw():
"""
Returns the last random number generated.
+
+ @rtype: integer
"""
diff --git a/source/gameengine/PyDoc/SCA_XNORController.py b/source/gameengine/PyDoc/SCA_XNORController.py
new file mode 100644
index 00000000000..5fb2561f35a
--- /dev/null
+++ b/source/gameengine/PyDoc/SCA_XNORController.py
@@ -0,0 +1,11 @@
+# $Id$
+# Documentation for SCA_XNORController
+from SCA_IController import *
+
+class SCA_XNORController(SCA_IController):
+ """
+ An XNOR controller activates when all linked sensors are the same (activated or inative).
+
+ There are no special python methods for this controller.
+ """
+
diff --git a/source/gameengine/PyDoc/SCA_XORController.py b/source/gameengine/PyDoc/SCA_XORController.py
new file mode 100644
index 00000000000..10e20fb0945
--- /dev/null
+++ b/source/gameengine/PyDoc/SCA_XORController.py
@@ -0,0 +1,11 @@
+# $Id$
+# Documentation for SCA_XORController
+from SCA_IController import *
+
+class SCA_XORController(SCA_IController):
+ """
+ An XOR controller activates when there is the input is mixed, but not when all are on or off.
+
+ There are no special python methods for this controller.
+ """
+
diff --git a/source/gameengine/PyDoc/SConscript b/source/gameengine/PyDoc/SConscript
index ac0b163d7bd..ed9712ba273 100644
--- a/source/gameengine/PyDoc/SConscript
+++ b/source/gameengine/PyDoc/SConscript
@@ -3,26 +3,27 @@ Import ('env')
from optparse import OptionParser
-try:
- import epydoc
-except ImportError:
- print "No epydoc install detected, Python API Docs will not be generated "
-if epydoc:
- from epydoc.docbuilder import build_doc_index
- from epydoc import cli
- names = env.Glob("source/gameengine/PyDoc/*.py")
- docindex = build_doc_index(names)
- optvalues = cli.OPTION_DEFAULTS
- optvalues["verbose"] = 1
- optvalues["target"] = env["BF_DOCDIR"]+"/BGE_API/"
- optvalues["url"] = "http://www.blender.org"
- optvalues["top"] = "Game Engine API"
- optvalues["name"] = "Blender"
- optvalues["noprivate"] = 1
- optvalues["noframes"] = 1
- optvalues["names"] = names
- optparser = OptionParser()
- optparser.set_defaults(**optvalues)
- (options, args) = optparser.parse_args([])
- cli.write_html(docindex, options)
+import epydoc
+from epydoc.docbuilder import build_doc_index
+from epydoc import cli
+names = env.Glob("source/gameengine/PyDoc/*.py")
+docindex = build_doc_index(names)
+optvalues = cli.OPTION_DEFAULTS
+optvalues["verbose"] = 1
+optvalues["quiet"] = 0
+optvalues["include_source_code"] = 0
+optvalues["inheritance"] = "included"
+optvalues["show_private"] = 0
+optvalues["target"] = env["BF_DOCDIR"]+"/BGE_API/"
+optvalues["url"] = "http://www.blender.org"
+optvalues["top"] = "Game Engine API"
+optvalues["name"] = "Blender"
+optvalues["noprivate"] = 1
+optvalues["noframes"] = 1
+optvalues["names"] = names
+optparser = OptionParser()
+optparser.set_defaults(**optvalues)
+(options, args) = optparser.parse_args([])
+print "Writing Game Engine epydocs to \"%s\"" % optvalues["target"]
+cli.write_html(docindex, options)
diff --git a/source/gameengine/PyDoc/WhatsNew.py b/source/gameengine/PyDoc/WhatsNew.py
index 64bef7ee1c8..4d86e6ef3c4 100644
--- a/source/gameengine/PyDoc/WhatsNew.py
+++ b/source/gameengine/PyDoc/WhatsNew.py
@@ -26,7 +26,7 @@ Blender 2.34
- Added getType() and setType() to L{BL_ActionActuator} and L{KX_SoundActuator} (sgefant)
- New Scene module: L{KX_Scene}
- New Camera module: L{KX_Camera}
- - New Light module: L{KX_Light}
+ - New Light module: L{KX_LightObject}
- Added attributes to L{KX_GameObject}, L{KX_VertexProxy}
- L{KX_SCA_AddObjectActuator}.setObject(), L{KX_TrackToActuator}.setObject() and
L{KX_SceneActuator}.setCamera() now accept L{KX_GameObject}s as parameters
diff --git a/source/gameengine/PyDoc/bge_api_validate_py.txt b/source/gameengine/PyDoc/bge_api_validate_py.txt
new file mode 100644
index 00000000000..0920e5d3c7d
--- /dev/null
+++ b/source/gameengine/PyDoc/bge_api_validate_py.txt
@@ -0,0 +1,110 @@
+#~ This program is free software; you can redistribute it and/or modify
+#~ it under the terms of the GNU General Public License as published by
+#~ the Free Software Foundation; version 2 of the License.
+
+#~ This program is distributed in the hope that it will be useful,
+#~ but WITHOUT ANY WARRANTY; without even the implied warranty of
+#~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+#~ GNU General Public License for more details.
+
+# This script must run from a logic brick so it has access to the game engine api
+# it assumes the root blender source directory is the current working directory
+#
+# Currently it only prints missing modules and methods (not attributes)
+
+
+BGE_API_DOC_PATH = 'source/gameengine/PyDoc'
+
+import GameTypes
+type_members = {}
+
+for type_name in dir(GameTypes):
+ if type_name.startswith('__'):
+ continue
+
+ type_object = getattr(GameTypes, type_name)
+
+ members = []
+ type_members[type_object.__name__] = members
+
+ for member in type_object.__dict__.keys():
+ if member.startswith('__'):
+ continue
+
+ # print type_object.__name__ + '.' + k
+ members.append(member)
+
+import sys, os
+
+doc_dir= os.path.join(os.getcwd(), BGE_API_DOC_PATH)
+
+if doc_dir not in sys.path:
+ sys.path.append(doc_dir)
+
+
+def check_attribute(type_mame, member):
+ filename = os.path.join(doc_dir, type_mame + '.py')
+ # print filename
+
+ file = open(filename, 'rU')
+
+ for l in file:
+ l = l.strip()
+
+ '''
+ @ivar foo: blah blah
+ to
+ foo
+
+ '''
+
+ if l.startswith('@ivar'):
+ var = l.split()[1].split(':')[0]
+
+ if var == member:
+ file.close()
+ return True
+
+ file.close()
+ return False
+
+
+
+
+
+
+print '\n\n\nChecking Docs'
+
+PRINT_OK = False
+
+for type_name in sorted(type_members.keys()):
+ members = type_members[type_name]
+
+ try:
+ mod = __import__(type_name)
+ if PRINT_OK:
+ print "type: %s" % type_name
+ except:
+ print "missing: %s - %s" % (type_name, str(sorted(members)))
+ continue
+
+ reload(mod) # incase were editing it
+
+ try:
+ type_class = getattr(mod, type_name)
+ except:
+ print "missing class: %s.%s - %s" % (type_name, type_name, str(sorted(members)))
+ continue
+
+ for member in sorted(members):
+ try:
+ getattr(type_class, member)
+ if PRINT_OK:
+ print "\tfound: %s.%s" % (type_name, member)
+ except:
+ if check_attribute(type_name, member):
+ if PRINT_OK:
+ print "\tfound attr: %s.%s" % (type_name, member)
+ else:
+ print "\tmissing: %s.%s" % (type_name, member)
+
diff --git a/source/gameengine/PyDoc/epy_docgen.sh b/source/gameengine/PyDoc/epy_docgen.sh
index b243101ddcb..ddf39dcc081 100644..100755
--- a/source/gameengine/PyDoc/epy_docgen.sh
+++ b/source/gameengine/PyDoc/epy_docgen.sh
@@ -8,4 +8,4 @@
LC_ALL=POSIX
epydoc --debug -v -o BPY_GE --url "http://www.blender.org" --top GameLogic \
- --name "Blender GameEngine" --no-private --no-frames *.py
+ --name "Blender GameEngine" --no-private --no-frames --no-sourcecode --inheritance=included *.py