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
path: root/doc
diff options
context:
space:
mode:
authorMitchell Stokes <mogurijin@gmail.com>2014-04-01 09:20:03 +0400
committerMitchell Stokes <mogurijin@gmail.com>2014-04-01 09:22:04 +0400
commit11299f5ff405a7668ae06ee7ea5495b624f9ce9a (patch)
tree72fe233c51b622c5f6b02ab9bb978ff22740ac6b /doc
parent617557b08ea94e2b65a1697ddf0b79651204d92b (diff)
BGE doc cleanup: Some small cleanups in the BGE docs:
* Fixing trailing whitespace in some files * Fixing some indentation * SCA_PythonController.owner is now documented * SCA_PythonKeyboard members now use the member directive instead of function
Diffstat (limited to 'doc')
-rw-r--r--doc/python_api/rst/bge.constraints.rst56
-rw-r--r--doc/python_api/rst/bge.events.rst18
-rw-r--r--doc/python_api/rst/bge_types/bge.types.KX_CharacterWrapper.rst2
-rw-r--r--doc/python_api/rst/bge_types/bge.types.KX_GameObject.rst100
-rw-r--r--doc/python_api/rst/bge_types/bge.types.SCA_PythonController.rst6
-rw-r--r--doc/python_api/rst/bge_types/bge.types.SCA_PythonKeyboard.rst4
6 files changed, 96 insertions, 90 deletions
diff --git a/doc/python_api/rst/bge.constraints.rst b/doc/python_api/rst/bge.constraints.rst
index 7757e11d41f..4d3e4ce880f 100644
--- a/doc/python_api/rst/bge.constraints.rst
+++ b/doc/python_api/rst/bge.constraints.rst
@@ -78,7 +78,7 @@ Physics Constraints (bge.constraints)
:return: a vehicle constraint object.
:rtype: :class:`bge.types.KX_VehicleWrapper`
-
+
.. function:: getCharacter(gameobj)
:arg gameobj: The game object with the character physics.
@@ -237,101 +237,101 @@ Physics Constraints (bge.constraints)
Not implemented.
.. data:: DBG_NODEBUG
-
+
.. note::
Debug mode to be used with function :class:`setDebugMode`
-
+
No debug.
.. data:: DBG_DRAWWIREFRAME
-
+
.. note::
Debug mode to be used with function :class:`setDebugMode`
-
+
Draw wireframe in debug.
.. data:: DBG_DRAWAABB
-
+
.. note::
Debug mode to be used with function :class:`setDebugMode`
-
+
Draw Axis Aligned Bounding Box in debug.
.. data:: DBG_DRAWFREATURESTEXT
-
+
.. note::
Debug mode to be used with function :class:`setDebugMode`
-
+
Draw freatures text in debug.
.. data:: DBG_DRAWCONTACTPOINTS
-
+
.. note::
Debug mode to be used with function :class:`setDebugMode`
-
+
Draw contact points in debug.
.. data:: DBG_NOHELPTEXT
-
+
.. note::
Debug mode to be used with function :class:`setDebugMode`
-
+
Debug without help text.
.. data:: DBG_DRAWTEXT
-
+
.. note::
Debug mode to be used with function :class:`setDebugMode`
-
+
Draw text in debug.
.. data:: DBG_PROFILETIMINGS
-
+
.. note::
Debug mode to be used with function :class:`setDebugMode`
-
+
Draw profile timings in debug.
.. data:: DBG_ENABLESATCOMPARISION
-
+
.. note::
Debug mode to be used with function :class:`setDebugMode`
-
+
Enable sat comparision in debug.
.. data:: DBG_DISABLEBULLETLCP
-
+
.. note::
Debug mode to be used with function :class:`setDebugMode`
-
+
Disable Bullet LCP.
.. data:: DBG_ENABLECCD
.. note::
Debug mode to be used with function :class:`setDebugMode`
-
+
Enable Continous Colision Detection in debug.
.. data:: DBG_DRAWCONSTRAINTS
-
+
.. note::
Debug mode to be used with function :class:`setDebugMode`
-
+
Draw constraints in debug.
.. data:: DBG_DRAWCONSTRAINTLIMITS
-
+
.. note::
Debug mode to be used with function :class:`setDebugMode`
-
+
Draw constraint limits in debug.
.. data:: DBG_FASTWIREFRAME
-
+
.. note::
Debug mode to be used with function :class:`setDebugMode`
-
+
Draw a fast wireframe in debug.
.. data:: POINTTOPOINT_CONSTRAINT
diff --git a/doc/python_api/rst/bge.events.rst b/doc/python_api/rst/bge.events.rst
index 2238faea242..8dbded6a3fe 100644
--- a/doc/python_api/rst/bge.events.rst
+++ b/doc/python_api/rst/bge.events.rst
@@ -14,7 +14,7 @@ This module holds key constants for the SCA_KeyboardSensor.
# Set a connected keyboard sensor to accept F1
import bge
-
+
co = bge.logic.getCurrentController()
# 'Keyboard' is a keyboard sensor
sensor = co.sensors["Keyboard"]
@@ -24,7 +24,7 @@ This module holds key constants for the SCA_KeyboardSensor.
# Do the all keys thing
import bge
-
+
co = bge.logic.getCurrentController()
# 'Keyboard' is a keyboard sensor
sensor = co.sensors["Keyboard"]
@@ -46,20 +46,20 @@ This module holds key constants for the SCA_KeyboardSensor.
# The all keys thing without a keyboard sensor (but you will
# need an always sensor with pulse mode on)
import bge
-
+
# Just shortening names here
keyboard = bge.logic.keyboard
JUST_ACTIVATED = bge.logic.KX_INPUT_JUST_ACTIVATED
-
+
if keyboard.events[bge.events.WKEY] == JUST_ACTIVATED:
print("Activate Forward!")
if keyboard.events[bge.events.SKEY] == JUST_ACTIVATED:
- print("Activate Backward!")
+ print("Activate Backward!")
if keyboard.events[bge.events.AKEY] == JUST_ACTIVATED:
- print("Activate Left!")
+ print("Activate Left!")
if keyboard.events[bge.events.DKEY] == JUST_ACTIVATED:
print("Activate Right!")
-
+
*********
Functions
@@ -72,11 +72,11 @@ Functions
:arg event: key event constant from :mod:`bge.events` or the keyboard sensor.
:type event: int
:rtype: string
-
+
.. function:: 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
:arg event: key event constant from :mod:`bge.events` or the keyboard sensor.
:type shift: bool
diff --git a/doc/python_api/rst/bge_types/bge.types.KX_CharacterWrapper.rst b/doc/python_api/rst/bge_types/bge.types.KX_CharacterWrapper.rst
index 32e5c3eaad8..4d9dd5b5c34 100644
--- a/doc/python_api/rst/bge_types/bge.types.KX_CharacterWrapper.rst
+++ b/doc/python_api/rst/bge_types/bge.types.KX_CharacterWrapper.rst
@@ -34,7 +34,7 @@ base class --- :class:`PyObjectPlus`
:type: int
.. attribute:: walkDirection
-
+
The speed and direction the character is traveling in using world coordinates. This should be used instead of applyMovement() to properly move the character.
:type: list [x, y, z]
diff --git a/doc/python_api/rst/bge_types/bge.types.KX_GameObject.rst b/doc/python_api/rst/bge_types/bge.types.KX_GameObject.rst
index a4c02ee6fec..b314a47c8e9 100644
--- a/doc/python_api/rst/bge_types/bge.types.KX_GameObject.rst
+++ b/doc/python_api/rst/bge_types/bge.types.KX_GameObject.rst
@@ -12,7 +12,7 @@ base class --- :class:`SCA_IObject`
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 SystemError,
if an object may have been removed since last accessing it use the :data:`invalid` attribute to check.
@@ -75,25 +75,25 @@ base class --- :class:`SCA_IObject`
:type: float
.. note::
-
+
The object must have a physics controller for the mass to be applied, otherwise the mass value will be returned as 0.0.
-
+
.. attribute:: linVelocityMin
Enforces the object keeps moving at a minimum velocity.
:type: float
-
+
.. 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.
.. attribute:: linVelocityMax
@@ -101,9 +101,9 @@ base class --- :class:`SCA_IObject`
Clamp the maximum linear velocity to prevent objects moving beyond a set speed.
:type: float
-
+
.. note::
-
+
Applies to dynamic and rigid body objects only.
.. note::
@@ -247,25 +247,25 @@ base class --- :class:`SCA_IObject`
:type: :class:`mathutils.Matrix`
.. attribute:: localLinearVelocity
-
+
The object's local linear velocity. [x, y, z]
:type: :class:`mathutils.Vector`
.. attribute:: worldLinearVelocity
-
+
The object's world linear velocity. [x, y, z]
:type: :class:`mathutils.Vector`
.. attribute:: localAngularVelocity
-
+
The object's local angular velocity. [x, y, z]
:type: :class:`mathutils.Vector`
.. attribute:: worldAngularVelocity
-
+
The object's world angular velocity. [x, y, z]
:type: :class:`mathutils.Vector`
@@ -287,13 +287,13 @@ base class --- :class:`SCA_IObject`
a list meshes for this object.
:type: list of :class:`KX_MeshProxy`
-
+
.. note::
-
+
Most objects use only 1 mesh.
.. note::
-
+
Changes to this list will not update the KX_GameObject.
.. attribute:: sensors
@@ -301,13 +301,13 @@ base class --- :class:`SCA_IObject`
a sequence of :class:`SCA_ISensor` objects with string/index lookups and iterator support.
:type: list
-
+
.. note::
-
+
This attribute is experemental and may be removed (but probably wont be).
.. note::
-
+
Changes to this list will not update the KX_GameObject.
.. attribute:: controllers
@@ -315,13 +315,13 @@ base class --- :class:`SCA_IObject`
a sequence of :class:`SCA_IController` objects with string/index lookups and iterator support.
:type: list of :class:`SCA_ISensor`
-
+
.. note::
-
+
This attribute is experemental and may be removed (but probably wont be).
.. note::
-
+
Changes to this list will not update the KX_GameObject.
.. attribute:: actuators
@@ -329,7 +329,7 @@ base class --- :class:`SCA_IObject`
a list of :class:`SCA_IActuator` with string/index lookups and iterator support.
:type: list
-
+
.. note::
This attribute is experemental and may be removed (but probably wont be).
@@ -490,7 +490,7 @@ base class --- :class:`SCA_IObject`
Sets the game object's linear velocity.
- This method sets game object's velocity through it's centre of mass,
+ This method sets game object's velocity through it's centre of mass,
ie no angular velocity component.
This requires a dynamic object.
@@ -571,7 +571,7 @@ base class --- :class:`SCA_IObject`
Resumes physics for this object.
.. note::
-
+
The objects linear velocity will be applied from when the dynamics were suspended.
.. method:: enableRigidBody()
@@ -607,7 +607,7 @@ base class --- :class:`SCA_IObject`
:type ghost: boolean
.. note::
-
+
If the object type is sensor, it stays ghost regardless of ghost parameter
.. method:: removeParent()
@@ -724,7 +724,7 @@ base class --- :class:`SCA_IObject`
* or 5-tuple (:class:`KX_GameObject`, 3-tuple (x, y, z), 3-tuple (nx, ny, nz), :class:`KX_PolyProxy`, 2-tuple (u, v))
.. note::
-
+
The ray ignores the object on which the method is called. It is casted from/to object center or explicit [x, y, z] points.
.. method:: setCollisionMargin(margin)
@@ -735,7 +735,7 @@ base class --- :class:`SCA_IObject`
:type margin: float
.. note::
-
+
If this object has no physics controller (a physics ID of zero), this function will raise RuntimeError.
.. method:: sendMessage(subject, body="", to="")
@@ -766,11 +766,11 @@ base class --- :class:`SCA_IObject`
.. note::
If this object has instances the other instances will be updated too.
-
+
.. note::
The gameObject argument has an advantage that it can convert from a mesh with modifiers applied (such as subsurf).
-
+
.. warning::
Only triangle mesh type objects are supported currently (not convex hull)
@@ -791,7 +791,7 @@ base class --- :class:`SCA_IObject`
.. method:: playAction(name, start_frame, end_frame, layer=0, priority=0, blendin=0, play_mode=KX_ACTION_MODE_PLAY, layer_weight=0.0, ipo_flags=0, speed=1.0, blend_mode=KX_ACTION_BLEND_BLEND)
Plays an action.
-
+
:arg name: the name of the action
:type name: string
:arg start: the start frame of the action
@@ -812,42 +812,42 @@ base class --- :class:`SCA_IObject`
:type ipo_flags: int bitfield
:arg speed: the playback speed of the action as a factor (1.0 = normal speed, 2.0 = 2x speed, etc)
:type speed: float
- :arg blend_mode: how to blend this layer with previous layers
- :type blend_mode: one of :ref:`these constants <gameobject-playaction-blend>`
+ :arg blend_mode: how to blend this layer with previous layers
+ :type blend_mode: one of :ref:`these constants <gameobject-playaction-blend>`
.. method:: stopAction(layer=0)
-
+
Stop playing the action on the given layer.
-
+
:arg layer: The layer to stop playing.
:type layer: integer
-
+
.. method:: getActionFrame(layer=0)
-
+
Gets the current frame of the action playing in the supplied layer.
-
+
:arg layer: The layer that you want to get the frame from.
:type layer: integer
-
+
:return: The current frame of the action
:rtype: float
-
+
.. method:: setActionFrame(frame, layer=0)
-
+
Set the current frame of the action playing in the supplied layer.
-
+
:arg layer: The layer where you want to set the frame
:type layer: integer
:arg frame: The frame to set the action to
:type frame: float
.. method:: isPlayingAction(layer=0)
-
- Checks to see if there is an action playing in the given layer.
-
- :arg layer: The layer to check for a playing action.
- :type layer: integer
-
- :return: Whether or not the action is playing
- :rtype: boolean
+
+ Checks to see if there is an action playing in the given layer.
+
+ :arg layer: The layer to check for a playing action.
+ :type layer: integer
+
+ :return: Whether or not the action is playing
+ :rtype: boolean
diff --git a/doc/python_api/rst/bge_types/bge.types.SCA_PythonController.rst b/doc/python_api/rst/bge_types/bge.types.SCA_PythonController.rst
index a00e9c29ad4..7b5619106ed 100644
--- a/doc/python_api/rst/bge_types/bge.types.SCA_PythonController.rst
+++ b/doc/python_api/rst/bge_types/bge.types.SCA_PythonController.rst
@@ -10,6 +10,12 @@ base class --- :class:`SCA_IController`
A Python controller uses a Python script to activate it's actuators,
based on it's sensors.
+ .. attribute:: owner
+
+ The object the controller is attached to.
+
+ :type: :class:`KX_GameObject`
+
.. attribute:: script
The value of this variable depends on the execution methid.
diff --git a/doc/python_api/rst/bge_types/bge.types.SCA_PythonKeyboard.rst b/doc/python_api/rst/bge_types/bge.types.SCA_PythonKeyboard.rst
index 6cfef2f80f1..7511f6724d8 100644
--- a/doc/python_api/rst/bge_types/bge.types.SCA_PythonKeyboard.rst
+++ b/doc/python_api/rst/bge_types/bge.types.SCA_PythonKeyboard.rst
@@ -22,13 +22,13 @@ base class --- :class:`PyObjectPlus`
:type: dictionary {:ref:`keycode<keyboard-keys>`::ref:`status<input-status>`, ...}
- .. function:: getClipboard()
+ .. method:: getClipboard()
Gets the clipboard text.
:rtype: string
- .. function:: setClipboard(text)
+ .. method:: setClipboard(text)
Sets the clipboard text.