Python API get/setObject update for Actuators. (SetParent, AddObject, Camera and...
authorCampbell Barton <ideasman42@gmail.com>
Thu, 14 Aug 2008 08:58:25 +0000 (08:58 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Thu, 14 Aug 2008 08:58:25 +0000 (08:58 +0000)
commit47c2271d673173ee93b9d91926de9ea41415d411
tree0a13432423c321cd415a4ea5771e89d7ee56d3d9
parent639f3e12a98f6459cb1f7d948e7a3f2658570b31
Python API get/setObject update for Actuators. (SetParent, AddObject, Camera and TrackTo)
* bugfix for BGE python api - SetParent actuator getObject would segfault if the object was not set.
* Added utility function ConvertPythonToGameObject() that can take a GameObject, string or None and set the game object from this since it was being done in a number of places.
* allow setObject(None), since no object is valid for actuators, Python should be able to set this.
* added optional argument for getObject() so it returns the KX_GameObject rather then its name, would prefer this be default but it could break existing games.
16 files changed:
source/gameengine/Converter/KX_ConvertActuators.cpp
source/gameengine/Expressions/PyObjectPlus.h
source/gameengine/Ketsji/KX_CameraActuator.cpp
source/gameengine/Ketsji/KX_CameraActuator.h
source/gameengine/Ketsji/KX_GameObject.cpp
source/gameengine/Ketsji/KX_GameObject.h
source/gameengine/Ketsji/KX_ParentActuator.cpp
source/gameengine/Ketsji/KX_ParentActuator.h
source/gameengine/Ketsji/KX_SCA_AddObjectActuator.cpp
source/gameengine/Ketsji/KX_SCA_AddObjectActuator.h
source/gameengine/Ketsji/KX_TrackToActuator.cpp
source/gameengine/Ketsji/KX_TrackToActuator.h
source/gameengine/PyDoc/KX_CameraActuator.py
source/gameengine/PyDoc/KX_ParentActuator.py
source/gameengine/PyDoc/KX_SCA_AddObjectActuator.py
source/gameengine/PyDoc/KX_TrackToActuator.py