user: How do I use Object Operators in Blender? Include parameters, examples, warnings and best practices.

assistant: , 0.0)*, *rotation=(0.0, 0.0, 0.0)*, *scale=(0.0, 0.0, 0.0)*)
:   Add an empty object to the scene

    Parameters:
    :   - **type** (enum in [Object Empty Drawtype Items](bpy_types_enum_items/object_empty_drawtype_items.html#rna-enum-object-empty-drawtype-items), (optional)) – Type
        - **radius** (*float in* *[**0**,* *inf**]**,* *(**optional**)*) – Radius
        - **align** (enum in [`'WORLD'`, `'VIEW'`, `'CURSOR'`], (optional)) –

          Align, The alignment of the new object

          - `WORLD`
            World – Align the new object to the world.
          - `VIEW`
            View – Align the new object to the view.
          - `CURSOR`
            3D Cursor – Use the 3D cursor orientation for the new object.
        - **location** ([`mathutils.Vector`](mathutils.html#mathutils.Vector "mathutils.Vector") of 3 items in [-inf, inf], (optional)) – Location, Location for the newly added object
        - **rotation** ([`mathutils.Euler`](mathutils.html#mathutils.Euler "mathutils.Euler") rotation of 3 items in [-inf, inf], (optional)) – Rotation, Rotation for the newly added object
        - **scale** ([`mathutils.Vector`](mathutils.html#mathutils.Vector "mathutils.Vector") of 3 items in [-inf, inf], (optional)) – Scale, Scale for the newly added object

bpy.ops.object.empty_image_add(*\**, *filepath=''*, *hide_props_region=True*, *check_existing=False*, *filter_blender=False*, *filter_backup=False*, *filter_image=True*, *filter_movie=True*, *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=9*, *relative_path=True*, *show_multiview=False*, *use_multiview=False*, *display_type='DEFAULT'*, *sort_method=''*, *name=''*, *session_uid=0*, *align='WORLD'*, *location=(0.0, 0.0, 0.0)*, *rotation=(0.0, 0.0, 0.0)*, *scale=(0.0, 0.0, 0.0)*, *background=False*)
:   Add an empty image type to scene with data

    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** (*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
        - **relative_path** (*boolean**,* *(**optional**)*) – Relative Path, Select the file relative to the blend file
        - **show_multiview** (*boolean**,* *(**optional**)*) – Enable Multi-View
        - **use_multiview** (*boolean**,* *(**optional**)*) – Use Multi-View
        - **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 [`'DEFAULT'`, `'FILE_SORT_ALPHA'`, `'FILE_SORT_EXTENSION'`, `'FILE_SORT_TIME'`, `'FILE_SORT_SIZE'`, `'ASSET_CATALOG'`], (optional)) –

          File sorting mode

          - `DEFAULT`
            Default – Automatically determine sort method for files.
          - `FILE_SORT_ALPHA`
            Name – Sort the file list alphabetically.
          - `FILE_SORT_EXTENSION`
            Extension – Sort the file list by extension/type.
          - `FILE_SORT_TIME`
            Modified Date – Sort files by modification time.
          - `FILE_SORT_SIZE`
            Size – Sort files by size.
          - `ASSET_CATALOG`
            Asset Catalog – Sort the asset list so that assets in the same catalog are kept together. Within a single catalog, assets are ordered by name. The catalogs are in order of the flattened catalog hierarchy..
        - **name** (*string**,* *(**optional**,* *never None**)*) – Name, Name of the data-block to use by the operator
        - **session_uid** (*int in* *[**-inf**,* *inf**]**,* *(**optional**)*) – Session UID, Session UID of the data-block to use by the operator
        - **align** (enum in [`'WORLD'`, `'VIEW'`, `'CURSOR'`], (optional)) –

          Align, The alignment of the new object

          - `WORLD`
            World – Align the new object to the world.
          - `VIEW`
            View – Align the new object to the view.
          - `CURSOR`
            3D Cursor – Use the 3D cursor orientation for the new object.
        - **location** ([`mathutils.Vector`](mathutils.html#mathutils.Vector "mathutils.Vector") of 3 items in [-inf, inf], (optional)) – Location, Location for the newly added object
        - **rotation** ([`mathutils.Euler`](mathutils.html#mathutils.Euler "mathutils.Euler") rotation of 3 items in [-inf, inf], (optional)) – Rotation, Rotation for the newly added object
        - **scale** ([`mathutils.Vector`](mathutils.html#mathutils.Vector "mathutils.Vector") of 3 items in [-inf, inf], (optional)) – Scale, Scale for the newly added object
        - **background** (*boolean**,* *(**optional**)*) – Put in Background, Make the image render behind all objects

bpy.ops.object.explode_refresh(*\**, *modifier=''*)
:   Refresh data in the Explode modifier

    Parameters:
    :   **modifier** (*string**,* *(**optional**,* *never None**)*) – Modifier, Name of the modifier to edit

bpy.ops.object.fix_to_camera(*\**, *use_location=True*, *use_rotation=True*, *use_scale=True*)
:   Generate new keys to fix the selected object/bone to the camera on unkeyed frames

    Parameters:
    :   - **use_location** (*boolean**,* *(**optional**)*) – Location, Create Location keys when fixing to the scene camera
        - **use_rotation** (*boolean**,* *(**optional**)*) – Rotation, Create Rotation keys when fixing to the scene camera
        - **use_scale** (*boolean**,* *(**optional**)*) – Scale, Create Scale keys when fixing to the scene camera

    File:
    :   [startup/bl_operators/copy_global_transform.py:639](https://projects.blender.org/blender/blender/src/branch/main/scripts/startup/bl_operators/copy_global_transform.py#L639)

bpy.ops.object.forcefield_toggle()
:   Toggle object’s force field

bpy.ops.object.geometry_node_bake_delete_single(*\**, *session_uid=0*, *modifier_name=''*, *bake_id=0*)
:   Delete baked data of a single bake node or simulation

    Parameters:
    :   - **session_uid** (*int in* *[**-inf**,* *inf**]**,* *(**optional**)*) – Session UID, Session UID of the data-block to use by the operator
        - **modifier_name** (*string**,* *(**optional**,* *never None**)*) – Modifier Name, Name of the modifier that contains the node
        - **bake_id** (*int in* *[**0**,* *inf**]**,* *(**optional**)*) – Bake ID, Nested node id of the node

bpy.ops.object.geometry_node_bake_pack_single(*\**, *session_uid=0*, *modifier_name=''*, *bake_id=0*)
:   Pack baked data from disk into the .blend file

    Parameters:
    :   - **session_uid** (*int in* *[**-inf**,* *inf**]**,* *(**optional**)*) – Session UID, Session UID of the data-block to use by the operator
        - **modifier_name** (*string**,* *(**optional**,* *never None**)*) – Modifier Name, Name of the modifier that contains the node
        - **bake_id** (*int in* *[**0**,* *inf**]**,* *(**optional**)*) – Bake ID, Nested node id of the node

bpy.ops.object.geometry_node_bake_single(*\**, *session_uid=0*, *modifier_name=''*, *bake_id=0*)
:   Bake a single bake node or simulation

    Parameters:
    :   - **session_uid** (*int in* *[**-inf**,* *inf**]**,* *(**optional**)*) – Session UID, Session UID of the data-block to use by the operator
        - **modifier_name** (*string**,* *(**optional**,* *never None**)*) – Modifier Name, Name of the modifier that contains the node
        - **bake_id** (*int in* *[**0**,* *inf**]**,* *(**optional**)*) – Bake ID, Nested node id of the node

bpy.ops.object.geometry_node_bake_unpack_single(*\**, *session_uid=0*, *modifier_name=''*, *bake_id=0*, *method='USE_LOCAL'*)
:   Unpack baked data from the .blend file to disk

    Parameters:
    :   - **session_uid** (*int in* *[**-inf**,* *inf**]**,* *(**optional**)*) – Session UID, Session UID of the data-block to use by the operator
        - **modifier_name** (*string**,* *(**optional**,* *never None**)*) – Modifier Name, Name of the modifier that contains the node
        - **bake_id** (*int in* *[**0**,* *inf**]**,* *(**optional**)*) – Bake ID, Nested node id of the node
        - **method** (enum in [`'USE_LOCAL'`, `'WRITE_LOCAL'`, `'USE_ORIGINAL'`, `'WRITE_ORIGINAL'`], (optional)) – Method, How to unpack

bpy.ops.object.geometry_node_tree_copy_assign()
:   Duplicate the active geometry node group and assign it to the active modifier

bpy.ops.object.geometry_nodes_input_attribute_toggle(*\**, *input_name=''*, *modifier_name=''*)
:   Switch between an attribute and a single value to define the data for every element

    Parameters:
    :   - **input_name** (*string**,* *(**optional**,* *never None**)*) – Input Name
        - **modifier_name** (*string**,* *(**optional**,* *never None**)*) – Modifier Name

bpy.ops.object.geometry_nodes_move_to_nodes(*\**, *use_selected_objects=False*)
:   Move inputs and outputs from in the modifier to a new node group

    Parameters:
    :   **use_selected_objects** (*boolean**,* *(**optional**)*) – Selected Objects, Affect all selected objects instead of just the active object

    File:
    :   [startup/bl_operators/geometry_nodes.py:280](https://projects.blender.org/blender/blender/src/branch/main/scripts/startup/bl_operators/geometry_nodes.py#L280)

bpy.ops.object.grease_pencil_add(*\**, *type='EMPTY'*, *use_in_front=True*, *stroke_depth_offset=0.05*, *use_lights=True*, *stroke_depth_order='3D'*, *radius=1.0*, *align='WORLD'*, *location=(0.0, 0.0, 0.0)*, *rotation=(0.0, 0.0, 0.0)*, *scale=(0.0, 0.0, 0.0)*)
:   Add a Grease Pencil object to the scene

    Parameters:
    :   - **type** (enum in [Object Gpencil Type Items](bpy_types_enum_items/object_gpencil_type_items.html#rna-enum-object-gpencil-type-items), (optional)) – Type
        - **use_in_front** (*boolean**,* *(**optional**)*) – Show In Front, Show Line Art Grease Pencil in front of everything
        - **stroke_depth_offset** (*float in* *[**0**,* *inf**]**,* *(**optional**)*) – Stroke Offset, Stroke offset for the Line Art modifier
        - **use_lights** (*boolean**,* *(**optional**)*) – Use Lights, Use lights for this Grease Pencil object
        - **stroke_depth_order** (enum in [`'2D'`, `'3D'`], (optional)) –

          Stroke Depth Order, Defines how the strokes are ordered in 3D space (for objects not displayed ‘In Front’)

          - `2D`
            2D Layers – Display strokes using Grease Pencil layers to define order.
          - `3D`
            3D Location – Display strokes using real 3D position in 3D space.
        - **radius** (*float in* *[**0**,* *inf**]**,* *(**optional**)*) – Radius
        - **align** (enum in [`'WORLD'`, `'VIEW'`, `'CURSOR'`], (optional)) –

          Align, The alignment of the new object

          - `WORLD`
            World – Align the new object to the world.
          - `VIEW`
            View – Align the new object to the view.
          - `CURSOR`
            3D Cursor – Use the 3D cursor orientation for the new object.
        - **location** ([`mathutils.Vector`](mathutils.html#mathutils.Vector "mathutils.Vector") of 3 items in [-inf, inf], (optional)) – Location, Location for the newly added object
        - **rotation** ([`mathutils.Euler`](mathutils.html#mathutils.Euler "mathutils.Euler") rotation of 3 items in [-inf, inf], (optional)) – Rotation, Rotation for the newly added object
        - **scale** ([`mathutils.Vector`](mathutils.html#mathutils.Vector "mathutils.Vector") of 3 items in [-inf, inf], (optional)) – Scale, Scale for the newly added object

bpy.ops.object.grease_pencil_dash_modifier_segment_add(*\**, *modifier=''*)
:   Add a segment to the dash modifier

    Parameters:
    :   **modifier** (*string**,* *(**optional**,* *never None**)*) – Modifier, Name of the modifier to edit

bpy.ops.object.grease_pencil_dash_modifier_segment_move(*\**, *modifier=''*, *type='UP'*)
:   Move the active dash segment up or down

    Parameters:
    :   - **modifier** (*string**,* *(**optional**,* *never None**)*) – Modifier, Name of the modifier to edit
        - **type** (enum in [`'UP'`, `'DOWN'`], (optional)) – Type

bpy.ops.object.grease_pencil_dash_modifier_segment_remove(*\**, *modifier=''*, *index=0*)
:   Remove the active segment from the dash modifier

    Parameters:
    :   - **modifier** (*string**,* *(**optional**,* *never None**)*) – Modifier, Name of the modifier to edit
        - **index** (*int in* *[**0**,* *inf**]**,* *(**optional**)*) – Index, Index of the segment to remove

bpy.ops.object.grease_pencil_time_modifier_segment_add(*\**, *modifier=''*)
:   Add a segment to the time modifier

    Parameters:
    :   **modifier** (*string**,* *(**optional**,* *never None**)*) – Modifier, Name of the modifier to edit

bpy.ops.object.grease_pencil_time_modifier_segment_move(*\**, *modifier=''*, *type='UP'*)
:   Move the active time segment up or down

    Parameters:
    :   - **modifier** (*string**,* *(**optional**,* *never None**)*) – Modifier, Name of the modifier to edit
        - **type** (enum in [`'UP'`, `'DOWN'`], (optional)) – Type

bpy.ops.object.grease_pencil_time_modifier_segment_remove(*\**, *modifier=''*, *index=0*)
:   Remove the active segment from the time modifier

    Parameters:
    :   - **modifier** (*string**,* *(**optional**,* *never None**)*) – Modifier, Name of the modifier to edit
        - **index** (*int in* *[**0**,* *inf**]**,* *(**optional**)*) – Index, Index of the segment to remove

bpy.ops.object.hide_collection(*\**, *collection_index=-1*, *toggle=False*, *extend=False*)
:   Show only objects in collection (Shift to extend)

    Parameters:
    :   - **collection_index** (*int in* *[**-1**,* *inf**]**,* *(**optional**)*) – Collection Index, Index of the collection to change visibility
        - **toggle** (*boolean**,* *(**optional**)*) – Toggle, Toggle visibility
        - **extend** (*boolean**,* *(**optional**)*) – Extend, Extend visibility

bpy.ops.object.hide_render_clear_all()
:   Reveal all render objects by setting the hide render flag

    File:
    :   [startup/bl_operators/object.py:729](https://projects.blender.org/blender/blender/src/branch/main/scripts/startup/bl_operators/object.py#L729)

bpy.ops.object.hide_view_clear(*\**, *select=True*)
:   Reveal temporarily hidden objects

    Parameters:
    :   **select** (*boolean**,* *(**optional**)*) – Select, Select revealed objects

bpy.ops.object.hide_view_set(*\**, *unselected=False*)
:   Temporarily hide objects from the viewport

    Parameters:
    :   **unselected** (*boolean**,* *(**optional**)*) – Unselected, Hide unselected rather than selected objects

bpy.ops.object.hook_add_newob()
:   Hook selected vertices to a newly created object

bpy.ops.object.hook_add_selob(*\**, *use_bone=False*)
:   Hook selected vertices to the first selected object

    Parameters:
    :   **use_bone** (*boolean**,* *(**optional**)*) – Active Bone, Assign the hook to the hook object’s active bone

bpy.ops.object.hook_assign(*\**, *modifier=''*)
:   Assign the selected vertices to a hook

    Parameters:
    :   **modifier** (*enum in* *[**]**,* *(**optional**)*) – Modifier, Modifier number to assign to

bpy.ops.object.hook_recenter(*\**, *modifier=''*)
:   Set hook center to cursor position

    Parameters:
    :   **modifier** (*enum in* *[**]**,* *(**optional**)*) – Modifier, Modifier number to assign to

bpy.ops.object.hook_remove(*\**, *modifier=''*)
:   Remove a hook from the active object

    Parameters:
    :   **modifier** (*enum in* *[**]**,* *(**optional**)*) – Modifier, Modifier number to remove

bpy.ops.object.hook_reset(*\**, *modifier=''*)
:   Recalculate and clear offset transformation

    Parameters:
    :   **modifier** (*enum in* *[**]**,* *(**optional**)*) – Modifier, Modifier number to assign to

bpy.ops.object.hook_select(*\**, *modifier=''*)
:   Select affected vertices on mesh

    Parameters:
    :   **modifier** (*enum in* *[**]**,* *(**optional**)*) – Modifier, Modifier n