diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-08-22 07:19:55 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-08-22 07:22:57 +0300 |
commit | cf038bcb153648c38e9f488c16281af04bd2261c (patch) | |
tree | 0230c7a87545da8e383afa119208d136ff4eeaa2 /source/blender/editors | |
parent | f6778ea63aa267c56b93b2fad3a2f47b0d16b5f5 (diff) |
Tool System: loop cut, confirm on release
When accessed as a tool it felt awkward to click twice to execute.
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/mesh/mesh_ops.c | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/source/blender/editors/mesh/mesh_ops.c b/source/blender/editors/mesh/mesh_ops.c index deb37a5925d..07390cc4017 100644 --- a/source/blender/editors/mesh/mesh_ops.c +++ b/source/blender/editors/mesh/mesh_ops.c @@ -233,14 +233,12 @@ void ED_operatormacros_mesh(void) ot = WM_operatortype_append_macro("MESH_OT_loopcut_slide", "Loop Cut and Slide", "Cut mesh loop and slide it", OPTYPE_UNDO | OPTYPE_REGISTER); WM_operatortype_macro_define(ot, "MESH_OT_loopcut"); - otmacro = WM_operatortype_macro_define(ot, "TRANSFORM_OT_edge_slide"); - RNA_boolean_set(otmacro->ptr, "release_confirm", false); + WM_operatortype_macro_define(ot, "TRANSFORM_OT_edge_slide"); ot = WM_operatortype_append_macro("MESH_OT_offset_edge_loops_slide", "Offset Edge Slide", "Offset edge loop slide", OPTYPE_UNDO | OPTYPE_REGISTER); WM_operatortype_macro_define(ot, "MESH_OT_offset_edge_loops"); otmacro = WM_operatortype_macro_define(ot, "TRANSFORM_OT_edge_slide"); - RNA_boolean_set(otmacro->ptr, "release_confirm", false); RNA_boolean_set(otmacro->ptr, "single_side", true); ot = WM_operatortype_append_macro("MESH_OT_duplicate_move", "Add Duplicate", "Duplicate mesh and move", @@ -333,8 +331,17 @@ void ED_keymap_mesh(wmKeyConfig *keyconf) keymap = WM_keymap_find(keyconf, "Mesh", 0, 0); keymap->poll = ED_operator_editmesh; - WM_keymap_add_item(keymap, "MESH_OT_loopcut_slide", RKEY, KM_PRESS, KM_CTRL, 0); - WM_keymap_add_item(keymap, "MESH_OT_offset_edge_loops_slide", RKEY, KM_PRESS, KM_CTRL | KM_SHIFT, 0); + kmi = WM_keymap_add_item(keymap, "MESH_OT_loopcut_slide", RKEY, KM_PRESS, KM_CTRL, 0); + { + PointerRNA macro_ptr = RNA_pointer_get(kmi->ptr, "TRANSFORM_OT_edge_slide"); + RNA_boolean_set(¯o_ptr, "release_confirm", false); + } + kmi = WM_keymap_add_item(keymap, "MESH_OT_offset_edge_loops_slide", RKEY, KM_PRESS, KM_CTRL | KM_SHIFT, 0); + { + PointerRNA macro_ptr = RNA_pointer_get(kmi->ptr, "TRANSFORM_OT_edge_slide"); + RNA_boolean_set(¯o_ptr, "release_confirm", false); + } + WM_keymap_add_item(keymap, "MESH_OT_inset", IKEY, KM_PRESS, 0, 0); #ifdef USE_WM_KEYMAP_27X WM_keymap_add_item(keymap, "MESH_OT_poke", PKEY, KM_PRESS, KM_ALT, 0); |