Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2009-04-30 16:45:13 +0400
committerCampbell Barton <ideasman42@gmail.com>2009-04-30 16:45:13 +0400
commitfdf6ea916db3225e2cee437cdb19b3fbee84db41 (patch)
treeef343448ff7e1d1909889590757527b29e0193b3 /source/gameengine
parentb14dc8f3d97d6010c842e9137034d3ff3747e68a (diff)
added Geometry as a BGE module, removed its dependency on gen_utils.c
Diffstat (limited to 'source/gameengine')
-rw-r--r--source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp2
-rw-r--r--source/gameengine/GamePlayer/ghost/GPG_Application.cpp1
-rw-r--r--source/gameengine/Ketsji/CMakeLists.txt1
-rw-r--r--source/gameengine/Ketsji/KX_PythonInit.cpp9
-rw-r--r--source/gameengine/Ketsji/KX_PythonInit.h1
-rw-r--r--source/gameengine/Ketsji/SConscript1
6 files changed, 14 insertions, 1 deletions
diff --git a/source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp b/source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp
index 2337ab49ee9..641938253b7 100644
--- a/source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp
+++ b/source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp
@@ -368,6 +368,7 @@ extern "C" void StartKetsjiShell(struct ScrArea *area,
initGameKeys();
initPythonConstraintBinding();
initMathutils();
+ initGeometry();
initBGL();
#ifdef WITH_FFMPEG
initVideoTexture();
@@ -671,6 +672,7 @@ extern "C" void StartKetsjiShellSimulation(struct ScrArea *area,
initGameKeys();
initPythonConstraintBinding();
initMathutils();
+ initGeometry();
initBGL();
#ifdef WITH_FFMPEG
initVideoTexture();
diff --git a/source/gameengine/GamePlayer/ghost/GPG_Application.cpp b/source/gameengine/GamePlayer/ghost/GPG_Application.cpp
index 907ba99e63b..af8b94857b9 100644
--- a/source/gameengine/GamePlayer/ghost/GPG_Application.cpp
+++ b/source/gameengine/GamePlayer/ghost/GPG_Application.cpp
@@ -693,6 +693,7 @@ bool GPG_Application::startEngine(void)
initGameKeys();
initPythonConstraintBinding();
initMathutils();
+ initGeometry();
initBGL();
#ifdef WITH_FFMPEG
initVideoTexture();
diff --git a/source/gameengine/Ketsji/CMakeLists.txt b/source/gameengine/Ketsji/CMakeLists.txt
index c4623b5b6fe..abc2b44825e 100644
--- a/source/gameengine/Ketsji/CMakeLists.txt
+++ b/source/gameengine/Ketsji/CMakeLists.txt
@@ -28,6 +28,7 @@ FILE(GLOB SRC *.cpp)
SET(SRC
${SRC}
../../../source/blender/python/api2_2x/Mathutils.c
+ ../../../source/blender/python/api2_2x/Geometry.c
../../../source/blender/python/api2_2x/constant.c
../../../source/blender/python/api2_2x/euler.c
../../../source/blender/python/api2_2x/matrix.c
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
diff --git a/source/gameengine/Ketsji/KX_PythonInit.h b/source/gameengine/Ketsji/KX_PythonInit.h
index 11360197b95..3253ac8f711 100644
--- a/source/gameengine/Ketsji/KX_PythonInit.h
+++ b/source/gameengine/Ketsji/KX_PythonInit.h
@@ -45,6 +45,7 @@ PyObject* initGameKeys();
PyObject* initRasterizer(class RAS_IRasterizer* rasty,class RAS_ICanvas* canvas);
PyObject* initGamePlayerPythonScripting(const STR_String& progname, TPythonSecurityLevel level, struct Main *maggie, int argc, char** argv);
PyObject* initMathutils();
+PyObject* initGeometry();
PyObject* initBGL();
PyObject* initVideoTexture(void);
void exitGamePlayerPythonScripting();
diff --git a/source/gameengine/Ketsji/SConscript b/source/gameengine/Ketsji/SConscript
index d97f13b0758..dd7297080e5 100644
--- a/source/gameengine/Ketsji/SConscript
+++ b/source/gameengine/Ketsji/SConscript
@@ -9,6 +9,7 @@ defs = ''
# Mathutils C files.
sources.extend([\
'#source/blender/python/api2_2x/Mathutils.c',\
+ '#source/blender/python/api2_2x/Geometry.c',\
'#source/blender/python/api2_2x/constant.c',\
'#source/blender/python/api2_2x/euler.c',\
'#source/blender/python/api2_2x/matrix.c',\