diff options
author | Campbell Barton <ideasman42@gmail.com> | 2010-08-06 16:46:22 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2010-08-06 16:46:22 +0400 |
commit | a8129f6b41df2f9916df63bc8477823317c38c44 (patch) | |
tree | 3f28704c377ccc71d8facad13d0378a23cb8732e /source/gameengine/Ketsji | |
parent | 14fe11bd8118fcd4f5605305cd23cb269d38fc75 (diff) |
fix for fake python bge.* module, this is really nasty temp py code! (not a good example)
Diffstat (limited to 'source/gameengine/Ketsji')
-rw-r--r-- | source/gameengine/Ketsji/KX_PythonInit.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/gameengine/Ketsji/KX_PythonInit.cpp b/source/gameengine/Ketsji/KX_PythonInit.cpp index 2e490c24217..3e63aa61d82 100644 --- a/source/gameengine/Ketsji/KX_PythonInit.cpp +++ b/source/gameengine/Ketsji/KX_PythonInit.cpp @@ -1990,7 +1990,7 @@ void setupGamePython(KX_KetsjiEngine* ketsjiengine, KX_Scene* startscene, Main * initVideoTexture(); /* could be done a lot more nicely, but for now a quick way to get bge.* working */ - PyRun_SimpleString("__import__('sys').modules['bge']=[mod for mod in (type(__builtins__)('bge'), ) if mod.__dict__.update({'logic':__import__('GameLogic'), 'render':__import__('Rasterizer'), 'events':__import__('GameKeys'), 'constraints':__import__('PhysicsConstraints'), 'types':__import__('GameTypes')}) is None][0]"); + PyRun_SimpleString("sys = __import__('sys');mod = sys.modules['bge'] = type(sys)('bge');mod.__dict__.update({'logic':__import__('GameLogic'), 'render':__import__('Rasterizer'), 'events':__import__('GameKeys'), 'constraints':__import__('PhysicsConstraints'), 'types':__import__('GameTypes')})"); } static struct PyModuleDef Rasterizer_module_def = { |