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:
authorCampbell Barton <ideasman42@gmail.com>2020-10-16 06:00:15 +0300
committerCampbell Barton <ideasman42@gmail.com>2020-10-16 06:00:15 +0300
commit507e7bcbdb944f424bbc017b1c4f56dd0b35a4f0 (patch)
tree27aacc98672bf63711e5075794ed615206593f11 /release/scripts/startup/bl_ui/space_userpref.py
parentfa0ceb4959cb5f943e73e06fcbb47ce18cea80e7 (diff)
Cleanup: assign variables for re-used context members
Diffstat (limited to 'release/scripts/startup/bl_ui/space_userpref.py')
-rw-r--r--release/scripts/startup/bl_ui/space_userpref.py17
1 files changed, 9 insertions, 8 deletions
diff --git a/release/scripts/startup/bl_ui/space_userpref.py b/release/scripts/startup/bl_ui/space_userpref.py
index 604ec302b60..f2934c8c5e8 100644
--- a/release/scripts/startup/bl_ui/space_userpref.py
+++ b/release/scripts/startup/bl_ui/space_userpref.py
@@ -1759,6 +1759,7 @@ class USERPREF_PT_addons(AddOnPanel, Panel):
layout = self.layout
+ wm = context.window_manager
prefs = context.preferences
used_ext = {ext.module for ext in prefs.addons}
@@ -1784,16 +1785,16 @@ class USERPREF_PT_addons(AddOnPanel, Panel):
split = layout.split(factor=0.6)
row = split.row()
- row.prop(context.window_manager, "addon_support", expand=True)
+ row.prop(wm, "addon_support", expand=True)
row = split.row(align=True)
row.operator("preferences.addon_install", icon='IMPORT', text="Install...")
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')
+ row.prop(prefs.view, "show_addons_enabled_only")
+ row.prop(wm, "addon_filter", text="")
+ row.prop(wm, "addon_search", text="", icon='VIEWZOOM')
col = layout.column()
@@ -1818,10 +1819,10 @@ class USERPREF_PT_addons(AddOnPanel, 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
+ show_enabled_only = prefs.view.show_addons_enabled_only
+ filter = wm.addon_filter
+ search = wm.addon_search.lower()
+ support = wm.addon_support
# initialized on demand
user_addon_paths = []