Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2010-08-05 07:25:45 +0400
committerCampbell Barton <ideasman42@gmail.com>2010-08-05 07:25:45 +0400
commita0cece42c646df39c858223b0361b7dfe0d44dd8 (patch)
tree78c8990de78ecf4ebc06b26a953ecf0bb83d91b0 /source/gameengine/Converter/KX_ConvertControllers.cpp
parentdb5a5c131cc9d379c74c1b9afd116d61af87feb7 (diff)
bugfix [#23148] "ImportError: __import__ not found" on changing Render FPS
The BGE was getting the namespace dict directly from __main__ which conflicts with my recent fix to get the pickle module working which to overwrote the __main__ module on script execution. Simple fix is to have the BGE and Blender use the same method of getting namespaces. Renamed CreateGlobalDictionary() to bpy_namespace_dict_new() and moved into bpy_internal_import.c pickle still wont work in the BGE since we make a copy of __main__ namespace but for speed would rather not have to replace the __main__ module many times per second.
Diffstat (limited to 'source/gameengine/Converter/KX_ConvertControllers.cpp')
-rw-r--r--source/gameengine/Converter/KX_ConvertControllers.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/source/gameengine/Converter/KX_ConvertControllers.cpp b/source/gameengine/Converter/KX_ConvertControllers.cpp
index 858db6d76a1..a6b62ecb7b0 100644
--- a/source/gameengine/Converter/KX_ConvertControllers.cpp
+++ b/source/gameengine/Converter/KX_ConvertControllers.cpp
@@ -176,11 +176,11 @@ void BL_ConvertControllers(
/* let the controller print any warnings here when importing */
pyctrl->SetScriptText(STR_String(pycont->module));
pyctrl->SetScriptName(pycont->module); /* will be something like module.func so using it as the name is OK */
- }
- if(pycont->flag & CONT_PY_DEBUG) {
- printf("\nDebuging \"%s\", module for object %s\n\texpect worse performance.\n", pycont->module, blenderobject->id.name+2);
- pyctrl->SetDebug(true);
+ if(pycont->flag & CONT_PY_DEBUG) {
+ printf("\nDebuging \"%s\", module for object %s\n\texpect worse performance.\n", pycont->module, blenderobject->id.name+2);
+ pyctrl->SetDebug(true);
+ }
}
#endif // DISABLE_PYTHON