diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-12-21 04:56:42 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-12-21 04:56:42 +0300 |
commit | 0457976a872000993202763abe7503c76b461122 (patch) | |
tree | a4998fbbb768c43eb00b55ba311d497fd74eadcd /materials_utils | |
parent | 04f6388deeddb32d53c9b6ab961ef36e45d48486 (diff) |
Rename user_preferences -> preferences
Diffstat (limited to 'materials_utils')
-rw-r--r-- | materials_utils/__init__.py | 2 | ||||
-rw-r--r-- | materials_utils/warning_messages_utils.py | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/materials_utils/__init__.py b/materials_utils/__init__.py index 94975e6b..32324ad8 100644 --- a/materials_utils/__init__.py +++ b/materials_utils/__init__.py @@ -2594,7 +2594,7 @@ def use_separator(operator, context): # preferences utilities def return_preferences(): - return bpy.context.user_preferences.addons[__name__].preferences + return bpy.context.preferences.addons[__name__].preferences def use_remove_mat_all(): diff --git a/materials_utils/warning_messages_utils.py b/materials_utils/warning_messages_utils.py index 00f4a719..435bcdfd 100644 --- a/materials_utils/warning_messages_utils.py +++ b/materials_utils/warning_messages_utils.py @@ -25,7 +25,7 @@ def warning_messages(operator=None, warn='DEFAULT', object_name="", is_mat=None, # override - important messages that should be enabled, no matter the setting # pass the show_warnings bool to enable/disable them - addon = bpy.context.user_preferences.addons[MAT_SPEC_NAME] + addon = bpy.context.preferences.addons[MAT_SPEC_NAME] get_warn = addon.preferences.show_warnings if addon else False show_warn = get_warn if override is False else override @@ -160,7 +160,7 @@ def collect_report(collection="", is_start=False, is_final=False): def c_is_cycles_addon_enabled(): # checks if Cycles is enabled thanks to ideasman42 - return ('cycles' in bpy.context.user_preferences.addons.keys()) + return ('cycles' in bpy.context.preferences.addons.keys()) def c_data_has_materials(): |