Wm Operators

bpy.ops.wm.addon_disable(module="")

Disable an addon

Parameters:
  • module (string, (optional)) – Module, Module name of the addon to disable
File :

ui/space_userpref.py:1106

bpy.ops.wm.addon_enable(module="")

Enable an addon

Parameters:
  • module (string, (optional)) – Module, Module name of the addon to enable
File :

ui/space_userpref.py:1069

bpy.ops.wm.addon_expand(module="")

Display more information on this add-on

Parameters:
  • module (string, (optional)) – Module, Module name of the addon to expand
File :

ui/space_userpref.py:1198

bpy.ops.wm.addon_install(filepath="", module="", filter_python=True, filter_folder=True)

Install an addon

Parameters:
  • filepath (string, (optional)) – File Path, File path to write file to
  • module (string, (optional)) – Module, Module name of the addon to disable
  • filter_python (boolean, (optional)) – Filter python
  • filter_folder (boolean, (optional)) – Filter folders
File :

ui/space_userpref.py:1142

bpy.ops.wm.call_menu(name="")

Undocumented (contribute)

Parameters:
  • name (string, (optional)) – Name, Name of the menu
bpy.ops.wm.context_cycle_enum(reverse=False, data_path="")

Toggle a context value.

Parameters:
  • reverse (boolean, (optional)) – Reverse, Cycle backwards
  • data_path (string, (optional)) – Context Attributes, rna context string
File :

op/wm.py:286

bpy.ops.wm.context_cycle_int(reverse=False, data_path="")
Set a context value. Useful for cycling active material,
vertex keys, groups’ etc.
Parameters:
  • reverse (boolean, (optional)) – Reverse, Cycle backwards
  • data_path (string, (optional)) – Context Attributes, rna context string
File :

op/wm.py:252

bpy.ops.wm.context_modal_mouse(initial_x=0, data_path_iter="", invert=False, input_scale=0.01, data_path_item="")

Adjust arbitrary values with mouse input

Parameters:
  • data_path_iter (string, (optional)) – The data path relative to the context, must point to an iterable.
  • invert (boolean, (optional)) – Invert the mouse input
  • input_scale (float in [-inf, inf], (optional)) – Scale the mouse movement by this value before applying the delta
  • data_path_item (string, (optional)) – The data path from each iterable to the value (int or float)
File :

op/wm.py:441

bpy.ops.wm.context_scale_int(always_step=True, data_path="", value=1.0)

Scale an int context value.

Parameters:
  • always_step (boolean, (optional)) – Always Step, Always adjust the value by a minimum of 1 when ‘value’ is not 1.0.
  • data_path (string, (optional)) – Context Attributes, rna context string
  • value (float in [-inf, inf], (optional)) – Value, Assign value
File :

op/wm.py:114

bpy.ops.wm.context_set_boolean(data_path="", value=True)

Set a context value.

Parameters:
  • data_path (string, (optional)) – Context Attributes, rna context string
  • value (boolean, (optional)) – Value, Assignment value
File :

op/wm.py:64

bpy.ops.wm.context_set_enum(data_path="", value="")

Set a context value.

Parameters:
  • data_path (string, (optional)) – Context Attributes, rna context string
  • value (string, (optional)) – Value, Assignment value (as a string)
File :

op/wm.py:64

bpy.ops.wm.context_set_float(data_path="", value=0.0, relative=False)

Set a context value.

Parameters:
  • data_path (string, (optional)) – Context Attributes, rna context string
  • value (float in [-inf, inf], (optional)) – Value, Assignment value
  • relative (boolean, (optional)) – Relative, Apply relative to the current value (delta)
File :

op/wm.py:64

bpy.ops.wm.context_set_id(data_path="", value="")

Toggle a context value.

Parameters:
  • data_path (string, (optional)) – Context Attributes, rna context string
  • value (string, (optional)) – Value, Assign value
File :

op/wm.py:339

bpy.ops.wm.context_set_int(data_path="", value=0, relative=False)

Set a context value.

Parameters:
  • data_path (string, (optional)) – Context Attributes, rna context string
  • value (int in [-inf, inf], (optional)) – Value, Assign value
  • relative (boolean, (optional)) – Relative, Apply relative to the current value (delta)
File :

op/wm.py:64

bpy.ops.wm.context_set_string(data_path="", value="")

Set a context value.

Parameters:
  • data_path (string, (optional)) – Context Attributes, rna context string
  • value (string, (optional)) – Value, Assign value
File :

op/wm.py:64

