diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-12-21 04:47:44 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-12-21 04:55:02 +0300 |
commit | 63fcbfc3a7325d79b9e916457d64c302ddfeadfa (patch) | |
tree | f194e16441c06af61a2c34ef6dc119ac2c98f9a3 /release/scripts/modules/addon_utils.py | |
parent | 9dde3e42a7c5bc5f7896fd30e2b3a5859d6857bf (diff) |
RNA: naming, user-preferences -> preferences
Diffstat (limited to 'release/scripts/modules/addon_utils.py')
-rw-r--r-- | release/scripts/modules/addon_utils.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/release/scripts/modules/addon_utils.py b/release/scripts/modules/addon_utils.py index c0d45822503..ef5ec77a6c5 100644 --- a/release/scripts/modules/addon_utils.py +++ b/release/scripts/modules/addon_utils.py @@ -30,7 +30,7 @@ __all__ = ( ) import bpy as _bpy -_user_preferences = _bpy.context.user_preferences +_preferences = _bpy.context.preferences error_encoding = False # (name, file, path) @@ -43,7 +43,7 @@ def _initialize(): path_list = paths() for path in path_list: _bpy.utils._sys_path_ensure(path) - for addon in _user_preferences.addons: + for addon in _preferences.addons: enable(addon.module) @@ -231,7 +231,7 @@ def check(module_name): :rtype: tuple of booleans """ import sys - loaded_default = module_name in _user_preferences.addons + loaded_default = module_name in _preferences.addons mod = sys.modules.get(module_name) loaded_state = ( @@ -258,7 +258,7 @@ def check(module_name): def _addon_ensure(module_name): - addons = _user_preferences.addons + addons = _preferences.addons addon = addons.get(module_name) if not addon: addon = addons.new() @@ -266,7 +266,7 @@ def _addon_ensure(module_name): def _addon_remove(module_name): - addons = _user_preferences.addons + addons = _preferences.addons while module_name in addons: addon = addons.get(module_name) |