diff options
author | Campbell Barton <ideasman42@gmail.com> | 2009-04-30 16:45:13 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2009-04-30 16:45:13 +0400 |
commit | fdf6ea916db3225e2cee437cdb19b3fbee84db41 (patch) | |
tree | ef343448ff7e1d1909889590757527b29e0193b3 /source/gameengine/Ketsji/KX_PythonInit.cpp | |
parent | b14dc8f3d97d6010c842e9137034d3ff3747e68a (diff) |
added Geometry as a BGE module, removed its dependency on gen_utils.c
Diffstat (limited to 'source/gameengine/Ketsji/KX_PythonInit.cpp')
-rw-r--r-- | source/gameengine/Ketsji/KX_PythonInit.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/source/gameengine/Ketsji/KX_PythonInit.cpp b/source/gameengine/Ketsji/KX_PythonInit.cpp index b17d4042bb6..f5d32e36fc5 100644 --- a/source/gameengine/Ketsji/KX_PythonInit.cpp +++ b/source/gameengine/Ketsji/KX_PythonInit.cpp @@ -86,6 +86,7 @@ extern "C" { #include "Mathutils.h" // Blender.Mathutils module copied here so the blenderlayer can use. + #include "Geometry.h" // Blender.Geometry module copied here so the blenderlayer can use. #include "bpy_internal_import.h" /* from the blender python api, but we want to import text too! */ #include "BGL.h" } @@ -1407,7 +1408,7 @@ PyObject *KXpy_import(PyObject *self, PyObject *args) /* quick hack for GamePython modules TODO: register builtin modules properly by ExtendInittab */ if (!strcmp(name, "GameLogic") || !strcmp(name, "GameKeys") || !strcmp(name, "PhysicsConstraints") || - !strcmp(name, "Rasterizer") || !strcmp(name, "Mathutils") || !strcmp(name, "BGL")) { + !strcmp(name, "Rasterizer") || !strcmp(name, "Mathutils") || !strcmp(name, "BGL") || !strcmp(name, "Geometry")) { return PyImport_ImportModuleEx(name, globals, locals, fromlist); } @@ -1725,6 +1726,7 @@ static void clearGameModules() clearModule(modules, "GameKeys"); clearModule(modules, "VideoTexture"); clearModule(modules, "Mathutils"); + clearModule(modules, "Geometry"); clearModule(modules, "BGL"); PyErr_Clear(); // incase some of these were alredy removed. #endif @@ -2051,6 +2053,11 @@ PyObject* initMathutils() return Mathutils_Init("Mathutils"); // Use as a top level module in BGE } +PyObject* initGeometry() +{ + return Geometry_Init("Geometry"); // Use as a top level module in BGE +} + PyObject* initBGL() { return BGL_Init("BGL"); // Use as a top level module in BGE |