[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [34944] trunk/blender/release/scripts/ui/ space_userpref.py: patch [#26056] fix for ValueError when no addons are present

Campbell Barton ideasman42 at gmail.com
Thu Feb 17 23:38:52 CET 2011


Revision: 34944
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=34944
Author:   campbellbarton
Date:     2011-02-17 22:38:51 +0000 (Thu, 17 Feb 2011)
Log Message:
-----------
patch [#26056] fix for ValueError when no addons are present
by Amorilia (amorilia), fix modified.

Modified Paths:
--------------
    trunk/blender/release/scripts/ui/space_userpref.py

Modified: trunk/blender/release/scripts/ui/space_userpref.py
===================================================================
--- trunk/blender/release/scripts/ui/space_userpref.py	2011-02-17 22:34:41 UTC (rev 34943)
+++ trunk/blender/release/scripts/ui/space_userpref.py	2011-02-17 22:38:51 UTC (rev 34944)
@@ -976,11 +976,12 @@
             bpy.types.WindowManager.addon_search = bpy.props.StringProperty(name="Search", description="Search within the selected filter")
             USERPREF_PT_addons._addons_cats = cats
 
-        sups = {info["support"] for mod, info in addons}
+        sups_default = {'OFFICIAL', 'COMMUNITY'}
+        sups = sups_default | {info["support"] for mod, info in addons}
         sups.discard("")
 
         if USERPREF_PT_addons._addons_sups != sups:
-            bpy.types.WindowManager.addon_support = bpy.props.EnumProperty(items=[(sup, sup.title(), "") for  sup in reversed(sorted(sups))], name="Support", description="Display support level", default={'OFFICIAL', 'COMMUNITY'}, options={'ENUM_FLAG'})
+            bpy.types.WindowManager.addon_support = bpy.props.EnumProperty(items=[(sup, sup.title(), "") for  sup in reversed(sorted(sups))], name="Support", description="Display support level", default=sups_default, options={'ENUM_FLAG'})
             USERPREF_PT_addons._addons_sups = sups
 
         split = layout.split(percentage=0.2)




More information about the Bf-blender-cvs mailing list