diff options
author | Campbell Barton <ideasman42@gmail.com> | 2015-11-16 01:39:06 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2015-11-16 01:40:56 +0300 |
commit | dbc29cb147179f9d0aeb11e7c14e41601a0bd375 (patch) | |
tree | 63514bf0bfc31aefab709a7f58a981f7053fd307 /release | |
parent | 603b867588f7940378950fefaffc9dfe0c67c2c7 (diff) |
Cleanup: remove unused profiling from bpy
Diffstat (limited to 'release')
-rw-r--r-- | release/scripts/modules/bpy/__init__.py | 26 |
1 files changed, 10 insertions, 16 deletions
diff --git a/release/scripts/modules/bpy/__init__.py b/release/scripts/modules/bpy/__init__.py index b0d2233b380..f012c1317d4 100644 --- a/release/scripts/modules/bpy/__init__.py +++ b/release/scripts/modules/bpy/__init__.py @@ -56,22 +56,16 @@ def main(): # fake module to allow: # from bpy.types import Panel - sys.modules["bpy.app"] = app - sys.modules["bpy.app.handlers"] = app.handlers - sys.modules["bpy.app.translations"] = app.translations - sys.modules["bpy.types"] = types - - #~ if "-d" in sys.argv: # Enable this to measure start up speed - if 0: - import cProfile - cProfile.run("import bpy; bpy.utils.load_scripts()", "blender.prof") - - import pstats - p = pstats.Stats("blender.prof") - p.sort_stats("cumulative").print_stats(100) - - else: - utils.load_scripts() + sys.modules.update({ + "bpy.app": app, + "bpy.app.handlers": app.handlers, + "bpy.app.translations": app.translations, + "bpy.types": types, + }) + + # Initializes Python classes. + # (good place to run a profiler or trace). + utils.load_scripts() main() |