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-01-28 00:33:39 +0300
committerCampbell Barton <ideasman42@gmail.com>2010-01-28 00:33:39 +0300
commit478dc000b3d65af48422154769641a3ecbe071d8 (patch)
treee727f48bb44ffbf518e33fab7726e14e9fb6a8c9 /release
parentfb7878a2c29338ee706b5add6a9a95b665616725 (diff)
* Mathutils attributes documented - http://www.blender.org/documentation/250PythonDoc/Mathutils.html
* Vector.difference() needed normalized vectors * bpy.DEUBG -> bpy.app.debug
Diffstat (limited to 'release')
-rw-r--r--release/scripts/modules/bpy/__init__.py6
-rw-r--r--release/scripts/modules/bpy/app.py6
2 files changed, 8 insertions, 4 deletions
diff --git a/release/scripts/modules/bpy/__init__.py b/release/scripts/modules/bpy/__init__.py
index a6bb2921a34..1b248658afd 100644
--- a/release/scripts/modules/bpy/__init__.py
+++ b/release/scripts/modules/bpy/__init__.py
@@ -35,8 +35,6 @@ from bpy import ops as _ops_module
ops = _ops_module.ops_fake_module
import sys as _sys
-DEBUG = ("-d" in _sys.argv)
-
def load_scripts(reload_scripts=False):
import os
@@ -58,7 +56,7 @@ def load_scripts(reload_scripts=False):
try:
t = time.time()
ret = __import__(module_name)
- if DEBUG:
+ if app.debug:
print("time %s %.4f" % (module_name, time.time() - t))
return ret
except:
@@ -104,7 +102,7 @@ def load_scripts(reload_scripts=False):
print("Reloading:", mod)
test_reload(mod)
- if DEBUG:
+ if app.debug:
print("Time %.4f" % (time.time() - t_main))
diff --git a/release/scripts/modules/bpy/app.py b/release/scripts/modules/bpy/app.py
index 8fc92175d0e..7b4b5e03ab7 100644
--- a/release/scripts/modules/bpy/app.py
+++ b/release/scripts/modules/bpy/app.py
@@ -38,10 +38,16 @@ This module contains application values that remain unchanged during runtime.
The location of blenders executable, useful for utilities that spawn new instances.
+.. data:: debug
+
+ Boolean, set when blender is running in debug mode (started with -d)
+
"""
# constants
import _bpy
+import sys as _sys
version = _bpy._VERSION
version_string = _bpy._VERSION_STR
home = _bpy._HOME
binary_path = _bpy._BINPATH
+debug = ("-d" in _sys.argv)