user: Give a detailed overview of Enum Search Popup: syntax, arguments, return values, common patterns.

assistant: You may want to have an operator prompt the user to select an item
from a search field, this can be done using `bpy.types.Operator.invoke_search_popup`.

```
import bpy
from bpy.props import EnumProperty

class SearchEnumOperator(bpy.types.Operator):
    bl_idname = "object.search_enum_operator"
    bl_label = "Search Enum Operator"
    bl_property = "my_search"

    my_search: EnumProperty(
        name="My Search",
        items=(
            ('FOO', "Foo", ""),
            ('BAR', "Bar", ""),
            ('BAZ', "Baz", ""),
        ),
    )

    def execute(self, context):
        self.report({'INFO'}, "Selected:" + self.my_search)
        return {'FINISHED'}

    def invoke(self, context, event):
        context.window_manager.invoke_search_popup(self)
        return {'RUNNING_MODAL'}

# Only needed if you want to add into a dynamic menu.
def menu_func(self, context):
    self.layout.operator(SearchEnumOperator.bl_idname, text="Search Enum Operator")

# Register and add to the object menu (required to also use F3 search "Search Enum Operator" for quick access).
bpy.utils.register_class(SearchEnumOperator)
bpy.types.VIEW3D_MT_object.append(menu_func)

# Test call.
bpy.ops.object.search_enum_operator('INVOKE_DEFAULT')
```

