python console namespace fix, merging namespace dicts was no good, since it pulled in private vars. use normal import command.

This commit is contained in:
Campbell Barton 2011-02-23 01:20:40 +00:00
parent 3f96359d5a
commit 8378aa74fa

View File

@ -83,11 +83,11 @@ def get_console(console_id):
namespace["bpy"] = bpy
namespace["C"] = bpy.context
namespace.update(__import__("mathutils").__dict__) # from mathutils import *
namespace.update(__import__("math").__dict__) # from math import *
console = InteractiveConsole(locals=namespace, filename="<blender_console>")
console.push("from mathutils import *")
console.push("from math import *")
if _BPY_MAIN_OWN:
console._bpy_main_mod = bpy_main_mod