diff options
author | Campbell Barton <ideasman42@gmail.com> | 2010-08-03 10:36:07 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2010-08-03 10:36:07 +0400 |
commit | 6d0769bc4216e79939c06888a8109796dc4824e5 (patch) | |
tree | 043e9eaa6bc746c14ce49780c539fd55293fb023 /release | |
parent | e0f0a425fa06a98a1e86ab378472cc5c3d21ab5d (diff) |
forgot to update addons with recent update to bpy.types
Diffstat (limited to 'release')
-rw-r--r-- | release/scripts/ui/space_userpref.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/release/scripts/ui/space_userpref.py b/release/scripts/ui/space_userpref.py index 30d84577b3d..9d20bc70657 100644 --- a/release/scripts/ui/space_userpref.py +++ b/release/scripts/ui/space_userpref.py @@ -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 |