user: Show practical ways to work with Wm Operators in a Blender add-on or script – include code.

assistant: /src/branch/main/scripts/startup/bl_operators/file.py#L289)

bpy.ops.wm.call_asset_shelf_popover(*\**, *name=''*)
:   Open a predefined asset shelf in a popup

    Parameters:
    :   **name** (*string**,* *(**optional**,* *never None**)*) – Asset Shelf Name, Identifier of the asset shelf to display

bpy.ops.wm.call_menu(*\**, *name=''*)
:   Open a predefined menu

    Parameters:
    :   **name** (*string**,* *(**optional**,* *never None**)*) – Name, Name of the menu

bpy.ops.wm.call_menu_pie(*\**, *name=''*)
:   Open a predefined pie menu

    Parameters:
    :   **name** (*string**,* *(**optional**,* *never None**)*) – Name, Name of the pie menu

bpy.ops.wm.call_panel(*\**, *name=''*, *keep_open=True*)
:   Open a predefined panel

    Parameters:
    :   - **name** (*string**,* *(**optional**,* *never None**)*) – Name, Name of the menu
        - **keep_open** (*boolean**,* *(**optional**)*) – Keep Open

bpy.ops.wm.clear_recent_files(*\**, *remove='ALL'*)
:   Clear the recent files list

    Parameters:
    :   **remove** (enum in [`'ALL'`, `'MISSING'`], (optional)) – Remove

bpy.ops.wm.collection_export_all()
:   Invoke all configured exporters for all collections

