diff options
-rw-r--r-- | source/gameengine/Ketsji/KX_GameObject.cpp | 8 | ||||
-rw-r--r-- | source/gameengine/Ketsji/KX_PythonInitTypes.cpp | 4 | ||||
-rw-r--r-- | source/gameengine/PyDoc/GameTypes.py | 4 |
3 files changed, 7 insertions, 9 deletions
diff --git a/source/gameengine/Ketsji/KX_GameObject.cpp b/source/gameengine/Ketsji/KX_GameObject.cpp index 9196d1e0527..ae30aeb971c 100644 --- a/source/gameengine/Ketsji/KX_GameObject.cpp +++ b/source/gameengine/Ketsji/KX_GameObject.cpp @@ -2051,14 +2051,8 @@ PyObject* KX_GameObject::PyGetVelocity(PyObject* args) MT_Point3 point(0.0,0.0,0.0); PyObject* pypos = NULL; - if (PyArg_ParseTuple(args, "|O:getVelocity", &pypos)) - { - if (pypos) - PyVecTo(pypos, point); - } - else { + if (!PyArg_ParseTuple(args, "|O:getVelocity", &pypos) || (pypos && !PyVecTo(pypos, point))) return NULL; - } if (m_pPhysicsController1) { diff --git a/source/gameengine/Ketsji/KX_PythonInitTypes.cpp b/source/gameengine/Ketsji/KX_PythonInitTypes.cpp index cd21663f41d..83c4dcbb34c 100644 --- a/source/gameengine/Ketsji/KX_PythonInitTypes.cpp +++ b/source/gameengine/Ketsji/KX_PythonInitTypes.cpp @@ -51,6 +51,7 @@ #include "KX_PhysicsObjectWrapper.h" #include "KX_PolyProxy.h" #include "KX_PolygonMaterial.h" +#include "KX_PythonSeq.h" #include "KX_SCA_AddObjectActuator.h" #include "KX_SCA_EndObjectActuator.h" #include "KX_SCA_ReplaceMeshActuator.h" @@ -227,6 +228,9 @@ void initPyTypes(void) PyType_Ready_Attr(dict, SCA_XNORController); PyType_Ready_Attr(dict, SCA_XORController); PyType_Ready_Attr(dict, SCA_IController); + + /* Normal python type */ + PyType_Ready(&KX_PythonSeq_Type); } #endif
\ No newline at end of file diff --git a/source/gameengine/PyDoc/GameTypes.py b/source/gameengine/PyDoc/GameTypes.py index d58f9087a9f..b5b0839c0f4 100644 --- a/source/gameengine/PyDoc/GameTypes.py +++ b/source/gameengine/PyDoc/GameTypes.py @@ -5544,7 +5544,7 @@ class KX_Camera(KX_GameObject): """ import types attrs = [] -for name, val in __builtins__.locals().items(): +for name, val in locals().items(): if name.startswith('__'): continue if type(val) == types.ClassType: @@ -5554,4 +5554,4 @@ for name, val in __builtins__.locals().items(): for a in attrs: print a -"""
\ No newline at end of file +""" |