Keymap: Use 1..4 to change UV select modes

Support for sync selection switching which keys apply.
This commit is contained in:
2018-07-25 11:02:12 +10:00
parent d8514482fe
commit 2e112f5914
7 changed files with 59 additions and 25 deletions

View File

@@ -80,6 +80,7 @@
#include "RNA_access.h"
#include "RNA_define.h"
#include "RNA_enum_types.h"
#include "WM_api.h"
#include "WM_types.h"
@@ -4404,6 +4405,15 @@ void ED_keymap_uvedit(wmKeyConfig *keyconf)
RNA_string_set(kmi->ptr, "data_path", "tool_settings.use_uv_sculpt");
#endif
/* Select Element (Sync Select: on) */
ED_keymap_editmesh_elem_mode(keyconf, keymap);
/* Hack to prevent fall-through, when the button isn't visible. */
WM_keymap_add_item(keymap, "MESH_OT_select_mode", FOURKEY, KM_PRESS, 0, 0);
/* Select Element (Sync Select: off) */
WM_keymap_add_context_enum_set_items(
keymap, rna_enum_mesh_select_mode_uv_items, "tool_settings.uv_select_mode",
ONEKEY, KM_PRESS, 0, 0);
/* Mark edge seam */
WM_keymap_add_item(keymap, "UV_OT_mark_seam", EKEY, KM_PRESS, KM_CTRL, 0);