forked from bartvdbraak/blender
Comments: wmOperator.cancel & modal
This commit is contained in:
parent
68496c0b38
commit
375ede0f3f
@ -542,7 +542,15 @@ typedef struct wmOperatorType {
|
||||
* canceled due to some external reason, cancel is called
|
||||
* - see defines below for return values */
|
||||
int (*invoke)(struct bContext *, struct wmOperator *, const struct wmEvent *) ATTR_WARN_UNUSED_RESULT;
|
||||
|
||||
/* Called when a modal operator is canceled (not used often).
|
||||
* Internal cleanup can be done here if needed. */
|
||||
void (*cancel)(struct bContext *, struct wmOperator *);
|
||||
|
||||
/* Modal is used for operators which continuously run, eg:
|
||||
* fly mode, knife tool, circle select are all examples of modal operators.
|
||||
* Modal operators can handle events which would normally access other operators,
|
||||
* they keep running until they don't return `OPERATOR_RUNNING_MODAL`. */
|
||||
int (*modal)(struct bContext *, struct wmOperator *, const struct wmEvent *) ATTR_WARN_UNUSED_RESULT;
|
||||
|
||||
/* verify if the operator can be executed in the current context, note
|
||||
|
Loading…
Reference in New Issue
Block a user