[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [35094] trunk/blender/release/scripts/op/ console_python.py: python console namespace fix, merging namespace dicts was no good, since it pulled in private vars.
Campbell Barton
ideasman42 at gmail.com
Wed Feb 23 02:20:41 CET 2011
Revision: 35094
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=35094
Author: campbellbarton
Date: 2011-02-23 01:20:40 +0000 (Wed, 23 Feb 2011)
Log Message:
-----------
python console namespace fix, merging namespace dicts was no good, since it pulled in private vars. use normal import command.
Modified Paths:
--------------
trunk/blender/release/scripts/op/console_python.py
Modified: trunk/blender/release/scripts/op/console_python.py
===================================================================
--- trunk/blender/release/scripts/op/console_python.py 2011-02-23 00:01:50 UTC (rev 35093)
+++ trunk/blender/release/scripts/op/console_python.py 2011-02-23 01:20:40 UTC (rev 35094)
@@ -83,11 +83,11 @@
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
More information about the Bf-blender-cvs
mailing list