bpy.ops.wm.context_set_value(data_path="", value="")

Set a context value.

Parameters:
  • data_path (string, (optional)) – Context Attributes, rna context string
  • value (string, (optional)) – Value, Assignment value (as a string)
File :

op/wm.py:190

bpy.ops.wm.context_toggle(data_path="")

Toggle a context value.

Parameters:
  • data_path (string, (optional)) – Context Attributes, rna context string
File :

op/wm.py:205

bpy.ops.wm.context_toggle_enum(data_path="", value_1="", value_2="")

Toggle a context value.

Parameters:
  • data_path (string, (optional)) – Context Attributes, rna context string
  • value_1 (string, (optional)) – Value, Toggle enum
  • value_2 (string, (optional)) – Value, Toggle enum
File :

op/wm.py:229

bpy.ops.wm.debug_menu(debugval=0)

Open a popup to set the debug level

Parameters:
  • debugval (int in [-10000, 10000], (optional)) – Debug Value
bpy.ops.wm.doc_edit(doc_new="", doc_id="")

Load online reference docs

Parameters:
  • doc_new (string, (optional)) – Edit Description
  • doc_id (string, (optional)) – Doc ID
File :

op/wm.py:563

bpy.ops.wm.doc_view(doc_id="")

Load online reference docs

Parameters:
  • doc_id (string, (optional)) – Doc ID
File :

op/wm.py:518

bpy.ops.wm.exit_blender()

Quit Blender

bpy.ops.wm.interaction_preset_add(name="")

Add an Application Interaction Preset

Parameters:
  • name (string, (optional)) – Name, Name of the preset, used to make the path name
File :

op/presets.py:40

bpy.ops.wm.keyconfig_export(filepath="keymap.py", filter_text=True, filter_python=True, kc_name="", filter_folder=True)

Export key configuration to a python script

Parameters:
  • filepath (string, (optional)) – File Path, Filepath to write file to
  • filter_text (boolean, (optional)) – Filter text
  • filter_python (boolean, (optional)) – Filter python
  • kc_name (string, (optional)) – KeyConfig Name, Name to save the key config as
  • filter_folder (boolean, (optional)) – Filter folders
File :

ui/space_userpref_keymap.py:589

bpy.ops.wm.keyconfig_import(keep_original=True, filepath="keymap.py", filter_folder=True, filter_text=True, filter_python=True)

Import key configuration from a python script

Parameters:
  • keep_original (boolean, (optional)) – Keep original, Keep original file after copying to configuration folder
  • filepath (string, (optional)) – File Path, Filepath to write file to
  • filter_folder (boolean, (optional)) – Filter folders
  • filter_text (boolean, (optional)) – Filter text
  • filter_python (boolean, (optional)) – Filter python
File :

ui/space_userpref_keymap.py:521

bpy.ops.wm.keyconfig_remove()

Remove key config

File :ui/space_userpref_keymap.py:773
bpy.ops.wm.keyconfig_test()

Test keyconfig for conflicts

File :ui/space_userpref_keymap.py:488
bpy.ops.wm.keyitem_add()

Add key map item

File :ui/space_userpref_keymap.py:729
bpy.ops.wm.keyitem_remove(item_id=0)

Remove key map item

Parameters:
  • item_id (int in [-inf, inf], (optional)) – Item Identifier, Identifier of the item to remove
File :

ui/space_userpref_keymap.py:755

bpy.ops.wm.keyitem_restore(item_id=0)

Restore key map item

Parameters:
  • item_id (int in [-inf, inf], (optional)) – Item Identifier, Identifier of the item to remove
File :

ui/space_userpref_keymap.py:714

bpy.ops.wm.keymap_edit()

Edit stored key map

File :ui/space_userpref_keymap.py:680
bpy.ops.wm.keymap_restore(all=False)

Restore key map(s)

Parameters:
  • all (boolean, (optional)) – All Keymaps, Restore all keymaps to default
File :

ui/space_userpref_keymap.py:694

Link or Append from a Library .blend file