base class — [`bpy_struct`](bpy.types.bpy_struct.html#bpy.types.bpy_struct "bpy.types.bpy_struct")

*class* bpy.types.Operator(*bpy_struct*)
:   Storage of an operator being executed, or registered after execution

    bl_cursor_pending
    :   Cursor to use when waiting for the user to select a location to activate the operator (when `bl_options` has `DEPENDS_ON_CURSOR` set)

        Type:
        :   enum in [Window Cursor Items](bpy_types_enum_items/window_cursor_items.html#rna-enum-window-cursor-items), default `'DEFAULT'`

    bl_description
    :   Type:
        :   string, default “”, (never None)

    bl_idname
    :   Type:
        :   string, default “”, (never None)

    bl_label
    :   Type:
        :   string, default “”, (never None)

    bl_options
    :   Options for this operator type

        Type:
        :   enum set in [Operator Type Flag Items](bpy_types_enum_items/operator_type_flag_items.html#rna-enum-operator-type-flag-items), default set()

    bl_translation_context
    :   Type:
        :   string, default “Operator”, (never None)

    bl_undo_group
    :   Type:
        :   string, default “”, (never None)

    has_reports
    :   Operator has a set of reports (warnings and errors) from last execution

        Type:
        :   boolean, default False, (readonly)

    layout
    :   Type:
        :   [`UILayout`](bpy.types.UILayout.html#bpy.types.UILayout "bpy.types.UILayout"), (readonly)

    macros
    :   Type:
        :   [`bpy_prop_collection`](bpy.types.bpy_prop_collection.html#bpy.types.bpy_prop_collection "bpy.types.bpy_prop_collection") of [`Macro`](bpy.types.Macro.html#bpy.types.Macro "bpy.types.Macro"), (readonly)

    name
    :   Type:
        :   string, default “”, (readonly, never None)

    options
    :   Runtime options

        Type:
        :   [`OperatorOptions`](bpy.types.OperatorOptions.html#bpy.types.OperatorOptions "bpy.types.OperatorOptions"), (readonly, never None)

    properties
    :   Type:
        :   [`OperatorProperties`](bpy.types.OperatorProperties.html#bpy.types.OperatorProperties "bpy.types.OperatorProperties"), (readonly, never None)

    bl_property
    :   The name of a property to use as this operators primary property.
        Currently this is only used to select the default property when
        expanding an operator into a menu.

        Type:
        :   str

    report(*type*, *message*)
    :   report

        Parameters:
        :   - **type** (enum set in [Wm Report Items](bpy_types_enum_items/wm_report_items.html#rna-enum-wm-report-items)) – Type
            - **message** (*string**,* *(**never None**)*) – Report Message

    is_repeat()
    :   is_repeat

        Returns:
        :   result

        Return type:
        :   boolean

    *classmethod* poll(*context*)
    :   Test if the operator can be called or not

        Return type:
        :   boolean

    execute(*context*)
    :   Execute the operator

        Returns:
        :   result

        Return type:
        :   enum set in [Operator Return Items](bpy_types_enum_items/operator_return_items.html#rna-enum-operator-return-items)

    check(*context*)
    :   Check the operator settings, return True to signal a change to redraw

        Returns:
        :   result

        Return type:
        :   boolean

    invoke(*context*, *event*)
    :   Invoke the operator

        Returns:
        :   result

        Return type:
        :   enum set in [Operator Return Items](bpy_types_enum_items/operator_return_items.html#rna-enum-operator-return-items)

    modal(*context*, *event*)
    :   Modal operator function

        Returns:
        :   result

        Return type:
        :   enum set in [Operator Return Items](bpy_types_enum_items/operator_return_items.html#rna-enum-operator-return-items)

    draw(*context*)
    :   Draw function for the operator

    cancel(*context*)
    :   Called when the operator is canceled

    *classmethod* description(*context*, *properties*)
    :   Compute a description string that depends on parameters

        Returns:
        :   result

        Return type:
        :   string

    as_keywords(*\**, *ignore=()*)
    :   Return a copy of the properties as a dictionary.

    *classmethod* bl_rna_get_subclass(*id*, *default=None*, */*)
    :   Parameters:
        :   **id** (*str*) – The RNA type identifier.

        Returns:
        :   The RNA type or default when not found.

        Return type:
        :   [`bpy.types.Struct`](bpy.types.Struct.html#bpy.types.Struct "bpy.types.Struct") subclass

    *classmethod* bl_rna_get_subclass_py(*id*, *default=None*, */*)
    :   Parameters:
        :   **id** (*str*) – The RNA type identifier.

        Returns:
        :   The class or default when not found.

        Return type:
        :   type

    *classmethod* poll_message_set(*message*, *\*args*)
    :   Set the message to show in the tool-tip when poll fails.

        When message is callable, additional user defined positional arguments are passed to the message function.

        Parameters:
        :   - **message** (*str* *|* *Callable**[**...**,* *str* *|* *None**]*) – The message or a function that returns the message.
            - **args** (*Any*) – A sequence of arguments to pass to `message`, if it’s a callable, otherwise argument is not available.

### Inherited Properties

|  |  |
| --- | --- |
| - [`bpy_struct.id_data`](bpy.types.bpy_struct.html#bpy.types.bpy_struct.id_data "bpy.types.bpy_struct.id_data") |  |

### Inherited Functions

|  |  |
| --- | --- |
| - [`bpy_struct.as_pointer`](bpy.types.bpy_struct.html#bpy.types.bpy_struct.as_pointer "bpy.types.bpy_struct.as_pointer") - [`bpy_struct.driver_add`](bpy.types.bpy_struct.html#bpy.types.bpy_struct.driver_add "bpy.types.bpy_struct.driver_add") - [`bpy_struct.driver_remove`](bpy.types.bpy_struct.html#bpy.types.bpy_struct.driver_remove "bpy.types.bpy_struct.driver_remove") - [`bpy_struct.get`](bpy.types.bpy_struct.html#bpy.types.bpy_struct.get "bpy.types.bpy_struct.get") - [`bpy_struct.id_properties_clear`](bpy.types.bpy_struct.html#bpy.types.bpy_struct.id_properties_clear "bpy.types.bpy_struct.id_properties_clear") - [`bpy_struct.id_properties_ensure`](bpy.types.bpy_struct.html#bpy.types.bpy_struct.id_properties_ensure "bpy.types.bpy_struct.id_properties_ensure") - [`bpy_struct.id_properties_ui`](bpy.types.bpy_struct.html#bpy.types.bpy_struct.id_properties_ui "bpy.types.bpy_struct.id_properties_ui") - [`bpy_struct.is_property_hidden`](bpy.types.bpy_struct.html#bpy.types.bpy_struct.is_property_hidden "bpy.types.bpy_struct.is_property_hidden") - [`bpy_struct.is_property_overridable_library`](bpy.types.bpy_struct.html#bpy.types.bpy_struct.is_property_overridable_library "bpy.types.bpy_struct.is_property_overridable_library") - [`bpy_struct.is_property_readonly`](bpy.types.bpy_struct.html#bpy.types.bpy_struct.is_property_readonly "bpy.types.bpy_struct.is_property_readonly") - [`bpy_struct.is_property_set`](bpy.types.bpy_struct.html#bpy.types.bpy_struct.is_property_set "bpy.types.bpy_struct.is_property_set") - [`bpy_struct.items`](bpy.types.bpy_struct.html#bpy.types.bpy_struct.items "bpy.types.bpy_struct.items") | - [`bpy_struct.keyframe_delete`](bpy.types.bpy_struct.html#bpy.types.bpy_struct.keyframe_delete "bpy.types.bpy_struct.keyframe_delete") - [`bpy_struct.keyframe_insert`](bpy.types.bpy_struct.html#bpy.types.bpy_struct.keyframe_insert "bpy.types.bpy_struct.keyframe_insert") - [`bpy_struct.keys`](bpy.types.bpy_struct.html#bpy.types.bpy_struct.keys "bpy.types.bpy_struct.keys") - [`bpy_struct.path_from_id`](bpy.types.bpy_struct.html#bpy.types.bpy_struct.path_from_id "bpy.types.bpy_struct.path_from_id") - [`bpy_struct.path_from_module`](bpy.types.bpy_struct.html#bpy.types.bpy_struct.path_from_module "bpy.types.bpy_struct.path_from_module") - [`bpy_struct.path_resolve`](bpy.types.bpy_struct.html#bpy.types.bpy_struct.path_resolve "bpy.types.bpy_struct.path_resolve") - [`bpy_struct.pop`](bpy.types.bpy_struct.html#bpy.types.bpy_struct.pop "bpy.types.bpy_struct.pop") - [`bpy_struct.property_overridable_library_set`](bpy.types.bpy_struct.html#bpy.types.bpy_struct.property_overridable_library_set "bpy.types.bpy_struct.property_overridable_library_set") - [`bpy_struct.property_unset`](bpy.types.bpy_struct.html#bpy.types.bpy_struct.property_unset "bpy.types.bpy_struct.property_unset") - [`bpy_struct.rna_ancestors`](bpy.types.bpy_struct.html#bpy.types.bpy_struct.rna_ancestors "bpy.types.bpy_struct.rna_ancestors") - [`bpy_struct.type_recast`](bpy.types.bpy_struct.html#bpy.types.bpy_struct.type_recast "bpy.types.bpy_struct.type_recast") - [`bpy_struct.values`](bpy.types.bpy_struct.html#bpy.types.bpy_struct.values "bpy.types.bpy_struct.values") |

### References

|  |  |
| --- | --- |
| - [`bpy.context.active_operator`](bpy.context.html#bpy.context.active_operator "bpy.context.active_operator") - [`SpaceFileBrowser.active_operator`](bpy.types.SpaceFileBrowser.html#bpy.types.SpaceFileBrowser.active_operator "bpy.types.SpaceFileBrowser.active_operator") - [`SpaceFileBrowser.operator`](bpy.types.SpaceFileBrowser.html#bpy.types.SpaceFileBrowser.operator "bpy.types.SpaceFileBrowser.operator") - [`Window.modal_operators`](bpy.types.Window.html#bpy.types.Window.modal_operators "bpy.types.Window.modal_operators") - [`WindowManager.fileselect_add`](bpy.types.WindowManager.html#bpy.types.WindowManager.fileselect_add "bpy.types.WindowManager.fileselect_add") - [`WindowManager.invoke_confirm`](bpy.types.WindowManager.html#bpy.types.WindowManager.invoke_confirm "bpy.types.WindowManager.invoke_confirm") | - [`WindowManager.invoke_popup`](bpy.types.WindowManager.html#bpy.types.WindowManager.invoke_popup "bpy.types.WindowManager.invoke_popup") - [`WindowManager.invoke_props_dialog`](bpy.types.WindowManager.html#bpy.types.WindowManager.invoke_props_dialog "bpy.types.WindowManager.invoke_props_dialog") - [`WindowManager.invoke_props_popup`](bpy.types.WindowManager.html#bpy.types.WindowManager.invoke_props_popup "bpy.types.WindowManager.invoke_props_popup") - [`WindowManager.invoke_search_popup`](bpy.types.WindowManager.html#bpy.types.WindowManager.invoke_search_popup "bpy.types.WindowManager.invoke_search_popup") - [`WindowManager.modal_handler_add`](bpy.types.WindowManager.html#bpy.types.WindowManager.modal_handler_add "bpy.types.WindowManager.modal_handler_add") - [`WindowManager.operators`](bpy.types.WindowManager.html#bpy.types.WindowManager.operators "bpy.types.WindowManager.operators") |