diff options
author | Rémi Verschelde <remi@verschelde.fr> | 2016-04-06 14:17:02 +0200 |
---|---|---|
committer | Rémi Verschelde <remi@verschelde.fr> | 2016-04-06 14:17:02 +0200 |
commit | 9dc620f6a225ffaf79dfdffaf843c36d69643e9e (patch) | |
tree | 1cf25babbef53981b1f962460a2ddcb43e152d6d /tools | |
parent | 646e0897829d7baf4b982c59d4bddade85199665 (diff) | |
parent | 8ee8802cbe753c9cb6472da9f906a71954ecae5e (diff) |
Bind Z key (without modifiers) to toggle wireframe in 3D view
Bind Z key (without modifiers) to toggle wireframe in 3D view
Diffstat (limited to 'tools')
-rw-r--r-- | tools/editor/plugins/spatial_editor_plugin.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tools/editor/plugins/spatial_editor_plugin.cpp b/tools/editor/plugins/spatial_editor_plugin.cpp index 71437d97ef..c78b3086ea 100644 --- a/tools/editor/plugins/spatial_editor_plugin.cpp +++ b/tools/editor/plugins/spatial_editor_plugin.cpp @@ -3602,6 +3602,17 @@ void SpatialEditor::_unhandled_key_input(InputEvent p_event) { case KEY_E: _menu_item_pressed(MENU_TOOL_ROTATE); break; case KEY_R: _menu_item_pressed(MENU_TOOL_SCALE); break; + case KEY_Z: { + if (k.mod.shift || k.mod.control || k.mod.command) + break; + + if (view_menu->get_popup()->is_item_checked( view_menu->get_popup()->get_item_index(MENU_VIEW_DISPLAY_WIREFRAME))) { + _menu_item_pressed(MENU_VIEW_DISPLAY_NORMAL); + } else { + _menu_item_pressed(MENU_VIEW_DISPLAY_WIREFRAME); + } + } break; + #if 0 #endif } |