Cleanup: Python context access

Avoid access from bpy when it's already declared.
This commit is contained in:
2018-02-07 15:47:54 +11:00
parent 1e4b612d6a
commit 6981861fcf
5 changed files with 12 additions and 10 deletions

View File

@@ -2223,7 +2223,7 @@ class WM_OT_addon_userpref_show(Operator):
info = addon_utils.module_bl_info(mod)
info["show_expanded"] = True
bpy.context.user_preferences.active_section = 'ADDONS'
context.user_preferences.active_section = 'ADDONS'
context.window_manager.addon_filter = 'All'
context.window_manager.addon_search = info["name"]
bpy.ops.screen.userpref_show('INVOKE_DEFAULT')