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:
Diffstat (limited to 'source/gameengine/PyDoc/GameTypes.py')
-rw-r--r--source/gameengine/PyDoc/GameTypes.py28
1 files changed, 16 insertions, 12 deletions
diff --git a/source/gameengine/PyDoc/GameTypes.py b/source/gameengine/PyDoc/GameTypes.py
index c391d0c3dec..054b2cb4daf 100644
--- a/source/gameengine/PyDoc/GameTypes.py
+++ b/source/gameengine/PyDoc/GameTypes.py
@@ -1023,6 +1023,12 @@ class CListValue(CPropValue):
Return the value matching key, or the default value if its not found.
@return: The key value or a default.
"""
+ def has_key(key):
+ """
+ Return True if the key is found.
+ @rtype: boolean
+ @return: The key value or a default.
+ """
def from_id(id):
"""
This is a funtion especially for the game engine to return a value with a spesific id.
@@ -1576,7 +1582,7 @@ class KX_GameObject(SCA_IObject):
@ivar childrenRecursive: all children of this object including childrens children, (read-only).
@type childrenRecursive: L{CListValue} of L{KX_GameObject}'s
@group Deprecated: getPosition, setPosition, setWorldPosition, getOrientation, setOrientation, getState, setState, getParent, getVisible, getMass, getMesh, getChildren, getChildrenRecursive
- @group Property Access: get, attrDict, getPropertyNames
+ @group Property Access: get, has_key, attrDict, getPropertyNames
"""
def endObject():
"""
@@ -2048,6 +2054,12 @@ class KX_GameObject(SCA_IObject):
Return the value matching key, or the default value if its not found.
@return: The key value or a default.
"""
+ def has_key(key):
+ """
+ Return True if the key is found.
+ @rtype: boolean
+ @return: The key value or a default.
+ """
class KX_IpoActuator(SCA_IActuator):
@@ -2407,8 +2419,6 @@ class KX_MouseFocusSensor(SCA_MouseSensor):
@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)
- @ivar usePulseFocus: When enabled, moving the mouse over a different object generates a pulse. (only used when the 'Mouse Over Any' sensor option is set)
- @type usePulseFocus: bool
"""
#{ Deprecated
def getHitNormal():
@@ -2470,7 +2480,7 @@ class KX_TouchSensor(SCA_ISensor):
@ivar useMaterial: Determines if the sensor is looking for a property or material.
KX_True = Find material; KX_False = Find property
@type useMaterial: boolean
- @ivar usePulseCollision: When enabled, changes to the set of colliding objects generate a pulse.
+ @ivar usePulseCollision: The last collided object.
@type usePulseCollision: bool
@ivar hitObject: The last collided object. (read-only)
@type hitObject: L{KX_GameObject} or None
@@ -3856,12 +3866,6 @@ class KX_Scene(PyObjectPlus):
@rtype: L{KX_GameObject}
"""
-
- def get(key, default=None):
- """
- Return the value matching key, or the default value if its not found.
- @return: The key value or a default.
- """
class KX_SceneActuator(SCA_IActuator):
"""
@@ -5733,7 +5737,7 @@ for name, val in locals().items():
# Store the mappings to new attributes in a list (because there
# could be collisions).
- if attrName not in depAttrs:
+ if not depAttrs.has_key(attrName):
depAttrs[attrName] = {}
mapping = depAttrs[attrName]
@@ -5758,7 +5762,7 @@ for name, val in locals().items():
# Another mapping, from a conversion tuple to lists of class
# names.
conversion = (func, newAttrName)
- if conversion not in mapping:
+ if not mapping.has_key(conversion):
mapping[conversion] = []
mapping[conversion].append(name)
break