diff options
author | Antony Riakiotakis <kalast@gmail.com> | 2014-09-08 20:15:42 +0400 |
---|---|---|
committer | Antony Riakiotakis <kalast@gmail.com> | 2014-09-08 20:15:42 +0400 |
commit | d9ffc99e66d659ac887d801b9cc071b4c3f9b8ab (patch) | |
tree | d88e83b5a9edab115081641d26c811b6aa22296a /doc/python_api/rst | |
parent | 551ebaa3dd758bc1975548c28766bfa3159d3846 (diff) | |
parent | b1490e39dd1017e51984d8a34d226e869bbb25df (diff) |
Merge branch 'master' into soc-2014-viewport_fxsoc-2014-viewport_fx
I have resolved some differences, for instance selection code which was more or less a stub, to be
the same as master. This will have to be fixed later.
Conflicts:
CMakeLists.txt
intern/ghost/CMakeLists.txt
intern/ghost/intern/GHOST_SystemWin32.cpp
intern/ghost/intern/GHOST_Window.cpp
intern/ghost/intern/GHOST_WindowWin32.cpp
intern/ghost/intern/GHOST_WindowX11.cpp
source/blender/blenlib/BLI_math_matrix.h
source/blender/blenlib/intern/math_matrix.c
source/blender/gpu/CMakeLists.txt
source/blender/gpu/GPU_select.h
source/blender/gpu/intern/gpu_buffers.c
source/blender/gpu/intern/gpu_draw.c
source/blender/gpu/intern/gpu_extensions.c
source/blender/gpu/intern/gpu_select.c
source/blender/gpu/shaders/gpu_shader_simple_vert.glsl
source/blender/nodes/CMakeLists.txt
Diffstat (limited to 'doc/python_api/rst')
-rw-r--r-- | doc/python_api/rst/bge.constraints.rst | 10 | ||||
-rw-r--r-- | doc/python_api/rst/bge.logic.rst | 17 | ||||
-rw-r--r-- | doc/python_api/rst/bge.render.rst | 28 | ||||
-rw-r--r-- | doc/python_api/rst/bge_types/bge.types.KX_ConstraintWrapper.rst | 127 | ||||
-rw-r--r-- | doc/python_api/rst/bge_types/bge.types.KX_GameObject.rst | 20 | ||||
-rw-r--r-- | doc/python_api/rst/bge_types/bge.types.KX_MouseFocusSensor.rst | 17 | ||||
-rw-r--r-- | doc/python_api/rst/bge_types/bge.types.KX_Scene.rst | 2 | ||||
-rw-r--r-- | doc/python_api/rst/bge_types/bge.types.KX_TrackToActuator.rst | 22 | ||||
-rw-r--r-- | doc/python_api/rst/info_gotcha.rst | 10 |
9 files changed, 246 insertions, 7 deletions
diff --git a/doc/python_api/rst/bge.constraints.rst b/doc/python_api/rst/bge.constraints.rst index 4d3e4ce880f..018be96fd14 100644 --- a/doc/python_api/rst/bge.constraints.rst +++ b/doc/python_api/rst/bge.constraints.rst @@ -28,6 +28,7 @@ Physics Constraints (bge.constraints) - :class:`ANGULAR_CONSTRAINT` - :class:`CONETWIST_CONSTRAINT` - :class:`VEHICLE_CONSTRAINT` + - :class:`GENERIC_6DOF_CONSTRAINT` :type constrainttype: int @@ -49,7 +50,7 @@ Physics Constraints (bge.constraints) :arg axisZ: Z axis :type axisZ: float - :arg flag: .. to do + :arg flag: 128 to disable collision between linked bodies :type flag: int .. attribute:: error @@ -368,3 +369,10 @@ Physics Constraints (bge.constraints) Constraint type to be used with function :class:`createConstraint` .. to do + +.. data:: GENERIC_6DOF_CONSTRAINT + + .. note:: + Constraint type to be used with function :class:`createConstraint` + + .. to do diff --git a/doc/python_api/rst/bge.logic.rst b/doc/python_api/rst/bge.logic.rst index 4e0d317e4bf..d901a4e4207 100644 --- a/doc/python_api/rst/bge.logic.rst +++ b/doc/python_api/rst/bge.logic.rst @@ -868,6 +868,23 @@ See :class:`bge.types.KX_SteeringActuator.behavior` :value: 3 +.. _logic-trackto-actuator: + +----------------- +TrackTo Actuator +----------------- + +See :class:`bge.types.KX_TrackToActuator` + +.. data:: KX_TRACK_UPAXIS_POS_X +.. data:: KX_TRACK_UPAXIS_POS_Y +.. data:: KX_TRACK_UPAXIS_POS_Z +.. data:: KX_TRACK_TRAXIS_POS_X +.. data:: KX_TRACK_TRAXIS_POS_Y +.. data:: KX_TRACK_TRAXIS_POS_Z +.. data:: KX_TRACK_TRAXIS_NEG_X +.. data:: KX_TRACK_TRAXIS_NEG_Y +.. data:: KX_TRACK_TRAXIS_NEG_Z ======= Various diff --git a/doc/python_api/rst/bge.render.rst b/doc/python_api/rst/bge.render.rst index 5a80b7fa5c1..9dd4057c82f 100644 --- a/doc/python_api/rst/bge.render.rst +++ b/doc/python_api/rst/bge.render.rst @@ -301,6 +301,34 @@ Functions Disable the motion blur effect. +.. function:: showFramerate(enable) + + Show or hide the framerate. + + :type enable: boolean + +.. function:: showProfile(enable) + + Show or hide the profile. + + :type enable: boolean + +.. function:: showProperties(enable) + + Show or hide the debug properties. + + :type enable: boolean + +.. function:: autoDebugList(enable) + + Enable or disable auto adding debug properties to the debug list. + + :type enable: boolean + +.. function:: clearDebugList() + + Clears the debug property list. + .. function:: setVsync(value) Set the vsync value diff --git a/doc/python_api/rst/bge_types/bge.types.KX_ConstraintWrapper.rst b/doc/python_api/rst/bge_types/bge.types.KX_ConstraintWrapper.rst index c26675147ac..53bef120f7a 100644 --- a/doc/python_api/rst/bge_types/bge.types.KX_ConstraintWrapper.rst +++ b/doc/python_api/rst/bge_types/bge.types.KX_ConstraintWrapper.rst @@ -11,8 +11,131 @@ base class --- :class:`PyObjectPlus` .. method:: getConstraintId(val) - Returns the contraint's ID + Returns the contraint ID - :return: the constraint's ID + :return: the constraint ID :rtype: integer + .. method:: setParam(axis, value0, value1) + + Set the contraint limits + + :arg axis: + :type axis: integer + + .. note:: + For each axis: + * Lowerlimit == Upperlimit -> axis is locked + * Lowerlimit > Upperlimit -> axis is free + * Lowerlimit < Upperlimit -> axis it limited in that range + + PHY_LINEHINGE_CONSTRAINT = 2 or PHY_ANGULAR_CONSTRAINT = 3: + axis = 3 is a constraint limit, with low/high limit value + + * 3: X axis angle + + :arg value0 (min): Set the minimum limit of the axis + :type value0: float + :arg value1 (max): Set the maximum limit of the axis + :type value1: float + + PHY_CONE_TWIST_CONSTRAINT = 3: + axis = 3..5 are constraint limits, high limit values + * 3: X axis angle + * 4: Y axis angle + * 5: Z axis angle + + :arg value0 (min): Set the minimum limit of the axis + :type value0: float + :arg value1 (max): Set the maximum limit of the axis + :type value1: float + + PHY_GENERIC_6DOF_CONSTRAINT = 12: + axis = 0..2 are constraint limits, with low/high limit value + * 0: X axis position + * 1: Y axis position + * 2: Z axis position + + axis = 3..5 are relative constraint (Euler) angles in radians + * 3: X axis angle + * 4: Y axis angle + * 5: Z axis angle + + :arg value0 (min): Set the minimum limit of the axis + :type value0: float + :arg value1 (max): Set the maximum limit of the axis + :type value1: float + + axis = 6..8 are translational motors, with value0=target velocity, value1 = max motor force + * 6: X axis position + * 7: Y axis position + * 8: Z axis position + + axis = 9..11 are rotational motors, with value0=target velocity, value1 = max motor force + * 9: X axis angle + * 10: Y axis angle + * 11: Z axis angle + + :arg value0 (speed): Set the linear velocity of the axis + :type value0: float Range: -10,000.00 to 10,000.00 + :arg value1 (force): Set the maximum force limit of the axis + :type value1: float Range: -10,000.00 to 10,000.00 + + axis = 12..14 are for linear springs on each of the position of freedom + * 12: X axis position + * 13: Y axis position + * 14: Z axis position + + axis = 15..17 are for angular springs on each of the angle of freedom in radians + * 15: X axis angle + * 16: Y axis angle + * 17: Z axis angle + + :arg value0 (stiffness): Set the stiffness of the spring + :type value0: float + :arg value1 (damping): Tendency of the spring to return to it's original position + :type value1: float + 1.0 = springs back to original position (no damping) + 0.0 = don't springs back + + .. method:: getParam(axis) + + Get the contraint position or euler angle of a generic 6DOF constraint + + :arg axis: + :type axis: integer + + axis = 0..2 are linear constraint values + * 0: X axis position + * 1: Y axis position + * 2: Z axis position + + :return: position + :rtype: float + + axis = 3..5 are relative constraint (Euler) angles in radians + * 3: X axis angle + * 4: Y axis angle + * 5: Z axis angle + + :return: angle + :rtype: float + + .. attribute:: constraint_id + + Returns the contraint ID (read only) + + :type: integer + + .. attribute:: constraint_type + + Returns the contraint type (read only) + + :type: integer + + * 1 = POINTTOPOINT_CONSTRAINT + * 2 = LINEHINGE_CONSTRAINT + * 3 = ANGULAR_CONSTRAINT (aka LINEHINGE_CONSTRAINT) + * 4 = CONETWIST_CONSTRAINT + * 11 = VEHICLE_CONSTRAINT + * 12 = GENERIC_6DOF_CONSTRAINT 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 215ff40577c..a6d03dee1a1 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 @@ -363,6 +363,18 @@ base class --- :class:`SCA_IObject` :type: float + .. attribute:: debug + + If true, the object's debug properties will be displayed on screen. + + :type: boolean + + .. attribute:: debugRecursive + + If true, the object's and children's debug properties will be displayed on screen. + + :type: boolean + .. method:: endObject() Delete this object, can be used in place of the EndObject Actuator. @@ -857,3 +869,11 @@ base class --- :class:`SCA_IObject` :return: Whether or not the action is playing :rtype: boolean + .. method:: addDebugProperty (name, debug = True) + + Adds a single debug property to the debug list. + + :arg name: name of the property that added to the debug list. + :type name: string + :arg debug: the debug state. + :type debug: boolean
\ No newline at end of file diff --git a/doc/python_api/rst/bge_types/bge.types.KX_MouseFocusSensor.rst b/doc/python_api/rst/bge_types/bge.types.KX_MouseFocusSensor.rst index dda73eadb52..0600a4b5aae 100644 --- a/doc/python_api/rst/bge_types/bge.types.KX_MouseFocusSensor.rst +++ b/doc/python_api/rst/bge_types/bge.types.KX_MouseFocusSensor.rst @@ -64,3 +64,20 @@ base class --- :class:`SCA_MouseSensor` :type: boolean + .. attribute:: useXRay + + If enabled it allows the sensor to see through game objects that don't have the selected property or material. + + :type: boolean + + .. attribute:: propName + + The property or material the sensor is looking for. + + :type: string + + .. attribute:: useMaterial + + Determines if the sensor is looking for a property or material. KX_True = Find material; KX_False = Find property. + + :type: boolean diff --git a/doc/python_api/rst/bge_types/bge.types.KX_Scene.rst b/doc/python_api/rst/bge_types/bge.types.KX_Scene.rst index 75630ae4d26..f2dad58731c 100644 --- a/doc/python_api/rst/bge_types/bge.types.KX_Scene.rst +++ b/doc/python_api/rst/bge_types/bge.types.KX_Scene.rst @@ -152,6 +152,8 @@ base class --- :class:`PyObjectPlus` :arg scene: The name of the scene to replace this scene with. :type scene: string + :return: True if the scene exists and was scheduled for addition, False otherwise. + :rtype: boolean .. method:: suspend() diff --git a/doc/python_api/rst/bge_types/bge.types.KX_TrackToActuator.rst b/doc/python_api/rst/bge_types/bge.types.KX_TrackToActuator.rst index 070243c6a05..5b5c5d0c0db 100644 --- a/doc/python_api/rst/bge_types/bge.types.KX_TrackToActuator.rst +++ b/doc/python_api/rst/bge_types/bge.types.KX_TrackToActuator.rst @@ -37,3 +37,25 @@ base class --- :class:`SCA_IActuator` :type: boolean + .. attribute:: upAxis + + The axis that points upward. + + :type: integer from 0 to 2 + + * KX_TRACK_UPAXIS_POS_X + * KX_TRACK_UPAXIS_POS_Y + * KX_TRACK_UPAXIS_POS_Z + + .. attribute:: trackAxis + + The axis that points to the target object. + + :type: integer from 0 to 5 + + * KX_TRACK_TRAXIS_POS_X + * KX_TRACK_TRAXIS_POS_Y + * KX_TRACK_TRAXIS_POS_Z + * KX_TRACK_TRAXIS_NEG_X + * KX_TRACK_TRAXIS_NEG_Y + * KX_TRACK_TRAXIS_NEG_Z diff --git a/doc/python_api/rst/info_gotcha.rst b/doc/python_api/rst/info_gotcha.rst index 5817f0f0d67..35f9c1bda9f 100644 --- a/doc/python_api/rst/info_gotcha.rst +++ b/doc/python_api/rst/info_gotcha.rst @@ -408,17 +408,19 @@ These returns the absolute path which can be used with native python modules. Unicode Problems ================ -Python supports many different encodings so there is nothing stopping you from writing a script in latin1 or iso-8859-15. +Python supports many different encodings so there is nothing stopping you from +writing a script in ``latin1`` or ``iso-8859-15``. See `pep-0263 <http://www.python.org/dev/peps/pep-0263/>`_ -However this complicates things for the python api because blend files themselves don't have an encoding. +However this complicates matters for Blender's Python API because ``.blend`` files don't have an explicit encoding. -To simplify the problem for python integration and script authors we have decided all strings in blend files **must** be UTF-8 or ASCII compatible. +To avoid the problem for Python integration and script authors we have decided all strings in blend files +**must** be ``UTF-8``, ``ASCII`` compatible. This means assigning strings with different encodings to an object names for instance will raise an error. -Paths are an exception to this rule since we cannot ignore the existane of non-utf-8 paths on peoples filesystems. +Paths are an exception to this rule since we cannot ignore the existence of non ``UTF-8`` paths on users file-system. This means seemingly harmless expressions can raise errors, eg. |