Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Poirier <theeth@yahoo.com>2009-11-18 01:19:48 +0300
committerMartin Poirier <theeth@yahoo.com>2009-11-18 01:19:48 +0300
commit7b05c9ca30cb61d808a7900886135e99719d9feb (patch)
treef77e53bcc49a14595412a494b5eb362bd3f45439 /source/blender/editors/mesh/mesh_ops.c
parent2ae15e39ad01768ce0d54aeb106a9cfa5162efa3 (diff)
Fun stuff with macro
Make macros work with more than one modal operator and mix of modal and invoke/exec As a proof, brought back loopcut + edge slide in a single macro operator called Loopcut and Slide, replacing Loopcut as assigned to Ctrl-R.
Diffstat (limited to 'source/blender/editors/mesh/mesh_ops.c')
-rw-r--r--source/blender/editors/mesh/mesh_ops.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/source/blender/editors/mesh/mesh_ops.c b/source/blender/editors/mesh/mesh_ops.c
index ea968bf6fc9..3ce5bbc7e5a 100644
--- a/source/blender/editors/mesh/mesh_ops.c
+++ b/source/blender/editors/mesh/mesh_ops.c
@@ -170,13 +170,10 @@ void ED_operatormacros_mesh(void)
wmOperatorType *ot;
wmOperatorTypeMacro *otmacro;
int constraint_axis[3] = {0, 0, 1};
-
- /*combining operators with invoke and exec portions doesn't work yet.
- ot= WM_operatortype_append_macro("MESH_OT_loopcut", "Loopcut", OPTYPE_UNDO|OPTYPE_REGISTER);
- WM_operatortype_macro_define(ot, "MESH_OT_edgering_select");
- WM_operatortype_macro_define(ot, "MESH_OT_subdivide");
- */
+ ot= WM_operatortype_append_macro("MESH_OT_loopcut_slide", "Loopcut and Slide", OPTYPE_UNDO|OPTYPE_REGISTER);
+ WM_operatortype_macro_define(ot, "MESH_OT_loopcut");
+ WM_operatortype_macro_define(ot, "TFM_OT_edge_slide");
ot= WM_operatortype_append_macro("MESH_OT_duplicate_move", "Add Duplicate", OPTYPE_UNDO|OPTYPE_REGISTER);
WM_operatortype_macro_define(ot, "MESH_OT_duplicate");
@@ -211,7 +208,7 @@ void ED_keymap_mesh(wmKeyConfig *keyconf)
keymap= WM_keymap_find(keyconf, "EditMesh", 0, 0);
keymap->poll= ED_operator_editmesh;
- WM_keymap_add_item(keymap, "MESH_OT_loopcut", RKEY, KM_PRESS, KM_CTRL, 0);
+ WM_keymap_add_item(keymap, "MESH_OT_loopcut_slide", RKEY, KM_PRESS, KM_CTRL, 0);
/* selecting */
/* standard mouse selection goes via space_view3d */