forgot to update addons with recent update to bpy.types
authorCampbell Barton <ideasman42@gmail.com>
Tue, 3 Aug 2010 06:36:07 +0000 (06:36 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Tue, 3 Aug 2010 06:36:07 +0000 (06:36 +0000)
release/scripts/ui/space_userpref.py

index 30d84577b3dc9a3512d3309da468c9b02615c366..9d20bc70657b1813bf0456509ffa5f26b09d9b4c 100644 (file)
@@ -1103,7 +1103,7 @@ class WM_OT_addon_enable(bpy.types.Operator):
 
         try:
             mod = __import__(module_name)
-            bpy.utils._load_module(module_name)
+            _bpy_types._register_module(module_name)
             mod.register()
         except:
             import traceback
@@ -1132,14 +1132,15 @@ class WM_OT_addon_disable(bpy.types.Operator):
     module = StringProperty(name="Module", description="Module name of the addon to disable")
 
     def execute(self, context):
-        import traceback
+        import bpy_types as _bpy_types
         module_name = self.properties.module
 
         try:
             mod = __import__(module_name)
-            bpy.utils._unload_module(module_name, free=False) # dont free because we may want to enable again.
+            _bpy_types._unregister_module(module_name, free=False) # dont free because we may want to enable again.
             mod.unregister()
         except:
+            import traceback
             traceback.print_exc()
 
         addons = context.user_preferences.addons