forked from bartvdbraak/blender
Added blender python module to game engine.
Updated Scons & Makefile
This commit is contained in:
parent
594040f769
commit
8e5fd5bba3
@ -858,7 +858,6 @@ libraries = (['blender_creator',
|
||||
'blender_imbuf',
|
||||
'blender_avi',
|
||||
'blender_blenlib',
|
||||
'blender_python',
|
||||
'blender_makesdna',
|
||||
'blender_kernel',
|
||||
'blender_BSP',
|
||||
@ -910,7 +909,7 @@ if user_options_dict['BUILD_GAMEENGINE'] == 1:
|
||||
'PHY_Physics'])
|
||||
link_env.Append (LIBS=user_options_dict['ODE_LIBRARY'])
|
||||
link_env.Append (LIBPATH=user_options_dict['ODE_LIBPATH'])
|
||||
|
||||
link_env.Append (LIBS=['blender_python'])
|
||||
link_env.Append (LIBS=user_options_dict['PYTHON_LIBRARY'])
|
||||
link_env.Append (LIBPATH=user_options_dict['PYTHON_LIBPATH'])
|
||||
link_env.Append (LINKFLAGS=user_options_dict['PYTHON_LINKFLAGS'])
|
||||
|
@ -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();
|
||||
}
|
||||
|
||||
|
||||
|
@ -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
|
||||
|
@ -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',
|
||||
|
Loading…
Reference in New Issue
Block a user