give better feedback when a class doesnt register correctly.
authorCampbell Barton <ideasman42@gmail.com>
Mon, 2 Aug 2010 13:41:59 +0000 (13:41 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Mon, 2 Aug 2010 13:41:59 +0000 (13:41 +0000)
release/scripts/modules/bpy_types.py

index 9d6d307502cc36991d5ab43d5e77d3138c360414..31acb3d7223533abc8db0d1d93eab60c4b6b68f1 100644 (file)
@@ -567,7 +567,12 @@ def _unload_module(module, free=True):
 
 def _load_module(module, force=False):
     for t in TypeMap.get(module, ()):
-        bpy_types.register(t)
+        try:
+            bpy_types.register(t)
+        except:
+            import traceback
+            print("bpy.utils._load_module(): Module '%s' failed to register calss '%s.%s'" % (module, t.__module__, t.__name__))
+            traceback.print_exc()
 
 _bpy._load_module = _load_module
 _bpy._unload_module = _unload_module