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>2012-06-20 12:49:59 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-06-20 12:49:59 +0400
commitb0b96bd9a1fca5ccdd8e793b5385ba0322c9316f (patch)
treef45b87eadbfcb16e181014d8188174b0cedbee35 /release
parent586f202eacf0ce06a38dc95d7b0300f85d47457c (diff)
add in convenience var 'D = bpy.data' - to the python console, add note for C, D - in initial message.
Diffstat (limited to 'release')
-rw-r--r--release/scripts/modules/console_python.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/release/scripts/modules/console_python.py b/release/scripts/modules/console_python.py
index 4ddde0de17c..b5985d2c851 100644
--- a/release/scripts/modules/console_python.py
+++ b/release/scripts/modules/console_python.py
@@ -96,7 +96,10 @@ def get_console(console_id):
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 @@ def banner(context):
'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