diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-02-18 01:38:51 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-02-18 01:38:51 +0300 |
commit | a241ce1fd185ea23ba983311589ddd865d4e50d0 (patch) | |
tree | d0e5914c45466f5f0e92ddccf66e4754ea667a73 /release | |
parent | 27e812d69702c43313af8a5521841fd7f4da69f1 (diff) |
patch [#26056] fix for ValueError when no addons are present
by Amorilia (amorilia), fix modified.
Diffstat (limited to 'release')
-rw-r--r-- | release/scripts/ui/space_userpref.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/release/scripts/ui/space_userpref.py b/release/scripts/ui/space_userpref.py index 7ebf47d290a..578571f50e1 100644 --- a/release/scripts/ui/space_userpref.py +++ b/release/scripts/ui/space_userpref.py @@ -976,11 +976,12 @@ class USERPREF_PT_addons(bpy.types.Panel): 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) |