[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [28796] trunk/blender/source/gameengine/ PyDoc: convert GameTypes from epydoc into sphinx compatible markup, also removed deprecated functions
Campbell Barton
ideasman42 at gmail.com
Mon May 17 00:57:23 CEST 2010
Revision: 28796
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=28796
Author: campbellbarton
Date: 2010-05-17 00:57:22 +0200 (Mon, 17 May 2010)
Log Message:
-----------
convert GameTypes from epydoc into sphinx compatible markup, also removed deprecated functions
Added Paths:
-----------
trunk/blender/source/gameengine/PyDoc/bge.types.rst
Removed Paths:
-------------
trunk/blender/source/gameengine/PyDoc/GameTypes.py
Deleted: trunk/blender/source/gameengine/PyDoc/GameTypes.py
===================================================================
--- trunk/blender/source/gameengine/PyDoc/GameTypes.py 2010-05-16 20:52:53 UTC (rev 28795)
+++ trunk/blender/source/gameengine/PyDoc/GameTypes.py 2010-05-16 22:57:22 UTC (rev 28796)
@@ -1,6184 +0,0 @@
-"""
-Documentation for the GameTypes Module.
-=======================================
-
- at group Base: PyObjectPlus, CValue, CPropValue, SCA_ILogicBrick, SCA_IObject, SCA_ISensor, SCA_IController, SCA_IActuator
-
- at group Object: KX_GameObject, KX_LightObject, KX_Camera, BL_ArmatureObject
-
- at group Animation: BL_ArmatureConstraint
-
- at group Mesh: KX_MeshProxy, KX_PolyProxy, KX_VertexProxy
-
- at group Shading: KX_PolygonMaterial, KX_BlenderMaterial, BL_Shader
-
- at group Sensors: SCA_ActuatorSensor, SCA_AlwaysSensor, SCA_DelaySensor, SCA_JoystickSensor, SCA_KeyboardSensor, KX_MouseFocusSensor, SCA_MouseSensor, KX_NearSensor, KX_NetworkMessageSensor, SCA_PropertySensor, KX_RadarSensor, SCA_RandomSensor, KX_RaySensor, KX_TouchSensor, KX_ArmatureSensor
-
- at group Actuators: SCA_2DFilterActuator, BL_ActionActuator, BL_ArmatureActuator, KX_SCA_AddObjectActuator, KX_CameraActuator, KX_ConstraintActuator, KX_SCA_DynamicActuator, KX_SCA_EndObjectActuator, KX_GameActuator, KX_IpoActuator, KX_NetworkMessageActuator, KX_ObjectActuator, KX_ParentActuator, SCA_PropertyActuator, SCA_RandomActuator, KX_SCA_ReplaceMeshActuator, KX_SceneActuator, BL_ShapeActionActuator, KX_SoundActuator, KX_StateActuator, KX_TrackToActuator, KX_VisibilityActuator
-
- at group Controllers: SCA_ANDController, SCA_NANDController, SCA_NORController, SCA_ORController, SCA_PythonController, SCA_XNORController, SCA_XORController
-"""
-import GameLogic
-
-class PyObjectPlus:
- """
- PyObjectPlus base class of most other types in the Game Engine.
-
- @ivar invalid: Test if the object has been freed by the game engine and is no longer valid.
-
- Normally this is not a problem but when storing game engine data in the GameLogic module,
- KX_Scenes or other KX_GameObjects its possible to hold a reference to invalid data.
- Calling an attribute or method on an invalid object will raise a SystemError.
-
- The invalid attribute allows testing for this case without exception handling.
- @type invalid: bool
- """
-
- def isA(game_type):
- """
- Check if this is a type or a subtype game_type.
-
- @param game_type: the name of the type or the type its self from the L{GameTypes} module.
- @type game_type: string or type
- @return: True if this object is a type or a subtype of game_type.
- @rtype: bool
- """
-
-class CValue(PyObjectPlus):
- """
- This class is a basis for other classes.
- @ivar name: The name of this CValue derived object (read-only).
- @type name: string
- @group Deprecated: getName
- """
- def getName():
- """
- Returns the name of the CValue.
-
- @deprecated: Use the L{name} attribute instead.
- @note: in most cases the CValue's subclasses will override this function.
- @rtype: string
- """
-
-class CPropValue(CValue):
- """
- This class has no python functions
- """
- pass
-
-class SCA_ILogicBrick(CValue):
- """
- Base class for all logic bricks.
-
- @ivar executePriority: This determines the order controllers are evaluated, and actuators are activated (lower priority is executed first).
- @type executePriority: int
- @ivar owner: The game object this logic brick is attached to (read-only).
- @type owner: L{KX_GameObject} or None in exceptional cases.
- @ivar name: The name of this logic brick (read-only).
- @type name: string
- """
-
-#{ Deprecated
- def getOwner():
- """
- Gets the game object associated with this logic brick.
-
- @deprecated: Use the L{owner} attribute instead.
- @rtype: L{KX_GameObject}
- """
-
- def setExecutePriority(priority):
- """
- Sets the priority of this logic brick.
-
- This determines the order controllers are evaluated, and actuators are activated.
- Bricks with lower priority will be executed first.
-
- @deprecated: Use the L{executePriority} attribute instead.
- @type priority: integer
- @param priority: the priority of this logic brick.
- """
- def getExecutePriority():
- """
- Gets the execution priority of this logic brick.
-
- @deprecated: Use the L{executePriority} attribute instead.
- @rtype: integer
- @return: this logic bricks current priority.
- """
-#}
-
-class SCA_PythonKeyboard(PyObjectPlus):
- """
- The current keyboard.
- @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], ...]
- """
- pass
-
-class SCA_PythonMouse(PyObjectPlus):
- """
- The current mouse.
-
- @ivar events: a list of pressed buttons 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], ...]
- @ivar position: The normalized x and y position of the mouse cursor.
- @type position: list [x, y]
- @ivar visible: The visibility of the mouse cursor
- @type visible: boolean
- """
- pass
-
-class SCA_IObject(CValue):
- """
- This class has no python functions
- """
- pass
-
-class SCA_ISensor(SCA_ILogicBrick):
- """
- Base class for all sensor logic bricks.
-
- @ivar usePosPulseMode: Flag to turn positive pulse mode on and off.
- @type usePosPulseMode: boolean
- @ivar useNegPulseMode: Flag to turn negative pulse mode on and off.
- @type useNegPulseMode: boolean
- @ivar frequency: The frequency for pulse mode sensors.
- @type frequency: int
- @ivar level: Option whether to detect level or edge transition when entering a state.
- It makes a difference only in case of logic state transition (state actuator).
- A level detector will immediately generate a pulse, negative or positive
- depending on the sensor condition, as soon as the state is activated.
- A edge detector will wait for a state change before generating a pulse.
- note: mutually exclusive with L{tap}, enabling will disable L{tap}.
- @type level: boolean
- @ivar tap: When enabled only sensors that are just activated will send a positive event,
- after this they will be detected as negative by the controllers.
- This will make a key thats held act as if its only tapped for an instant.
- note: mutually exclusive with L{level}, enabling will disable L{level}.
- @type tap: boolean
- @ivar invert: Flag to set if this sensor activates on positive or negative events.
- @type invert: boolean
- @ivar triggered: True if this sensor brick is in a positive state. (read-only)
- @type triggered: boolean
- @ivar positive: True if this sensor brick is in a positive state. (read-only)
- @type positive: boolean
- @ivar status: The status of the sensor. (read-only)
- KX_SENSOR_INACTIVE, KX_SENSOR_JUST_ACTIVATED,
- KX_SENSOR_ACTIVE, KX_SENSOR_JUST_DEACTIVATED
- Note: this convenient attribute combines the values of triggered and positive attributes
- @type status: int from 0-3.
- """
-
- def reset():
- """
- Reset sensor internal state, effect depends on the type of sensor and settings.
-
- The sensor is put in its initial state as if it was just activated.
- """
-#{ Deprecated
- def isPositive():
- """
- True if this sensor brick is in a positive state.
-
- @deprecated: use L{positive}
- """
-
- def isTriggered():
- """
- True if this sensor brick has triggered the current controller.
-
- @deprecated: use L{triggered}
- """
-
- def getUsePosPulseMode():
- """
- True if the sensor is in positive pulse mode.
-
- @deprecated: use L{usePosPulseMode}
- """
- def setUsePosPulseMode(pulse):
- """
- Sets positive pulse mode.
-
- @type pulse: boolean
- @param pulse: If True, will activate positive pulse mode for this sensor.
- @deprecated: use L{usePosPulseMode}
- """
- def getFrequency():
- """
- The frequency for pulse mode sensors.
-
- @rtype: integer
- @return: the pulse frequency in 1/50 sec.
- @deprecated: use L{frequency}
- """
- def setFrequency(freq):
- """
- Sets the frequency for pulse mode sensors.
-
- @type freq: integer
- @return: the pulse frequency in 1/50 sec.
- @deprecated: use L{frequency}
- """
- def getUseNegPulseMode():
- """
- True if the sensor is in negative pulse mode.
-
- @deprecated: use L{useNegPulseMode}
- """
- def setUseNegPulseMode(pulse):
- """
- Sets negative pulse mode.
-
- @type pulse: boolean
- @param pulse: If True, will activate negative pulse mode for this sensor.
- @deprecated: use L{useNegPulseMode}
- """
- def getInvert():
- """
- True if this sensor activates on negative events.
-
- @deprecated: use L{invert}
- """
- def setInvert(invert):
- """
- Sets if this sensor activates on positive or negative events.
-
- @type invert: boolean
- @param invert: true if activates on negative events; false if activates on positive events.
- @deprecated: use L{invert}
- """
- def getLevel():
- """
- Returns whether this sensor is a level detector or a edge detector.
- It makes a difference only in case of logic state transition (state actuator).
- A level detector will immediately generate a pulse, negative or positive
- depending on the sensor condition, as soon as the state is activated.
- A edge detector will wait for a state change before generating a pulse.
-
- @rtype: boolean
- @return: true if sensor is level sensitive, false if it is edge sensitive
- @deprecated: use L{level}
- """
- def setLevel(level):
- """
- Set whether to detect level or edge transition when entering a state.
-
- @param level: Detect level instead of edge? (KX_TRUE, KX_FALSE)
- @type level: boolean
- @deprecated: use L{level}
- """
-#}
-
-class SCA_IController(SCA_ILogicBrick):
- """
- Base class for all controller logic bricks.
-
- @ivar state: the controllers state bitmask.
- This can be used with the GameObject's state to test if the controller is active.
- @type state: int bitmask
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list