make python3.3 compatible, __class__ is no longer in the class methods namespace.
[blender.git] / release / scripts / startup / bl_ui / space_userpref.py
index 24b9098895320c8e624750cc6d677b9d0a62cd0a..6a809aefb9dfbf98df6daae06ebe457258fa8dcf 100644 (file)
@@ -986,7 +986,7 @@ class USERPREF_PT_addons(bpy.types.Panel):
                         split.label(text="Warning:")
                         split.label(text='  ' + info["warning"], icon='ERROR')
 
-                    user_addon = __class__.is_user_addon(mod, user_addon_paths)
+                    user_addon = USERPREF_PT_addons.is_user_addon(mod, user_addon_paths)
                     tot_row = bool(info["wiki_url"]) + bool(info["tracker_url"]) + bool(user_addon)
 
                     if tot_row:
@@ -1136,7 +1136,7 @@ class WM_OT_addon_install(bpy.types.Operator):
 
             if self.overwrite:
                 for f in file_to_extract.namelist():
-                    __class__._module_remove(path_addons, f)
+                    WM_OT_addon_install._module_remove(path_addons, f)
             else:
                 for f in file_to_extract.namelist():
                     path_dest = os.path.join(path_addons, os.path.basename(f))
@@ -1160,7 +1160,7 @@ class WM_OT_addon_install(bpy.types.Operator):
             path_dest = os.path.join(path_addons, os.path.basename(pyfile))
 
             if self.overwrite:
-                __class__._module_remove(path_addons, os.path.basename(pyfile))
+                WM_OT_addon_install._module_remove(path_addons, os.path.basename(pyfile))
             elif os.path.exists(path_dest):
                 self.report({'WARNING'}, "File already installed to %r\n" % path_dest)
                 return {'CANCELLED'}
@@ -1225,7 +1225,7 @@ class WM_OT_addon_remove(bpy.types.Operator):
         return None, False
 
     def execute(self, context):
-        path, isdir = __class__.path_from_addon(self.module)
+        path, isdir = WM_OT_addon_remove.path_from_addon(self.module)
         if path is None:
             self.report('WARNING', "Addon path %r could not be found" % path)
             return {'CANCELLED'}
@@ -1245,7 +1245,7 @@ class WM_OT_addon_remove(bpy.types.Operator):
     # lame confirmation check
     def draw(self, context):
         self.layout.label(text="Remove Addon: %r?" % self.module)
-        path, isdir = __class__.path_from_addon(self.module)
+        path, isdir = WM_OT_addon_remove.path_from_addon(self.module)
         self.layout.label(text="Path: %r" % path)
 
     def invoke(self, context, event):