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>2018-12-21 04:47:44 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-12-21 04:55:02 +0300
commit63fcbfc3a7325d79b9e916457d64c302ddfeadfa (patch)
treef194e16441c06af61a2c34ef6dc119ac2c98f9a3 /release/scripts/startup
parent9dde3e42a7c5bc5f7896fd30e2b3a5859d6857bf (diff)
RNA: naming, user-preferences -> preferences
Diffstat (limited to 'release/scripts/startup')
-rw-r--r--release/scripts/startup/bl_operators/image.py4
-rw-r--r--release/scripts/startup/bl_operators/screen_play_rendered_anim.py2
-rw-r--r--release/scripts/startup/bl_operators/wm.py40
-rw-r--r--release/scripts/startup/bl_ui/properties_scene.py4
-rw-r--r--release/scripts/startup/bl_ui/properties_workspace.py4
-rw-r--r--release/scripts/startup/bl_ui/space_filebrowser.py4
-rw-r--r--release/scripts/startup/bl_ui/space_time.py6
-rw-r--r--release/scripts/startup/bl_ui/space_toolsystem_common.py2
-rw-r--r--release/scripts/startup/bl_ui/space_toolsystem_toolbar.py4
-rw-r--r--release/scripts/startup/bl_ui/space_topbar.py6
-rw-r--r--release/scripts/startup/bl_ui/space_userpref.py126
-rw-r--r--release/scripts/startup/bl_ui/space_view3d.py6
12 files changed, 104 insertions, 104 deletions
diff --git a/release/scripts/startup/bl_operators/image.py b/release/scripts/startup/bl_operators/image.py
index 8fbc8182ad8..a3de2811750 100644
--- a/release/scripts/startup/bl_operators/image.py
+++ b/release/scripts/startup/bl_operators/image.py
@@ -37,7 +37,7 @@ class EditExternally(Operator):
def _editor_guess(context):
import sys
- image_editor = context.user_preferences.filepaths.image_editor
+ image_editor = context.preferences.filepaths.image_editor
# use image editor in the preferences when available.
if not image_editor:
@@ -189,7 +189,7 @@ class ProjectEdit(Operator):
if bpy.data.is_saved:
filepath = "//" + filepath
else:
- tmpdir = context.user_preferences.filepaths.temporary_directory
+ tmpdir = context.preferences.filepaths.temporary_directory
filepath = os.path.join(tmpdir, "project_edit")
obj = context.object
diff --git a/release/scripts/startup/bl_operators/screen_play_rendered_anim.py b/release/scripts/startup/bl_operators/screen_play_rendered_anim.py
index 27c8487eaa9..3a7199120a6 100644
--- a/release/scripts/startup/bl_operators/screen_play_rendered_anim.py
+++ b/release/scripts/startup/bl_operators/screen_play_rendered_anim.py
@@ -79,7 +79,7 @@ class PlayRenderedAnim(Operator):
scene = context.scene
rd = scene.render
- prefs = context.user_preferences
+ prefs = context.preferences
fps_final = rd.fps / rd.fps_base
preset = prefs.filepaths.animation_player_preset
diff --git a/release/scripts/startup/bl_operators/wm.py b/release/scripts/startup/bl_operators/wm.py
index 4461812cc2e..81814f4ffcf 100644
--- a/release/scripts/startup/bl_operators/wm.py
+++ b/release/scripts/startup/bl_operators/wm.py
@@ -2015,7 +2015,7 @@ class WM_OT_addon_install(Operator):
# don't use bpy.utils.script_paths("addons") because we may not be able to write to it.
path_addons = bpy.utils.user_resource('SCRIPTS', "addons", create=True)
else:
- path_addons = context.user_preferences.filepaths.script_directory
+ path_addons = context.preferences.filepaths.script_directory
if path_addons:
path_addons = os.path.join(path_addons, "addons")
@@ -2206,7 +2206,7 @@ class WM_OT_addon_expand(Operator):
class WM_OT_addon_userpref_show(Operator):
- """Show add-on user preferences"""
+ """Show add-on preferences"""
bl_idname = "wm.addon_userpref_show"
bl_label = ""
bl_options = {'INTERNAL'}
@@ -2227,7 +2227,7 @@ class WM_OT_addon_userpref_show(Operator):
info = addon_utils.module_bl_info(mod)
info["show_expanded"] = True
- context.user_preferences.active_section = 'ADDONS'
+ context.preferences.active_section = 'ADDONS'
context.window_manager.addon_filter = 'All'
context.window_manager.addon_search = info["name"]
bpy.ops.screen.userpref_show('INVOKE_DEFAULT')
@@ -2454,7 +2454,7 @@ class WM_OT_studiolight_install(Operator):
import traceback
import shutil
import pathlib
- userpref = context.user_preferences
+ prefs = context.preferences
filepaths = [pathlib.Path(self.directory, e.name) for e in self.files]
path_studiolights = bpy.utils.user_resource('DATAFILES')
@@ -2472,7 +2472,7 @@ class WM_OT_studiolight_install(Operator):
for filepath in filepaths:
shutil.copy(str(filepath), str(path_studiolights))
- userpref.studio_lights.load(str(path_studiolights.joinpath(filepath.name)), self.type)
+ prefs.studio_lights.load(str(path_studiolights.joinpath(filepath.name)), self.type)
# print message
msg = (
@@ -2503,7 +2503,7 @@ class WM_OT_studiolight_new(Operator):
def execute(self, context):
import pathlib
- userpref = context.user_preferences
+ prefs = context.preferences
wm = context.window_manager
path_studiolights = bpy.utils.user_resource('DATAFILES')
@@ -2525,11 +2525,11 @@ class WM_OT_studiolight_new(Operator):
self.ask_overide = True
return wm.invoke_props_dialog(self, width=600)
else:
- for studio_light in userpref.studio_lights:
+ for studio_light in prefs.studio_lights:
if studio_light.name == self.filename + ".sl":
bpy.ops.wm.studiolight_uninstall(index=studio_light.index)
- userpref.studio_lights.new(path=finalpath)
+ prefs.studio_lights.new(path=finalpath)
# print message
msg = (
@@ -2564,8 +2564,8 @@ class WM_OT_studiolight_uninstall(Operator):
def execute(self, context):
import pathlib
- userpref = context.user_preferences
- for studio_light in userpref.studio_lights:
+ prefs = context.preferences
+ for studio_light in prefs.studio_lights:
if studio_light.index == self.index:
if studio_light.path:
self._remove_path(pathlib.Path(studio_light.path))
@@ -2573,7 +2573,7 @@ class WM_OT_studiolight_uninstall(Operator):
self._remove_path(pathlib.Path(studio_light.path_irr_cache))
if studio_light.path_sh_cache:
self._remove_path(pathlib.Path(studio_light.path_sh_cache))
- userpref.studio_lights.remove(studio_light)
+ prefs.studio_lights.remove(studio_light)
return {'FINISHED'}
return {'CANCELLED'}
@@ -2585,9 +2585,9 @@ class WM_OT_studiolight_copy_settings(Operator):
index: bpy.props.IntProperty()
def execute(self, context):
- userpref = context.user_preferences
- system = userpref.system
- for studio_light in userpref.studio_lights:
+ prefs = context.preferences
+ system = prefs.system
+ for studio_light in prefs.studio_lights:
if studio_light.index == self.index:
system.light_ambient = studio_light.light_ambient
for sys_light, light in zip(system.solid_lights, studio_light.solid_lights):
@@ -2601,13 +2601,13 @@ class WM_OT_studiolight_copy_settings(Operator):
class WM_OT_studiolight_userpref_show(Operator):
- """Show light user preferences"""
+ """Show light preferences"""
bl_idname = "wm.studiolight_userpref_show"
bl_label = ""
bl_options = {'INTERNAL'}
def execute(self, context):
- context.user_preferences.active_section = 'LIGHTS'
+ context.preferences.active_section = 'LIGHTS'
bpy.ops.screen.userpref_show('INVOKE_DEFAULT')
return {'FINISHED'}
@@ -2617,7 +2617,7 @@ class WM_MT_splash(Menu):
def draw_setup(self, context):
wm = context.window_manager
- # userpref = context.user_preferences
+ # prefs = context.preferences
layout = self.layout
@@ -2678,8 +2678,8 @@ class WM_MT_splash(Menu):
#row = sub.row()
#row.alignment = 'RIGHT'
# row.label(text="Language:")
- #userpref = context.user_preferences
- #sub.prop(userpref.system, "language", text="")
+ #prefs = context.preferences
+ #sub.prop(prefs.system, "language", text="")
# Keep height constant
if not has_select_mouse:
@@ -2705,7 +2705,7 @@ class WM_MT_splash(Menu):
layout.separator()
def draw(self, context):
- # Draw setup screen if no user preferences have been saved yet.
+ # Draw setup screen if no preferences have been saved yet.
import os
user_path = bpy.utils.resource_path('USER')
diff --git a/release/scripts/startup/bl_ui/properties_scene.py b/release/scripts/startup/bl_ui/properties_scene.py
index 32524ec092c..49d0b4075a1 100644
--- a/release/scripts/startup/bl_ui/properties_scene.py
+++ b/release/scripts/startup/bl_ui/properties_scene.py
@@ -129,7 +129,7 @@ class SceneKeyingSetsPanel:
owner = ks
propname = prop
else:
- owner = context.user_preferences.edit
+ owner = context.preferences.edit
if userpref_fallback:
propname = userpref_fallback
else:
@@ -137,7 +137,7 @@ class SceneKeyingSetsPanel:
else:
item = ks
- owner = context.user_preferences.edit
+ owner = context.preferences.edit
if userpref_fallback:
propname = userpref_fallback
else:
diff --git a/release/scripts/startup/bl_ui/properties_workspace.py b/release/scripts/startup/bl_ui/properties_workspace.py
index d07e2dbbaf6..daea94a3811 100644
--- a/release/scripts/startup/bl_ui/properties_workspace.py
+++ b/release/scripts/startup/bl_ui/properties_workspace.py
@@ -57,7 +57,7 @@ class WORKSPACE_PT_addons(WorkSpaceButtonsPanel, Panel):
col = layout.box().column(align=True)
workspace = context.workspace
- userpref = context.user_preferences
+ prefs = context.preferences
col.active = workspace.use_filter_by_owner
@@ -65,7 +65,7 @@ class WORKSPACE_PT_addons(WorkSpaceButtonsPanel, Panel):
addon_map = {mod.__name__: mod for mod in addon_utils.modules()}
owner_ids = {owner_id.name for owner_id in workspace.owner_ids}
- for addon in userpref.addons:
+ for addon in prefs.addons:
module_name = addon.module
info = addon_utils.module_bl_info(addon_map[module_name])
if not info["use_owner"]:
diff --git a/release/scripts/startup/bl_ui/space_filebrowser.py b/release/scripts/startup/bl_ui/space_filebrowser.py
index eb94adc1964..2eacae81057 100644
--- a/release/scripts/startup/bl_ui/space_filebrowser.py
+++ b/release/scripts/startup/bl_ui/space_filebrowser.py
@@ -141,7 +141,7 @@ class FILEBROWSER_PT_system_bookmarks(Panel):
@classmethod
def poll(cls, context):
- return not context.user_preferences.filepaths.hide_system_bookmarks
+ return not context.preferences.filepaths.hide_system_bookmarks
def draw(self, context):
layout = self.layout
@@ -203,7 +203,7 @@ class FILEBROWSER_PT_recent_folders(Panel):
@classmethod
def poll(cls, context):
- return not context.user_preferences.filepaths.hide_recent_locations
+ return not context.preferences.filepaths.hide_recent_locations
def draw(self, context):
layout = self.layout
diff --git a/release/scripts/startup/bl_ui/space_time.py b/release/scripts/startup/bl_ui/space_time.py
index 3be03ee8a80..0ae28ae38e7 100644
--- a/release/scripts/startup/bl_ui/space_time.py
+++ b/release/scripts/startup/bl_ui/space_time.py
@@ -47,7 +47,7 @@ class TIME_HT_editor_buttons(Header):
# if using JACK and A/V sync:
# hide the play-reversed button
# since JACK transport doesn't support reversed playback
- if scene.sync_mode == 'AUDIO_SYNC' and context.user_preferences.system.audio_device == 'JACK':
+ if scene.sync_mode == 'AUDIO_SYNC' and context.preferences.system.audio_device == 'JACK':
sub = row.row(align=True)
sub.scale_x = 1.4
sub.operator("screen.animation_play", text="", icon='PLAY')
@@ -275,7 +275,7 @@ class TIME_PT_keyframing_settings(TimelinePanelButtons, Panel):
scene = context.scene
tool_settings = context.tool_settings
- userprefs = context.user_preferences
+ prefs = context.preferences
col = layout.column(align=True)
col.label(text="Active Keying Set:")
@@ -293,7 +293,7 @@ class TIME_PT_keyframing_settings(TimelinePanelButtons, Panel):
row = col.row()
row.prop(tool_settings, "auto_keying_mode", text="")
row.prop(tool_settings, "use_keyframe_insert_keyingset", text="")
- if not userprefs.edit.use_keyframe_insert_available:
+ if not prefs.edit.use_keyframe_insert_available:
col.prop(tool_settings, "use_record_with_nla", text="Layered Recording")
layout.prop(tool_settings, "use_keyframe_cycle_aware")
diff --git a/release/scripts/startup/bl_ui/space_toolsystem_common.py b/release/scripts/startup/bl_ui/space_toolsystem_common.py
index 9d13bd93c86..4d6a43aa141 100644
--- a/release/scripts/startup/bl_ui/space_toolsystem_common.py
+++ b/release/scripts/startup/bl_ui/space_toolsystem_common.py
@@ -431,7 +431,7 @@ class ToolSelectPanelHelper:
"""
# Currently this just checks the width,
# we could have different layouts as preferences too.
- system = bpy.context.user_preferences.system
+ system = bpy.context.preferences.system
view2d = region.view2d
view2d_scale = (
view2d.region_to_view(1.0, 0.0)[0] -
diff --git a/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py b/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py
index a4ca27e8f48..e7883ce0bac 100644
--- a/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py
+++ b/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py
@@ -195,8 +195,8 @@ class _defs_annotate:
def eraser():
def draw_settings(context, layout, tool):
# TODO: Move this setting to tool_settings
- user_prefs = context.user_preferences
- layout.prop(user_prefs.edit, "grease_pencil_eraser_radius", text="Radius")
+ prefs = context.preferences
+ layout.prop(prefs.edit, "grease_pencil_eraser_radius", text="Radius")
return dict(
text="Annotate Eraser",
icon="ops.gpencil.draw.eraser",
diff --git a/release/scripts/startup/bl_ui/space_topbar.py b/release/scripts/startup/bl_ui/space_topbar.py
index 67530ba71ee..6f80b4394b6 100644
--- a/release/scripts/startup/bl_ui/space_topbar.py
+++ b/release/scripts/startup/bl_ui/space_topbar.py
@@ -609,7 +609,7 @@ class TOPBAR_MT_file(Menu):
layout.operator_context = 'INVOKE_AREA'
if any(bpy.utils.app_template_paths()):
- app_template = context.user_preferences.app_template
+ app_template = context.preferences.app_template
else:
app_template = None
@@ -647,7 +647,7 @@ class TOPBAR_MT_file(Menu):
layout.separator()
layout.operator_context = 'EXEC_AREA'
- if bpy.data.is_dirty and context.user_preferences.view.use_quit_dialog:
+ if bpy.data.is_dirty and context.preferences.view.use_quit_dialog:
layout.operator_context = 'INVOKE_SCREEN' # quit dialog
layout.operator("wm.quit_blender", text="Quit", icon='QUIT')
@@ -894,7 +894,7 @@ class TOPBAR_MT_help(Menu):
def draw(self, context):
layout = self.layout
- show_developer = context.user_preferences.view.show_developer_ui
+ show_developer = context.preferences.view.show_developer_ui
layout.operator(
"wm.url_open", text="Manual", icon='HELP',
diff --git a/release/scripts/startup/bl_ui/space_userpref.py b/release/scripts/startup/bl_ui/space_userpref.py
index 541158796e5..c4198e02187 100644
--- a/release/scripts/startup/bl_ui/space_userpref.py
+++ b/release/scripts/startup/bl_ui/space_userpref.py
@@ -28,29 +28,29 @@ from bpy.app.translations import contexts as i18n_contexts
class USERPREF_HT_header(Header):
- bl_space_type = 'USER_PREFERENCES'
+ bl_space_type = 'PREFERENCES'
def draw(self, context):
layout = self.layout
layout.template_header()
- userpref = context.user_preferences
+ prefs = context.preferences
- if userpref.active_section == 'INPUT':
+ if prefs.active_section == 'INPUT':
layout.operator("wm.keyconfig_import", icon='IMPORT')
layout.operator("wm.keyconfig_export", icon='EXPORT')
- elif userpref.active_section == 'ADDONS':
+ elif prefs.active_section == 'ADDONS':
layout.operator("wm.addon_install", icon='FILEBROWSER')
layout.operator("wm.addon_refresh", icon='FILE_REFRESH')
layout.menu("USERPREF_MT_addons_online_resources")
- elif userpref.active_section == 'LIGHTS':
+ elif prefs.active_section == 'LIGHTS':
layout.operator("wm.studiolight_install", text="Add MatCap").type = 'MATCAP'
layout.operator("wm.studiolight_install", text="Add LookDev HDRI").type = 'WORLD'
op = layout.operator("wm.studiolight_install", text="Add Studio Light")
op.type = 'STUDIO'
op.filter_glob = ".sl"
- elif userpref.active_section == 'THEMES':
+ elif prefs.active_section == 'THEMES':
layout.operator("wm.theme_install", icon='FILEBROWSER')
layout.operator("ui.reset_default_theme", icon='LOOP_BACK')
@@ -62,38 +62,38 @@ class USERPREF_HT_header(Header):
class USERPREF_PT_navigation(Panel):
bl_label = ""
- bl_space_type = 'USER_PREFERENCES'
+ bl_space_type = 'PREFERENCES'
bl_region_type = 'NAVIGATION_BAR'
bl_options = {'HIDE_HEADER'}
def draw(self, context):
layout = self.layout
- userpref = context.user_preferences
+ prefs = context.preferences
col = layout.column()
col.scale_x = 1.3
col.scale_y = 1.3
- col.prop(userpref, "active_section", expand=True)
+ col.prop(prefs, "active_section", expand=True)
class USERPREF_PT_interface(Panel):
- bl_space_type = 'USER_PREFERENCES'
+ bl_space_type = 'PREFERENCES'
bl_label = "Interface"
bl_region_type = 'WINDOW'
bl_options = {'HIDE_HEADER'}
@classmethod
def poll(cls, context):
- userpref = context.user_preferences
- return (userpref.active_section == 'INTERFACE')
+ prefs = context.preferences
+ return (prefs.active_section == 'INTERFACE')
def draw(self, context):
layout = self.layout
- userpref = context.user_preferences
- view = userpref.view
+ prefs = context.preferences
+ view = prefs.view
split = layout.split()
row = split.row()
@@ -212,21 +212,21 @@ class USERPREF_PT_interface(Panel):
class USERPREF_PT_edit(Panel):
- bl_space_type = 'USER_PREFERENCES'
+ bl_space_type = 'PREFERENCES'
bl_label = "Edit"
bl_region_type = 'WINDOW'
bl_options = {'HIDE_HEADER'}
@classmethod
def poll(cls, context):
- userpref = context.user_preferences
- return (userpref.active_section == 'EDITING')
+ prefs = context.preferences
+ return (prefs.active_section == 'EDITING')
def draw(self, context):
layout = self.layout
- userpref = context.user_preferences
- edit = userpref.edit
+ prefs = context.preferences
+ edit = prefs.edit
split = layout.split()
row = split.row()
@@ -341,22 +341,22 @@ class USERPREF_PT_edit(Panel):
class USERPREF_PT_system_general(Panel):
- bl_space_type = 'USER_PREFERENCES'
+ bl_space_type = 'PREFERENCES'
bl_label = "System General"
bl_region_type = 'WINDOW'
bl_options = {'HIDE_HEADER'}
@classmethod
def poll(cls, context):
- userpref = context.user_preferences
- return (userpref.active_section == 'SYSTEM_GENERAL')
+ prefs = context.preferences
+ return (prefs.active_section == 'SYSTEM_GENERAL')
def draw(self, context):
import sys
layout = self.layout
- userpref = context.user_preferences
- system = userpref.system
+ prefs = context.preferences
+ system = prefs.system
split = layout.split()
@@ -383,7 +383,7 @@ class USERPREF_PT_system_general(Panel):
col.separator()
if bpy.app.build_options.cycles:
- addon = userpref.addons.get("cycles")
+ addon = prefs.addons.get("cycles")
if addon is not None:
addon.preferences.draw_impl(col, context)
del addon
@@ -490,8 +490,8 @@ class USERPREF_MT_interface_theme_presets(Menu):
preset_operator = "script.execute_preset"
preset_type = 'XML'
preset_xml_map = (
- ("user_preferences.themes[0]", "Theme"),
- ("user_preferences.ui_styles[0]", "ThemeStyle"),
+ ("preferences.themes[0]", "Theme"),
+ ("preferences.ui_styles[0]", "ThemeStyle"),
)
draw = Menu.draw_preset
@@ -500,7 +500,7 @@ class USERPREF_MT_interface_theme_presets(Menu):
class USERPREF_PT_theme(Panel):
- bl_space_type = 'USER_PREFERENCES'
+ bl_space_type = 'PREFERENCES'
bl_label = "Themes"
bl_region_type = 'WINDOW'
bl_options = {'HIDE_HEADER'}
@@ -640,13 +640,13 @@ class USERPREF_PT_theme(Panel):
@classmethod
def poll(cls, context):
- userpref = context.user_preferences
- return (userpref.active_section == 'THEMES')
+ prefs = context.preferences
+ return (prefs.active_section == 'THEMES')
def draw(self, context):
layout = self.layout
- theme = context.user_preferences.themes[0]
+ theme = context.preferences.themes[0]
split_themes = layout.split(factor=0.2)
@@ -864,7 +864,7 @@ class USERPREF_PT_theme(Panel):
elif theme.theme_area == 'STYLE':
col = split.column()
- style = context.user_preferences.ui_styles[0]
+ style = context.preferences.ui_styles[0]
col.label(text="Panel Title:")
self._ui_font_style(col, style.panel_title)
@@ -883,22 +883,22 @@ class USERPREF_PT_theme(Panel):
class USERPREF_PT_file(Panel):
- bl_space_type = 'USER_PREFERENCES'
+ bl_space_type = 'PREFERENCES'
bl_label = "Files"
bl_region_type = 'WINDOW'
bl_options = {'HIDE_HEADER'}
@classmethod
def poll(cls, context):
- userpref = context.user_preferences
- return (userpref.active_section == 'SYSTEM_FILES')
+ prefs = context.preferences
+ return (prefs.active_section == 'SYSTEM_FILES')
def draw(self, context):
layout = self.layout
- userpref = context.user_preferences
- paths = userpref.filepaths
- system = userpref.system
+ prefs = context.preferences
+ paths = prefs.filepaths
+ system = prefs.system
split = layout.split(factor=0.7)
@@ -949,7 +949,7 @@ class USERPREF_PT_file(Panel):
row = box.row()
row.label(text="Excluded Paths:")
row.operator("wm.userpref_autoexec_path_add", text="", icon='ADD', emboss=False)
- for i, path_cmp in enumerate(userpref.autoexec_paths):
+ for i, path_cmp in enumerate(prefs.autoexec_paths):
row = box.row()
row.prop(path_cmp, "path", text="")
row.prop(path_cmp, "use_glob", text="", icon='FILTER')
@@ -1002,7 +1002,7 @@ class USERPREF_MT_ndof_settings(Menu):
def draw(self, context):
layout = self.layout
- input_prefs = context.user_preferences.inputs
+ input_prefs = context.preferences.inputs
is_view3d = context.space_data.type == 'VIEW_3D'
@@ -1052,15 +1052,15 @@ class USERPREF_MT_keyconfigs(Menu):
class USERPREF_PT_input(Panel):
- bl_space_type = 'USER_PREFERENCES'
+ bl_space_type = 'PREFERENCES'
bl_label = "Input"
bl_region_type = 'WINDOW'
bl_options = {'HIDE_HEADER'}
@classmethod
def poll(cls, context):
- userpref = context.user_preferences
- return (userpref.active_section == 'INPUT')
+ prefs = context.preferences
+ return (prefs.active_section == 'INPUT')
@staticmethod
def draw_input_prefs(inputs, layout):
@@ -1163,9 +1163,9 @@ class USERPREF_PT_input(Panel):
#start = time.time()
- userpref = context.user_preferences
+ prefs = context.preferences
- inputs = userpref.inputs
+ inputs = prefs.inputs
split = layout.split(factor=0.25)
@@ -1212,7 +1212,7 @@ class USERPREF_MT_addons_online_resources(Menu):
class USERPREF_PT_addons(Panel):
- bl_space_type = 'USER_PREFERENCES'
+ bl_space_type = 'PREFERENCES'
bl_label = "Add-ons"
bl_region_type = 'WINDOW'
bl_options = {'HIDE_HEADER'}
@@ -1225,8 +1225,8 @@ class USERPREF_PT_addons(Panel):
@classmethod
def poll(cls, context):
- userpref = context.user_preferences
- return (userpref.active_section == 'ADDONS')
+ prefs = context.preferences
+ return (prefs.active_section == 'ADDONS')
@staticmethod
def is_user_addon(mod, user_addon_paths):
@@ -1261,12 +1261,12 @@ class USERPREF_PT_addons(Panel):
layout = self.layout
- userpref = context.user_preferences
- used_ext = {ext.module for ext in userpref.addons}
+ prefs = context.preferences
+ used_ext = {ext.module for ext in prefs.addons}
addon_user_dirs = tuple(
p for p in (
- os.path.join(userpref.filepaths.script_directory, "addons"),
+ os.path.join(prefs.filepaths.script_directory, "addons"),
bpy.utils.user_resource('SCRIPTS', "addons"),
)
if p
@@ -1443,9 +1443,9 @@ class USERPREF_PT_addons(Panel):
for _ in range(4 - tot_row):
split.separator()
- # Show addon user preferences
+ # Show addon preferences
if is_enabled:
- addon_preferences = userpref.addons[module_name].preferences
+ addon_preferences = prefs.addons[module_name].preferences
if addon_preferences is not None:
draw = getattr(addon_preferences, "draw", None)
if draw is not None:
@@ -1489,21 +1489,21 @@ class USERPREF_PT_addons(Panel):
class StudioLightPanelMixin():
- bl_space_type = 'USER_PREFERENCES'
+ bl_space_type = 'PREFERENCES'
bl_region_type = 'WINDOW'
@classmethod
def poll(cls, context):
- userpref = context.user_preferences
- return (userpref.active_section == 'LIGHTS')
+ prefs = context.preferences
+ return (prefs.active_section == 'LIGHTS')
- def _get_lights(self, userpref):
- return [light for light in userpref.studio_lights if light.is_user_defined and light.type == self.sl_type]
+ def _get_lights(self, prefs):
+ return [light for light in prefs.studio_lights if light.is_user_defined and light.type == self.sl_type]
def draw(self, context):
layout = self.layout
- userpref = context.user_preferences
- lights = self._get_lights(userpref)
+ prefs = context.preferences
+ lights = self._get_lights(prefs)
self.draw_light_list(layout, lights)
@@ -1549,7 +1549,7 @@ class USERPREF_PT_studiolight_lights(Panel, StudioLightPanelMixin):
class USERPREF_PT_studiolight_light_editor(Panel):
bl_label = "Studio Light Editor"
bl_parent_id = "USERPREF_PT_studiolight_lights"
- bl_space_type = 'USER_PREFERENCES'
+ bl_space_type = 'PREFERENCES'
bl_region_type = 'WINDOW'
def opengl_light_buttons(self, layout, light):
@@ -1566,8 +1566,8 @@ class USERPREF_PT_studiolight_light_editor(Panel):
def draw(self, context):
layout = self.layout
- userpref = context.user_preferences
- system = userpref.system
+ prefs = context.preferences
+ system = prefs.system
row = layout.row()
row.prop(system, "edit_studio_light", toggle=True)
diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py
index c1b4849ddad..12ac3698359 100644
--- a/release/scripts/startup/bl_ui/space_view3d.py
+++ b/release/scripts/startup/bl_ui/space_view3d.py
@@ -4420,8 +4420,8 @@ class VIEW3D_PT_shading_lighting(Panel):
sub = col.row()
if shading.light == 'STUDIO':
- userpref = context.user_preferences
- system = userpref.system
+ prefs = context.preferences
+ system = prefs.system
if not system.edit_studio_light:
sub.scale_y = 0.6 # smaller studiolight preview
@@ -5013,7 +5013,7 @@ class VIEW3D_PT_overlay_edit_mesh_developer(Panel):
@classmethod
def poll(cls, context):
- return context.mode == 'EDIT_MESH' and context.user_preferences.view.show_developer_ui
+ return context.mode == 'EDIT_MESH' and context.preferences.view.show_developer_ui
def draw(self, context):
layout = self.layout