bpy.ops.wm.context_collection_boolean_set(*\**, *data_path_iter=''*, *data_path_item=''*, *type='TOGGLE'*)
:   Set boolean values for a collection of items

    Parameters:
    :   - **data_path_iter** (*string**,* *(**optional**,* *never None**)*) – data_path_iter, The data path relative to the context, must point to an iterable
        - **data_path_item** (*string**,* *(**optional**,* *never None**)*) – data_path_item, The data path from each iterable to the value (int or float)
        - **type** (enum in [`'TOGGLE'`, `'ENABLE'`, `'DISABLE'`], (optional)) – Type

    File:
    :   [startup/bl_operators/wm.py:875](https://projects.blender.org/blender/blender/src/branch/main/scripts/startup/bl_operators/wm.py#L875)

bpy.ops.wm.context_cycle_array(*\**, *data_path=''*, *reverse=False*)
:   Set a context array value (useful for cycling the active mesh edit mode)

    Parameters:
    :   - **data_path** (*string**,* *(**optional**,* *never None**)*) – Context Attributes, Context data-path (expanded using visible windows in the current .blend file)
        - **reverse** (*boolean**,* *(**optional**)*) – Reverse, Cycle backwards

    File:
    :   [startup/bl_operators/wm.py:673](https://projects.blender.org/blender/blender/src/branch/main/scripts/startup/bl_operators/wm.py#L673)

bpy.ops.wm.context_cycle_enum(*\**, *data_path=''*, *reverse=False*, *wrap=False*)
:   Toggle a context value

    Parameters:
    :   - **data_path** (*string**,* *(**optional**,* *never None**)*) – Context Attributes, Context data-path (expanded using visible windows in the current .blend file)
        - **reverse** (*boolean**,* *(**optional**)*) – Reverse, Cycle backwards
        - **wrap** (*boolean**,* *(**optional**)*) – Wrap, Wrap back to the first/last values

    File:
    :   [startup/bl_operators/wm.py:624](https://projects.blender.org/blender/blender/src/branch/main/scripts/startup/bl_operators/wm.py#L624)

bpy.ops.wm.context_cycle_int(*\**, *data_path=''*, *reverse=False*, *wrap=False*)
:   Set a context value (useful for cycling active material, shape keys, groups, etc.)

    Parameters:
    :   - **data_path** (*string**,* *(**optional**,* *never None**)*) – Context Attributes, Context data-path (expanded using visible windows in the current .blend file)
        - **reverse** (*boolean**,* *(**optional**)*) – Reverse, Cycle backwards
        - **wrap** (*boolean**,* *(**optional**)*) – Wrap, Wrap back to the first/last values

    File:
    :   [startup/bl_operators/wm.py:584](https://projects.blender.org/blender/blender/src/branch/main/scripts/startup/bl_operators/wm.py#L584)

bpy.ops.wm.context_menu_enum(*\**, *data_path=''*)
:   Undocumented, consider [contributing](https://developer.blender.org/).

    Parameters:
    :   **data_path** (*string**,* *(**optional**,* *never None**)*) – Context Attributes, Context data-path (expanded using visible windows in the current .blend file)

    File:
    :   [startup/bl_operators/wm.py:703](https://projects.blender.org/blender/blender/src/branch/main/scripts/startup/bl_operators/wm.py#L703)

bpy.ops.wm.context_modal_mouse(*\**, *data_path_iter=''*, *data_path_item=''*, *header_text=''*, *input_scale=0.01*, *invert=False*, *initial_x=0*)
:   Adjust arbitrary values with mouse input

    Parameters:
    :   - **data_path_iter** (*string**,* *(**optional**,* *never None**)*) – data_path_iter, The data path relative to the context, must point to an iterable
        - **data_path_item** (*string**,* *(**optional**,* *never None**)*) – data_path_item, The data path from each iterable to the value (int or float)
        - **header_text** (*string**,* *(**optional**,* *never None**)*) – Header Text, Text to display in header during scale
        - **input_scale** (*float in* *[**-inf**,* *inf**]**,* *(**optional**)*) – input_scale, Scale the mouse movement by this value before applying the delta
        - **invert** (*boolean**,* *(**optional**)*) – invert, Invert the mouse input
        - **initial_x** (*int in* *[**-inf**,* *inf**]**,* *(**optional**)*) – initial_x

    File:
    :   [startup/bl_operators/wm.py:1014](https://projects.blender.org/blender/blender/src/branch/main/scripts/startup/bl_operators/wm.py#L1014)

bpy.ops.wm.context_pie_enum(*\**, *data_path=''*)
:   Undocumented, consider [contributing](https://developer.blender.org/).

    Parameters:
    :   **data_path** (*string**,* *(**optional**,* *never None**)*) – Context Attributes, Context data-path (expanded using visible windows in the current .blend file)

    File:
    :   [startup/bl_operators/wm.py:735](https://projects.blender.org/blender/blender/src/branch/main/scripts/startup/bl_operators/wm.py#L735)

bpy.ops.wm.context_scale_float(*\**, *data_path=''*, *value=1.0*)
:   Scale a float context value

    Parameters:
    :   - **data_path** (*string**,* *(**optional**,* *never None**)*) – Context Attributes, Context data-path (expanded using visible windows in the current .blend file)
        - **value** (*float in* *[**-inf**,* *inf**]**,* *(**optional**)*) – Value, Assign value

    File:
    :   [startup/bl_operators/wm.py:338](https://projects.blender.org/blender/blender/src/branch/main/scripts/startup/bl_operators/wm.py#L338)

bpy.ops.wm.context_scale_int(*\**, *data_path=''*, *value=1.0*, *always_step=True*)
:   Scale an int context value

    Parameters:
    :   - **data_path** (*string**,* *(**optional**,* *never None**)*) – Context Attributes, Context data-path (expanded using visible windows in the current .blend file)
        - **value** (*float in* *[**-inf**,* *inf**]**,* *(**optional**)*) – Value, Assign value
        - **always_step** (*boolean**,* *(**optional**)*) – Always Step, Always adjust the value by a minimum of 1 when ‘value’ is not 1.0

    File:
    :   [startup/bl_operators/wm.py:376](https://projects.blender.org/blender/blender/src/branch/main/scripts/startup/bl_operators/wm.py#L376)

bpy.ops.wm.context_set_boolean(*\**, *data_path=''*, *value=True*)
:   Set a context value

    Parameters:
    :   - **data_path** (*string**,* *(**optional**,* *never None**)*) – Context Attributes, Context data-path (expanded using visible windows in the current .blend file)
        - **value** (*boolean**,* *(**optional**)*) – Value, Assignment value

    File:
    :   [startup/bl_operators/wm.py:267](https://projects.blender.org/blender/blender/src/branch/main/scripts/startup/bl_operators/wm.py#L267)

bpy.ops.wm.context_set_enum(*\**, *data_path=''*, *value=''*)
:   Set a context value

    Parameters:
    :   - **data_path** (*string**,* *(**optional**,* *never None**)*) – Context Attributes, Context data-path (expanded using visible windows in the current .blend file)
        - **value** (*string**,* *(**optional**,* *never None**)*) – Value, Assignment value (as a string)

    File:
    :   [startup/bl_operators/wm.py:267](https://projects.blender.org/blender/blender/src/branch/main/scripts/startup/bl_operators/wm.py#L267)

bpy.ops.wm.context_set_float(*\**, *data_path=''*, *value=0.0*, *relative=False*)
:   Set a context value

    Parameters:
    :   - **data_path** (*string**,* *(**optional**,* *never None**)*) – Context Attributes, Context data-path (expanded using visible windows in the current .blend file)
        - **value** (*float in* *[**-inf**,* *inf**]**,* *(**optional**)*) – Value, Assignment value
        - **relative** (*boolean**,* *(**optional**)*) – Relative, Apply relative to the current value (delta)

    File:
    :   [startup/bl_operators/wm.py:267](https://projects.blender.org/blender/blender/src/branch/main/scripts/startup/bl_operators/wm.py#L267)

bpy.ops.wm.context_set_id(*\**, *data_path=''*, *value=''*)
:   Set a context value to an ID data-block

    Parameters:
    :   - **data_path** (*string**,* *(**optional**,* *never None**)*) – Context Attributes, Context data-path (expanded using visible windows in the current .blend file)
        - **value** (*string**,* *(**optional**,* *never None**)*) – Value, Assign value

    File:
    :   [startup/bl_operators/wm.py:817](https://projects.blender.org/blender/blender/src/branch/main/scripts/startup/bl_operators/wm.py#L817)

bpy.ops.wm.context_set_int(*\**, *data_path=''*, *value=0*, *relative=False*)
:   Set a context value

    Parameters:
    :   - **data_path** (*string**,* *(**optional**,* *never None**)*) – Context Attributes, Context data-path (expanded using visible windows in the current .blend file)
        - **value** (*int in* *[**-inf**,* *inf**]**,* *(**optional**)*) – Value, Assign value
        - **relative** (*boolean**,* *(**optional**)*) – Relative, Apply relative to the current value (delta)

    File:
    :   [startup/bl_operators/wm.py:267](https://projects.blender.org/blender/blender/src/branch/main/scripts/startup/bl_operators/wm.py#L267)

bpy.ops.wm.context_set_string(*\**, *data_path=''*, *value=''*)
:   Set a context value

    Parameters:
    :   - **data_path** (*string**,* *(**optional**,* *never None**)*) – Context Attributes, Context data-path (expanded using visible windows in the current .blend file)
        - **value** (*string**,* *(**optional**,* *never None**)*) – Value, Assign value

    File:
    :   [startup/bl_operators/wm.py:267](https://projects.blender.org/blender/blender/src/branch/main/scripts/startup/bl_operators/wm.py#L267)

bpy.ops.wm.context_set_value(*\**, *data_path=''*, *value=''*)
:   Set a context value

    Parameters:
    :   - **data_path** (*string**,* *(**optional**,* *never None**)*) – Context Attributes, Context data-path (expanded using visible windows in the current .blend file)
        - **value** (*string**,* *(**optional**,* *never None**)*) – Value, Assignment value (as a string)

    File:
    :   [startup/bl_operators/wm.py:480](https://projects.blender.org/blender/blender/src/branch/main/scripts/startup/bl_operators/wm.py#L480)

bpy.ops.wm.context_toggle(*\**, *data_path=''*, *module=''*)
:   Toggle a context value

    Parameters:
    :   - **data_path** (*string**,* *(**optional**,* *never None**)*) – Context Attributes, Context data-path (expanded using visible windows in the current .blend file)
        - **module** (*string**,* *(**optional**,* *never None**)*) – Module, Optionally override the context with a module

    File:
    :   [startup/bl_operators/wm.py:504](https://projects.blender.org/blender/blender/src/branch/main/scripts/startup/bl_operators/wm.py#L504)

bpy.ops.wm.context_toggle_enum(*\**, *data_path=''*, *value_1=''*, *value_2=''*)
:   Toggle a context value

    Parameters:
    :   - **data_path** (*string**,* *(**optional**,* *never None**)*) – Context Attributes, Context data-path (expanded using visible windows in the current .blend file)
        - **value_1** (*string**,* *(**optional**,* *never None**)*) – Value, Toggle enum
        - **value_2** (*string**,* *(**optional**,* *never None**)*) – Value, Toggle enum

    File:
    :   [startup/bl_operators/wm.py:545](https://projects.blender.org/blender/blender/src/branch/main/scripts/startup/bl_operators/wm.py#L545)

bpy.ops.wm.debug_menu(*\**, *debug_value=0*)
:   Open a popup to set the debug level

    Parameters:
    :   **debug_value** (*int in* *[**-32768**,* *32767**]**,* *(**optional**)*) – Debug Value

bpy.ops.wm.doc_view(*\**, *doc_id=''*)
:   Open online reference docs in a web browser

    Parameters:
    :   **doc_id** (*string**,* *(**optional**,* *never None**)*) – Doc ID

    File:
    :   [startup/bl_operators/wm.py:1361](https://projects.blender.org/blender/blender/src/branch/main/scripts/startup/bl_operators/wm.py#L1361)

bpy.ops.wm.doc_view_manual(*\**, *doc_id=''*)
:   Load online manual

    Parameters:
    :   **doc_id** (*string**,* *(**optional**,* *never None**)*) – Doc ID

    File:
    :   [startup/bl_operators/wm.py:1334](https://projects.blender.org/blender/blender/src/branch/main/scripts/startup/bl_operators/wm.py#L1334)

bpy.ops.wm.doc_view_manual_ui_context()
:   View a context based online manual in a web browser

bpy.ops.wm.drop_blend_file(*\**, *filepath=''*)
:   Undocumented, consider [contributing](https://developer.blender.org/).

    Parameters:
    :   **filepath** (*string**,* *(**optional**,* *never None**)*) – filepath

    File:
    :   [startup/bl_operators/wm.py:3655](https://projects.blender.org/blender/blender/src/branch/main/scripts/startup/bl_operators/wm.py#L3655)

bpy.ops.wm.drop_import_file(*\**, *directory=''*, *files=None*)
:   Operator that allows file handlers to receive file drops

    Parameters:
    :   - **directory** (*string**,* *(**optional**,* *never None**)*) – Directory, Directory of the file
        - **files** (`bpy_prop_collection` of `OperatorFileListElement`, (optional)) – Files

bpy.ops.wm.fbx_import(*\**, *filepath=''*, *directory=''*, *files=None*, *check_existing=False*, *filter_blender=False*, *filter_backup=False*, *filter_image=False*, *filter_movie=False*, *filter_python=False*, *filter_font=False*, *filter_sound=False*, *filter_text=False*, *filter_archive=False*, *filter_btx=False*, *filter_alembic=False*, *filter_usd=False*, *filter_obj=False*, *filter_volume=False*, *filter_folder=True*, *filter_blenlib=False*, *filemode=8*, *display_type='DEFAULT'*, *sort_method=''*, *global_scale=1.0*, *mtl_name_collision_mode='MAKE_UNIQUE'*, *import_colors='SRGB'*, *use_custom_normals=True*, *use_custom_props=True*, *use_custom_props_enum_as_string=True*, *import_subdivision=False*, *ignore_leaf_bones=False*, *validate_meshes=True*, *use_anim=True*, *anim_offset=1.0*, *filter_glob='\*.fbx'*)
:   Import FBX file into current scene

    Parameters:
    :   - **filepath** (*string**,* *(**optional**,* *never None**)*) – File Path, Path to file
        - **directory** (*string**,* *(**optional**,* *never None**)*) – Directory, Directory of the file
        - **files** (`bpy_prop_collection` of `OperatorFileListElement`, (optional)) – Files
        - **check_existing** (*boolean**,* *(**optional**)*) – Check Existing, Check and warn on overwriting existing files
        - **filter_blender** (*boolean**,* *(**optional**)*) – Filter .blend files
        - **filter_backup** (*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_archive** (*boolean**,* *(**optional**)*) – Filter archive files
        - **filter_btx** (*boolean**,* *(**optional**)*) – Filter btx files
        - **filter_alembic** (*boolean**,* *(**optional**)*) – Filter Alembic files
        - **filter_usd** (*boolean**,* *(**optional**)*) – Filter USD files
        - **filter_obj** (*boolean**,* *(**optional**)*) – Filter OBJ files
        - **filter_volume** (*boolean**,* *(**optional**)*) – Filter OpenVDB volume files
        - **filter_folder** (*boolean**,* *(**optional**)*) – Filter folders
        - **filter_blenlib** (*boolean**,* *(**optional**)*) – Filter Blender IDs
        - **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
        - **display_type** (enum in [`'DEFAULT'`, `'LIST_VERTICAL'`, `'LIST_HORIZONTAL'`, `'THUMBNAIL'`], (optional)) –

          Display Type

          - `DEFAULT`
            Default – Automatically determine display type for files.
          - `LIST_VERTICAL`
            Short List – Display files as short list.
          - `LIST_HORIZONTAL`
            Long List – Display files as a detailed list.
          - `THUMBNAIL`
            Thumbnails – Display files as thumbnails.
        - **sort_method** (*enum in* *[**]**,* *(**optional**)*) – File sorting mode
        - **global_scale** (*float in* *[**1e-06**,* *1e+06**]**,* *(**optional**)*) – Scale
        - **mtl_name_collision_mode** (enum in [`'MAKE_UNIQUE'`, `'REFERENCE_EXISTING'`], (optional)) –

          Material Name Collision, Behavior when the name of an imported material conflicts with an existing material

          - `MAKE_UNIQUE`
            Make Unique – Import each FBX material as a unique Blender material.
          - `REFERENCE_EXISTING`
            Reference Existing – If a material with the same name already exists, reference that instead of importing.
        - **import_colors** (enum in [`'NONE'`, `'SRGB'`, `'LINEAR'`], (optional)) –

          Vertex Colors, Import vertex color attributes

          - `NONE`