[Bf-committers] [Bf-blender-cvs] SVN commit: /data/svn/bf-blender [29326] trunk/blender/source/gameengine/ PyDoc: == python api docs ==

Dalai Felinto dfelinto at gmail.com
Tue Jun 8 04:52:21 CEST 2010


Hi Luca,

> - have doubt about the list at bge.types.html#bge.types.SCA_MouseSensor.mode possibly tomorrow will ask Dalai
>  I'll ask Dalai tomorrow or when possible (check bge.logic.html#shape-action-actuator once cambo rebuilds the docs)

If you make a list with your questions (including the armature ones,
and other problems) maybe easier. This week I'm finishing a project at
work that may drain most of my attention. Although I'll be in IRC
questions that require some look at the code would be more hard to do.
On the other hand I can reply once I get home, so that would work
well.

Thanks for your work :) It was about time for the BGE online API to
receive even more love !
Ciao,

Dalai
http://blenderecia.orgfree.com

2010/6/7 Luca Bonavita <mindrones at gmail.com>:
> Revision: 29326
>          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=29326
> Author:   mindrones
> Date:     2010-06-08 01:50:43 +0200 (Tue, 08 Jun 2010)
>
> Log Message:
> -----------
> == python api docs ==
>
> bge.types
> ---------
>
> - removed lists if they were already available in bge.logic and crosslinked
>  where the list contained description, moved the descriptions in bge.logic
>  so we have useful thing in one place only
> - fixed a lot of bad formatting, like bad indentation and usage of TAB
> - changed from literal to codeblocks that smerch for the useful suggestion :)
> - whered appropriate I've moved code examples to the end, after notes and all
>  it is blocking to have a big black block before actually see a method parameters or return type
> - have doubt about the list at bge.types.html#bge.types.SCA_MouseSensor.mode
>  possibly tomorrow will ask Dalai
>
> bge.logic
> ---------
>
> - added sensor status list
> - cross linked with bge.types where needed
> - added a section "ShapeAction Actuator" because in bge.types these constants are docuemented, but in 2.5 I don't see the ShapeAction Actuator
> (anymore, or for now)
>  I'll ask Dalai tomorrow or when possible (check bge.logic.html#shape-action-actuator once cambo rebuilds the docs)
> - moved descriptions from bge.types lists to logic page where appropriate
> - where possible, added custom directive :value: so we have a consistent way to show the value of constants
>
> Modified Paths:
> --------------
>    trunk/blender/source/gameengine/PyDoc/bge.events.rst
>    trunk/blender/source/gameengine/PyDoc/bge.logic.rst
>    trunk/blender/source/gameengine/PyDoc/bge.types.rst
>
> Modified: trunk/blender/source/gameengine/PyDoc/bge.events.rst
> ===================================================================
> --- trunk/blender/source/gameengine/PyDoc/bge.events.rst        2010-06-07 23:09:50 UTC (rev 29325)
> +++ trunk/blender/source/gameengine/PyDoc/bge.events.rst        2010-06-07 23:50:43 UTC (rev 29326)
> @@ -81,6 +81,8 @@
>  .. data:: MOUSEX
>  .. data:: MOUSEY
>
> +.. _keyboard-keys:
> +
>  =============
>  Keyboard Keys
>  =============
>
> Modified: trunk/blender/source/gameengine/PyDoc/bge.logic.rst
> ===================================================================
> --- trunk/blender/source/gameengine/PyDoc/bge.logic.rst 2010-06-07 23:09:50 UTC (rev 29325)
> +++ trunk/blender/source/gameengine/PyDoc/bge.logic.rst 2010-06-07 23:50:43 UTC (rev 29326)
> @@ -337,6 +337,19 @@
>  Sensors
>  =======
>
> +.. _sensor-status:
> +
> +-------------
> +Sensor Status
> +-------------
> +
> +.. data:: KX_SENSOR_INACTIVE
> +.. data:: KX_SENSOR_JUST_ACTIVATED
> +.. data:: KX_SENSOR_ACTIVE
> +.. data:: KX_SENSOR_JUST_DEACTIVATED
> +
> +.. _logic-property-sensor:
> +
>  ---------------
>  Property Sensor
>  ---------------
> @@ -345,21 +358,31 @@
>
>    Activate when the property is equal to the sensor value.
>
> +   :value: 1
> +
>  .. data:: KX_PROPSENSOR_NOTEQUAL
>
>    Activate when the property is not equal to the sensor value.
> +
> +   :value: 2
>
>  .. data:: KX_PROPSENSOR_INTERVAL
>
>    Activate when the property is between the specified limits.
> -
> +
> +   :value: 3
> +
>  .. data:: KX_PROPSENSOR_CHANGED
>
> -   Activate when the property changes
> +   Activate when the property changes
>
> +   :value: 4
> +
>  .. data:: KX_PROPSENSOR_EXPRESSION
>
>    Activate when the expression matches
> +
> +   :value: 5
>
>  ------------
>  Radar Sensor
> @@ -392,6 +415,8 @@
>  Actuators
>  =========
>
> +.. _action-actuator:
> +
>  ---------------
>  Action Actuator
>  ---------------
> @@ -408,8 +433,44 @@
>  Constraint Actuator
>  -------------------
>
> -See :class:`bge.types.KX_ConstraintActuator`
> +.. _constraint-actuator-option:
>
> +See :class:`bge.types.KX_ConstraintActuator.option`
> +
> +* Applicable to Distance constraint:
> +
> +  .. data:: KX_ACT_CONSTRAINT_NORMAL
> +
> +     Activate alignment to surface
> +
> +  .. data:: KX_ACT_CONSTRAINT_DISTANCE
> +
> +     Activate distance control
> +
> +  .. data:: KX_ACT_CONSTRAINT_LOCAL
> +
> +     Direction of the ray is along the local axis
> +
> +* Applicable to Force field constraint:
> +
> +  .. data:: KX_ACT_CONSTRAINT_DOROTFH
> +
> +     Force field act on rotation as well
> +
> +* Applicable to both:
> +
> +  .. data:: KX_ACT_CONSTRAINT_MATERIAL
> +
> +     Detect material rather than property
> +
> +  .. data:: KX_ACT_CONSTRAINT_PERMANENT
> +
> +     No deactivation if ray does not hit target
> +
> +.. _constraint-actuator-limit:
> +
> +See :class:`bge.types.KX_ConstraintActuator.limit`
> +
>  .. data:: KX_CONSTRAINTACT_LOCX
>
>    Limit X coord.
> @@ -493,13 +554,6 @@
>  .. data:: KX_ACT_CONSTRAINT_FHPZ
>
>    Set force field along positive Z axis
> -
> -.. data:: KX_ACT_CONSTRAINT_DISTANCE
> -.. data:: KX_ACT_CONSTRAINT_DOROTFH
> -.. data:: KX_ACT_CONSTRAINT_LOCAL
> -.. data:: KX_ACT_CONSTRAINT_MATERIAL
> -.. data:: KX_ACT_CONSTRAINT_NORMAL
> -.. data:: KX_ACT_CONSTRAINT_PERMANENT
>
>  ----------------
>  Dynamic Actuator
> @@ -513,6 +567,8 @@
>  .. data:: KX_DYN_DISABLE_RIGID_BODY
>  .. data:: KX_DYN_SET_MASS
>
> +.. _game-actuator:
> +
>  -------------
>  Game Actuator
>  -------------
> @@ -526,6 +582,8 @@
>  .. data:: KX_GAME_SAVECFG
>  .. data:: KX_GAME_LOADCFG
>
> +.. _ipo-actuator:
> +
>  ------------
>  IPO Actuator
>  ------------
> @@ -546,6 +604,8 @@
>  .. data:: KX_PARENT_REMOVE
>  .. data:: KX_PARENT_SET
>
> +.. _logic-random-distributions:
> +
>  --------------------
>  Random Distributions
>  --------------------
> @@ -578,28 +638,64 @@
>  .. data:: KX_SCENE_SUSPEND
>  .. data:: KX_SCENE_RESUME
>
> +.. _shape-action-actuator:
> +
> +---------------------
> +Shape Action Actuator
> +---------------------
> +
> +See :class:`bge.types.BL_ActionActuator`
> +
> +.. data:: KX_ACTIONACT_PLAY
> +.. data:: KX_ACTIONACT_FLIPPER
> +.. data:: KX_ACTIONACT_LOOPSTOP
> +.. data:: KX_ACTIONACT_LOOPEND
> +.. data:: KX_ACTIONACT_PROPERTY
> +
> +.. _logic-sound-actuator:
> +
>  --------------
>  Sound Actuator
>  --------------
> -
> +
>  See :class:`bge.types.KX_SoundActuator`
>
>  .. data:: KX_SOUNDACT_PLAYSTOP
> +
> +   :value: 1
> +
>  .. data:: KX_SOUNDACT_PLAYEND
> +
> +   :value: 2
> +
>  .. data:: KX_SOUNDACT_LOOPSTOP
> +
> +   :value: 3
> +
>  .. data:: KX_SOUNDACT_LOOPEND
> +
> +   :value: 4
> +
>  .. data:: KX_SOUNDACT_LOOPBIDIRECTIONAL
> +
> +   :value: 5
> +
>  .. data:: KX_SOUNDACT_LOOPBIDIRECTIONAL_STOP
>
> +   :value: 6
> +
> +
>  =======
>  Various
>  =======
>
> +.. _input-status:
> +
>  ------------
>  Input Status
>  ------------
>
> -See :class:`bge.types.SCA_MouseSensor`
> +See :class:`bge.types.SCA_PythonKeyboard`, :class:`bge.types.SCA_PythonMouse`, :class:`bge.types.SCA_MouseSensor`, :class:`bge.types.SCA_KeyboardSensor`
>
>  .. data:: KX_INPUT_NONE
>  .. data:: KX_INPUT_JUST_ACTIVATED
> @@ -652,31 +748,111 @@
>  .. data:: KX_STATE28
>  .. data:: KX_STATE29
>  .. data:: KX_STATE30
> +
> +.. _state-actuator-operation:
> +
> +See :class:`bge.types.KX_StateActuator.operation`
> +
>  .. data:: KX_STATE_OP_CLR
> +
> +   Substract bits to state mask
> +
> +   :value: 0
> +
>  .. data:: KX_STATE_OP_CPY
> +
> +   Copy state mask
> +
> +   :value: 1
> +
>  .. data:: KX_STATE_OP_NEG
> +
> +   Invert bits to state mask
> +
> +   :value: 2
> +
>  .. data:: KX_STATE_OP_SET
>
> +   Add bits to state mask
> +
> +   :value: 3
> +
> +.. _Two-D-FilterActuator-mode:
> +
>  ---------
>  2D Filter
>  ---------
>
>  .. data:: RAS_2DFILTER_BLUR
> +
> +   :value: 2
> +
>  .. data:: RAS_2DFILTER_CUSTOMFILTER
> +
> +   Customer filter, the code code is set via shaderText property.
> +
> +   :value: 12
> +
>  .. data:: RAS_2DFILTER_DILATION
> +
> +   :value: 4
> +
>  .. data:: RAS_2DFILTER_DISABLED
> +
> +   Disable the filter that is currently active
> +
> +   :value: -1
> +
>  .. data:: RAS_2DFILTER_ENABLED
> +
> +   Enable the filter that was previously disabled
> +
> +   :value: -2
> +
>  .. data:: RAS_2DFILTER_EROSION
> +
> +   :value: 5
> +
>  .. data:: RAS_2DFILTER_GRAYSCALE
> +
> +   :value: 9
> +
>  .. data:: RAS_2DFILTER_INVERT
> +
> +   :value: 11
> +
>  .. data:: RAS_2DFILTER_LAPLACIAN
> +
> +   :value: 6
> +
>  .. data:: RAS_2DFILTER_MOTIONBLUR
> +
> +   Create and enable preset filters
> +
> +   :value: 1
> +
>  .. data:: RAS_2DFILTER_NOFILTER
> +
> +   Disable and destroy the filter that is currently active
> +
> +   :value: 0
> +
>  .. data:: RAS_2DFILTER_PREWITT
> +
> +   :value: 8
> +
>  .. data:: RAS_2DFILTER_SEPIA
> +
> +   :value: 10
> +
>  .. data:: RAS_2DFILTER_SHARPEN
> +
> +   :value: 3
> +
>  .. data:: RAS_2DFILTER_SOBEL
>
> +   :value: 7
> +
>  ------
>  Shader
>  ------
>
> Modified: trunk/blender/source/gameengine/PyDoc/bge.types.rst
> ===================================================================
> --- trunk/blender/source/gameengine/PyDoc/bge.types.rst 2010-06-07 23:09:50 UTC (rev 29325)
> +++ trunk/blender/source/gameengine/PyDoc/bge.types.rst 2010-06-07 23:50:43 UTC (rev 29326)
> @@ -163,14 +163,9 @@
>
>    .. attribute:: status
>
> -      The status of the sensor. (read-only).
> -
> -      :type: int from 0-3.
> +      The status of the sensor (read-only): can be one of :ref:`these constants<sensor-status>`.
>
> -      * KX_SENSOR_INACTIVE
> -      * KX_SENSOR_JUST_ACTIVATED
> -      * KX_SENSOR_ACTIVE
> -      * KX_SENSOR_JUST_DEACTIVATED
> +      :type: int
>
>       .. note::
>
> @@ -294,7 +289,7 @@
>
>    .. attribute:: mode
>
> -      The operation mode of the actuator. KX_ACTIONACT_PLAY, KX_ACTIONACT_PROPERTY, KX_ACTIONACT_FLIPPER, KX_ACTIONACT_LOOPSTOP, KX_ACTIONACT_LOOPEND.
> +      The operation mode of the actuator. Can be one of :ref:`these constants<action-actuator>`.
>
>       :type: integer
>
> @@ -597,7 +592,7 @@
>
>    .. attribute:: mode
>
> -      The operation mode of the actuator in [KX_ACTIONACT_PLAY, KX_ACTIONACT_PROPERTY, KX_ACTIONACT_FLIPPER, KX_ACTIONACT_LOOPSTOP, KX_ACTIONACT_LOOPEND].
> +      The operation mode of the actuator. Can be one of :ref:`these constants<shape-action-actuator>`.
>
>       :type: integer
>
> @@ -653,12 +648,14 @@
>
>       Since object names are not always unique, the id of an object can be used to get an object from the CValueList.
>
> -      Example.
> +      Example:
>
> -      ``myObID=id(gameObject)``
> -      ``ob= scene.objects.from_id(myObID)``
> +      .. code-block:: python
> +
> +         myObID=id(gameObject)
> +         ob= scene.objects.from_id(myObID)
>
> -      Where myObID is an int or long from the id function.
> +      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.
>
> @@ -752,14 +749,10 @@
>
>       :type: :class:`KX_GameObject` or None
>
> -   @author: snail
> -
>  .. class:: KX_ConstraintActuator(SCA_IActuator)
>
>    A constraint actuator limits the position, rotation, distance or orientation of an object.
>
> -   Properties:
> -
>    .. attribute:: damp
>
>       Time constant of the constraint expressed in frame (not use by Force field constraint).
> @@ -780,20 +773,10 @@
>
>    .. attribute:: option
>
> -      Binary combination of the following values.
> +      Binary combination of :ref:`these constants <constraint-actuator-option>`
>
>       :type: integer
>
> -      * 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
> -
>    .. attribute:: 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.
> @@ -832,22 +815,7 @@
>
>    .. attribute:: limit
>
> -      type of constraint.
> -
> -      Use one of the following constant: :data:`~bge.logic.KX_CONSTRAINTACT_LOCX`,
> -      :data:`~bge.logic.KX_CONSTRAINTACT_LOCY`, :data:`~bge.logic.KX_CONSTRAINTACT_LOCZ`,
> -      :data:`~bge.logic.KX_CONSTRAINTACT_ROTX`, :data:`~bge.logic.KX_CONSTRAINTACT_ROTY`,
> -      :data:`~bge.logic.KX_CONSTRAINTACT_ROTZ`, :data:`~bge.logic.KX_CONSTRAINTACT_DIRPX`,
> -      :data:`~bge.logic.KX_CONSTRAINTACT_DIRPY`, :data:`~bge.logic.KX_CONSTRAINTACT_DIRPZ`,
> -      :data:`~bge.logic.KX_CONSTRAINTACT_DIRNX`, :data:`~bge.logic.KX_CONSTRAINTACT_DIRNY`,
> -      :data:`~bge.logic.KX_CONSTRAINTACT_DIRNZ`, :data:`~bge.logic.KX_CONSTRAINTACT_ORIX`,
> -      :data:`~bge.logic.KX_CONSTRAINTACT_ORIY`, :data:`~bge.logic.KX_CONSTRAINTACT_ORIZ`,
>
> @@ Diff output truncated at 10240 characters. @@
>
> _______________________________________________
> Bf-blender-cvs mailing list
> Bf-blender-cvs at blender.org
> http://lists.blender.org/mailman/listinfo/bf-blender-cvs
>


More information about the Bf-committers mailing list