diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2009-04-20 19:06:46 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2009-04-20 19:06:46 +0400 |
commit | 874c29cea8e6f9bc411fccf2d6f4cb07e94328d0 (patch) | |
tree | 5971e577cf7c02e05a1e37b5ad058c71a6744877 /source/gameengine/PyDoc/KX_SCA_ReplaceMeshActuator.py | |
parent | 7555bfa793a2b0fc187c6211c56986f35b2d7b09 (diff) | |
parent | c5bc4e4fb1a33eda8c31f2ea02e91f32f74c8fa5 (diff) |
2.50: svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r19323:HEAD
Notes:
* blenderbuttons and ICON_SNAP_PEEL_OBJECT were not merged.
Diffstat (limited to 'source/gameengine/PyDoc/KX_SCA_ReplaceMeshActuator.py')
-rw-r--r-- | source/gameengine/PyDoc/KX_SCA_ReplaceMeshActuator.py | 24 |
1 files changed, 17 insertions, 7 deletions
diff --git a/source/gameengine/PyDoc/KX_SCA_ReplaceMeshActuator.py b/source/gameengine/PyDoc/KX_SCA_ReplaceMeshActuator.py index 498f6072e23..951c118a99a 100644 --- a/source/gameengine/PyDoc/KX_SCA_ReplaceMeshActuator.py +++ b/source/gameengine/PyDoc/KX_SCA_ReplaceMeshActuator.py @@ -18,13 +18,13 @@ class KX_SCA_ReplaceMeshActuator(SCA_IActuator): # Mesh (name, near, far) # Meshes overlap so that they don't 'pop' when on the edge of the distance. meshes = ((".Hi", 0.0, -20.0), - (".Med", -15.0, -50.0), - (".Lo", -40.0, -100.0) - ) + (".Med", -15.0, -50.0), + (".Lo", -40.0, -100.0) + ) co = GameLogic.getCurrentController() obj = co.getOwner() - act = co.getActuator("LOD." + obj.getName()) + act = co.getActuator("LOD." + obj.name) cam = GameLogic.getCurrentScene().active_camera def Depth(pos, plane): @@ -39,10 +39,10 @@ class KX_SCA_ReplaceMeshActuator(SCA_IActuator): for mesh in meshes: if depth < mesh[1] and depth > mesh[2]: newmesh = mesh - if "ME" + obj.getName() + mesh[0] == act.getMesh(): + if "ME" + obj.name + mesh[0] == act.getMesh(): curmesh = mesh - if newmesh != None and "ME" + obj.getName() + newmesh[0] != act.getMesh(): + if newmesh != None and "ME" + obj.name + newmesh[0] != act.getMesh(): # The mesh is a different mesh - switch it. # Check the current mesh is not a better fit. if curmesh == None or curmesh[1] < depth or curmesh[2] > depth: @@ -55,9 +55,14 @@ class KX_SCA_ReplaceMeshActuator(SCA_IActuator): This will generate a warning in the console: C{ERROR: GameObject I{OBName} ReplaceMeshActuator I{ActuatorName} without object} + + @ivar mesh: L{KX_MeshProxy} or the name of the mesh that will replace the current one + Set to None to disable actuator + @type mesh: L{KX_MeshProxy} or None if no mesh is set """ def setMesh(name): """ + DEPRECATED: Use the mesh property instead. Sets the name of the mesh that will replace the current one. When the name is None it will unset the mesh value so no action is taken. @@ -65,10 +70,15 @@ class KX_SCA_ReplaceMeshActuator(SCA_IActuator): """ def getMesh(): """ + DEPRECATED: Use the mesh property instead. Returns the name of the mesh that will replace the current one. Returns None if no mesh has been scheduled to be added. @rtype: string or None """ - + def instantReplaceMesh(): + """ + Immediately replace mesh without delay. + @rtype: None + """
\ No newline at end of file |