[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [31628] trunk/blender/source/gameengine/ Ketsji/KX_PythonInit.cpp: After talking with Campbell, we came to the conclusion that it was probably best not to auto-import modules .

Mitchell Stokes mogurijin at gmail.com
Sat Aug 28 10:00:37 CEST 2010


Revision: 31628
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=31628
Author:   moguri
Date:     2010-08-28 10:00:37 +0200 (Sat, 28 Aug 2010)

Log Message:
-----------
After talking with Campbell, we came to the conclusion that it was probably best not to auto-import modules. To this end, I'm removing the automatic import of the bge module.

Modified Paths:
--------------
    trunk/blender/source/gameengine/Ketsji/KX_PythonInit.cpp

Modified: trunk/blender/source/gameengine/Ketsji/KX_PythonInit.cpp
===================================================================
--- trunk/blender/source/gameengine/Ketsji/KX_PythonInit.cpp	2010-08-28 07:07:02 UTC (rev 31627)
+++ trunk/blender/source/gameengine/Ketsji/KX_PythonInit.cpp	2010-08-28 08:00:37 UTC (rev 31628)
@@ -1997,7 +1997,7 @@
 	initVideoTexture();
 
 	/* could be done a lot more nicely, but for now a quick way to get bge.* working */
-	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')});import bge");
+	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 = {





More information about the Bf-blender-cvs mailing list