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

assistant: tup/bl_operators/wm.py:2503](https://projects.blender.org/blender/blender/src/branch/main/scripts/startup/bl_operators/wm.py#L2503)

bpy.ops.wm.toolbar_fallback_pie()
:   Undocumented, consider [contributing](https://developer.blender.org/).

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

bpy.ops.wm.toolbar_prompt()
:   Leader key like functionality for accessing tools

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

bpy.ops.wm.url_open(*\**, *url=''*)
:   Open a website in the web browser

    Parameters:
    :   **url** (*string**,* *(**optional**,* *never None**)*) – URL, URL to open

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

bpy.ops.wm.url_open_preset(*\**, *type=''*)
:   Open a preset website in the web browser

    Parameters:
    :   **type** (*enum in* *[**]**,* *(**optional**)*) – Site

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

bpy.ops.wm.usd_export(*\**, *filepath=''*, *check_existing=True*, *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=True*, *filter_obj=False*, *filter_volume=False*, *filter_folder=True*, *filter_blenlib=False*, *filemode=8*, *display_type='DEFAULT'*, *sort_method=''*, *filter_glob='\*.usd'*, *selected_objects_only=False*, *collection=''*, *export_animation=False*, *export_hair=False*, *export_uvmaps=True*, *rename_uvmaps=True*, *export_mesh_colors=True*, *export_normals=True*, *export_materials=True*, *export_subdivision='BEST_MATCH'*, *export_armatures=True*, *only_deform_bones=False*, *export_shapekeys=True*, *use_instancing=False*, *evaluation_mode='RENDER'*, *generate_preview_surface=True*, *generate_materialx_network=False*, *convert_orientation=False*, *export_global_forward_selection='NEGATIVE_Z'*, *export_global_up_selection='Y'*, *export_textures_mode='NEW'*, *overwrite_textures=False*, *relative_paths=True*, *xform_op_mode='TRS'*, *root_prim_path='/root'*, *export_custom_properties=True*, *custom_properties_namespace='userProperties'*, *author_blender_name=True*, *convert_world_material=True*, *allow_unicode=True*, *export_meshes=True*, *export_lights=True*, *export_cameras=True*, *export_curves=True*, *export_points=True*, *export_volumes=True*, *triangulate_meshes=False*, *quad_method='SHORTEST_DIAGONAL'*, *ngon_method='BEAUTY'*, *usdz_downscale_size='KEEP'*, *usdz_downscale_custom_size=128*, *merge_parent_xform=False*, *convert_scene_units='METERS'*, *meters_per_unit=1.0*)
:   Export current scene in a USD archive

    Parameters:
    :   - **filepath** (*string**,* *(**optional**,* *never None**)*) – 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_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
        - **selected_objects_only** (*boolean**,* *(**optional**)*) – Selection Only, Only export selected objects. Unselected parents of selected objects are exported as empty transform
        - **collection** (*string**,* *(**optional**,* *never None**)*) – Collection
        - **export_animation** (*boolean**,* *(**optional**)*) – Animation, Export all frames in the render frame range, rather than only the current frame
        - **export_hair** (*boolean**,* *(**optional**)*) – Hair, Export hair particle systems as USD curves
        - **export_uvmaps** (*boolean**,* *(**optional**)*) – UV Maps, Include all mesh UV maps in the export
        - **rename_uvmaps** (*boolean**,* *(**optional**)*) – Rename UV Maps, Rename active render UV map to “st” to match USD conventions
        - **export_mesh_colors** (*boolean**,* *(**optional**)*) – Color Attributes, Include mesh color attributes in the export
        - **export_normals** (*boolean**,* *(**optional**)*) – Normals, Include normals of exported meshes in the export
        - **export_materials** (*boolean**,* *(**optional**)*) – Materials, Export viewport settings of materials as USD preview materials, and export material assignments as geometry subsets
        - **export_subdivision** (enum in [`'IGNORE'`, `'TESSELLATE'`, `'BEST_MATCH'`], (optional)) –

          Subdivision, Choose how subdivision modifiers will be mapped to the USD subdivision scheme during export

          - `IGNORE`
            Ignore – Scheme = None. Export base mesh without subdivision.
          - `TESSELLATE`
            Tessellate – Scheme = None. Export subdivided mesh.
          - `BEST_MATCH`
            Best Match – Scheme = Catmull-Clark, when possible. Reverts to exporting the subdivided mesh for the Simple subdivision type.
        - **export_armatures** (*boolean**,* *(**optional**)*) – Armatures, Export armatures and meshes with armature modifiers as USD skeletons and skinned meshes
        - **only_deform_bones** (*boolean**,* *(**optional**)*) – Only Deform Bones, Only export deform bones and their parents
        - **export_shapekeys** (*boolean**,* *(**optional**)*) – Shape Keys, Export shape keys as USD blend shapes
        - **use_instancing** (*boolean**,* *(**optional**)*) – Instancing, Export instanced objects as references in USD rather than real objects
        - **evaluation_mode** (enum in [`'RENDER'`, `'VIEWPORT'`], (optional)) –

          Use Settings for, Determines visibility of objects, modifier settings, and other areas where there are different settings for viewport and rendering

          - `RENDER`
            Render – Use Render settings for object visibility, modifier settings, etc.
          - `VIEWPORT`
            Viewport – Use Viewport settings for object visibility, modifier settings, etc.
        - **generate_preview_surface** (*boolean**,* *(**optional**)*) – USD Preview Surface Network, Generate an approximate USD Preview Surface shader representation of a Principled BSDF node network
        - **generate_materialx_network** (*boolean**,* *(**optional**)*) – MaterialX Network, Generate a MaterialX network representation of the materials
        - **convert_orientation** (*boolean**,* *(**optional**)*) – Convert Orientation, Convert orientation axis to a different convention to match other applications
        - **export_global_forward_selection** (enum in [`'X'`, `'Y'`, `'Z'`, `'NEGATIVE_X'`, `'NEGATIVE_Y'`, `'NEGATIVE_Z'`], (optional)) –

          Forward Axis

          - `X`
            X – Positive X axis.
          - `Y`
            Y – Positive Y axis.
          - `Z`
            Z – Positive Z axis.
          - `NEGATIVE_X`
            -X – Negative X axis.
          - `NEGATIVE_Y`
            -Y – Negative Y axis.
          - `NEGATIVE_Z`
            -Z – Negative Z axis.
        - **export_global_up_selection** (enum in [`'X'`, `'Y'`, `'Z'`, `'NEGATIVE_X'`, `'NEGATIVE_Y'`, `'NEGATIVE_Z'`], (optional)) –

          Up Axis

          - `X`
            X – Positive X axis.
          - `Y`
            Y – Positive Y axis.
          - `Z`
            Z – Positive Z axis.
          - `NEGATIVE_X`
            -X – Negative X axis.
          - `NEGATIVE_Y`
            -Y – Negative Y axis.
          - `NEGATIVE_Z`
            -Z – Negative Z axis.
        - **export_textures_mode** (enum in [`'KEEP'`, `'PRESERVE'`, `'NEW'`], (optional)) –

          Export Textures, Texture export method

          - `KEEP`
            Keep – Use original location of textures.
          - `PRESERVE`
            Preserve – Preserve file paths of textures from already imported USD files.
            Export remaining textures to a ‘textures’ folder next to the USD file.
          - `NEW`
            New Path – Export textures to a ‘textures’ folder next to the USD file.
        - **overwrite_textures** (*boolean**,* *(**optional**)*) – Overwrite Textures, Overwrite existing files when exporting textures
        - **relative_paths** (*boolean**,* *(**optional**)*) – Relative Paths, Use relative paths to reference external files (i.e. textures, volumes) in USD, otherwise use absolute paths
        - **xform_op_mode** (enum in [`'TRS'`, `'TOS'`, `'MAT'`], (optional)) –

          Xform Ops, The type of transform operators to write

          - `TRS`
            Translate, Rotate, Scale – Export with translate, rotate, and scale Xform operators.
          - `TOS`
            Translate, Orient, Scale – Export with translate, orient quaternion, and scale Xform operators.
          - `MAT`
            Matrix – Export matrix operator.
        - **root_prim_path** (*string**,* *(**optional**,* *never None**)*) – Root Prim, If set, add a transform primitive with the given path to the stage as the parent of all exported data
        - **export_custom_properties** (*boolean**,* *(**optional**)*) – Custom Properties, Export custom properties as USD attributes
        - **custom_properties_namespace** (*string**,* *(**optional**,* *never None**)*) – Namespace, If set, add the given namespace as a prefix to exported custom property names. This only applies to property names that do not already have a prefix (e.g., it would apply to name ‘bar’ but not ‘foo:bar’) and does not apply to blender object and data names which are always exported in the ‘userProperties:blender’ namespace
        - **author_blender_name** (*boolean**,* *(**optional**)*) – Blender Names, Author USD custom attributes containing the original Blender object and object data names
        - **convert_world_material** (*boolean**,* *(**optional**)*) – World Dome Light, Convert the world material to a USD dome light. Currently works for simple materials, consisting of an environment texture connected to a background shader, with an optional vector multiply of the texture color
        - **allow_unicode** (*boolean**,* *(**optional**)*) – Allow Unicode, Preserve UTF-8 encoded characters when writing USD prim and property names (requires software utilizing USD 24.03 or greater when opening the resulting files)
        - **export_meshes** (*boolean**,* *(**optional**)*) – Meshes, Export all meshes
        - **export_lights** (*boolean**,* *(**optional**)*) – Lights, Export all lights
        - **export_cameras** (*boolean**,* *(**optional**)*) – Cameras, Export all cameras
        - **export_curves** (*boolean**,* *(**optional**)*) – Curves, Export all curves
        - **export_points** (*boolean**,* *(**optional**)*) – Point Clouds, Export all point clouds
        - **export_volumes** (*boolean**,* *(**optional**)*) – Volumes, Export all volumes
        - **triangulate_meshes** (*boolean**,* *(**optional**)*) – Triangulate Meshes, Triangulate meshes during export
        - **quad_method** (enum in [Modifier Triangulate Quad Method Items](bpy_types_enum_items/modifier_triangulate_quad_method_items.html#rna-enum-modifier-triangulate-quad-method-items), (optional)) – Quad Method, Method for splitting the quads into triangles
        - **ngon_method** (enum in [Modifier Triangulate Ngon Method Items](bpy_types_enum_items/modifier_triangulate_ngon_method_items.html#rna-enum-modifier-triangulate-ngon-method-items), (optional)) – N-gon Method, Method for splitting the n-gons into triangles
        - **usdz_downscale_size** (enum in [`'KEEP'`, `'256'`, `'512'`, `'1024'`, `'2048'`, `'4096'`, `'CUSTOM'`], (optional)) –

          USDZ Texture Downsampling, Choose a maximum size for all exported textures

          - `KEEP`
            Keep – Keep all current texture sizes.
          - `256`
            256 – Resize to a maximum of 256 pixels.
          - `512`
            512 – Resize to a maximum of 512 pixels.
          - `1024`
            1024 – Resize to a maximum of 1024 pixels.
          - `2048`
            2048 – Resize to a maximum of 2048 pixels.
          - `4096`
            4096 – Resize to a maximum of 4096 pixels.
          - `CUSTOM`
            Custom – Specify a custom size.
        - **usdz_downscale_custom_size** (*int in* *[**64**,* *16384**]**,* *(**optional**)*) – USDZ Custom Downscale Size, Custom size for downscaling exported textures
        - **merge_parent_xform** (*boolean**,* *(**optional**)*) – Merge parent Xform, Merge USD primitives with their Xform parent if possible. USD does not allow nested UsdGeomGprims, intermediary Xform prims will be defined to keep the USD file valid when encountering object hierarchies.
        - **convert_scene_units** (enum in [`'METERS'`, `'KILOMETERS'`, `'CENTIMETERS'`, `'MILLIMETERS'`, `'INCHES'`, `'FEET'`, `'YARDS'`, `'CUSTOM'`], (optional)) –

          Units, Set the USD Stage meters per unit to the chosen measurement, or a custom value

          - `METERS`
            Meters – Scene meters per unit to 1.0.
          - `KILOMETERS`
            Kilometers – Scene meters per unit to 1000.0.
          - `CENTIMETERS`
            Centimeters – Scene meters per unit to 0.01.
          - `MILLIMETERS`
            Millimeters – Scene meters per unit to 0.001.
          - `INCHES`
            Inches – Scene meters per unit to 0.0254.
          - `FEET`
            Feet – Scene meters per unit to 0.3048.
          - `YARDS`
            Yards – Scene meters per unit to 0.9144.
          - `CUSTOM`
            Custom – Specify a custom scene meters per unit value.
        - **meters_per_unit** (*float in* *[**0.0001**,* *1000**]**,* *(**optional**)*) – Meters Per Unit, Custom value for meters per unit in the USD Stage

bpy.ops.wm.usd_import(*\**, *filepath=''*, *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=True*, *filter_obj=False*, *filter_volume=False*, *filter_folder=True*, *filter_blenlib=False*, *filemode=8*, *relative_path=True*, *display_type='DEFAULT'*, *sort_method=''*, *filter_glob='\*.usd'*, *scale=1.0*, *set_frame_range=True*, *import_cameras=True*, *import_curves=True*, *import_lights=True*, *import_materials=True*, *import_meshes=True*, *import_volumes=True*, *import_shapes=True*, *import_skeletons=True*, *import_blendshapes=True*, *import_points=True*, *import_subdivision=False*, *support_scene_instancing=True*, *import_visible_only=True*, *create_collection=False*, *read_mesh_uvs=True*, *read_mesh_colors=True*, *read_mesh_attributes=True*, *prim_path_mask=''*, *import_guide=False*, *import_proxy=False*, *import_render=True*, *import_all_materials=False*, *import_usd_preview=True*, *set_material_blend=True*, *light_intensity_scale=1.0*, *mtl_purpose='MTL_FULL'*, *mtl_name_collision_mode='MAKE_UNIQUE'*, *import_textures_mode='IMPORT_PACK'*, *import_textures_dir='//textures/'*, *tex_name_collision_mode='USE_EXISTING'*, *property_import_mode='ALL'*, *validate_meshes=False*, *create_world_material=True*, *import_defined_only=True*, *merge_parent_xform=True*, *apply_unit_conversion_scale=True*)
:   Import USD stage into current scene

    Parameters:
    :   - **filepath** (*string**,* *(**optional**,* *never None**)*) – 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_backup** (*boolean**,* *(**optional**)*) – Filter .blend files
        - **filter_image** (*boolean**,* *(**optional**)*) – Filter image files
        - **filter_movie** (*boolean**,* *(**optional**)*) – Filter movie files
        - **filter_python** (*boolean**,* *