BGE PyAPI can now import text (within the blend-file)
Previously this only worked with the Blender API. - bpy_internal_import small C file that Blender scripting and the game engine use. - Tested with blender, blenderplayer, loading files - Needed to use a hack to override the Main struct since the game engine doesn't set G.main - when the sandbox is set, only internal scripts can be imported.
This commit is contained in:
@@ -681,7 +681,7 @@ bool GPG_Application::startEngine(void)
|
||||
|
||||
|
||||
// some python things
|
||||
PyObject* dictionaryobject = initGamePlayerPythonScripting("Ketsji", psl_Lowest);
|
||||
PyObject* dictionaryobject = initGamePlayerPythonScripting("Ketsji", psl_Lowest, m_maggie);
|
||||
m_ketsjiengine->SetPythonDictionary(dictionaryobject);
|
||||
initRasterizer(m_rasterizer, m_canvas);
|
||||
PyObject *gameLogic = initGameLogic(m_ketsjiengine, startscene);
|
||||
|
Reference in New Issue
Block a user