diff options
author | Kester Maddock <Christopher.Maddock.1@uni.massey.ac.nz> | 2004-04-02 17:21:04 +0400 |
---|---|---|
committer | Kester Maddock <Christopher.Maddock.1@uni.massey.ac.nz> | 2004-04-02 17:21:04 +0400 |
commit | 8e5fd5bba355be855f851415f6a93d0e8f0d87d5 (patch) | |
tree | cafce49a51aa61e49a5fd753acad46b731e33b57 /source | |
parent | 594040f7694a081e4ec88555ba65ae798f6243f2 (diff) |
Added blender python module to game engine.
Updated Scons & Makefile
Diffstat (limited to 'source')
-rw-r--r-- | source/gameengine/Ketsji/KX_PythonInit.cpp | 5 | ||||
-rw-r--r-- | source/gameengine/Ketsji/Makefile | 2 | ||||
-rw-r--r-- | source/gameengine/Ketsji/SConscript | 1 |
3 files changed, 5 insertions, 3 deletions
diff --git a/source/gameengine/Ketsji/KX_PythonInit.cpp b/source/gameengine/Ketsji/KX_PythonInit.cpp index 7c1b9928f5f..efd00f24a0c 100644 --- a/source/gameengine/Ketsji/KX_PythonInit.cpp +++ b/source/gameengine/Ketsji/KX_PythonInit.cpp @@ -54,6 +54,7 @@ #include "KX_Scene.h" #include "SND_DeviceManager.h" +#include "BPY_extern.h" static void setSandbox(TPythonSecurityLevel level); @@ -628,7 +629,7 @@ PyObject* initGamePythonScripting(const STR_String& progname, TPythonSecurityLev Py_SetProgramName(pname.Ptr()); Py_NoSiteFlag=1; Py_FrozenFlag=1; - Py_Initialize(); + BPY_start_python(); setSandbox(level); PyObject* moduleobj = PyImport_AddModule("__main__"); @@ -639,7 +640,7 @@ PyObject* initGamePythonScripting(const STR_String& progname, TPythonSecurityLev void exitGamePythonScripting() { - Py_Finalize(); + BPY_end_python(); } diff --git a/source/gameengine/Ketsji/Makefile b/source/gameengine/Ketsji/Makefile index f12e1c08ed4..d5dee041e3e 100644 --- a/source/gameengine/Ketsji/Makefile +++ b/source/gameengine/Ketsji/Makefile @@ -39,7 +39,7 @@ include nan_compile.mk CCFLAGS += $(LEVEL_1_CPP_WARNINGS) CPPFLAGS += $(OGL_CPPFLAGS) -CPPFLAGS += -I$(NAN_PYTHON)/include/python$(NAN_PYTHON_VERSION) +CPPFLAGS += -I$(NAN_PYTHON)/include/python$(NAN_PYTHON_VERSION) -I../../blender/python CPPFLAGS += -I$(NAN_STRING)/include CPPFLAGS += -I$(NAN_SOUNDSYSTEM)/include CPPFLAGS += -I$(NAN_FUZZICS)/include -I$(NAN_SUMO) -I$(NAN_MOTO)/include diff --git a/source/gameengine/Ketsji/SConscript b/source/gameengine/Ketsji/SConscript index 4789138d1c2..8f8b868a877 100644 --- a/source/gameengine/Ketsji/SConscript +++ b/source/gameengine/Ketsji/SConscript @@ -85,6 +85,7 @@ ketsji_env.Append (CPPPATH = ['.', '#source/blender', '#source/blender/include', '#source/blender/makesdna', + '#source/blender/python', '#source/gameengine/Rasterizer', '#source/gameengine/GameLogic', '#source/gameengine/Expressions', |