diff options
author | Campbell Barton <ideasman42@gmail.com> | 2009-07-26 05:32:37 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2009-07-26 05:32:37 +0400 |
commit | dd918da8de8b885d90420dc86351a4996dbd6ea6 (patch) | |
tree | 71941227e76d9fd815b451c07a4f6a610720c6db /source/gameengine/PyDoc | |
parent | e9ca43521f99c6b9baf6d9278f85323086fcade2 (diff) |
ReplaceMesh Actuator option to replace the physics mesh and display mesh + python api options.
When the mesh field is left blank and Physics option is enabled, it reinstances the physics mesh from the existing mesh.
like calling gameOb.reinstancePhysicsMesh() from python.
Diffstat (limited to 'source/gameengine/PyDoc')
-rw-r--r-- | source/gameengine/PyDoc/GameTypes.py | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/source/gameengine/PyDoc/GameTypes.py b/source/gameengine/PyDoc/GameTypes.py index 6a554a7c42e..b1d1ce71173 100644 --- a/source/gameengine/PyDoc/GameTypes.py +++ b/source/gameengine/PyDoc/GameTypes.py @@ -1642,10 +1642,14 @@ class KX_GameObject(SCA_IObject): Delete this object, can be used inpace of the EndObject Actuator. The actual removal of the object from the scene is delayed. """ - def replaceMesh(mesh): + def replaceMesh(mesh, useDisplayMesh=True, usePhysicsMesh=False): """ Replace the mesh of this object with a new mesh. This works the same was as the actuator. @type mesh: L{KX_MeshProxy} or mesh name + @type useDisplayMesh: bool + @param useDisplayMesh: when enabled the display mesh will be replaced (optional argument). + @type usePhysicsMesh: bool + @param usePhysicsMesh: when enabled the physics mesh will be replaced (optional argument). """ def getVisible(): """ @@ -3791,6 +3795,11 @@ class KX_SCA_ReplaceMeshActuator(SCA_IActuator): @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 + + @ivar useDisplayMesh: when true the displayed mesh is replaced. + @type useDisplayMesh: boolean + @ivar usePhysicsMesh: when true the physics mesh is replaced. + @type usePhysicsMesh: boolean """ def setMesh(name): """ |