From 0457976a872000993202763abe7503c76b461122 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 21 Dec 2018 12:56:42 +1100 Subject: Rename user_preferences -> preferences --- materials_utils/__init__.py | 2 +- materials_utils/warning_messages_utils.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'materials_utils') 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(): -- cgit v1.2.3