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>2019-03-01 16:21:05 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-03-01 16:23:42 +0300
commitbbe98b18fb4c2b72c71367e61a066da62523f051 (patch)
tree2b8d6d951ab6c1c3521c5e3b15c91eea68cf181c
parent53e4a18cdf6c96d1acd941851a6d831a7cc22f25 (diff)
Cleanup: use preferences prefix for Python operators
-rw-r--r--release/scripts/modules/bl_i18n_utils/bl_extract_messages.py2
-rw-r--r--release/scripts/modules/bl_i18n_utils/utils.py4
-rw-r--r--release/scripts/modules/rna_keymap_ui.py18
-rw-r--r--release/scripts/startup/bl_operators/presets.py2
-rw-r--r--release/scripts/startup/bl_operators/userpref.py154
-rw-r--r--release/scripts/startup/bl_operators/wm.py6
-rw-r--r--release/scripts/startup/bl_ui/space_topbar.py2
-rw-r--r--release/scripts/startup/bl_ui/space_userpref.py28
-rw-r--r--release/scripts/startup/bl_ui/space_view3d.py6
9 files changed, 111 insertions, 111 deletions
diff --git a/release/scripts/modules/bl_i18n_utils/bl_extract_messages.py b/release/scripts/modules/bl_i18n_utils/bl_extract_messages.py
index 0285a22a923..d552638850c 100644
--- a/release/scripts/modules/bl_i18n_utils/bl_extract_messages.py
+++ b/release/scripts/modules/bl_i18n_utils/bl_extract_messages.py
@@ -536,7 +536,7 @@ def dump_py_messages_from_files(msgs, reports, files, settings):
def _op_to_ctxt(node):
# Some smart coders like things like:
- # >>> row.operator("wm.addon_disable" if is_enabled else "wm.addon_enable", ...)
+ # >>> row.operator("preferences.addon_disable" if is_enabled else "preferences.addon_enable", ...)
# We only take first arg into account here!
bag = extract_strings_split(node)
opname, _ = bag[0]
diff --git a/release/scripts/modules/bl_i18n_utils/utils.py b/release/scripts/modules/bl_i18n_utils/utils.py
index 2116e39fd8e..fe27be9895b 100644
--- a/release/scripts/modules/bl_i18n_utils/utils.py
+++ b/release/scripts/modules/bl_i18n_utils/utils.py
@@ -199,12 +199,12 @@ def enable_addons(addons=None, support=None, disable=False, check_only=False):
if module_name not in used_ext:
continue
print(" Disabling module ", module_name)
- bpy.ops.wm.addon_disable(module=module_name)
+ bpy.ops.preferences.addon_disable(module=module_name)
else:
if module_name in used_ext:
continue
print(" Enabling module ", module_name)
- bpy.ops.wm.addon_enable(module=module_name)
+ bpy.ops.preferences.addon_enable(module=module_name)
except Exception as e: # XXX TEMP WORKAROUND
print(e)
diff --git a/release/scripts/modules/rna_keymap_ui.py b/release/scripts/modules/rna_keymap_ui.py
index a6826c1d13c..9ce52006d89 100644
--- a/release/scripts/modules/rna_keymap_ui.py
+++ b/release/scripts/modules/rna_keymap_ui.py
@@ -79,7 +79,7 @@ def draw_km(display_keymaps, kc, km, children, layout, level):
subrow.alignment = 'RIGHT'
if km.is_user_modified:
- subrow.operator("wm.keymap_restore", text="Restore")
+ subrow.operator("preferences.keymap_restore", text="Restore")
if km.is_modal:
subrow.label(text="", icon='LINKED')
del subrow
@@ -104,7 +104,7 @@ def draw_km(display_keymaps, kc, km, children, layout, level):
# "Add New" at end of keymap item list
subcol = _indented_layout(col, kmi_level)
subcol = subcol.split(factor=0.2).column()
- subcol.operator("wm.keyitem_add", text="Add New", text_ctxt=i18n_contexts.id_windowmanager,
+ subcol.operator("preferences.keyitem_add", text="Add New", text_ctxt=i18n_contexts.id_windowmanager,
icon='ADD')
col.separator()
@@ -159,9 +159,9 @@ def draw_kmi(display_keymaps, kc, km, kmi, layout, level):
row.label()
if (not kmi.is_user_defined) and kmi.is_user_modified:
- row.operator("wm.keyitem_restore", text="", icon='BACK').item_id = kmi.id
+ row.operator("preferences.keyitem_restore", text="", icon='BACK').item_id = kmi.id
else:
- row.operator("wm.keyitem_remove", text="", icon='X').item_id = kmi.id
+ row.operator("preferences.keyitem_remove", text="", icon='X').item_id = kmi.id
# Expanded, additional event settings
if kmi.show_expanded:
@@ -340,7 +340,7 @@ def draw_filtered(display_keymaps, filter_type, filter_text, layout):
row.label()
if km.is_user_modified:
- row.operator("wm.keymap_restore", text="Restore")
+ row.operator("preferences.keymap_restore", text="Restore")
else:
row.label()
@@ -350,7 +350,7 @@ def draw_filtered(display_keymaps, filter_type, filter_text, layout):
# "Add New" at end of keymap item list
col = _indented_layout(layout, 1)
subcol = col.split(factor=0.2).column()
- subcol.operator("wm.keyitem_add", text="Add New", icon='ADD')
+ subcol.operator("preferences.keyitem_add", text="Add New", icon='ADD')
return True
@@ -384,14 +384,14 @@ def draw_keymaps(context, layout):
rowsub.operator("wm.keyconfig_preset_add", text="", icon='REMOVE').remove_active = True
rowsub = split.row(align=True)
- rowsub.operator("wm.keyconfig_import", text="Import...", icon='IMPORT')
- rowsub.operator("wm.keyconfig_export", text="Export...", icon='EXPORT')
+ rowsub.operator("preferences.keyconfig_import", text="Import...", icon='IMPORT')
+ rowsub.operator("preferences.keyconfig_export", text="Export...", icon='EXPORT')
row = layout.row()
col = layout.column()
# layout.context_pointer_set("keyconfig", wm.keyconfigs.active)
- # row.operator("wm.keyconfig_remove", text="", icon='X')
+ # row.operator("preferences.keyconfig_remove", text="", icon='X')
rowsub = row.split(factor=0.3, align=True)
# postpone drawing into rowsub, so we can set alert!
diff --git a/release/scripts/startup/bl_operators/presets.py b/release/scripts/startup/bl_operators/presets.py
index 663de209c15..4df0d32f946 100644
--- a/release/scripts/startup/bl_operators/presets.py
+++ b/release/scripts/startup/bl_operators/presets.py
@@ -563,7 +563,7 @@ class AddPresetKeyconfig(AddPresetBase, Operator):
preset_subdir = "keyconfig"
def add(self, context, filepath):
- bpy.ops.wm.keyconfig_export(filepath=filepath)
+ bpy.ops.preferences.keyconfig_export(filepath=filepath)
bpy.utils.keyconfig_set(filepath)
def pre_cb(self, context):
diff --git a/release/scripts/startup/bl_operators/userpref.py b/release/scripts/startup/bl_operators/userpref.py
index a43aac786ed..b63d5fa773d 100644
--- a/release/scripts/startup/bl_operators/userpref.py
+++ b/release/scripts/startup/bl_operators/userpref.py
@@ -50,8 +50,8 @@ def module_filesystem_remove(path_base, module_name):
os.remove(f_full)
-class WM_OT_keyconfig_activate(Operator):
- bl_idname = "wm.keyconfig_activate"
+class PREFERENCES_OT_keyconfig_activate(Operator):
+ bl_idname = "preferences.keyconfig_activate"
bl_label = "Activate Keyconfig"
filepath: StringProperty(
@@ -65,9 +65,9 @@ class WM_OT_keyconfig_activate(Operator):
return {'CANCELLED'}
-class WM_OT_copy_prev_settings(Operator):
+class PREFERENCES_OT_copy_prev(Operator):
"""Copy settings from previous version"""
- bl_idname = "wm.copy_prev_settings"
+ bl_idname = "preferences.copy_prev"
bl_label = "Copy Previous Settings"
@staticmethod
@@ -126,9 +126,9 @@ class WM_OT_copy_prev_settings(Operator):
return {'FINISHED'}
-class WM_OT_keyconfig_test(Operator):
+class PREFERENCES_OT_keyconfig_test(Operator):
"""Test key-config for conflicts"""
- bl_idname = "wm.keyconfig_test"
+ bl_idname = "preferences.keyconfig_test"
bl_label = "Test Key Configuration for Conflicts"
def execute(self, context):
@@ -143,9 +143,9 @@ class WM_OT_keyconfig_test(Operator):
return {'FINISHED'}
-class WM_OT_keyconfig_import(Operator):
+class PREFERENCES_OT_keyconfig_import(Operator):
"""Import key configuration from a python script"""
- bl_idname = "wm.keyconfig_import"
+ bl_idname = "preferences.keyconfig_import"
bl_label = "Import Key Configuration..."
filepath: StringProperty(
@@ -210,9 +210,9 @@ class WM_OT_keyconfig_import(Operator):
# This operator is also used by interaction presets saving - AddPresetBase
-class WM_OT_keyconfig_export(Operator):
+class PREFERENCES_OT_keyconfig_export(Operator):
"""Export key configuration to a python script"""
- bl_idname = "wm.keyconfig_export"
+ bl_idname = "preferences.keyconfig_export"
bl_label = "Export Key Configuration..."
all: BoolProperty(
@@ -266,9 +266,9 @@ class WM_OT_keyconfig_export(Operator):
return {'RUNNING_MODAL'}
-class WM_OT_keymap_restore(Operator):
+class PREFERENCES_OT_keymap_restore(Operator):
"""Restore key map(s)"""
- bl_idname = "wm.keymap_restore"
+ bl_idname = "preferences.keymap_restore"
bl_label = "Restore Key Map(s)"
all: BoolProperty(
@@ -289,9 +289,9 @@ class WM_OT_keymap_restore(Operator):
return {'FINISHED'}
-class WM_OT_keyitem_restore(Operator):
+class PREFERENCES_OT_keyitem_restore(Operator):
"""Restore key map item"""
- bl_idname = "wm.keyitem_restore"
+ bl_idname = "preferences.keyitem_restore"
bl_label = "Restore Key Map Item"
item_id: IntProperty(
@@ -314,9 +314,9 @@ class WM_OT_keyitem_restore(Operator):
return {'FINISHED'}
-class WM_OT_keyitem_add(Operator):
+class PREFERENCES_OT_keyitem_add(Operator):
"""Add key map item"""
- bl_idname = "wm.keyitem_add"
+ bl_idname = "preferences.keyitem_add"
bl_label = "Add Key Map Item"
def execute(self, context):
@@ -336,9 +336,9 @@ class WM_OT_keyitem_add(Operator):
return {'FINISHED'}
-class WM_OT_keyitem_remove(Operator):
+class PREFERENCES_OT_keyitem_remove(Operator):
"""Remove key map item"""
- bl_idname = "wm.keyitem_remove"
+ bl_idname = "preferences.keyitem_remove"
bl_label = "Remove Key Map Item"
item_id: IntProperty(
@@ -357,9 +357,9 @@ class WM_OT_keyitem_remove(Operator):
return {'FINISHED'}
-class WM_OT_keyconfig_remove(Operator):
+class PREFERENCES_OT_keyconfig_remove(Operator):
"""Remove key config"""
- bl_idname = "wm.keyconfig_remove"
+ bl_idname = "preferences.keyconfig_remove"
bl_label = "Remove Key Config"
@classmethod
@@ -378,9 +378,9 @@ class WM_OT_keyconfig_remove(Operator):
# -----------------------------------------------------------------------------
# Add-on Operators
-class WM_OT_addon_enable(Operator):
+class PREFERENCES_OT_addon_enable(Operator):
"""Enable an add-on"""
- bl_idname = "wm.addon_enable"
+ bl_idname = "preferences.addon_enable"
bl_label = "Enable Add-on"
module: StringProperty(
@@ -424,9 +424,9 @@ class WM_OT_addon_enable(Operator):
return {'CANCELLED'}
-class WM_OT_addon_disable(Operator):
+class PREFERENCES_OT_addon_disable(Operator):
"""Disable an add-on"""
- bl_idname = "wm.addon_disable"
+ bl_idname = "preferences.addon_disable"
bl_label = "Disable Add-on"
module: StringProperty(
@@ -453,9 +453,9 @@ class WM_OT_addon_disable(Operator):
return {'FINISHED'}
-class WM_OT_theme_install(Operator):
+class PREFERENCES_OT_theme_install(Operator):
"""Load and apply a Blender XML theme file"""
- bl_idname = "wm.theme_install"
+ bl_idname = "preferences.theme_install"
bl_label = "Install Theme..."
overwrite: BoolProperty(
@@ -515,9 +515,9 @@ class WM_OT_theme_install(Operator):
return {'RUNNING_MODAL'}
-class WM_OT_addon_refresh(Operator):
+class PREFERENCES_OT_addon_refresh(Operator):
"""Scan add-on directories for new modules"""
- bl_idname = "wm.addon_refresh"
+ bl_idname = "preferences.addon_refresh"
bl_label = "Refresh"
def execute(self, context):
@@ -528,11 +528,11 @@ class WM_OT_addon_refresh(Operator):
return {'FINISHED'}
-# Note: shares some logic with WM_OT_app_template_install
+# Note: shares some logic with PREFERENCES_OT_app_template_install
# but not enough to de-duplicate. Fixed here may apply to both.
-class WM_OT_addon_install(Operator):
+class PREFERENCES_OT_addon_install(Operator):
"""Install an add-on"""
- bl_idname = "wm.addon_install"
+ bl_idname = "preferences.addon_install"
bl_label = "Install Add-on from File..."
overwrite: BoolProperty(
@@ -684,9 +684,9 @@ class WM_OT_addon_install(Operator):
return {'RUNNING_MODAL'}
-class WM_OT_addon_remove(Operator):
+class PREFERENCES_OT_addon_remove(Operator):
"""Delete the add-on from the file system"""
- bl_idname = "wm.addon_remove"
+ bl_idname = "preferences.addon_remove"
bl_label = "Remove Add-on"
module: StringProperty(
@@ -713,7 +713,7 @@ class WM_OT_addon_remove(Operator):
import addon_utils
import os
- path, isdir = WM_OT_addon_remove.path_from_addon(self.module)
+ path, isdir = PREFERENCES_OT_addon_remove.path_from_addon(self.module)
if path is None:
self.report({'WARNING'}, "Add-on path %r could not be found" % path)
return {'CANCELLED'}
@@ -735,7 +735,7 @@ class WM_OT_addon_remove(Operator):
# lame confirmation check
def draw(self, context):
self.layout.label(text="Remove Add-on: %r?" % self.module)
- path, _isdir = WM_OT_addon_remove.path_from_addon(self.module)
+ path, _isdir = PREFERENCES_OT_addon_remove.path_from_addon(self.module)
self.layout.label(text="Path: %r" % path)
def invoke(self, context, event):
@@ -743,9 +743,9 @@ class WM_OT_addon_remove(Operator):
return wm.invoke_props_dialog(self, width=600)
-class WM_OT_addon_expand(Operator):
+class PREFERENCES_OT_addon_expand(Operator):
"""Display information and preferences for this add-on"""
- bl_idname = "wm.addon_expand"
+ bl_idname = "preferences.addon_expand"
bl_label = ""
bl_options = {'INTERNAL'}
@@ -767,9 +767,9 @@ class WM_OT_addon_expand(Operator):
return {'FINISHED'}
-class WM_OT_addon_userpref_show(Operator):
+class PREFERENCES_OT_addon_show(Operator):
"""Show add-on preferences"""
- bl_idname = "wm.addon_userpref_show"
+ bl_idname = "preferences.addon_show"
bl_label = ""
bl_options = {'INTERNAL'}
@@ -797,11 +797,11 @@ class WM_OT_addon_userpref_show(Operator):
return {'FINISHED'}
-# Note: shares some logic with WM_OT_addon_install
+# Note: shares some logic with PREFERENCES_OT_addon_install
# but not enough to de-duplicate. Fixes here may apply to both.
-class WM_OT_app_template_install(Operator):
+class PREFERENCES_OT_app_template_install(Operator):
"""Install an application-template"""
- bl_idname = "wm.app_template_install"
+ bl_idname = "preferences.app_template_install"
bl_label = "Install Template from File..."
overwrite: BoolProperty(
@@ -900,9 +900,9 @@ class WM_OT_app_template_install(Operator):
# -----------------------------------------------------------------------------
# Studio Light Operations
-class WM_OT_studiolight_install(Operator):
+class PREFERENCES_OT_studiolight_install(Operator):
"""Install a user defined studio light"""
- bl_idname = "wm.studiolight_install"
+ bl_idname = "preferences.studiolight_install"
bl_label = "Install Custom Studio Light"
files: CollectionProperty(
@@ -963,9 +963,9 @@ class WM_OT_studiolight_install(Operator):
return {'RUNNING_MODAL'}
-class WM_OT_studiolight_new(Operator):
+class PREFERENCES_OT_studiolight_new(Operator):
"""Save custom studio light from the studio light editor settings"""
- bl_idname = 'wm.studiolight_new'
+ bl_idname = 'preferences.studiolight_new'
bl_label = "Save custom Studio light"
filename: StringProperty(
@@ -994,7 +994,7 @@ class WM_OT_studiolight_new(Operator):
else:
for studio_light in prefs.studio_lights:
if studio_light.name == filename:
- bpy.ops.wm.studiolight_uninstall(index=studio_light.index)
+ bpy.ops.preferences.studiolight_uninstall(index=studio_light.index)
prefs.studio_lights.new(path=filepath_final)
@@ -1019,9 +1019,9 @@ class WM_OT_studiolight_new(Operator):
return wm.invoke_props_dialog(self, width=600)
-class WM_OT_studiolight_uninstall(Operator):
+class PREFERENCES_OT_studiolight_uninstall(Operator):
"""Delete Studio Light"""
- bl_idname = 'wm.studiolight_uninstall'
+ bl_idname = 'preferences.studiolight_uninstall'
bl_label = "Uninstall Studio Light"
index: bpy.props.IntProperty()
@@ -1042,9 +1042,9 @@ class WM_OT_studiolight_uninstall(Operator):
return {'CANCELLED'}
-class WM_OT_studiolight_copy_settings(Operator):
+class PREFERENCES_OT_studiolight_copy_settings(Operator):
"""Copy Studio Light settings to the Studio light editor"""
- bl_idname = 'wm.studiolight_copy_settings'
+ bl_idname = 'preferences.studiolight_copy_settings'
bl_label = "Copy Studio Light settings"
index: bpy.props.IntProperty()
@@ -1064,9 +1064,9 @@ class WM_OT_studiolight_copy_settings(Operator):
return {'CANCELLED'}
-class WM_OT_studiolight_userpref_show(Operator):
+class PREFERENCES_OT_studiolight_show(Operator):
"""Show light preferences"""
- bl_idname = "wm.studiolight_userpref_show"
+ bl_idname = "preferences.studiolight_show"
bl_label = ""
bl_options = {'INTERNAL'}
@@ -1077,28 +1077,28 @@ class WM_OT_studiolight_userpref_show(Operator):
classes = (
- WM_OT_addon_disable,
- WM_OT_addon_enable,
- WM_OT_addon_expand,
- WM_OT_addon_install,
- WM_OT_addon_refresh,
- WM_OT_addon_remove,
- WM_OT_addon_userpref_show,
- WM_OT_app_template_install,
- WM_OT_copy_prev_settings,
- WM_OT_keyconfig_activate,
- WM_OT_keyconfig_export,
- WM_OT_keyconfig_import,
- WM_OT_keyconfig_remove,
- WM_OT_keyconfig_test,
- WM_OT_keyitem_add,
- WM_OT_keyitem_remove,
- WM_OT_keyitem_restore,
- WM_OT_keymap_restore,
- WM_OT_theme_install,
- WM_OT_studiolight_install,
- WM_OT_studiolight_new,
- WM_OT_studiolight_uninstall,
- WM_OT_studiolight_copy_settings,
- WM_OT_studiolight_userpref_show,
+ PREFERENCES_OT_addon_disable,
+ PREFERENCES_OT_addon_enable,
+ PREFERENCES_OT_addon_expand,
+ PREFERENCES_OT_addon_install,
+ PREFERENCES_OT_addon_refresh,
+ PREFERENCES_OT_addon_remove,
+ PREFERENCES_OT_addon_show,
+ PREFERENCES_OT_app_template_install,
+ PREFERENCES_OT_copy_prev,
+ PREFERENCES_OT_keyconfig_activate,
+ PREFERENCES_OT_keyconfig_export,
+ PREFERENCES_OT_keyconfig_import,
+ PREFERENCES_OT_keyconfig_remove,
+ PREFERENCES_OT_keyconfig_test,
+ PREFERENCES_OT_keyitem_add,
+ PREFERENCES_OT_keyitem_remove,
+ PREFERENCES_OT_keyitem_restore,
+ PREFERENCES_OT_keymap_restore,
+ PREFERENCES_OT_theme_install,
+ PREFERENCES_OT_studiolight_install,
+ PREFERENCES_OT_studiolight_new,
+ PREFERENCES_OT_studiolight_uninstall,
+ PREFERENCES_OT_studiolight_copy_settings,
+ PREFERENCES_OT_studiolight_show,
)
diff --git a/release/scripts/startup/bl_operators/wm.py b/release/scripts/startup/bl_operators/wm.py
index dc1bbb4467c..7177f35f877 100644
--- a/release/scripts/startup/bl_operators/wm.py
+++ b/release/scripts/startup/bl_operators/wm.py
@@ -1650,9 +1650,9 @@ class WM_MT_splash(Menu):
row = layout.row()
sub = row.row()
- if bpy.types.WM_OT_copy_prev_settings.poll(context):
- old_version = bpy.types.WM_OT_copy_prev_settings.previous_version()
- sub.operator("wm.copy_prev_settings", text="Load %d.%d Settings" % old_version)
+ if bpy.types.PREFERENCES_OT_copy_prev.poll(context):
+ old_version = bpy.types.PREFERENCES_OT_copy_prev.previous_version()
+ sub.operator("preferences.copy_prev", text="Load %d.%d Settings" % old_version)
sub.operator("wm.save_userpref", text="Save New Settings")
else:
sub.label()
diff --git a/release/scripts/startup/bl_ui/space_topbar.py b/release/scripts/startup/bl_ui/space_topbar.py
index f0ff5e9a29d..20e090f9deb 100644
--- a/release/scripts/startup/bl_ui/space_topbar.py
+++ b/release/scripts/startup/bl_ui/space_topbar.py
@@ -600,7 +600,7 @@ class TOPBAR_MT_file(Menu):
layout.separator()
- layout.operator("wm.app_template_install", text="Install Application Template...")
+ layout.operator("preferences.app_template_install", text="Install Application Template...")
layout.separator()
diff --git a/release/scripts/startup/bl_ui/space_userpref.py b/release/scripts/startup/bl_ui/space_userpref.py
index 26ab6502b8e..0697d794c6b 100644
--- a/release/scripts/startup/bl_ui/space_userpref.py
+++ b/release/scripts/startup/bl_ui/space_userpref.py
@@ -719,7 +719,7 @@ class USERPREF_PT_theme(Panel):
row.operator("wm.interface_theme_preset_add", text="", icon='REMOVE').remove_active = True
row = split.row(align=True)
- row.operator("wm.theme_install", text="Install...", icon='IMPORT')
+ row.operator("preferences.theme_install", text="Install...", icon='IMPORT')
row.operator("ui.reset_default_theme", text="Reset", icon='LOOP_BACK')
@@ -1570,7 +1570,7 @@ class USERPREF_PT_input_ndof(PreferencePanel):
class USERPREF_MT_keyconfigs(Menu):
bl_label = "KeyPresets"
preset_subdir = "keyconfig"
- preset_operator = "wm.keyconfig_activate"
+ preset_operator = "preferences.keyconfig_activate"
def draw(self, context):
Menu.draw_preset(self, context)
@@ -1680,8 +1680,8 @@ class USERPREF_PT_addons(Panel):
row.prop(context.window_manager, "addon_support", expand=True)
row = split.row(align=True)
- row.operator("wm.addon_install", icon='IMPORT', text="Install...")
- row.operator("wm.addon_refresh", icon='FILE_REFRESH', text="Refresh")
+ row.operator("preferences.addon_install", icon='IMPORT', text="Install...")
+ row.operator("preferences.addon_refresh", icon='FILE_REFRESH', text="Refresh")
row = layout.row()
row.prop(context.window_manager, "addon_filter", text="")
@@ -1756,13 +1756,13 @@ class USERPREF_PT_addons(Panel):
row = colsub.row(align=True)
row.operator(
- "wm.addon_expand",
+ "preferences.addon_expand",
icon='DISCLOSURE_TRI_DOWN' if info["show_expanded"] else 'DISCLOSURE_TRI_RIGHT',
emboss=False,
).module = module_name
row.operator(
- "wm.addon_disable" if is_enabled else "wm.addon_enable",
+ "preferences.addon_disable" if is_enabled else "preferences.addon_enable",
icon='CHECKBOX_HLT' if is_enabled else 'CHECKBOX_DEHLT', text="",
emboss=False,
).module = module_name
@@ -1832,7 +1832,7 @@ class USERPREF_PT_addons(Panel):
)
if user_addon:
sub.operator(
- "wm.addon_remove", text="Remove", icon='CANCEL',
+ "preferences.addon_remove", text="Remove", icon='CANCEL',
).module = mod.__name__
# Show addon user preferences
@@ -1874,7 +1874,7 @@ class USERPREF_PT_addons(Panel):
if is_enabled:
row.operator(
- "wm.addon_disable", icon='CHECKBOX_HLT', text="", emboss=False,
+ "preferences.addon_disable", icon='CHECKBOX_HLT', text="", emboss=False,
).module = module_name
row.label(text=module_name, translate=False)
@@ -1913,11 +1913,11 @@ class StudioLightPanelMixin():
row.template_icon(layout.icon(studio_light), scale=3.0)
col = row.column()
- op = col.operator("wm.studiolight_uninstall", text="", icon='REMOVE')
+ op = col.operator("preferences.studiolight_uninstall", text="", icon='REMOVE')
op.index = studio_light.index
if studio_light.type == 'STUDIO':
- op = col.operator("wm.studiolight_copy_settings", text="", icon='IMPORT')
+ op = col.operator("preferences.studiolight_copy_settings", text="", icon='IMPORT')
op.index = studio_light.index
box.label(text=studio_light.name)
@@ -1929,7 +1929,7 @@ class USERPREF_PT_studiolight_matcaps(Panel, StudioLightPanelMixin):
def draw_header_preset(self, context):
layout = self.layout
- layout.operator("wm.studiolight_install", icon='IMPORT', text="Install...").type = 'MATCAP'
+ layout.operator("preferences.studiolight_install", icon='IMPORT', text="Install...").type = 'MATCAP'
layout.separator()
@@ -1939,7 +1939,7 @@ class USERPREF_PT_studiolight_world(Panel, StudioLightPanelMixin):
def draw_header_preset(self, context):
layout = self.layout
- layout.operator("wm.studiolight_install", icon='IMPORT', text="Install...").type = 'WORLD'
+ layout.operator("preferences.studiolight_install", icon='IMPORT', text="Install...").type = 'WORLD'
layout.separator()
@@ -1949,7 +1949,7 @@ class USERPREF_PT_studiolight_lights(Panel, StudioLightPanelMixin):
def draw_header_preset(self, context):
layout = self.layout
- op = layout.operator("wm.studiolight_install", icon='IMPORT', text="Install...")
+ op = layout.operator("preferences.studiolight_install", icon='IMPORT', text="Install...")
op.type = 'STUDIO'
op.filter_glob = ".sl"
layout.separator()
@@ -1981,7 +1981,7 @@ class USERPREF_PT_studiolight_light_editor(Panel):
row = layout.row()
row.prop(system, "use_studio_light_edit", toggle=True)
- row.operator("wm.studiolight_new", text="Save as Studio light", icon='FILE_TICK')
+ row.operator("preferences.studiolight_new", text="Save as Studio light", icon='FILE_TICK')
layout.separator()
diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py
index 178a91ba7e3..767c2c977ba 100644
--- a/release/scripts/startup/bl_ui/space_view3d.py
+++ b/release/scripts/startup/bl_ui/space_view3d.py
@@ -4546,7 +4546,7 @@ class VIEW3D_PT_shading_lighting(Panel):
sub.prop(system, "use_studio_light_edit", text="Disable Studio Light Edit", icon='NONE', toggle=True)
col = split.column()
- col.operator("wm.studiolight_userpref_show", emboss=False, text="", icon='PREFERENCES')
+ col.operator("preferences.studiolight_show", emboss=False, text="", icon='PREFERENCES')
split = layout.split(factor=0.9)
col = split.column()
@@ -4564,7 +4564,7 @@ class VIEW3D_PT_shading_lighting(Panel):
sub.template_icon_view(shading, "studio_light", scale_popup=3.0)
col = split.column()
- col.operator("wm.studiolight_userpref_show", emboss=False, text="", icon='PREFERENCES')
+ col.operator("preferences.studiolight_show", emboss=False, text="", icon='PREFERENCES')
col.operator("view3d.toggle_matcap_flip", emboss=False, text="", icon='ARROW_LEFTRIGHT')
elif shading.type == 'MATERIAL':
@@ -4581,7 +4581,7 @@ class VIEW3D_PT_shading_lighting(Panel):
sub.template_icon_view(shading, "studio_light", scale_popup=3)
col = split.column()
- col.operator("wm.studiolight_userpref_show", emboss=False, text="", icon='PREFERENCES')
+ col.operator("preferences.studiolight_show", emboss=False, text="", icon='PREFERENCES')
if shading.selected_studio_light.type == 'WORLD':
split = layout.split(factor=0.9)