[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [48108] trunk/blender/release/scripts/ modules/console_python.py: add in convenience var 'D = bpy.data' - to the python console, add note for C, D - in initial message.

Campbell Barton ideasman42 at gmail.com
Wed Jun 20 10:50:08 CEST 2012


Revision: 48108
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=48108
Author:   campbellbarton
Date:     2012-06-20 08:49:59 +0000 (Wed, 20 Jun 2012)
Log Message:
-----------
add in convenience var 'D = bpy.data' - to the python console, add note for C, D - in initial message.

Modified Paths:
--------------
    trunk/blender/release/scripts/modules/console_python.py

Modified: trunk/blender/release/scripts/modules/console_python.py
===================================================================
--- trunk/blender/release/scripts/modules/console_python.py	2012-06-20 08:11:59 UTC (rev 48107)
+++ trunk/blender/release/scripts/modules/console_python.py	2012-06-20 08:49:59 UTC (rev 48108)
@@ -96,7 +96,10 @@
 
         namespace["__builtins__"] = sys.modules["builtins"]
         namespace["bpy"] = bpy
+
+        # weak! - but highly convenient
         namespace["C"] = bpy.context
+        namespace["D"] = bpy.data
 
         replace_help(namespace)
 
@@ -305,6 +308,7 @@
                    'OUTPUT')
     add_scrollback("Convenience Imports: from mathutils import *; "
                    "from math import *", 'OUTPUT')
+    add_scrollback("Convenience Variables: C = bpy.context, D = bpy.data", 'OUTPUT')
     add_scrollback("", 'OUTPUT')
     sc.prompt = PROMPT
 




More information about the Bf-blender-cvs mailing list