2 #km_snap_utilities_modal_keymap = "Snap Utilities Modal Map"
4 km_tool_snap_utilities_line
= "3D View Tool: Edit Mesh, Make Line"
6 def km_mesh_snap_utilities_operators():
9 {"space_type": 'EMPTY', "region_type": 'WINDOW'},
11 ("mesh.snap_utilities_line", {"type": 'K', "value": 'PRESS'},
12 {"properties": [("wait_for_input", True)],
18 def km_snap_utilities_modal_map():
22 km_snap_utilities_modal_keymap,
23 {"space_type": 'EMPTY', "region_type": 'WINDOW', "modal": True, "modal_enum": modal_enum},
28 ("ADD_CUT", "ADD_CUT", ""),
29 ("CANCEL", "CANCEL", ""),
30 ("CONFIRM", "CONFIRM", ""),
31 ("IGNORE_SNAP_ON", "IGNORE_SNAP_ON", ""),
32 ("IGNORE_SNAP_OFF", "IGNORE_SNAP_OFF", ""),
36 ("ADD_CUT", {"type": 'LEFTMOUSE', "value": 'ANY', "any": True}, None),
37 ("CANCEL", {"type": 'ESC', "value": 'PRESS', "any": True}, None),
38 ("CANCEL", {"type": 'LEFTMOUSE', "value": 'DOUBLE_CLICK', "any": True}, None),
39 ("CANCEL", {"type": 'RIGHTMOUSE', "value": 'PRESS', "any": True}, None),
40 ("CONFIRM", {"type": 'RET', "value": 'PRESS', "any": True}, None),
41 ("CONFIRM", {"type": 'NUMPAD_ENTER', "value": 'PRESS', "any": True}, None),
42 ("CONFIRM", {"type": 'SPACE', "value": 'PRESS', "any": True}, None),
43 ("IGNORE_SNAP_ON", {"type": 'LEFT_SHIFT', "value": 'PRESS', "any": True}, None),
44 ("IGNORE_SNAP_OFF", {"type": 'LEFT_SHIFT', "value": 'RELEASE', "any": True}, None),
45 ("IGNORE_SNAP_ON", {"type": 'RIGHT_SHIFT', "value": 'PRESS', "any": True}, None),
46 ("IGNORE_SNAP_OFF", {"type": 'RIGHT_SHIFT', "value": 'RELEASE', "any": True}, None),
52 def km_3d_view_tool_snap_utilities_line(tool_mouse
):
54 km_tool_snap_utilities_line
,
55 {"space_type": 'VIEW_3D', "region_type": 'WINDOW'},
57 ("mesh.snap_utilities_line", {"type": tool_mouse
, "value": 'PRESS'},
58 {"properties": [("wait_for_input", False)]}),
62 def km_view3d_empty(km_name
):
65 {"space_type": 'VIEW_3D', "region_type": 'WINDOW'},
69 # ------------------------------------------------------------------------------
72 def generate_empty_snap_utilities_tools_keymaps():
74 #km_view3d_empty(km_snap_utilities_modal_keymap),
76 km_view3d_empty(km_tool_snap_utilities_line
),
79 def generate_snap_utilities_global_keymaps(tool_mouse
= 'LEFTMOUSE'):
81 km_mesh_snap_utilities_operators(),
84 def generate_snap_utilities_tools_keymaps(tool_mouse
= 'LEFTMOUSE'):
87 km_3d_view_tool_snap_utilities_line(tool_mouse
),
90 def generate_snap_utilities_keymaps(tool_mouse
= 'LEFTMOUSE'):
92 km_mesh_snap_utilities_operators(),
95 #km_snap_utilities_modal_map(),
98 km_3d_view_tool_snap_utilities_line(tool_mouse
),