diff options
author | Ton Roosendaal <ton@blender.org> | 2009-07-29 21:56:38 +0400 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2009-07-29 21:56:38 +0400 |
commit | 4a1266baadf2251bf19ac8ebe15e334273b1f5a3 (patch) | |
tree | bfe8d1125ed33ab1732a718c7539d3be6081fa5f /source/blender/editors/include/ED_util.h | |
parent | fa7a2091f1afb50e276730c5fdc0ff4b7141f327 (diff) |
2.5
Operator goodies!
--- Macro operators
Operators now can consist of multiple operators. Such a macro operator
is identical and behaves identical to other opererators. Macros can
also be constructed of macros even! Currently only hardcoded macros are
implemented, this to solve combined operators such as 'add duplicate' or
'extrude' (both want a transform appended).
Usage is simple:
- WM_operatortype_append_macro() : add new operatortype, name, flags
- WM_operatortype_macro_define() : add existing operator to macro
(Note: macro_define will also allow properties to be set, doesnt work
right now)
On converting the macro wmOperatorType to a real operator, it makes a
list of all operators, and the standard macro callbacks (exec, invoke,
modal, poll) just will use all.
Important note; switching to a modal operator only works as last in the
chain now!
Macros implemented for duplicate, extrude and rip. Tool menu works fine
for it, also the redo hotkey F4 works properly.
--- Operator redo fix
The operators use the undo system to switch back, but this could give
errors if other actions added undo pushes (buttons, outliner). Now the
redo for operator searches back for the correct undo level.
This fixes issues with many redos.
Note for brecht: removed the ED_undo_push for buttons... it was called
on *every* button now, which is probably too much? For example, using
the 'toolbar' redo also caused this...
Diffstat (limited to 'source/blender/editors/include/ED_util.h')
-rw-r--r-- | source/blender/editors/include/ED_util.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/source/blender/editors/include/ED_util.h b/source/blender/editors/include/ED_util.h index 7ccbf1ff18d..7b1c87f9cb2 100644 --- a/source/blender/editors/include/ED_util.h +++ b/source/blender/editors/include/ED_util.h @@ -44,6 +44,7 @@ void ED_editors_exit (struct bContext *C); /* undo.c */ void ED_undo_push (struct bContext *C, char *str); void ED_undo_push_op (struct bContext *C, struct wmOperator *op); +void ED_undo_pop_op (struct bContext *C, struct wmOperator *op); void ED_undo_pop (struct bContext *C); void ED_undo_redo (struct bContext *C); void ED_OT_undo (struct wmOperatorType *ot); |