Fix error in rigify property generation
[blender-addons.git] / mesh_snap_utilities_line / keys.py
blob29523966e5b82460c8a98b605a52be69e1abd53a
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():
7 return (
8 "Mesh",
9 {"space_type": 'EMPTY', "region_type": 'WINDOW'},
10 {"items": [
11 ("mesh.snap_utilities_line", {"type": 'K', "value": 'PRESS'},
12 {"properties": [("wait_for_input", True)],
13 "active":False}),
14 ]},
17 """
18 def km_snap_utilities_modal_map():
19 items = []
20 modal_enum = []
21 keymap = (
22 km_snap_utilities_modal_keymap,
23 {"space_type": 'EMPTY', "region_type": 'WINDOW', "modal": True, "modal_enum": modal_enum},
24 {"items": items},
27 modal_enum.extend([
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", ""),
35 items.extend([
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),
49 return keymap
50 """
52 def km_3d_view_tool_snap_utilities_line(tool_mouse):
53 return (
54 km_tool_snap_utilities_line,
55 {"space_type": 'VIEW_3D', "region_type": 'WINDOW'},
56 {"items": [
57 ("mesh.snap_utilities_line", {"type": tool_mouse, "value": 'PRESS'},
58 {"properties": [("wait_for_input", False)]}),
59 ]},
62 def km_view3d_empty(km_name):
63 return (
64 km_name,
65 {"space_type": 'VIEW_3D', "region_type": 'WINDOW'},
66 {"items": []},
69 # ------------------------------------------------------------------------------
70 # Full Configuration
72 def generate_empty_snap_utilities_tools_keymaps():
73 return [
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'):
80 return [
81 km_mesh_snap_utilities_operators(),
84 def generate_snap_utilities_tools_keymaps(tool_mouse = 'LEFTMOUSE'):
85 return [
86 # Tool System.
87 km_3d_view_tool_snap_utilities_line(tool_mouse),
90 def generate_snap_utilities_keymaps(tool_mouse = 'LEFTMOUSE'):
91 return [
92 km_mesh_snap_utilities_operators(),
94 # Modal maps.
95 #km_snap_utilities_modal_map(),
97 # Tool System.
98 km_3d_view_tool_snap_utilities_line(tool_mouse),