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:
Campbell Barton
2009-04-05 19:37:13 +00:00
parent 3dacfbb231
commit b4e4ccf92d
9 changed files with 333 additions and 188 deletions

View File

@@ -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);