user: How do I use Bpy.Ops.Wm in Blender? Include parameters, examples, warnings and best practices.

assistant:  with ngon-method: “Beauty”, quad-method: “Shortest Diagonal”, min vertices: 4 ascii_format ( boolean , ( optional ) ) – ASCII Format, Export file in ASCII format, export as binary otherwise filter_glob ( string , ( optional , never None ) ) – Extension Filter bpy.ops.wm. ply_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 , use_scene_unit = False , forward_axis = 'Y' , up_axis = 'Z' , merge_verts = False , import_colors = 'SRGB' , import_attributes = True , filter_glob = '*.ply' ) ¶ Import an PLY file as an object 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 use_scene_unit ( boolean , ( optional ) ) – Scene Unit, Apply current scene’s unit (as defined by unit scale) to imported data forward_axis (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. up_axis (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. merge_verts ( boolean , ( optional ) ) – Merge Vertices, Merges vertices by distance import_colors (enum in [ 'NONE' , 'SRGB' , 'LINEAR' ], (optional)) – Vertex Colors, Import vertex color attributes NONE None – Do not import/export color attributes. SRGB sRGB – Vertex colors in the file are in sRGB color space. LINEAR Linear – Vertex colors in the file are in linear color space. import_attributes ( boolean , ( optional ) ) – Vertex Attributes, Import custom vertex attributes filter_glob ( string , ( optional , never None ) ) – Extension Filter bpy.ops.wm. previews_batch_clear ( * , files = None , directory = '' , filter_blender = True , filter_folder = True , use_scenes = True , use_collections = True , use_objects = True , use_intern_data = True , use_trusted = False , use_backups = True ) ¶ Clear selected .blend file’s previews Parameters : files ( bpy_prop_collection of OperatorFileListElement , (optional)) – files directory ( string , ( optional , never None ) ) – directory filter_blender ( boolean , ( optional ) ) – filter_blender filter_folder ( boolean , ( optional ) ) – filter_folder use_scenes ( boolean , ( optional ) ) – Scenes, Clear scenes’ previews use_collections ( boolean , ( optional ) ) – Collections, Clear collections’ previews use_objects ( boolean , ( optional ) ) – Objects, Clear objects’ previews use_intern_data ( boolean , ( optional ) ) – Materials & Textures, Clear ‘internal’ previews (materials, textures, images, etc.) use_trusted ( boolean , ( optional ) ) – Trusted Blend Files, Enable Python evaluation for selected files use_backups ( boolean , ( optional ) ) – Save Backups, Keep a backup (.blend1) version of the files when saving with cleared previews File : startup/bl_operators/file.py:204 bpy.ops.wm. previews_batch_generate ( * , files = None , directory = '' , filter_blender = True , filter_folder = True , use_scenes = True , use_collections = True , use_objects = True , use_intern_data = True , use_trusted = False , use_backups = True ) ¶ Generate selected .blend file’s previews Parameters : files ( bpy_prop_collection of OperatorFileListElement , (optional)) – Collection of file paths with common directory root directory ( string , ( optional , never None ) ) – Root path of all files listed in files collection filter_blender ( boolean , ( optional ) ) – Show Blender files in the File Browser filter_folder ( boolean , ( optional ) ) – Show folders in the File Browser use_scenes ( boolean , ( optional ) ) – Scenes, Generate scenes’ previews use_collections ( boolean , ( optional ) ) – Collections, Generate collections’ previews use_objects ( boolean , ( optional ) ) – Objects, Generate objects’ previews use_intern_data ( boolean , ( optional ) ) – Materials & Textures, Generate ‘internal’ previews (materials, textures, images, etc.) use_trusted ( boolean , ( optional ) ) – Trusted Blend Files, Enable Python evaluation for selected files use_backups ( boolean , ( optional ) ) – Save Backups, Keep a backup (.blend1) version of the files when saving with generated previews File : startup/bl_operators/file.py:95 bpy.ops.wm. previews_clear ( * , id_type = {} ) ¶ Clear data-block previews (only for some types like objects, materials, textures, etc.) Parameters : id_type (enum set in { 'ALL' , 'GEOMETRY' , 'SHADING' , 'SCENE' , 'COLLECTION' , 'OBJECT' , 'MATERIAL' , 'LIGHT' , 'WORLD' , 'TEXTURE' , 'IMAGE' }, (optional)) – Data-Block Type, Which data-block previews to clear ALL All Types. GEOMETRY All Geometry Types – Clear previews for scenes, collections and objects. SHADING All Shading Types – Clear previews for materials, lights, worlds, textures and images. SCENE Scenes. COLLECTION Collections. OBJECT Objects. MATERIAL Materials. LIGHT Lights. WORLD Worlds. TEXTURE Textures. IMAGE Images. bpy.ops.wm. previews_ensure ( ) ¶ Ensure data-block previews are available and up-to-date (to be saved in .blend file, only for some types like materials, textures, etc.) bpy.ops.wm. properties_add ( * , data_path = '' ) ¶ Add your own property to the data-block Parameters : data_path ( string , ( optional , never None ) ) – Property Edit, Property data_path edit File : startup/bl_operators/wm.py:2136 bpy.ops.wm. properties_context_change ( * , context = '' ) ¶ Jump to a different tab inside the properties editor Parameters : context ( string , ( optional , never None ) ) – Context File : startup/bl_operators/wm.py:2179 bpy.ops.wm. properties_edit ( * , data_path = '' , property_name = '' , property_type = 'FLOAT' , is_overridable_library = False , description = '' , use_soft_limits = False , array_length = 3 , default_int = (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0) , min_int = -10000 , max_int = 10000 , soft_min_int = -10000 , soft_max_int = 10000 , step_int = 1 , default_bool = (False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False) , default_float = (0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0) , min_float = -10000.0 , max_float = -10000.0 , soft_min_float = -10000.0 , soft_max_float = -10000.0 , precision = 3 , step_float = 0.1 , subtype = '' , default_string = '' , id_type = 'OBJECT' , eval_string = '' ) ¶ Change a custom property’s type, or adjust how it is displayed in the interface Parameters : data_path ( string , ( optional , never None ) ) – Property Edit, Property data_path edit property_name ( string , ( optional , never None ) ) – Property Name, Property name edit property_type (enum in [ 'FLOAT' , 'FLOAT_ARRAY' , 'INT' , 'INT_ARRAY' , 'BOOL' , 'BOOL_ARRAY' , 'STRING' , 'DATA_BLOCK' , 'PYTHON' ], (optional)) – Type FLOAT Float – A single floating-point value. FLOAT_ARRAY Float Array – An array of floating-point values. INT Integer – A single integer. INT_ARRAY Integer Array – An array of integers. BOOL Boolean – A true or false value. BOOL_ARRAY Boolean Array – An array of true or false values. STRING String – A string value. DATA_BLOCK Data-Block – A data-block value. PYTHON Python – Edit a Python value directly, for unsupported property types. is_overridable_library ( boolean , ( optional ) ) – Library Overridable, Allow the property to be overridden when the data-block is linked description ( string , ( optional , never None ) ) – Description use_soft_limits ( boolean , ( optional ) ) – Soft Limits, Limits the Property Value slider to a range, values outside the range must be inputted numerically array_length ( int in [ 1 , 32 ] , ( optional ) ) – Array Length default_int ( int array of 32 items in [ -inf , inf ] , ( optional ) ) – Default Value min_int ( int in [ -inf , inf ] , ( optional ) ) – Min max_int ( int in [ -inf , inf ] , ( optional ) ) – Max soft_min_int ( int in [ -inf , inf ] , ( optional ) ) – Soft Min soft_max_int ( int in [ -inf , inf ] , ( optional ) ) – Soft Max step_int ( int in [ 1 , inf ] , ( optional ) ) – Step default_bool ( boolean array of 32 items , ( optional ) ) – Default Value default_float ( float array of 32 items in [ -inf , inf ] , ( optional ) ) – Default Value min_float ( float in [ -inf , inf ] , ( optional ) ) – Min max_float ( float in [ -inf , inf ] , ( optional ) ) – Max soft_min_float ( float in [ -inf , inf ] , ( optional ) ) – Soft Min soft_max_float ( float in [ -inf , inf ] , ( optional ) ) – Soft Max precision ( int in [ 0 , 8 ] , ( optional ) ) – Precision step_float ( float in [ 0.001 , inf ] , ( optional ) ) – Step subtype ( enum in [ ] , ( optional ) ) – Subtype default_string ( string , ( optional , never None ) ) – Default Value id_type (enum in [ 'ACTION' , 'ARMATURE' , 'BRUSH' , 'CACHEFILE' , 'CAMERA' , 'COLLECTION' , 'CURVE' , 'CURVES' , 'FONT' , 'GREASEPENCIL' , 'GREASEPENCIL_V3' , 'IMAGE' , 'KEY' , 'LATTICE' , 'LIBRARY' , 'LIGHT' , 'LIGHT_PROBE' , 'LINESTYLE' , 'MASK' , 'MATERIAL' , 'MESH' , 'META' , 'MOVIECLIP' , 'NODETREE' , 'OBJECT' , 'PAINTCURVE' , 'PALETTE' , 'PARTICLE' , 'POINTCLOUD' , 'SCENE' , 'SCREEN' , 'SOUND' , 'SPEAKER' , 'TEXT' , 'TEXTURE' , 'VOLUME' , 'WINDOWMANAGER' , 'WORKSPACE' , 'WORLD' ], (optional)) – ID Type eval_string ( string , ( optional , never None ) ) – Value, Python value for unsupported custom property types File : startup/bl_operators/wm.py:1869 bpy.ops.wm. properties_edit_value ( * , data_path = '' , property_name = '' , eval_string = '' ) ¶ Edit the value of a custom property Parameters : data_path ( string , ( optional , never None ) ) – Property Edit, Property data_path edit property_name ( string , ( optional , never None ) ) – Property Name, Property name edit eval_string ( string , ( optional , never None ) ) – Value, Value for custom property types that can only be edited as a Python expression File : startup/bl_operators/wm.py:2093 bpy.ops.wm. properties_remove ( * , data_path = '' , property_name = '' ) ¶ Internal use (edit a property data_path) Parameters : data_path ( string , ( optional , never None ) ) – Property Edit, Property data_path edit property_name ( string , ( optional , never None ) ) – Property Name, Property name edit File : startup/bl_operators/wm.py:2193 bpy.ops.wm. quit_blender ( ) ¶ Quit Blender bpy.ops.wm. radial_control ( * , data_path_primary = '' , data_path_secondary = '' , use_secondary = '' , rotation_path = '' , color_path = '' , fill_color_path = '' , fill_color_override_path = '' , fill_color_override_test_path = '' , zoom_path = '' , image_id = '' , secondary_tex = False , release_confirm = False ) ¶ Set some size property (e.g. brush size) with mouse wheel Parameters : data_path_primary ( string , ( optional , never None ) ) – Primary Data Path, Primary path of property to be set by the radial control data_path_secondary ( string , ( optional , never None ) ) – Secondary Data Path, Secondary path of property to be set by the radial control use_secondary ( string , ( optional , never None ) ) – Use Secondary, Path of property to select between the primary and secondary data paths rotation_path ( string , ( optional , never None ) ) – Rotation Path, Path of property used to rotate the texture display color_path ( string , ( optional , never None ) ) – Color Path, Path of property used to set the color of the control fill_color_path ( string , ( optional , never None ) ) – Fill Color Path, Path of property used to set the fill color of the control fill_color_override_path ( string , ( optional , never None ) ) – Fill Color Override Path fill_color_override_test_path ( string , ( optional , never None ) ) – Fill Color Override Test zoom_path ( string , ( optional , never None ) ) – Zoom Path, Path of property used to set the zoom level for the control image_id ( string , ( optional , never None ) ) – Image ID, Path of ID that is used to generate an image for the control secondary_tex ( boolean , ( optional ) ) – Secondary Texture, Tweak brush secondary/mask texture release_confirm ( boolean , ( optional ) ) – Confirm On Release, Finish operation on key release bpy.ops.wm. read_factory_settings ( * , use_factory_startup_app_template_only = False , app_template = 'Template' , use_empty = False ) ¶ Load factory default startup file and preferences. To make changes permanent, use “Save Startup File” and “Save Preferences” Parameters : use_factory_startup_app_template_only ( boolean , ( optional ) ) – Factory Startup App-Template Only use_empty ( boolean , ( optional ) ) – Empty, After loading, remove everything except scenes, windows, and workspaces. This makes it possible to load the startup file with its scene configuration and window layout intact, but no objects, materials, animations, … bpy.ops.wm. read_factory_userpref ( * , use_factory_startup_app_template_only = False ) ¶ Load factory default preferences. To make changes to preferences permanent, use “Save Preferences” Parameters : use_factory_startup_app_template_only ( boolean , ( optional ) ) – Factory Startup App-Template Only bpy.ops.wm. read_history ( ) ¶ Reloads history and bookmarks bpy.ops.wm. read_homefile ( * , filepath = '' , load_ui = True , use_splash = False , use_factory_startup = False , use_factory_startup_app_template_only = False , app_template = 'Template' , use_empty = False ) ¶ Open the default file Parameters : filepath ( string , ( optional , never None ) ) – File Path, Path to an alternative start-up file load_ui ( boolean , ( optional ) ) – Load UI, Load user interface setup from the .blend file use_splash ( boolean , ( optional ) ) – Splash use_factory_startup ( boolean , ( optional ) ) – Factory Startup, Load the default (‘factory startup’) blend file. This is independent of the normal start-up file that the user can save use_factory_startup_app_template_only ( boolean , ( optional ) ) – Factory Startup App-Template Only use_empty ( boolean , ( optional ) ) – Empty, After loading, remove everything except scenes, windows, and workspaces. This makes it possible to load the startup file with its scene configuration and window layout intact, but no objects, materials, animations, … bpy.ops.wm. read_userpref ( ) ¶ Load last saved preferences bpy.ops.wm. recover_auto_save ( * , filepath = '' , hide_props_region = True , check_existing = False , filter_blender = True , 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 = False , filter_blenlib = False , filemode = 8 , display_type = 'LIST_VERTICAL' , sort_method = '' , use_scripts = False ) ¶ Open an automatically saved file to recover it Parameters : filepath ( string , ( optional , never None ) ) – File Path, Path to file hide_props_region ( boolean , ( optional ) ) – Hide Operator Properties, Collapse the region displaying the operator settings 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