Blender V5.0
DNA_windowmanager_enums.h File Reference
#include "BLI_utildefines.h"

Go to the source code of this file.

Macros

#define OPERATOR_FLAGS_ALL
#define OPERATOR_RETVAL_CHECK(ret)

Enumerations

enum  wmOperatorStatus {
  OPERATOR_RUNNING_MODAL = (1 << 0) , OPERATOR_CANCELLED = (1 << 1) , OPERATOR_FINISHED = (1 << 2) , OPERATOR_PASS_THROUGH = (1 << 3) ,
  OPERATOR_HANDLED = (1 << 4) , OPERATOR_INTERFACE = (1 << 5)
}
enum  {
  OP_IS_INVOKE = (1 << 0) , OP_IS_REPEAT = (1 << 1) , OP_IS_REPEAT_LAST = (1 << 2) , OP_IS_MODAL_GRAB_CURSOR = (1 << 3) ,
  OP_IS_MODAL_CURSOR_REGION = (1 << 4)
}

Functions

 ENUM_OPERATORS (wmOperatorStatus, OPERATOR_INTERFACE)

Macro Definition Documentation

◆ OPERATOR_FLAGS_ALL

#define OPERATOR_FLAGS_ALL

◆ OPERATOR_RETVAL_CHECK

Enumeration Type Documentation

◆ anonymous enum

anonymous enum

wmOperator.flag

Enumerator
OP_IS_INVOKE 

Low level flag so exec() operators can tell if they were invoked, use with care. Typically this shouldn't make any difference, but it rare cases its needed (see smooth-view).

OP_IS_REPEAT 

So we can detect if an operators exec() call is activated by adjusting the last action.

OP_IS_REPEAT_LAST 

So we can detect if an operators exec() call is activated from SCREEN_OT_repeat_last.

This difference can be important because previous settings may be used, even with PROP_SKIP_SAVE the repeat last operator will use the previous settings. Unlike OP_IS_REPEAT the selection (and context generally) may be different each time. See #60777 for an example of when this is needed.

OP_IS_MODAL_GRAB_CURSOR 

When the cursor is grabbed

OP_IS_MODAL_CURSOR_REGION 

Allow modal operators to have the region under the cursor for their context (the region-type is maintained to prevent errors).

Definition at line 45 of file DNA_windowmanager_enums.h.

◆ wmOperatorStatus

Operator type return flags: exec(), invoke() modal(), return values.

Enumerator
OPERATOR_RUNNING_MODAL 
OPERATOR_CANCELLED 
OPERATOR_FINISHED 
OPERATOR_PASS_THROUGH 

Add this flag if the event should pass through.

OPERATOR_HANDLED 

In case operator got executed outside WM code (like via file-select).

OPERATOR_INTERFACE 

Used for operators that act indirectly (eg. popup menu).

Note
this isn't great design (using operators to trigger UI) avoid where possible.

Definition at line 16 of file DNA_windowmanager_enums.h.

Function Documentation

◆ ENUM_OPERATORS()

ENUM_OPERATORS ( wmOperatorStatus ,
OPERATOR_INTERFACE  )

References OPERATOR_INTERFACE.