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 /release/scripts/modules
parent53e4a18cdf6c96d1acd941851a6d831a7cc22f25 (diff)
Cleanup: use preferences prefix for Python operators
Diffstat (limited to 'release/scripts/modules')
-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
3 files changed, 12 insertions, 12 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!