Parameters:
  • filepath (string, (optional)) – File Path, Path to file
  • directory (string, (optional)) – Directory, Directory of the file
  • filename (string, (optional)) – File Name, Name of the file
  • filter_blender (boolean, (optional)) – Filter .blend files
  • filter_image (boolean, (optional)) – Filter image files
  • filter_movie (boolean, (optional)) – Filter movie files
  • filter_python (boolean, (optional)) – Filter python files
  • filter_font (boolean, (optional)) – Filter font files
  • filter_sound (boolean, (optional)) – Filter sound files
  • filter_text (boolean, (optional)) – Filter text files
  • filter_btx (boolean, (optional)) – Filter btx files
  • filter_collada (boolean, (optional)) – Filter COLLADA files
  • filter_folder (boolean, (optional)) – Filter folders
  • filemode (int in [1, 9], (optional)) – File Browser Mode, The setting for the file browser mode to load a .blend file, a library or a special file
  • relative_path (boolean, (optional)) – Relative Path, Select the file relative to the blend file
  • link (boolean, (optional)) – Link, Link the objects or datablocks rather than appending
  • autoselect (boolean, (optional)) – Select, Select the linked objects
  • active_layer (boolean, (optional)) – Active Layer, Put the linked objects on the active layer
  • instance_groups (boolean, (optional)) – Instance Groups, Create instances for each group as a DupliGroup
  • files (Collection of OperatorFileListElement, (optional)) – Files
bpy.ops.wm.memory_statistics()

Print memory statistics to the console

bpy.ops.wm.open_mainfile(filepath="", filter_blender=True, filter_image=False, filter_movie=False, filter_python=False, filter_font=False, filter_sound=False, filter_text=False, filter_btx=False, filter_collada=False, filter_folder=True, filemode=8, load_ui=True, use_scripts=True)

Open a Blender file

Parameters:
  • filepath (string, (optional)) – File Path, Path to file
  • filter_blender (boolean, (optional)) – Filter .blend files
  • filter_image (boolean, (optional)) – Filter image files
  • filter_movie (boolean, (optional)) – Filter movie files
  • filter_python (boolean, (optional)) – Filter python files
  • filter_font (boolean, (optional)) – Filter font files
  • filter_sound (boolean, (optional)) – Filter sound files
  • filter_text (boolean, (optional)) – Filter text files
  • filter_btx (boolean, (optional)) – Filter btx files
  • filter_collada (boolean, (optional)) – Filter COLLADA files
  • filter_folder (boolean, (optional)) – Filter folders
  • filemode (int in [1, 9], (optional)) – File Browser Mode, The setting for the file browser mode to load a .blend file, a library or a special file
  • load_ui (boolean, (optional)) – Load UI, Load user interface setup in the .blend file
  • use_scripts (boolean, (optional)) – Trusted Source, Allow blend file execute scripts automatically, default available from system preferences
bpy.ops.wm.path_open(filepath="")

Open a path in a file browser

Parameters:
  • filepath (string, (optional)) – File Path
File :

op/wm.py:476

bpy.ops.wm.properties_add(data_path="")

Internal use (edit a property data_path)

Parameters:
  • data_path (string, (optional)) – Property Edit, Property data_path edit
File :

op/wm.py:710

bpy.ops.wm.properties_edit(description="", min=0.0, max=1.0, data_path="", value="", property="")

Internal use (edit a property data_path)

Parameters:
  • description (string, (optional)) – Tip
  • min (float in [-inf, inf], (optional)) – Min
  • max (float in [-inf, inf], (optional)) – Max
  • data_path (string, (optional)) – Property Edit, Property data_path edit
  • value (string, (optional)) – Property Value, Property value edit
  • property (string, (optional)) – Property Name, Property name edit
File :

op/wm.py:643

bpy.ops.wm.properties_remove(property="", data_path="")

Internal use (edit a property data_path)

Parameters:
  • property (string, (optional)) – Property Name, Property name edit
  • data_path (string, (optional)) – Property Edit, Property data_path edit
File :

op/wm.py:737

bpy.ops.wm.read_homefile(factory=False)

Open the default file (doesn’t save the current file)

Parameters:
  • factory (boolean, (optional)) – Factory Settings
bpy.ops.wm.recover_auto_save(filepath="", filter_blender=True, filter_image=False, filter_movie=False, filter_python=False, filter_font=False, filter_sound=False, filter_text=False, filter_btx=False, filter_collada=False, filter_folder=False, filemode=8)

Open an automatically saved file to recover it

Parameters:
  • filepath (string, (optional)) – File Path, Path to file
  • filter_blender (boolean, (optional)) – Filter .blend files
  • filter_image (boolean, (optional)) – Filter image files
  • filter_movie (boolean, (optional)) – Filter movie files
  • filter_python (boolean, (optional)) – Filter python files
  • filter_font (boolean, (optional)) – Filter font files
  • filter_sound (boolean, (optional)) – Filter sound files
  • filter_text (boolean, (optional)) – Filter text files
  • filter_btx (boolean, (optional)) – Filter btx files
  • filter_collada (boolean, (optional)) – Filter COLLADA files
  • filter_folder (boolean, (optional)) – Filter folders
  • filemode (int in [1, 9], (optional)) – File Browser Mode, The setting for the file browser mode to load a .blend file, a library or a special file
