Operator(bpy_struct)

base class — bpy_struct

class bpy.types.Operator(bpy_struct)

Storage of an operator being executed, or registered after execution

bl_description
Type :string, default “”
bl_idname
Type :string, default “”
bl_label
Type :string, default “”
bl_options

Options for this operator type

Type :enum in [‘REGISTER’, ‘UNDO’, ‘BLOCKING’, ‘MACRO’, ‘GRAB_POINTER’], default ‘REGISTER’
has_reports

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

Type :boolean, default False, (readonly)
layout
Type :UILayout, (readonly)
name
Type :string, default “”, (readonly)
properties
Type :OperatorProperties, (readonly, never None)
report(type, message)

report

Parameters:
  • type (enum in [‘DEBUG’, ‘INFO’, ‘OPERATOR’, ‘WARNING’, ‘ERROR’, ‘ERROR_INVALID_INPUT’, ‘ERROR_INVALID_CONTEXT’, ‘ERROR_OUT_OF_MEMORY’]) – Type
  • message (string) – Report Message
classmethod poll(context=None)

Test if the operator can be called or not.

Return type:boolean
execute(context=None)

Execute the operator.

Returns:result
Return type:enum in [‘RUNNING_MODAL’, ‘CANCELLED’, ‘FINISHED’, ‘PASS_THROUGH’]
invoke(context=None, event=None)

Invoke the operator.

Returns:result
Return type:enum in [‘RUNNING_MODAL’, ‘CANCELLED’, ‘FINISHED’, ‘PASS_THROUGH’]
modal(context=None, event=None)

Modal operator function.

Returns:result
Return type:enum in [‘RUNNING_MODAL’, ‘CANCELLED’, ‘FINISHED’, ‘PASS_THROUGH’]
draw(context=None)

Draw function for the operator.

Inherited Properties

Inherited Functions

References

Previous topic

ObstacleFluidSettings(FluidSettings)

Next topic

OperatorFileListElement(IDPropertyGroup)