diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-02-11 04:12:01 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-02-11 04:12:01 +0300 |
commit | 2f4f046b6f16d4429b6d74270945cbb87cca6c52 (patch) | |
tree | f9ee0ba654d21ba985b6c9e7b3ab8969e082aa17 /release/scripts/modules/bpy_types.py | |
parent | b1cdf5c34478204fbec5272b97754abc548da195 (diff) |
UI functions added to existing UI classes (operators adding their own menus for eg),
would stop the entire menu from drawing if they raised an exception.
now print the exception and continue.
Also added a verbose argument for bpy.utils.(un)register_module() to help test whats being registered.
Diffstat (limited to 'release/scripts/modules/bpy_types.py')
-rw-r--r-- | release/scripts/modules/bpy_types.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/release/scripts/modules/bpy_types.py b/release/scripts/modules/bpy_types.py index fcc3166b066..4eb712a65cc 100644 --- a/release/scripts/modules/bpy_types.py +++ b/release/scripts/modules/bpy_types.py @@ -657,7 +657,12 @@ class _GenericUI: def draw_ls(self, context): for func in draw_ls._draw_funcs: - func(self, context) + # so bad menu functions dont stop the entire menu from drawing. + try: + func(self, context) + except: + import traceback + traceback.print_exc() draw_funcs = draw_ls._draw_funcs = [cls.draw] cls.draw = draw_ls |