Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'release/scripts/startup/bl_ui/space_userpref.py')
-rw-r--r--release/scripts/startup/bl_ui/space_userpref.py18
1 files changed, 11 insertions, 7 deletions
diff --git a/release/scripts/startup/bl_ui/space_userpref.py b/release/scripts/startup/bl_ui/space_userpref.py
index 87baea9cdd8..ce4a6fb835e 100644
--- a/release/scripts/startup/bl_ui/space_userpref.py
+++ b/release/scripts/startup/bl_ui/space_userpref.py
@@ -1744,6 +1744,7 @@ class USERPREF_PT_addons(Panel):
row.operator("preferences.addon_refresh", icon='FILE_REFRESH', text="Refresh")
row = layout.row()
+ row.prop(context.preferences.view, "show_addons_enabled_only")
row.prop(context.window_manager, "addon_filter", text="")
row.prop(context.window_manager, "addon_search", text="", icon='VIEWZOOM')
@@ -1770,6 +1771,7 @@ class USERPREF_PT_addons(Panel):
"(see console for details)",
)
+ show_enabled_only = context.preferences.view.show_addons_enabled_only
filter = context.window_manager.addon_filter
search = context.window_manager.addon_search.lower()
support = context.window_manager.addon_support
@@ -1786,13 +1788,15 @@ class USERPREF_PT_addons(Panel):
continue
# check if addon should be visible with current filters
- if (
- (filter == "All") or
- (filter == info["category"]) or
- (filter == "Enabled" and is_enabled) or
- (filter == "Disabled" and not is_enabled) or
- (filter == "User" and (mod.__file__.startswith(addon_user_dirs)))
- ):
+ is_visible = (
+ (filter == "All") or
+ (filter == info["category"]) or
+ (filter == "User" and (mod.__file__.startswith(addon_user_dirs)))
+ )
+ if show_enabled_only:
+ is_visible = is_visible and is_enabled
+
+ if is_visible:
if search and search not in info["name"].lower():
if info["author"]:
if search not in info["author"].lower():