bpy.ops.wm.recover_last_session()

Open the last closed file (“quit.blend”)

bpy.ops.wm.redraw_timer(type='DRAW', iterations=10)

Simple redraw timer to test the speed of updating the interface

Parameters:
  • type (enum in [‘DRAW’, ‘DRAW_SWAP’, ‘DRAW_WIN’, ‘DRAW_WIN_SWAP’, ‘ANIM_STEP’, ‘ANIM_PLAY’, ‘UNDO’], (optional, never None)) – Type
  • iterations (int in [1, inf], (optional)) – Iterations, Number of times to redraw
bpy.ops.wm.save_as_mainfile(filepath="", check_existing=True, filter_blender=True, filter_image=False, filter_movie=False, filter_python=False, filter_font=False, filter_sound=False, filter_text=False, filter_btx=False, filter_collada=False, filter_folder=True, filemode=8, compress=False, relative_remap=True, copy=False)

Save the current file in the desired location

Parameters:
  • filepath (string, (optional)) – File Path, Path to file
  • check_existing (boolean, (optional)) – Check Existing, Check and warn on overwriting existing files
  • filter_blender (boolean, (optional)) – Filter .blend files
  • filter_image (boolean, (optional)) – Filter image files
  • filter_movie (boolean, (optional)) – Filter movie files
  • filter_python (boolean, (optional)) – Filter python files
  • filter_font (boolean, (optional)) – Filter font files
  • filter_sound (boolean, (optional)) – Filter sound files
  • filter_text (boolean, (optional)) – Filter text files
  • filter_btx (boolean, (optional)) – Filter btx files
  • filter_collada (boolean, (optional)) – Filter COLLADA files
  • filter_folder (boolean, (optional)) – Filter folders
  • filemode (int in [1, 9], (optional)) – File Browser Mode, The setting for the file browser mode to load a .blend file, a library or a special file
  • compress (boolean, (optional)) – Compress, Write compressed .blend file
  • relative_remap (boolean, (optional)) – Remap Relative, Remap relative paths when saving in a different directory
  • copy (boolean, (optional)) – Save Copy, Save a copy of the actual working state but does not make saved file active.
bpy.ops.wm.save_homefile()

Make the current file the default .blend file

bpy.ops.wm.save_mainfile(filepath="", check_existing=True, filter_blender=True, filter_image=False, filter_movie=False, filter_python=False, filter_font=False, filter_sound=False, filter_text=False, filter_btx=False, filter_collada=False, filter_folder=True, filemode=8, compress=False, relative_remap=False)

Save the current Blender file

Parameters:
  • filepath (string, (optional)) – File Path, Path to file
  • check_existing (boolean, (optional)) – Check Existing, Check and warn on overwriting existing files
  • filter_blender (boolean, (optional)) – Filter .blend files
  • filter_image (boolean, (optional)) – Filter image files
  • filter_movie (boolean, (optional)) – Filter movie files
  • filter_python (boolean, (optional)) – Filter python files
  • filter_font (boolean, (optional)) – Filter font files
  • filter_sound (boolean, (optional)) – Filter sound files
  • filter_text (boolean, (optional)) – Filter text files
  • filter_btx (boolean, (optional)) – Filter btx files
  • filter_collada (boolean, (optional)) – Filter COLLADA files
  • filter_folder (boolean, (optional)) – Filter folders
  • filemode (int in [1, 9], (optional)) – File Browser Mode, The setting for the file browser mode to load a .blend file, a library or a special file
  • compress (boolean, (optional)) – Compress, Write compressed .blend file
  • relative_remap (boolean, (optional)) – Remap Relative, Remap relative paths when saving in a different directory
bpy.ops.wm.search_menu()

Undocumented (contribute)

bpy.ops.wm.splash()

Opens a blocking popup region with release info

bpy.ops.wm.url_open(url="")

Open a website in the Webbrowser

Parameters:
  • url (string, (optional)) – URL, URL to open
File :

op/wm.py:463

bpy.ops.wm.window_duplicate()

Duplicate the current Blender window

bpy.ops.wm.window_fullscreen_toggle()

Toggle the current window fullscreen

Previous topic

View3d Operators

Next topic

World Operators