Advertisement
Guest User

Blender 2.70 Dvorak Laptop Key Configuration

a guest
Sep 4th, 2018
203
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # From https://github.com/BioticPixels/Blender-Dvorak-Key-Configuration
  2.  
  3. import bpy
  4. import os
  5.  
  6. def kmi_props_setattr(kmi_props, attr, value):
  7.     try:
  8.         setattr(kmi_props, attr, value)
  9.     except AttributeError:
  10.         print("Warning: property '%s' not found in keymap item '%s'" %
  11.               (attr, kmi_props.__class__.__name__))
  12.     except Exception as e:
  13.         print("Warning: %r" % e)
  14.  
  15. wm = bpy.context.window_manager
  16. kc = wm.keyconfigs.new(os.path.splitext(os.path.basename(__file__))[0])
  17.  
  18. # Map Window
  19. km = kc.keymaps.new('Window', space_type='EMPTY', region_type='WINDOW', modal=False)
  20.  
  21. kmi = km.keymap_items.new('wm.window_duplicate', 'W', 'PRESS', ctrl=True, alt=True)
  22. kmi.active = False
  23. kmi = km.keymap_items.new('wm.read_homefile', 'N', 'PRESS', oskey=True)
  24. kmi.active = False
  25. kmi = km.keymap_items.new('wm.call_menu', 'R', 'PRESS', shift=True, oskey=True)
  26. kmi_props_setattr(kmi.properties, 'name', 'INFO_MT_file_open_recent')
  27. kmi = km.keymap_items.new('wm.open_mainfile', 'O', 'PRESS', oskey=True)
  28. kmi.active = False
  29. kmi = km.keymap_items.new('wm.save_mainfile', 'S', 'PRESS', oskey=True)
  30. kmi = km.keymap_items.new('wm.save_as_mainfile', 'S', 'PRESS', shift=True, oskey=True)
  31. kmi = km.keymap_items.new('wm.quit_blender', 'Q', 'PRESS', oskey=True)
  32. kmi = km.keymap_items.new('wm.read_homefile', 'N', 'PRESS', ctrl=True)
  33. kmi.active = False
  34. kmi = km.keymap_items.new('wm.save_homefile', 'U', 'PRESS', ctrl=True)
  35. kmi.active = False
  36. kmi = km.keymap_items.new('wm.call_menu', 'R', 'PRESS', shift=True, ctrl=True)
  37. kmi_props_setattr(kmi.properties, 'name', 'INFO_MT_file_open_recent')
  38. kmi = km.keymap_items.new('wm.open_mainfile', 'O', 'PRESS', ctrl=True)
  39. kmi.active = False
  40. kmi = km.keymap_items.new('wm.open_mainfile', 'F1', 'PRESS')
  41. kmi.active = False
  42. kmi = km.keymap_items.new('wm.link_append', 'O', 'PRESS', ctrl=True, alt=True)
  43. kmi.active = False
  44. kmi = km.keymap_items.new('wm.link_append', 'F1', 'PRESS', shift=True)
  45. kmi_props_setattr(kmi.properties, 'link', False)
  46. kmi_props_setattr(kmi.properties, 'instance_groups', False)
  47. kmi.active = False
  48. kmi = km.keymap_items.new('wm.save_mainfile', 'S', 'PRESS', ctrl=True)
  49. kmi.active = False
  50. kmi = km.keymap_items.new('wm.save_mainfile', 'W', 'PRESS', ctrl=True)
  51. kmi.active = False
  52. kmi = km.keymap_items.new('wm.save_as_mainfile', 'S', 'PRESS', shift=True, ctrl=True)
  53. kmi.active = False
  54. kmi = km.keymap_items.new('wm.save_as_mainfile', 'F2', 'PRESS')
  55. kmi.active = False
  56. kmi = km.keymap_items.new('wm.save_as_mainfile', 'S', 'PRESS', ctrl=True, alt=True)
  57. kmi_props_setattr(kmi.properties, 'copy', True)
  58. kmi.active = False
  59. kmi = km.keymap_items.new('wm.window_fullscreen_toggle', 'F11', 'PRESS', alt=True)
  60. kmi = km.keymap_items.new('wm.quit_blender', 'Q', 'PRESS', ctrl=True)
  61. kmi.active = False
  62. kmi = km.keymap_items.new('wm.redraw_timer', 'T', 'PRESS', ctrl=True, alt=True)
  63. kmi.active = False
  64. kmi = km.keymap_items.new('wm.debug_menu', 'D', 'PRESS', ctrl=True, alt=True)
  65. kmi.active = False
  66. kmi = km.keymap_items.new('wm.search_menu', 'SPACE', 'PRESS')
  67. kmi = km.keymap_items.new('wm.call_menu', 'NDOF_BUTTON_MENU', 'PRESS')
  68. kmi_props_setattr(kmi.properties, 'name', 'USERPREF_MT_ndof_settings')
  69. kmi = km.keymap_items.new('wm.context_set_enum', 'F2', 'PRESS', shift=True)
  70. kmi_props_setattr(kmi.properties, 'data_path', 'area.type')
  71. kmi_props_setattr(kmi.properties, 'value', 'LOGIC_EDITOR')
  72. kmi = km.keymap_items.new('wm.context_set_enum', 'F3', 'PRESS', shift=True)
  73. kmi_props_setattr(kmi.properties, 'data_path', 'area.type')
  74. kmi_props_setattr(kmi.properties, 'value', 'NODE_EDITOR')
  75. kmi = km.keymap_items.new('wm.context_set_enum', 'F4', 'PRESS', shift=True)
  76. kmi_props_setattr(kmi.properties, 'data_path', 'area.type')
  77. kmi_props_setattr(kmi.properties, 'value', 'CONSOLE')
  78. kmi = km.keymap_items.new('wm.context_set_enum', 'F5', 'PRESS', shift=True)
  79. kmi_props_setattr(kmi.properties, 'data_path', 'area.type')
  80. kmi_props_setattr(kmi.properties, 'value', 'VIEW_3D')
  81. kmi = km.keymap_items.new('wm.context_set_enum', 'F6', 'PRESS', shift=True)
  82. kmi_props_setattr(kmi.properties, 'data_path', 'area.type')
  83. kmi_props_setattr(kmi.properties, 'value', 'GRAPH_EDITOR')
  84. kmi = km.keymap_items.new('wm.context_set_enum', 'F7', 'PRESS', shift=True)
  85. kmi_props_setattr(kmi.properties, 'data_path', 'area.type')
  86. kmi_props_setattr(kmi.properties, 'value', 'PROPERTIES')
  87. kmi = km.keymap_items.new('wm.context_set_enum', 'F8', 'PRESS', shift=True)
  88. kmi_props_setattr(kmi.properties, 'data_path', 'area.type')
  89. kmi_props_setattr(kmi.properties, 'value', 'SEQUENCE_EDITOR')
  90. kmi = km.keymap_items.new('wm.context_set_enum', 'F9', 'PRESS', shift=True)
  91. kmi_props_setattr(kmi.properties, 'data_path', 'area.type')
  92. kmi_props_setattr(kmi.properties, 'value', 'OUTLINER')
  93. kmi = km.keymap_items.new('wm.context_set_enum', 'F10', 'PRESS', shift=True)
  94. kmi_props_setattr(kmi.properties, 'data_path', 'area.type')
  95. kmi_props_setattr(kmi.properties, 'value', 'IMAGE_EDITOR')
  96. kmi = km.keymap_items.new('wm.context_set_enum', 'F11', 'PRESS', shift=True)
  97. kmi_props_setattr(kmi.properties, 'data_path', 'area.type')
  98. kmi_props_setattr(kmi.properties, 'value', 'TEXT_EDITOR')
  99. kmi = km.keymap_items.new('wm.context_set_enum', 'F12', 'PRESS', shift=True)
  100. kmi_props_setattr(kmi.properties, 'data_path', 'area.type')
  101. kmi_props_setattr(kmi.properties, 'value', 'DOPESHEET_EDITOR')
  102. kmi = km.keymap_items.new('wm.context_scale_float', 'NDOF_BUTTON_PLUS', 'PRESS')
  103. kmi_props_setattr(kmi.properties, 'data_path', 'user_preferences.inputs.ndof_sensitivity')
  104. kmi_props_setattr(kmi.properties, 'value', 1.100000023841858)
  105. kmi = km.keymap_items.new('wm.context_scale_float', 'NDOF_BUTTON_MINUS', 'PRESS')
  106. kmi_props_setattr(kmi.properties, 'data_path', 'user_preferences.inputs.ndof_sensitivity')
  107. kmi_props_setattr(kmi.properties, 'value', 0.9090908765792847)
  108. kmi = km.keymap_items.new('wm.context_scale_float', 'NDOF_BUTTON_PLUS', 'PRESS', shift=True)
  109. kmi_props_setattr(kmi.properties, 'data_path', 'user_preferences.inputs.ndof_sensitivity')
  110. kmi_props_setattr(kmi.properties, 'value', 1.5)
  111. kmi = km.keymap_items.new('wm.context_scale_float', 'NDOF_BUTTON_MINUS', 'PRESS', shift=True)
  112. kmi_props_setattr(kmi.properties, 'data_path', 'user_preferences.inputs.ndof_sensitivity')
  113. kmi_props_setattr(kmi.properties, 'value', 0.6666666865348816)
  114. kmi = km.keymap_items.new('info.reports_display_update', 'TIMER_REPORT', 'ANY', any=True)
  115.  
  116. # Map Screen
  117. km = kc.keymaps.new('Screen', space_type='EMPTY', region_type='WINDOW', modal=False)
  118.  
  119. kmi = km.keymap_items.new('screen.animation_step', 'TIMER0', 'ANY', any=True)
  120. kmi = km.keymap_items.new('screen.region_blend', 'TIMERREGION', 'ANY', any=True)
  121. kmi = km.keymap_items.new('screen.screen_set', 'RIGHT_ARROW', 'PRESS', ctrl=True)
  122. kmi_props_setattr(kmi.properties, 'delta', 1)
  123. kmi = km.keymap_items.new('screen.screen_set', 'LEFT_ARROW', 'PRESS', ctrl=True)
  124. kmi_props_setattr(kmi.properties, 'delta', -1)
  125. kmi = km.keymap_items.new('screen.screen_full_area', 'UP_ARROW', 'PRESS', ctrl=True)
  126. kmi = km.keymap_items.new('screen.screen_full_area', 'DOWN_ARROW', 'PRESS', ctrl=True)
  127. kmi = km.keymap_items.new('screen.screen_full_area', 'SPACE', 'PRESS', shift=True)
  128. kmi = km.keymap_items.new('screen.screenshot', 'F3', 'PRESS', ctrl=True)
  129. kmi = km.keymap_items.new('screen.screencast', 'F3', 'PRESS', alt=True)
  130. kmi = km.keymap_items.new('screen.region_quadview', 'QUOTE', 'PRESS', ctrl=True, alt=True)
  131. kmi = km.keymap_items.new('screen.repeat_history', 'F3', 'PRESS')
  132. kmi = km.keymap_items.new('screen.repeat_last', 'P', 'PRESS', shift=True)
  133. kmi = km.keymap_items.new('screen.region_flip', 'F5', 'PRESS')
  134. kmi = km.keymap_items.new('screen.redo_last', 'F6', 'PRESS')
  135. kmi = km.keymap_items.new('script.reload', 'F8', 'PRESS')
  136. kmi = km.keymap_items.new('file.execute', 'RET', 'PRESS')
  137. kmi = km.keymap_items.new('file.execute', 'NUMPAD_ENTER', 'PRESS')
  138. kmi = km.keymap_items.new('file.cancel', 'ESC', 'PRESS')
  139. kmi = km.keymap_items.new('ed.undo', 'Z', 'PRESS', oskey=True)
  140. kmi = km.keymap_items.new('ed.redo', 'Z', 'PRESS', shift=True, oskey=True)
  141. kmi = km.keymap_items.new('ed.undo_history', 'Z', 'PRESS', alt=True, oskey=True)
  142. kmi = km.keymap_items.new('ed.undo', 'Z', 'PRESS', ctrl=True)
  143. kmi.active = False
  144. kmi = km.keymap_items.new('ed.redo', 'Z', 'PRESS', shift=True, ctrl=True)
  145. kmi.active = False
  146. kmi = km.keymap_items.new('ed.undo_history', 'Z', 'PRESS', ctrl=True, alt=True)
  147. kmi = km.keymap_items.new('render.render', 'F12', 'PRESS')
  148. kmi_props_setattr(kmi.properties, 'use_viewport', True)
  149. kmi = km.keymap_items.new('render.render', 'F12', 'PRESS', ctrl=True)
  150. kmi_props_setattr(kmi.properties, 'animation', True)
  151. kmi_props_setattr(kmi.properties, 'use_viewport', True)
  152. kmi = km.keymap_items.new('render.view_cancel', 'ESC', 'PRESS')
  153. kmi = km.keymap_items.new('render.view_show', 'F11', 'PRESS')
  154. kmi = km.keymap_items.new('render.play_rendered_anim', 'F11', 'PRESS', ctrl=True)
  155. kmi = km.keymap_items.new('screen.userpref_show', 'W', 'PRESS', oskey=True)
  156. kmi = km.keymap_items.new('screen.userpref_show', 'G', 'PRESS', ctrl=True, alt=True)
  157.  
  158. # Map View2D
  159. km = kc.keymaps.new('View2D', space_type='EMPTY', region_type='WINDOW', modal=False)
  160.  
  161. kmi = km.keymap_items.new('view2d.scroller_activate', 'LEFTMOUSE', 'PRESS')
  162. kmi = km.keymap_items.new('view2d.scroller_activate', 'MIDDLEMOUSE', 'PRESS')
  163. kmi = km.keymap_items.new('view2d.pan', 'MIDDLEMOUSE', 'PRESS')
  164. kmi = km.keymap_items.new('view2d.pan', 'MIDDLEMOUSE', 'PRESS', shift=True)
  165. kmi = km.keymap_items.new('view2d.pan', 'TRACKPADPAN', 'ANY')
  166. kmi = km.keymap_items.new('view2d.scroll_right', 'WHEELDOWNMOUSE', 'PRESS', ctrl=True)
  167. kmi = km.keymap_items.new('view2d.scroll_left', 'WHEELUPMOUSE', 'PRESS', ctrl=True)
  168. kmi = km.keymap_items.new('view2d.scroll_down', 'WHEELDOWNMOUSE', 'PRESS', shift=True)
  169. kmi = km.keymap_items.new('view2d.scroll_up', 'WHEELUPMOUSE', 'PRESS', shift=True)
  170. kmi = km.keymap_items.new('view2d.ndof', 'NDOF_MOTION', 'ANY')
  171. kmi = km.keymap_items.new('view2d.zoom_out', 'WHEELOUTMOUSE', 'PRESS')
  172. kmi = km.keymap_items.new('view2d.zoom_in', 'WHEELINMOUSE', 'PRESS')
  173. kmi = km.keymap_items.new('view2d.zoom_out', 'LEFT_BRACKET', 'PRESS')
  174. kmi = km.keymap_items.new('view2d.zoom_in', 'RIGHT_BRACKET', 'PRESS')
  175. kmi = km.keymap_items.new('view2d.zoom', 'TRACKPADPAN', 'ANY', ctrl=True)
  176. kmi = km.keymap_items.new('view2d.smoothview', 'TIMER1', 'ANY', any=True)
  177. kmi = km.keymap_items.new('view2d.scroll_down', 'WHEELDOWNMOUSE', 'PRESS')
  178. kmi = km.keymap_items.new('view2d.scroll_up', 'WHEELUPMOUSE', 'PRESS')
  179. kmi = km.keymap_items.new('view2d.scroll_right', 'WHEELDOWNMOUSE', 'PRESS')
  180. kmi = km.keymap_items.new('view2d.scroll_left', 'WHEELUPMOUSE', 'PRESS')
  181. kmi = km.keymap_items.new('view2d.zoom', 'MIDDLEMOUSE', 'PRESS', ctrl=True)
  182. kmi = km.keymap_items.new('view2d.zoom', 'TRACKPADZOOM', 'ANY')
  183. kmi = km.keymap_items.new('view2d.zoom_border', 'X', 'PRESS', shift=True)
  184.  
  185. # Map View2D Buttons List
  186. km = kc.keymaps.new('View2D Buttons List', space_type='EMPTY', region_type='WINDOW', modal=False)
  187.  
  188. kmi = km.keymap_items.new('view2d.scroller_activate', 'LEFTMOUSE', 'PRESS')
  189. kmi = km.keymap_items.new('view2d.scroller_activate', 'MIDDLEMOUSE', 'PRESS')
  190. kmi = km.keymap_items.new('view2d.pan', 'MIDDLEMOUSE', 'PRESS')
  191. kmi = km.keymap_items.new('view2d.pan', 'TRACKPADPAN', 'ANY')
  192. kmi = km.keymap_items.new('view2d.scroll_down', 'WHEELDOWNMOUSE', 'PRESS')
  193. kmi = km.keymap_items.new('view2d.scroll_up', 'WHEELUPMOUSE', 'PRESS')
  194. kmi = km.keymap_items.new('view2d.scroll_down', 'PAGE_DOWN', 'PRESS')
  195. kmi_props_setattr(kmi.properties, 'page', True)
  196. kmi = km.keymap_items.new('view2d.scroll_up', 'PAGE_UP', 'PRESS')
  197. kmi_props_setattr(kmi.properties, 'page', True)
  198. kmi = km.keymap_items.new('view2d.zoom', 'MIDDLEMOUSE', 'PRESS', ctrl=True)
  199. kmi = km.keymap_items.new('view2d.zoom', 'TRACKPADZOOM', 'ANY')
  200. kmi = km.keymap_items.new('view2d.zoom', 'TRACKPADPAN', 'ANY', ctrl=True)
  201. kmi = km.keymap_items.new('view2d.zoom_out', 'LEFT_BRACKET', 'PRESS')
  202. kmi = km.keymap_items.new('view2d.zoom_in', 'RIGHT_BRACKET', 'PRESS')
  203. kmi = km.keymap_items.new('view2d.reset', 'BACK_SLASH', 'PRESS')
  204.  
  205. # Map 3D View Generic
  206. km = kc.keymaps.new('3D View Generic', space_type='VIEW_3D', region_type='WINDOW', modal=False)
  207.  
  208. kmi = km.keymap_items.new('view3d.properties', 'B', 'PRESS')
  209. kmi = km.keymap_items.new('view3d.toolshelf', 'Y', 'PRESS')
  210.  
  211. # Map Grease Pencil
  212. km = kc.keymaps.new('Grease Pencil', space_type='EMPTY', region_type='WINDOW', modal=False)
  213.  
  214. kmi = km.keymap_items.new('gpencil.draw', 'LEFTMOUSE', 'PRESS', key_modifier='E')
  215. kmi_props_setattr(kmi.properties, 'mode', 'DRAW')
  216. kmi = km.keymap_items.new('gpencil.draw', 'LEFTMOUSE', 'PRESS', ctrl=True, key_modifier='E')
  217. kmi_props_setattr(kmi.properties, 'mode', 'DRAW_STRAIGHT')
  218. kmi = km.keymap_items.new('gpencil.draw', 'RIGHTMOUSE', 'PRESS', ctrl=True, key_modifier='E')
  219. kmi_props_setattr(kmi.properties, 'mode', 'DRAW_POLY')
  220. kmi = km.keymap_items.new('gpencil.draw', 'RIGHTMOUSE', 'PRESS', key_modifier='E')
  221. kmi_props_setattr(kmi.properties, 'mode', 'ERASER')
  222.  
  223. # Map Face Mask
  224. km = kc.keymaps.new('Face Mask', space_type='EMPTY', region_type='WINDOW', modal=False)
  225.  
  226. kmi = km.keymap_items.new('paint.face_select_all', 'A', 'PRESS')
  227. kmi_props_setattr(kmi.properties, 'action', 'TOGGLE')
  228. kmi = km.keymap_items.new('paint.face_select_all', 'C', 'PRESS', ctrl=True)
  229. kmi_props_setattr(kmi.properties, 'action', 'INVERT')
  230. kmi = km.keymap_items.new('paint.face_select_hide', 'D', 'PRESS')
  231. kmi_props_setattr(kmi.properties, 'unselected', False)
  232. kmi = km.keymap_items.new('paint.face_select_hide', 'D', 'PRESS', shift=True)
  233. kmi_props_setattr(kmi.properties, 'unselected', True)
  234. kmi = km.keymap_items.new('paint.face_select_reveal', 'D', 'PRESS', alt=True)
  235. kmi = km.keymap_items.new('paint.face_select_linked', 'N', 'PRESS', ctrl=True)
  236. kmi = km.keymap_items.new('paint.face_select_linked_pick', 'N', 'PRESS')
  237. kmi_props_setattr(kmi.properties, 'deselect', False)
  238. kmi = km.keymap_items.new('paint.face_select_linked_pick', 'N', 'PRESS', shift=True)
  239. kmi_props_setattr(kmi.properties, 'deselect', True)
  240.  
  241. # Map Weight Paint Vertex Selection
  242. km = kc.keymaps.new('Weight Paint Vertex Selection', space_type='EMPTY', region_type='WINDOW', modal=False)
  243.  
  244. kmi = km.keymap_items.new('paint.vert_select_all', 'A', 'PRESS')
  245. kmi_props_setattr(kmi.properties, 'action', 'TOGGLE')
  246. kmi = km.keymap_items.new('paint.vert_select_all', 'C', 'PRESS', ctrl=True)
  247. kmi_props_setattr(kmi.properties, 'action', 'INVERT')
  248. kmi = km.keymap_items.new('view3d.select_border', 'X', 'PRESS')
  249. kmi = km.keymap_items.new('view3d.select_lasso', 'EVT_TWEAK_A', 'ANY', ctrl=True)
  250. kmi_props_setattr(kmi.properties, 'deselect', False)
  251. kmi = km.keymap_items.new('view3d.select_lasso', 'EVT_TWEAK_A', 'ANY', shift=True, ctrl=True)
  252. kmi_props_setattr(kmi.properties, 'deselect', True)
  253. kmi = km.keymap_items.new('view3d.select_circle', 'J', 'PRESS')
  254.  
  255. # Map Pose
  256. km = kc.keymaps.new('Pose', space_type='EMPTY', region_type='WINDOW', modal=False)
  257.  
  258. kmi = km.keymap_items.new('object.parent_set', 'L', 'PRESS', ctrl=True)
  259. kmi = km.keymap_items.new('wm.call_menu', 'A', 'PRESS', shift=True)
  260. kmi_props_setattr(kmi.properties, 'name', 'INFO_MT_add')
  261. kmi = km.keymap_items.new('pose.hide', 'D', 'PRESS')
  262. kmi_props_setattr(kmi.properties, 'unselected', False)
  263. kmi = km.keymap_items.new('pose.hide', 'D', 'PRESS', shift=True)
  264. kmi_props_setattr(kmi.properties, 'unselected', True)
  265. kmi = km.keymap_items.new('pose.reveal', 'D', 'PRESS', alt=True)
  266. kmi = km.keymap_items.new('wm.call_menu', 'A', 'PRESS', ctrl=True)
  267. kmi_props_setattr(kmi.properties, 'name', 'VIEW3D_MT_pose_apply')
  268. kmi = km.keymap_items.new('pose.rot_clear', 'P', 'PRESS', alt=True)
  269. kmi = km.keymap_items.new('pose.loc_clear', 'I', 'PRESS', alt=True)
  270. kmi = km.keymap_items.new('pose.scale_clear', 'O', 'PRESS', alt=True)
  271. kmi = km.keymap_items.new('pose.quaternions_flip', 'U', 'PRESS', alt=True)
  272. kmi = km.keymap_items.new('pose.rotation_mode_set', 'P', 'PRESS', ctrl=True)
  273. kmi = km.keymap_items.new('pose.copy', 'C', 'PRESS', ctrl=True)
  274. kmi.active = False
  275. kmi = km.keymap_items.new('pose.paste', 'V', 'PRESS', ctrl=True)
  276. kmi_props_setattr(kmi.properties, 'flipped', False)
  277. kmi.active = False
  278. kmi = km.keymap_items.new('pose.paste', 'V', 'PRESS', shift=True, ctrl=True)
  279. kmi_props_setattr(kmi.properties, 'flipped', True)
  280. kmi.active = False
  281. kmi = km.keymap_items.new('pose.copy', 'C', 'PRESS', oskey=True)
  282. kmi = km.keymap_items.new('pose.paste', 'V', 'PRESS', oskey=True)
  283. kmi_props_setattr(kmi.properties, 'flipped', False)
  284. kmi = km.keymap_items.new('pose.paste', 'V', 'PRESS', shift=True, oskey=True)
  285. kmi_props_setattr(kmi.properties, 'flipped', True)
  286. kmi = km.keymap_items.new('pose.select_all', 'A', 'PRESS')
  287. kmi_props_setattr(kmi.properties, 'action', 'TOGGLE')
  288. kmi = km.keymap_items.new('pose.select_all', 'C', 'PRESS', ctrl=True)
  289. kmi_props_setattr(kmi.properties, 'action', 'INVERT')
  290. kmi = km.keymap_items.new('pose.select_parent', 'L', 'PRESS', shift=True)
  291. kmi = km.keymap_items.new('pose.select_hierarchy', 'SLASH', 'PRESS')
  292. kmi_props_setattr(kmi.properties, 'direction', 'PARENT')
  293. kmi_props_setattr(kmi.properties, 'extend', False)
  294. kmi = km.keymap_items.new('pose.select_hierarchy', 'SLASH', 'PRESS', shift=True)
  295. kmi_props_setattr(kmi.properties, 'direction', 'PARENT')
  296. kmi_props_setattr(kmi.properties, 'extend', True)
  297. kmi = km.keymap_items.new('pose.select_hierarchy', 'EQUAL', 'PRESS')
  298. kmi_props_setattr(kmi.properties, 'direction', 'CHILD')
  299. kmi_props_setattr(kmi.properties, 'extend', False)
  300. kmi = km.keymap_items.new('pose.select_hierarchy', 'EQUAL', 'PRESS', shift=True)
  301. kmi_props_setattr(kmi.properties, 'direction', 'CHILD')
  302. kmi_props_setattr(kmi.properties, 'extend', True)
  303. kmi = km.keymap_items.new('pose.select_linked', 'N', 'PRESS')
  304. kmi = km.keymap_items.new('pose.select_grouped', 'I', 'PRESS', shift=True)
  305. kmi = km.keymap_items.new('pose.select_mirror', 'U', 'PRESS', shift=True)
  306. kmi = km.keymap_items.new('pose.constraint_add_with_targets', 'J', 'PRESS', shift=True, ctrl=True)
  307. kmi = km.keymap_items.new('pose.constraints_clear', 'J', 'PRESS', ctrl=True, alt=True)
  308. kmi = km.keymap_items.new('pose.ik_add', 'C', 'PRESS', shift=True)
  309. kmi = km.keymap_items.new('pose.ik_clear', 'C', 'PRESS', ctrl=True, alt=True)
  310. kmi = km.keymap_items.new('wm.call_menu', 'I', 'PRESS', ctrl=True)
  311. kmi_props_setattr(kmi.properties, 'name', 'VIEW3D_MT_pose_group')
  312. kmi = km.keymap_items.new('wm.call_menu', 'COMMA', 'PRESS', shift=True)
  313. kmi_props_setattr(kmi.properties, 'name', 'VIEW3D_MT_bone_options_toggle')
  314. kmi = km.keymap_items.new('wm.call_menu', 'COMMA', 'PRESS', shift=True, ctrl=True)
  315. kmi_props_setattr(kmi.properties, 'name', 'VIEW3D_MT_bone_options_enable')
  316. kmi = km.keymap_items.new('wm.call_menu', 'COMMA', 'PRESS', alt=True)
  317. kmi_props_setattr(kmi.properties, 'name', 'VIEW3D_MT_bone_options_disable')
  318. kmi = km.keymap_items.new('armature.layers_show_all', 'ACCENT_GRAVE', 'PRESS', ctrl=True)
  319. kmi = km.keymap_items.new('pose.armature_layers', 'M', 'PRESS', shift=True)
  320. kmi = km.keymap_items.new('pose.bone_layers', 'M', 'PRESS')
  321. kmi = km.keymap_items.new('transform.transform', 'O', 'PRESS', ctrl=True, alt=True)
  322. kmi_props_setattr(kmi.properties, 'mode', 'BONE_SIZE')
  323. kmi = km.keymap_items.new('anim.keyframe_insert_menu', 'C', 'PRESS')
  324. kmi = km.keymap_items.new('anim.keyframe_delete_v3d', 'C', 'PRESS', alt=True)
  325. kmi = km.keymap_items.new('anim.keying_set_active_set', 'C', 'PRESS', shift=True, ctrl=True, alt=True)
  326. kmi = km.keymap_items.new('poselib.browse_interactive', 'N', 'PRESS', ctrl=True)
  327. kmi = km.keymap_items.new('poselib.pose_add', 'N', 'PRESS', shift=True)
  328. kmi = km.keymap_items.new('poselib.pose_remove', 'N', 'PRESS', alt=True)
  329. kmi = km.keymap_items.new('poselib.pose_rename', 'N', 'PRESS', shift=True, ctrl=True)
  330. kmi = km.keymap_items.new('pose.push', 'PERIOD', 'PRESS', ctrl=True)
  331. kmi = km.keymap_items.new('pose.relax', 'PERIOD', 'PRESS', alt=True)
  332. kmi = km.keymap_items.new('pose.breakdown', 'PERIOD', 'PRESS', shift=True)
  333. kmi = km.keymap_items.new('wm.call_menu', 'COMMA', 'PRESS')
  334. kmi_props_setattr(kmi.properties, 'name', 'VIEW3D_MT_pose_specials')
  335.  
  336. # Map Object Mode
  337. km = kc.keymaps.new('Object Mode', space_type='EMPTY', region_type='WINDOW', modal=False)
  338.  
  339. kmi = km.keymap_items.new('wm.context_cycle_enum', 'R', 'PRESS', shift=True)
  340. kmi_props_setattr(kmi.properties, 'data_path', 'tool_settings.proportional_edit_falloff')
  341. kmi = km.keymap_items.new('wm.context_toggle', 'R', 'PRESS')
  342. kmi_props_setattr(kmi.properties, 'data_path', 'tool_settings.use_proportional_edit_objects')
  343. kmi = km.keymap_items.new('view3d.game_start', 'L', 'PRESS')
  344. kmi = km.keymap_items.new('object.select_all', 'A', 'PRESS')
  345. kmi_props_setattr(kmi.properties, 'action', 'TOGGLE')
  346. kmi = km.keymap_items.new('object.select_all', 'C', 'PRESS', ctrl=True)
  347. kmi_props_setattr(kmi.properties, 'action', 'INVERT')
  348. kmi = km.keymap_items.new('object.select_linked', 'N', 'PRESS', shift=True)
  349. kmi = km.keymap_items.new('object.select_grouped', 'I', 'PRESS', shift=True)
  350. kmi = km.keymap_items.new('object.select_mirror', 'M', 'PRESS', shift=True, ctrl=True)
  351. kmi = km.keymap_items.new('object.select_hierarchy', 'SLASH', 'PRESS')
  352. kmi_props_setattr(kmi.properties, 'direction', 'PARENT')
  353. kmi_props_setattr(kmi.properties, 'extend', False)
  354. kmi = km.keymap_items.new('object.select_hierarchy', 'SLASH', 'PRESS', shift=True)
  355. kmi_props_setattr(kmi.properties, 'direction', 'PARENT')
  356. kmi_props_setattr(kmi.properties, 'extend', True)
  357. kmi = km.keymap_items.new('object.select_hierarchy', 'EQUAL', 'PRESS')
  358. kmi_props_setattr(kmi.properties, 'direction', 'CHILD')
  359. kmi_props_setattr(kmi.properties, 'extend', False)
  360. kmi = km.keymap_items.new('object.select_hierarchy', 'EQUAL', 'PRESS', shift=True)
  361. kmi_props_setattr(kmi.properties, 'direction', 'CHILD')
  362. kmi_props_setattr(kmi.properties, 'extend', True)
  363. kmi = km.keymap_items.new('object.parent_set', 'L', 'PRESS', ctrl=True)
  364. kmi = km.keymap_items.new('object.parent_no_inverse_set', 'L', 'PRESS', shift=True, ctrl=True)
  365. kmi = km.keymap_items.new('object.parent_clear', 'L', 'PRESS', alt=True)
  366. kmi = km.keymap_items.new('object.track_set', 'Y', 'PRESS', ctrl=True)
  367. kmi = km.keymap_items.new('object.track_clear', 'Y', 'PRESS', alt=True)
  368. kmi = km.keymap_items.new('object.constraint_add_with_targets', 'J', 'PRESS', shift=True, ctrl=True)
  369. kmi = km.keymap_items.new('object.constraints_clear', 'J', 'PRESS', ctrl=True, alt=True)
  370. kmi = km.keymap_items.new('object.location_clear', 'I', 'PRESS', alt=True)
  371. kmi = km.keymap_items.new('object.rotation_clear', 'P', 'PRESS', alt=True)
  372. kmi = km.keymap_items.new('object.scale_clear', 'O', 'PRESS', alt=True)
  373. kmi = km.keymap_items.new('object.origin_clear', 'R', 'PRESS', alt=True)
  374. kmi = km.keymap_items.new('object.hide_view_clear', 'D', 'PRESS', alt=True)
  375. kmi = km.keymap_items.new('object.hide_view_set', 'D', 'PRESS')
  376. kmi_props_setattr(kmi.properties, 'unselected', False)
  377. kmi = km.keymap_items.new('object.hide_view_set', 'D', 'PRESS', shift=True)
  378. kmi_props_setattr(kmi.properties, 'unselected', True)
  379. kmi = km.keymap_items.new('object.hide_render_clear', 'D', 'PRESS', ctrl=True, alt=True)
  380. kmi = km.keymap_items.new('object.hide_render_set', 'D', 'PRESS', ctrl=True)
  381. kmi = km.keymap_items.new('object.move_to_layer', 'M', 'PRESS')
  382. kmi = km.keymap_items.new('object.delete', 'BACK_SPACE', 'PRESS')
  383. kmi_props_setattr(kmi.properties, 'use_global', False)
  384. kmi = km.keymap_items.new('object.delete', 'BACK_SPACE', 'PRESS', shift=True)
  385. kmi_props_setattr(kmi.properties, 'use_global', True)
  386. kmi = km.keymap_items.new('object.delete', 'BACK_SPACE', 'PRESS')
  387. kmi_props_setattr(kmi.properties, 'use_global', False)
  388. kmi.active = False
  389. kmi = km.keymap_items.new('object.delete', 'BACK_SPACE', 'PRESS', shift=True)
  390. kmi_props_setattr(kmi.properties, 'use_global', True)
  391. kmi.active = False
  392. kmi = km.keymap_items.new('wm.call_menu', 'A', 'PRESS', shift=True)
  393. kmi_props_setattr(kmi.properties, 'name', 'INFO_MT_add')
  394. kmi = km.keymap_items.new('object.duplicates_make_real', 'A', 'PRESS', shift=True, ctrl=True)
  395. kmi = km.keymap_items.new('wm.call_menu', 'A', 'PRESS', ctrl=True)
  396. kmi_props_setattr(kmi.properties, 'name', 'VIEW3D_MT_object_apply')
  397. kmi = km.keymap_items.new('wm.call_menu', 'G', 'PRESS')
  398. kmi_props_setattr(kmi.properties, 'name', 'VIEW3D_MT_make_single_user')
  399. kmi = km.keymap_items.new('wm.call_menu', 'N', 'PRESS', ctrl=True)
  400. kmi_props_setattr(kmi.properties, 'name', 'VIEW3D_MT_make_links')
  401. kmi = km.keymap_items.new('object.duplicate_move', 'E', 'PRESS', shift=True)
  402. kmi = km.keymap_items.new('object.duplicate_move_linked', 'E', 'PRESS', alt=True)
  403. kmi = km.keymap_items.new('object.join', 'H', 'PRESS', ctrl=True)
  404. kmi = km.keymap_items.new('object.convert', 'J', 'PRESS', alt=True)
  405. kmi = km.keymap_items.new('object.proxy_make', 'L', 'PRESS', ctrl=True, alt=True)
  406. kmi = km.keymap_items.new('object.make_local', 'N', 'PRESS')
  407. kmi = km.keymap_items.new('anim.keyframe_insert_menu', 'C', 'PRESS')
  408. kmi = km.keymap_items.new('anim.keyframe_delete_v3d', 'C', 'PRESS', alt=True)
  409. kmi = km.keymap_items.new('anim.keying_set_active_set', 'C', 'PRESS', shift=True, ctrl=True, alt=True)
  410. kmi = km.keymap_items.new('group.create', 'I', 'PRESS', ctrl=True)
  411. kmi = km.keymap_items.new('group.objects_remove', 'I', 'PRESS', ctrl=True, alt=True)
  412. kmi = km.keymap_items.new('group.objects_remove_all', 'I', 'PRESS', shift=True, ctrl=True, alt=True)
  413. kmi = km.keymap_items.new('group.objects_add_active', 'I', 'PRESS', shift=True, ctrl=True)
  414. kmi = km.keymap_items.new('group.objects_remove_active', 'I', 'PRESS', shift=True, alt=True)
  415. kmi = km.keymap_items.new('wm.call_menu', 'COMMA', 'PRESS')
  416. kmi_props_setattr(kmi.properties, 'name', 'VIEW3D_MT_object_specials')
  417. kmi = km.keymap_items.new('object.subdivision_set', 'ZERO', 'PRESS', shift=True, alt=True)
  418. kmi_props_setattr(kmi.properties, 'level', 0)
  419. kmi = km.keymap_items.new('object.subdivision_set', 'ONE', 'PRESS', shift=True, alt=True)
  420. kmi_props_setattr(kmi.properties, 'level', 1)
  421. kmi = km.keymap_items.new('object.subdivision_set', 'TWO', 'PRESS', shift=True, alt=True)
  422. kmi_props_setattr(kmi.properties, 'level', 2)
  423. kmi = km.keymap_items.new('object.subdivision_set', 'THREE', 'PRESS', shift=True, alt=True)
  424. kmi_props_setattr(kmi.properties, 'level', 3)
  425. kmi = km.keymap_items.new('object.subdivision_set', 'FOUR', 'PRESS', shift=True, alt=True)
  426. kmi_props_setattr(kmi.properties, 'level', 4)
  427. kmi = km.keymap_items.new('object.subdivision_set', 'FIVE', 'PRESS', shift=True, alt=True)
  428. kmi_props_setattr(kmi.properties, 'level', 5)
  429.  
  430. # Map Image Paint
  431. km = kc.keymaps.new('Image Paint', space_type='EMPTY', region_type='WINDOW', modal=False)
  432.  
  433. kmi = km.keymap_items.new('paint.image_paint', 'LEFTMOUSE', 'PRESS')
  434. kmi_props_setattr(kmi.properties, 'mode', 'NORMAL')
  435. kmi = km.keymap_items.new('paint.image_paint', 'LEFTMOUSE', 'PRESS', ctrl=True)
  436. kmi_props_setattr(kmi.properties, 'mode', 'INVERT')
  437. kmi = km.keymap_items.new('paint.grab_clone', 'RIGHTMOUSE', 'PRESS')
  438. kmi = km.keymap_items.new('paint.sample_color', 'O', 'PRESS')
  439. kmi = km.keymap_items.new('brush.active_index_set', 'ONE', 'PRESS')
  440. kmi_props_setattr(kmi.properties, 'mode', 'image_paint')
  441. kmi_props_setattr(kmi.properties, 'index', 0)
  442. kmi = km.keymap_items.new('brush.active_index_set', 'TWO', 'PRESS')
  443. kmi_props_setattr(kmi.properties, 'mode', 'image_paint')
  444. kmi_props_setattr(kmi.properties, 'index', 1)
  445. kmi = km.keymap_items.new('brush.active_index_set', 'THREE', 'PRESS')
  446. kmi_props_setattr(kmi.properties, 'mode', 'image_paint')
  447. kmi_props_setattr(kmi.properties, 'index', 2)
  448. kmi = km.keymap_items.new('brush.active_index_set', 'FOUR', 'PRESS')
  449. kmi_props_setattr(kmi.properties, 'mode', 'image_paint')
  450. kmi_props_setattr(kmi.properties, 'index', 3)
  451. kmi = km.keymap_items.new('brush.active_index_set', 'FIVE', 'PRESS')
  452. kmi_props_setattr(kmi.properties, 'mode', 'image_paint')
  453. kmi_props_setattr(kmi.properties, 'index', 4)
  454. kmi = km.keymap_items.new('brush.active_index_set', 'SIX', 'PRESS')
  455. kmi_props_setattr(kmi.properties, 'mode', 'image_paint')
  456. kmi_props_setattr(kmi.properties, 'index', 5)
  457. kmi = km.keymap_items.new('brush.active_index_set', 'SEVEN', 'PRESS')
  458. kmi_props_setattr(kmi.properties, 'mode', 'image_paint')
  459. kmi_props_setattr(kmi.properties, 'index', 6)
  460. kmi = km.keymap_items.new('brush.active_index_set', 'EIGHT', 'PRESS')
  461. kmi_props_setattr(kmi.properties, 'mode', 'image_paint')
  462. kmi_props_setattr(kmi.properties, 'index', 7)
  463. kmi = km.keymap_items.new('brush.active_index_set', 'NINE', 'PRESS')
  464. kmi_props_setattr(kmi.properties, 'mode', 'image_paint')
  465. kmi_props_setattr(kmi.properties, 'index', 8)
  466. kmi = km.keymap_items.new('brush.active_index_set', 'ZERO', 'PRESS')
  467. kmi_props_setattr(kmi.properties, 'mode', 'image_paint')
  468. kmi_props_setattr(kmi.properties, 'index', 9)
  469. kmi = km.keymap_items.new('brush.active_index_set', 'ONE', 'PRESS', shift=True)
  470. kmi_props_setattr(kmi.properties, 'mode', 'image_paint')
  471. kmi_props_setattr(kmi.properties, 'index', 10)
  472. kmi = km.keymap_items.new('brush.active_index_set', 'TWO', 'PRESS', shift=True)
  473. kmi_props_setattr(kmi.properties, 'mode', 'image_paint')
  474. kmi_props_setattr(kmi.properties, 'index', 11)
  475. kmi = km.keymap_items.new('brush.active_index_set', 'THREE', 'PRESS', shift=True)
  476. kmi_props_setattr(kmi.properties, 'mode', 'image_paint')
  477. kmi_props_setattr(kmi.properties, 'index', 12)
  478. kmi = km.keymap_items.new('brush.active_index_set', 'FOUR', 'PRESS', shift=True)
  479. kmi_props_setattr(kmi.properties, 'mode', 'image_paint')
  480. kmi_props_setattr(kmi.properties, 'index', 13)
  481. kmi = km.keymap_items.new('brush.active_index_set', 'FIVE', 'PRESS', shift=True)
  482. kmi_props_setattr(kmi.properties, 'mode', 'image_paint')
  483. kmi_props_setattr(kmi.properties, 'index', 14)
  484. kmi = km.keymap_items.new('brush.active_index_set', 'SIX', 'PRESS', shift=True)
  485. kmi_props_setattr(kmi.properties, 'mode', 'image_paint')
  486. kmi_props_setattr(kmi.properties, 'index', 15)
  487. kmi = km.keymap_items.new('brush.active_index_set', 'SEVEN', 'PRESS', shift=True)
  488. kmi_props_setattr(kmi.properties, 'mode', 'image_paint')
  489. kmi_props_setattr(kmi.properties, 'index', 16)
  490. kmi = km.keymap_items.new('brush.active_index_set', 'EIGHT', 'PRESS', shift=True)
  491. kmi_props_setattr(kmi.properties, 'mode', 'image_paint')
  492. kmi_props_setattr(kmi.properties, 'index', 17)
  493. kmi = km.keymap_items.new('brush.active_index_set', 'NINE', 'PRESS', shift=True)
  494. kmi_props_setattr(kmi.properties, 'mode', 'image_paint')
  495. kmi_props_setattr(kmi.properties, 'index', 18)
  496. kmi = km.keymap_items.new('brush.active_index_set', 'ZERO', 'PRESS', shift=True)
  497. kmi_props_setattr(kmi.properties, 'mode', 'image_paint')
  498. kmi_props_setattr(kmi.properties, 'index', 19)
  499. kmi = km.keymap_items.new('brush.scale_size', 'SLASH', 'PRESS')
  500. kmi_props_setattr(kmi.properties, 'scalar', 0.8999999761581421)
  501. kmi = km.keymap_items.new('brush.scale_size', 'EQUAL', 'PRESS')
  502. kmi_props_setattr(kmi.properties, 'scalar', 1.1111111640930176)
  503. kmi = km.keymap_items.new('wm.radial_control', 'U', 'PRESS')
  504. kmi_props_setattr(kmi.properties, 'data_path_primary', 'tool_settings.image_paint.brush.size')
  505. kmi_props_setattr(kmi.properties, 'data_path_secondary', 'tool_settings.unified_paint_settings.size')
  506. kmi_props_setattr(kmi.properties, 'use_secondary', 'tool_settings.unified_paint_settings.use_unified_size')
  507. kmi_props_setattr(kmi.properties, 'rotation_path', 'tool_settings.image_paint.brush.mask_texture_slot.angle')
  508. kmi_props_setattr(kmi.properties, 'color_path', 'tool_settings.image_paint.brush.cursor_color_add')
  509. kmi_props_setattr(kmi.properties, 'fill_color_path', 'tool_settings.image_paint.brush.color')
  510. kmi_props_setattr(kmi.properties, 'zoom_path', 'space_data.zoom')
  511. kmi_props_setattr(kmi.properties, 'image_id', 'tool_settings.image_paint.brush')
  512. kmi_props_setattr(kmi.properties, 'secondary_tex', True)
  513. kmi = km.keymap_items.new('wm.radial_control', 'U', 'PRESS', shift=True)
  514. kmi_props_setattr(kmi.properties, 'data_path_primary', 'tool_settings.image_paint.brush.strength')
  515. kmi_props_setattr(kmi.properties, 'data_path_secondary', 'tool_settings.unified_paint_settings.strength')
  516. kmi_props_setattr(kmi.properties, 'use_secondary', 'tool_settings.unified_paint_settings.use_unified_strength')
  517. kmi_props_setattr(kmi.properties, 'rotation_path', 'tool_settings.image_paint.brush.mask_texture_slot.angle')
  518. kmi_props_setattr(kmi.properties, 'color_path', 'tool_settings.image_paint.brush.cursor_color_add')
  519. kmi_props_setattr(kmi.properties, 'fill_color_path', 'tool_settings.image_paint.brush.color')
  520. kmi_props_setattr(kmi.properties, 'zoom_path', '')
  521. kmi_props_setattr(kmi.properties, 'image_id', 'tool_settings.image_paint.brush')
  522. kmi_props_setattr(kmi.properties, 'secondary_tex', True)
  523. kmi = km.keymap_items.new('wm.radial_control', 'U', 'PRESS', ctrl=True)
  524. kmi_props_setattr(kmi.properties, 'data_path_primary', 'tool_settings.image_paint.brush.texture_slot.angle')
  525. kmi_props_setattr(kmi.properties, 'data_path_secondary', '')
  526. kmi_props_setattr(kmi.properties, 'use_secondary', '')
  527. kmi_props_setattr(kmi.properties, 'rotation_path', 'tool_settings.image_paint.brush.texture_slot.angle')
  528. kmi_props_setattr(kmi.properties, 'color_path', 'tool_settings.image_paint.brush.cursor_color_add')
  529. kmi_props_setattr(kmi.properties, 'fill_color_path', 'tool_settings.image_paint.brush.color')
  530. kmi_props_setattr(kmi.properties, 'zoom_path', '')
  531. kmi_props_setattr(kmi.properties, 'image_id', 'tool_settings.image_paint.brush')
  532. kmi_props_setattr(kmi.properties, 'secondary_tex', False)
  533. kmi = km.keymap_items.new('wm.radial_control', 'U', 'PRESS', ctrl=True, alt=True)
  534. kmi_props_setattr(kmi.properties, 'data_path_primary', 'tool_settings.image_paint.brush.mask_texture_slot.angle')
  535. kmi_props_setattr(kmi.properties, 'data_path_secondary', '')
  536. kmi_props_setattr(kmi.properties, 'use_secondary', '')
  537. kmi_props_setattr(kmi.properties, 'rotation_path', 'tool_settings.image_paint.brush.mask_texture_slot.angle')
  538. kmi_props_setattr(kmi.properties, 'color_path', 'tool_settings.image_paint.brush.cursor_color_add')
  539. kmi_props_setattr(kmi.properties, 'fill_color_path', 'tool_settings.image_paint.brush.color')
  540. kmi_props_setattr(kmi.properties, 'zoom_path', '')
  541. kmi_props_setattr(kmi.properties, 'image_id', 'tool_settings.image_paint.brush')
  542. kmi_props_setattr(kmi.properties, 'secondary_tex', True)
  543. kmi = km.keymap_items.new('brush.stencil_control', 'RIGHTMOUSE', 'PRESS')
  544. kmi_props_setattr(kmi.properties, 'mode', 'TRANSLATION')
  545. kmi = km.keymap_items.new('brush.stencil_control', 'RIGHTMOUSE', 'PRESS', shift=True)
  546. kmi_props_setattr(kmi.properties, 'mode', 'SCALE')
  547. kmi = km.keymap_items.new('brush.stencil_control', 'RIGHTMOUSE', 'PRESS', ctrl=True)
  548. kmi_props_setattr(kmi.properties, 'mode', 'ROTATION')
  549. kmi = km.keymap_items.new('brush.stencil_control', 'RIGHTMOUSE', 'PRESS', alt=True)
  550. kmi_props_setattr(kmi.properties, 'mode', 'TRANSLATION')
  551. kmi_props_setattr(kmi.properties, 'texmode', 'SECONDARY')
  552. kmi = km.keymap_items.new('brush.stencil_control', 'RIGHTMOUSE', 'PRESS', shift=True, alt=True)
  553. kmi_props_setattr(kmi.properties, 'mode', 'SCALE')
  554. kmi_props_setattr(kmi.properties, 'texmode', 'SECONDARY')
  555. kmi = km.keymap_items.new('brush.stencil_control', 'RIGHTMOUSE', 'PRESS', ctrl=True, alt=True)
  556. kmi_props_setattr(kmi.properties, 'mode', 'ROTATION')
  557. kmi_props_setattr(kmi.properties, 'texmode', 'SECONDARY')
  558. kmi = km.keymap_items.new('wm.context_toggle', 'M', 'PRESS')
  559. kmi_props_setattr(kmi.properties, 'data_path', 'image_paint_object.data.use_paint_mask')
  560. kmi = km.keymap_items.new('wm.context_toggle', 'O', 'PRESS', shift=True)
  561. kmi_props_setattr(kmi.properties, 'data_path', 'tool_settings.image_paint.brush.use_smooth_stroke')
  562. kmi = km.keymap_items.new('wm.context_menu_enum', 'P', 'PRESS')
  563. kmi_props_setattr(kmi.properties, 'data_path', 'tool_settings.image_paint.brush.texture_angle_source_random')
  564. kmi = km.keymap_items.new('wm.context_menu_enum', 'A', 'PRESS')
  565. kmi_props_setattr(kmi.properties, 'data_path', 'tool_settings.image_paint.brush.stroke_method')
  566.  
  567. # Map Vertex Paint
  568. km = kc.keymaps.new('Vertex Paint', space_type='EMPTY', region_type='WINDOW', modal=False)
  569.  
  570. kmi = km.keymap_items.new('paint.vertex_paint', 'LEFTMOUSE', 'PRESS')
  571. kmi = km.keymap_items.new('paint.sample_color', 'O', 'PRESS')
  572. kmi = km.keymap_items.new('paint.vertex_color_set', 'T', 'PRESS', shift=True)
  573. kmi = km.keymap_items.new('brush.active_index_set', 'ONE', 'PRESS')
  574. kmi_props_setattr(kmi.properties, 'mode', 'vertex_paint')
  575. kmi_props_setattr(kmi.properties, 'index', 0)
  576. kmi = km.keymap_items.new('brush.active_index_set', 'TWO', 'PRESS')
  577. kmi_props_setattr(kmi.properties, 'mode', 'vertex_paint')
  578. kmi_props_setattr(kmi.properties, 'index', 1)
  579. kmi = km.keymap_items.new('brush.active_index_set', 'THREE', 'PRESS')
  580. kmi_props_setattr(kmi.properties, 'mode', 'vertex_paint')
  581. kmi_props_setattr(kmi.properties, 'index', 2)
  582. kmi = km.keymap_items.new('brush.active_index_set', 'FOUR', 'PRESS')
  583. kmi_props_setattr(kmi.properties, 'mode', 'vertex_paint')
  584. kmi_props_setattr(kmi.properties, 'index', 3)
  585. kmi = km.keymap_items.new('brush.active_index_set', 'FIVE', 'PRESS')
  586. kmi_props_setattr(kmi.properties, 'mode', 'vertex_paint')
  587. kmi_props_setattr(kmi.properties, 'index', 4)
  588. kmi = km.keymap_items.new('brush.active_index_set', 'SIX', 'PRESS')
  589. kmi_props_setattr(kmi.properties, 'mode', 'vertex_paint')
  590. kmi_props_setattr(kmi.properties, 'index', 5)
  591. kmi = km.keymap_items.new('brush.active_index_set', 'SEVEN', 'PRESS')
  592. kmi_props_setattr(kmi.properties, 'mode', 'vertex_paint')
  593. kmi_props_setattr(kmi.properties, 'index', 6)
  594. kmi = km.keymap_items.new('brush.active_index_set', 'EIGHT', 'PRESS')
  595. kmi_props_setattr(kmi.properties, 'mode', 'vertex_paint')
  596. kmi_props_setattr(kmi.properties, 'index', 7)
  597. kmi = km.keymap_items.new('brush.active_index_set', 'NINE', 'PRESS')
  598. kmi_props_setattr(kmi.properties, 'mode', 'vertex_paint')
  599. kmi_props_setattr(kmi.properties, 'index', 8)
  600. kmi = km.keymap_items.new('brush.active_index_set', 'ZERO', 'PRESS')
  601. kmi_props_setattr(kmi.properties, 'mode', 'vertex_paint')
  602. kmi_props_setattr(kmi.properties, 'index', 9)
  603. kmi = km.keymap_items.new('brush.active_index_set', 'ONE', 'PRESS', shift=True)
  604. kmi_props_setattr(kmi.properties, 'mode', 'vertex_paint')
  605. kmi_props_setattr(kmi.properties, 'index', 10)
  606. kmi = km.keymap_items.new('brush.active_index_set', 'TWO', 'PRESS', shift=True)
  607. kmi_props_setattr(kmi.properties, 'mode', 'vertex_paint')
  608. kmi_props_setattr(kmi.properties, 'index', 11)
  609. kmi = km.keymap_items.new('brush.active_index_set', 'THREE', 'PRESS', shift=True)
  610. kmi_props_setattr(kmi.properties, 'mode', 'vertex_paint')
  611. kmi_props_setattr(kmi.properties, 'index', 12)
  612. kmi = km.keymap_items.new('brush.active_index_set', 'FOUR', 'PRESS', shift=True)
  613. kmi_props_setattr(kmi.properties, 'mode', 'vertex_paint')
  614. kmi_props_setattr(kmi.properties, 'index', 13)
  615. kmi = km.keymap_items.new('brush.active_index_set', 'FIVE', 'PRESS', shift=True)
  616. kmi_props_setattr(kmi.properties, 'mode', 'vertex_paint')
  617. kmi_props_setattr(kmi.properties, 'index', 14)
  618. kmi = km.keymap_items.new('brush.active_index_set', 'SIX', 'PRESS', shift=True)
  619. kmi_props_setattr(kmi.properties, 'mode', 'vertex_paint')
  620. kmi_props_setattr(kmi.properties, 'index', 15)
  621. kmi = km.keymap_items.new('brush.active_index_set', 'SEVEN', 'PRESS', shift=True)
  622. kmi_props_setattr(kmi.properties, 'mode', 'vertex_paint')
  623. kmi_props_setattr(kmi.properties, 'index', 16)
  624. kmi = km.keymap_items.new('brush.active_index_set', 'EIGHT', 'PRESS', shift=True)
  625. kmi_props_setattr(kmi.properties, 'mode', 'vertex_paint')
  626. kmi_props_setattr(kmi.properties, 'index', 17)
  627. kmi = km.keymap_items.new('brush.active_index_set', 'NINE', 'PRESS', shift=True)
  628. kmi_props_setattr(kmi.properties, 'mode', 'vertex_paint')
  629. kmi_props_setattr(kmi.properties, 'index', 18)
  630. kmi = km.keymap_items.new('brush.active_index_set', 'ZERO', 'PRESS', shift=True)
  631. kmi_props_setattr(kmi.properties, 'mode', 'vertex_paint')
  632. kmi_props_setattr(kmi.properties, 'index', 19)
  633. kmi = km.keymap_items.new('brush.scale_size', 'SLASH', 'PRESS')
  634. kmi_props_setattr(kmi.properties, 'scalar', 0.8999999761581421)
  635. kmi = km.keymap_items.new('brush.scale_size', 'EQUAL', 'PRESS')
  636. kmi_props_setattr(kmi.properties, 'scalar', 1.1111111640930176)
  637. kmi = km.keymap_items.new('wm.radial_control', 'U', 'PRESS')
  638. kmi_props_setattr(kmi.properties, 'data_path_primary', 'tool_settings.vertex_paint.brush.size')
  639. kmi_props_setattr(kmi.properties, 'data_path_secondary', 'tool_settings.unified_paint_settings.size')
  640. kmi_props_setattr(kmi.properties, 'use_secondary', 'tool_settings.unified_paint_settings.use_unified_size')
  641. kmi_props_setattr(kmi.properties, 'rotation_path', 'tool_settings.vertex_paint.brush.texture_slot.angle')
  642. kmi_props_setattr(kmi.properties, 'color_path', 'tool_settings.vertex_paint.brush.cursor_color_add')
  643. kmi_props_setattr(kmi.properties, 'fill_color_path', 'tool_settings.vertex_paint.brush.color')
  644. kmi_props_setattr(kmi.properties, 'zoom_path', '')
  645. kmi_props_setattr(kmi.properties, 'image_id', 'tool_settings.vertex_paint.brush')
  646. kmi_props_setattr(kmi.properties, 'secondary_tex', False)
  647. kmi = km.keymap_items.new('wm.radial_control', 'U', 'PRESS', shift=True)
  648. kmi_props_setattr(kmi.properties, 'data_path_primary', 'tool_settings.vertex_paint.brush.strength')
  649. kmi_props_setattr(kmi.properties, 'data_path_secondary', 'tool_settings.unified_paint_settings.strength')
  650. kmi_props_setattr(kmi.properties, 'use_secondary', 'tool_settings.unified_paint_settings.use_unified_strength')
  651. kmi_props_setattr(kmi.properties, 'rotation_path', 'tool_settings.vertex_paint.brush.texture_slot.angle')
  652. kmi_props_setattr(kmi.properties, 'color_path', 'tool_settings.vertex_paint.brush.cursor_color_add')
  653. kmi_props_setattr(kmi.properties, 'fill_color_path', 'tool_settings.vertex_paint.brush.color')
  654. kmi_props_setattr(kmi.properties, 'zoom_path', '')
  655. kmi_props_setattr(kmi.properties, 'image_id', 'tool_settings.vertex_paint.brush')
  656. kmi_props_setattr(kmi.properties, 'secondary_tex', False)
  657. kmi = km.keymap_items.new('wm.radial_control', 'U', 'PRESS', ctrl=True)
  658. kmi_props_setattr(kmi.properties, 'data_path_primary', 'tool_settings.vertex_paint.brush.texture_slot.angle')
  659. kmi_props_setattr(kmi.properties, 'data_path_secondary', '')
  660. kmi_props_setattr(kmi.properties, 'use_secondary', '')
  661. kmi_props_setattr(kmi.properties, 'rotation_path', 'tool_settings.vertex_paint.brush.texture_slot.angle')
  662. kmi_props_setattr(kmi.properties, 'color_path', 'tool_settings.vertex_paint.brush.cursor_color_add')
  663. kmi_props_setattr(kmi.properties, 'fill_color_path', 'tool_settings.vertex_paint.brush.color')
  664. kmi_props_setattr(kmi.properties, 'zoom_path', '')
  665. kmi_props_setattr(kmi.properties, 'image_id', 'tool_settings.vertex_paint.brush')
  666. kmi_props_setattr(kmi.properties, 'secondary_tex', False)
  667. kmi = km.keymap_items.new('brush.stencil_control', 'RIGHTMOUSE', 'PRESS')
  668. kmi_props_setattr(kmi.properties, 'mode', 'TRANSLATION')
  669. kmi = km.keymap_items.new('brush.stencil_control', 'RIGHTMOUSE', 'PRESS', shift=True)
  670. kmi_props_setattr(kmi.properties, 'mode', 'SCALE')
  671. kmi = km.keymap_items.new('brush.stencil_control', 'RIGHTMOUSE', 'PRESS', ctrl=True)
  672. kmi_props_setattr(kmi.properties, 'mode', 'ROTATION')
  673. kmi = km.keymap_items.new('brush.stencil_control', 'RIGHTMOUSE', 'PRESS', alt=True)
  674. kmi_props_setattr(kmi.properties, 'mode', 'TRANSLATION')
  675. kmi_props_setattr(kmi.properties, 'texmode', 'SECONDARY')
  676. kmi = km.keymap_items.new('brush.stencil_control', 'RIGHTMOUSE', 'PRESS', shift=True, alt=True)
  677. kmi_props_setattr(kmi.properties, 'mode', 'SCALE')
  678. kmi_props_setattr(kmi.properties, 'texmode', 'SECONDARY')
  679. kmi = km.keymap_items.new('brush.stencil_control', 'RIGHTMOUSE', 'PRESS', ctrl=True, alt=True)
  680. kmi_props_setattr(kmi.properties, 'mode', 'ROTATION')
  681. kmi_props_setattr(kmi.properties, 'texmode', 'SECONDARY')
  682. kmi = km.keymap_items.new('wm.context_toggle', 'M', 'PRESS')
  683. kmi_props_setattr(kmi.properties, 'data_path', 'vertex_paint_object.data.use_paint_mask')
  684. kmi = km.keymap_items.new('wm.context_toggle', 'O', 'PRESS', shift=True)
  685. kmi_props_setattr(kmi.properties, 'data_path', 'tool_settings.vertex_paint.brush.use_smooth_stroke')
  686. kmi = km.keymap_items.new('wm.context_menu_enum', 'P', 'PRESS')
  687. kmi_props_setattr(kmi.properties, 'data_path', 'tool_settings.vertex_paint.brush.texture_angle_source_random')
  688. kmi = km.keymap_items.new('wm.context_menu_enum', 'A', 'PRESS')
  689. kmi_props_setattr(kmi.properties, 'data_path', 'tool_settings.vertex_paint.brush.stroke_method')
  690.  
  691. # Map Sculpt
  692. km = kc.keymaps.new('Sculpt', space_type='EMPTY', region_type='WINDOW', modal=False)
  693.  
  694. kmi = km.keymap_items.new('sculpt.brush_stroke', 'LEFTMOUSE', 'PRESS')
  695. kmi_props_setattr(kmi.properties, 'mode', 'NORMAL')
  696. kmi = km.keymap_items.new('sculpt.brush_stroke', 'LEFTMOUSE', 'PRESS', ctrl=True)
  697. kmi_props_setattr(kmi.properties, 'mode', 'INVERT')
  698. kmi = km.keymap_items.new('sculpt.brush_stroke', 'LEFTMOUSE', 'PRESS', shift=True)
  699. kmi_props_setattr(kmi.properties, 'mode', 'SMOOTH')
  700. kmi = km.keymap_items.new('paint.hide_show', 'D', 'PRESS', shift=True)
  701. kmi_props_setattr(kmi.properties, 'action', 'SHOW')
  702. kmi_props_setattr(kmi.properties, 'area', 'INSIDE')
  703. kmi = km.keymap_items.new('paint.hide_show', 'D', 'PRESS')
  704. kmi_props_setattr(kmi.properties, 'action', 'HIDE')
  705. kmi_props_setattr(kmi.properties, 'area', 'INSIDE')
  706. kmi = km.keymap_items.new('paint.hide_show', 'D', 'PRESS', alt=True)
  707. kmi_props_setattr(kmi.properties, 'action', 'SHOW')
  708. kmi_props_setattr(kmi.properties, 'area', 'ALL')
  709. kmi = km.keymap_items.new('object.subdivision_set', 'ZERO', 'PRESS', ctrl=True)
  710. kmi_props_setattr(kmi.properties, 'level', 0)
  711. kmi = km.keymap_items.new('object.subdivision_set', 'ONE', 'PRESS', ctrl=True)
  712. kmi_props_setattr(kmi.properties, 'level', 1)
  713. kmi = km.keymap_items.new('object.subdivision_set', 'TWO', 'PRESS', ctrl=True)
  714. kmi_props_setattr(kmi.properties, 'level', 2)
  715. kmi = km.keymap_items.new('object.subdivision_set', 'THREE', 'PRESS', ctrl=True)
  716. kmi_props_setattr(kmi.properties, 'level', 3)
  717. kmi = km.keymap_items.new('object.subdivision_set', 'FOUR', 'PRESS', ctrl=True)
  718. kmi_props_setattr(kmi.properties, 'level', 4)
  719. kmi = km.keymap_items.new('object.subdivision_set', 'FIVE', 'PRESS', ctrl=True)
  720. kmi_props_setattr(kmi.properties, 'level', 5)
  721. kmi = km.keymap_items.new('paint.mask_flood_fill', 'M', 'PRESS', alt=True)
  722. kmi_props_setattr(kmi.properties, 'mode', 'VALUE')
  723. kmi_props_setattr(kmi.properties, 'value', 0.0)
  724. kmi = km.keymap_items.new('paint.mask_flood_fill', 'I', 'PRESS', ctrl=True)
  725. kmi_props_setattr(kmi.properties, 'mode', 'INVERT')
  726. kmi = km.keymap_items.new('paint.mask_lasso_gesture', 'LEFTMOUSE', 'PRESS', shift=True, ctrl=True)
  727. kmi = km.keymap_items.new('sculpt.dynamic_topology_toggle', 'E', 'PRESS', ctrl=True)
  728. kmi = km.keymap_items.new('wm.radial_control', 'E', 'PRESS', shift=True)
  729. kmi_props_setattr(kmi.properties, 'data_path_primary', 'tool_settings.sculpt.detail_size')
  730. kmi_props_setattr(kmi.properties, 'data_path_secondary', '')
  731. kmi_props_setattr(kmi.properties, 'use_secondary', '')
  732. kmi_props_setattr(kmi.properties, 'rotation_path', 'tool_settings.sculpt.brush.texture_slot.angle')
  733. kmi_props_setattr(kmi.properties, 'color_path', 'tool_settings.sculpt.brush.cursor_color_add')
  734. kmi_props_setattr(kmi.properties, 'fill_color_path', '')
  735. kmi_props_setattr(kmi.properties, 'zoom_path', '')
  736. kmi_props_setattr(kmi.properties, 'image_id', 'tool_settings.sculpt.brush')
  737. kmi_props_setattr(kmi.properties, 'secondary_tex', False)
  738. kmi = km.keymap_items.new('object.subdivision_set', 'PAGE_UP', 'PRESS')
  739. kmi_props_setattr(kmi.properties, 'level', 1)
  740. kmi_props_setattr(kmi.properties, 'relative', True)
  741. kmi = km.keymap_items.new('object.subdivision_set', 'PAGE_DOWN', 'PRESS')
  742. kmi_props_setattr(kmi.properties, 'level', -1)
  743. kmi_props_setattr(kmi.properties, 'relative', True)
  744. kmi = km.keymap_items.new('brush.active_index_set', 'ONE', 'PRESS')
  745. kmi_props_setattr(kmi.properties, 'mode', 'sculpt')
  746. kmi_props_setattr(kmi.properties, 'index', 0)
  747. kmi = km.keymap_items.new('brush.active_index_set', 'TWO', 'PRESS')
  748. kmi_props_setattr(kmi.properties, 'mode', 'sculpt')
  749. kmi_props_setattr(kmi.properties, 'index', 1)
  750. kmi = km.keymap_items.new('brush.active_index_set', 'THREE', 'PRESS')
  751. kmi_props_setattr(kmi.properties, 'mode', 'sculpt')
  752. kmi_props_setattr(kmi.properties, 'index', 2)
  753. kmi = km.keymap_items.new('brush.active_index_set', 'FOUR', 'PRESS')
  754. kmi_props_setattr(kmi.properties, 'mode', 'sculpt')
  755. kmi_props_setattr(kmi.properties, 'index', 3)
  756. kmi = km.keymap_items.new('brush.active_index_set', 'FIVE', 'PRESS')
  757. kmi_props_setattr(kmi.properties, 'mode', 'sculpt')
  758. kmi_props_setattr(kmi.properties, 'index', 4)
  759. kmi = km.keymap_items.new('brush.active_index_set', 'SIX', 'PRESS')
  760. kmi_props_setattr(kmi.properties, 'mode', 'sculpt')
  761. kmi_props_setattr(kmi.properties, 'index', 5)
  762. kmi = km.keymap_items.new('brush.active_index_set', 'SEVEN', 'PRESS')
  763. kmi_props_setattr(kmi.properties, 'mode', 'sculpt')
  764. kmi_props_setattr(kmi.properties, 'index', 6)
  765. kmi = km.keymap_items.new('brush.active_index_set', 'EIGHT', 'PRESS')
  766. kmi_props_setattr(kmi.properties, 'mode', 'sculpt')
  767. kmi_props_setattr(kmi.properties, 'index', 7)
  768. kmi = km.keymap_items.new('brush.active_index_set', 'NINE', 'PRESS')
  769. kmi_props_setattr(kmi.properties, 'mode', 'sculpt')
  770. kmi_props_setattr(kmi.properties, 'index', 8)
  771. kmi = km.keymap_items.new('brush.active_index_set', 'ZERO', 'PRESS')
  772. kmi_props_setattr(kmi.properties, 'mode', 'sculpt')
  773. kmi_props_setattr(kmi.properties, 'index', 9)
  774. kmi = km.keymap_items.new('brush.active_index_set', 'ONE', 'PRESS', shift=True)
  775. kmi_props_setattr(kmi.properties, 'mode', 'sculpt')
  776. kmi_props_setattr(kmi.properties, 'index', 10)
  777. kmi = km.keymap_items.new('brush.active_index_set', 'TWO', 'PRESS', shift=True)
  778. kmi_props_setattr(kmi.properties, 'mode', 'sculpt')
  779. kmi_props_setattr(kmi.properties, 'index', 11)
  780. kmi = km.keymap_items.new('brush.active_index_set', 'THREE', 'PRESS', shift=True)
  781. kmi_props_setattr(kmi.properties, 'mode', 'sculpt')
  782. kmi_props_setattr(kmi.properties, 'index', 12)
  783. kmi = km.keymap_items.new('brush.active_index_set', 'FOUR', 'PRESS', shift=True)
  784. kmi_props_setattr(kmi.properties, 'mode', 'sculpt')
  785. kmi_props_setattr(kmi.properties, 'index', 13)
  786. kmi = km.keymap_items.new('brush.active_index_set', 'FIVE', 'PRESS', shift=True)
  787. kmi_props_setattr(kmi.properties, 'mode', 'sculpt')
  788. kmi_props_setattr(kmi.properties, 'index', 14)
  789. kmi = km.keymap_items.new('brush.active_index_set', 'SIX', 'PRESS', shift=True)
  790. kmi_props_setattr(kmi.properties, 'mode', 'sculpt')
  791. kmi_props_setattr(kmi.properties, 'index', 15)
  792. kmi = km.keymap_items.new('brush.active_index_set', 'SEVEN', 'PRESS', shift=True)
  793. kmi_props_setattr(kmi.properties, 'mode', 'sculpt')
  794. kmi_props_setattr(kmi.properties, 'index', 16)
  795. kmi = km.keymap_items.new('brush.active_index_set', 'EIGHT', 'PRESS', shift=True)
  796. kmi_props_setattr(kmi.properties, 'mode', 'sculpt')
  797. kmi_props_setattr(kmi.properties, 'index', 17)
  798. kmi = km.keymap_items.new('brush.active_index_set', 'NINE', 'PRESS', shift=True)
  799. kmi_props_setattr(kmi.properties, 'mode', 'sculpt')
  800. kmi_props_setattr(kmi.properties, 'index', 18)
  801. kmi = km.keymap_items.new('brush.active_index_set', 'ZERO', 'PRESS', shift=True)
  802. kmi_props_setattr(kmi.properties, 'mode', 'sculpt')
  803. kmi_props_setattr(kmi.properties, 'index', 19)
  804. kmi = km.keymap_items.new('brush.scale_size', 'SLASH', 'PRESS')
  805. kmi_props_setattr(kmi.properties, 'scalar', 0.8999999761581421)
  806. kmi = km.keymap_items.new('brush.scale_size', 'EQUAL', 'PRESS')
  807. kmi_props_setattr(kmi.properties, 'scalar', 1.1111111640930176)
  808. kmi = km.keymap_items.new('wm.radial_control', 'U', 'PRESS')
  809. kmi_props_setattr(kmi.properties, 'data_path_primary', 'tool_settings.sculpt.brush.size')
  810. kmi_props_setattr(kmi.properties, 'data_path_secondary', 'tool_settings.unified_paint_settings.size')
  811. kmi_props_setattr(kmi.properties, 'use_secondary', 'tool_settings.unified_paint_settings.use_unified_size')
  812. kmi_props_setattr(kmi.properties, 'rotation_path', 'tool_settings.sculpt.brush.texture_slot.angle')
  813. kmi_props_setattr(kmi.properties, 'color_path', 'tool_settings.sculpt.brush.cursor_color_add')
  814. kmi_props_setattr(kmi.properties, 'fill_color_path', '')
  815. kmi_props_setattr(kmi.properties, 'zoom_path', '')
  816. kmi_props_setattr(kmi.properties, 'image_id', 'tool_settings.sculpt.brush')
  817. kmi_props_setattr(kmi.properties, 'secondary_tex', False)
  818. kmi = km.keymap_items.new('wm.radial_control', 'U', 'PRESS', shift=True)
  819. kmi_props_setattr(kmi.properties, 'data_path_primary', 'tool_settings.sculpt.brush.strength')
  820. kmi_props_setattr(kmi.properties, 'data_path_secondary', 'tool_settings.unified_paint_settings.strength')
  821. kmi_props_setattr(kmi.properties, 'use_secondary', 'tool_settings.unified_paint_settings.use_unified_strength')
  822. kmi_props_setattr(kmi.properties, 'rotation_path', 'tool_settings.sculpt.brush.texture_slot.angle')
  823. kmi_props_setattr(kmi.properties, 'color_path', 'tool_settings.sculpt.brush.cursor_color_add')
  824. kmi_props_setattr(kmi.properties, 'fill_color_path', '')
  825. kmi_props_setattr(kmi.properties, 'zoom_path', '')
  826. kmi_props_setattr(kmi.properties, 'image_id', 'tool_settings.sculpt.brush')
  827. kmi_props_setattr(kmi.properties, 'secondary_tex', False)
  828. kmi = km.keymap_items.new('wm.radial_control', 'U', 'PRESS', ctrl=True)
  829. kmi_props_setattr(kmi.properties, 'data_path_primary', 'tool_settings.sculpt.brush.texture_slot.angle')
  830. kmi_props_setattr(kmi.properties, 'data_path_secondary', '')
  831. kmi_props_setattr(kmi.properties, 'use_secondary', '')
  832. kmi_props_setattr(kmi.properties, 'rotation_path', 'tool_settings.sculpt.brush.texture_slot.angle')
  833. kmi_props_setattr(kmi.properties, 'color_path', 'tool_settings.sculpt.brush.cursor_color_add')
  834. kmi_props_setattr(kmi.properties, 'fill_color_path', '')
  835. kmi_props_setattr(kmi.properties, 'zoom_path', '')
  836. kmi_props_setattr(kmi.properties, 'image_id', 'tool_settings.sculpt.brush')
  837. kmi_props_setattr(kmi.properties, 'secondary_tex', False)
  838. kmi = km.keymap_items.new('brush.stencil_control', 'RIGHTMOUSE', 'PRESS')
  839. kmi_props_setattr(kmi.properties, 'mode', 'TRANSLATION')
  840. kmi = km.keymap_items.new('brush.stencil_control', 'RIGHTMOUSE', 'PRESS', shift=True)
  841. kmi_props_setattr(kmi.properties, 'mode', 'SCALE')
  842. kmi = km.keymap_items.new('brush.stencil_control', 'RIGHTMOUSE', 'PRESS', ctrl=True)
  843. kmi_props_setattr(kmi.properties, 'mode', 'ROTATION')
  844. kmi = km.keymap_items.new('brush.stencil_control', 'RIGHTMOUSE', 'PRESS', alt=True)
  845. kmi_props_setattr(kmi.properties, 'mode', 'TRANSLATION')
  846. kmi_props_setattr(kmi.properties, 'texmode', 'SECONDARY')
  847. kmi = km.keymap_items.new('brush.stencil_control', 'RIGHTMOUSE', 'PRESS', shift=True, alt=True)
  848. kmi_props_setattr(kmi.properties, 'mode', 'SCALE')
  849. kmi_props_setattr(kmi.properties, 'texmode', 'SECONDARY')
  850. kmi = km.keymap_items.new('brush.stencil_control', 'RIGHTMOUSE', 'PRESS', ctrl=True, alt=True)
  851. kmi_props_setattr(kmi.properties, 'mode', 'ROTATION')
  852. kmi_props_setattr(kmi.properties, 'texmode', 'SECONDARY')
  853. kmi = km.keymap_items.new('paint.brush_select', 'Q', 'PRESS')
  854. kmi_props_setattr(kmi.properties, 'paint_mode', 'SCULPT')
  855. kmi_props_setattr(kmi.properties, 'sculpt_tool', 'DRAW')
  856. kmi = km.keymap_items.new('paint.brush_select', 'O', 'PRESS')
  857. kmi_props_setattr(kmi.properties, 'paint_mode', 'SCULPT')
  858. kmi_props_setattr(kmi.properties, 'sculpt_tool', 'SMOOTH')
  859. kmi = km.keymap_items.new('paint.brush_select', 'L', 'PRESS')
  860. kmi_props_setattr(kmi.properties, 'paint_mode', 'SCULPT')
  861. kmi_props_setattr(kmi.properties, 'sculpt_tool', 'PINCH')
  862. kmi = km.keymap_items.new('paint.brush_select', 'C', 'PRESS')
  863. kmi_props_setattr(kmi.properties, 'paint_mode', 'SCULPT')
  864. kmi_props_setattr(kmi.properties, 'sculpt_tool', 'INFLATE')
  865. kmi = km.keymap_items.new('paint.brush_select', 'I', 'PRESS')
  866. kmi_props_setattr(kmi.properties, 'paint_mode', 'SCULPT')
  867. kmi_props_setattr(kmi.properties, 'sculpt_tool', 'GRAB')
  868. kmi = km.keymap_items.new('paint.brush_select', 'N', 'PRESS')
  869. kmi_props_setattr(kmi.properties, 'paint_mode', 'SCULPT')
  870. kmi_props_setattr(kmi.properties, 'sculpt_tool', 'LAYER')
  871. kmi = km.keymap_items.new('paint.brush_select', 'Y', 'PRESS', shift=True)
  872. kmi_props_setattr(kmi.properties, 'paint_mode', 'SCULPT')
  873. kmi_props_setattr(kmi.properties, 'sculpt_tool', 'FLATTEN')
  874. kmi = km.keymap_items.new('paint.brush_select', 'J', 'PRESS')
  875. kmi_props_setattr(kmi.properties, 'paint_mode', 'SCULPT')
  876. kmi_props_setattr(kmi.properties, 'sculpt_tool', 'CLAY')
  877. kmi = km.keymap_items.new('paint.brush_select', 'J', 'PRESS', shift=True)
  878. kmi_props_setattr(kmi.properties, 'paint_mode', 'SCULPT')
  879. kmi_props_setattr(kmi.properties, 'sculpt_tool', 'CREASE')
  880. kmi = km.keymap_items.new('paint.brush_select', 'T', 'PRESS')
  881. kmi_props_setattr(kmi.properties, 'paint_mode', 'SCULPT')
  882. kmi_props_setattr(kmi.properties, 'sculpt_tool', 'SNAKE_HOOK')
  883. kmi = km.keymap_items.new('paint.brush_select', 'M', 'PRESS')
  884. kmi_props_setattr(kmi.properties, 'paint_mode', 'SCULPT')
  885. kmi_props_setattr(kmi.properties, 'sculpt_tool', 'MASK')
  886. kmi_props_setattr(kmi.properties, 'toggle', True)
  887. kmi_props_setattr(kmi.properties, 'create_missing', True)
  888. kmi = km.keymap_items.new('wm.context_menu_enum', 'A', 'PRESS')
  889. kmi_props_setattr(kmi.properties, 'data_path', 'tool_settings.sculpt.brush.sculpt_stroke_method')
  890. kmi = km.keymap_items.new('wm.context_toggle', 'O', 'PRESS', shift=True)
  891. kmi_props_setattr(kmi.properties, 'data_path', 'tool_settings.sculpt.brush.use_smooth_stroke')
  892. kmi = km.keymap_items.new('wm.context_menu_enum', 'P', 'PRESS')
  893. kmi_props_setattr(kmi.properties, 'data_path', 'tool_settings.sculpt.brush.texture_angle_source_random')
  894.  
  895. # Map Mesh
  896. km = kc.keymaps.new('Mesh', space_type='EMPTY', region_type='WINDOW', modal=False)
  897.  
  898. kmi = km.keymap_items.new('mesh.loopcut_slide', 'P', 'PRESS', ctrl=True)
  899. kmi = km.keymap_items.new('mesh.inset', 'C', 'PRESS')
  900. kmi = km.keymap_items.new('mesh.poke', 'L', 'PRESS', ctrl=True)
  901. kmi = km.keymap_items.new('mesh.bevel', 'X', 'PRESS', ctrl=True)
  902. kmi_props_setattr(kmi.properties, 'vertex_only', False)
  903. kmi = km.keymap_items.new('mesh.bevel', 'X', 'PRESS', shift=True, ctrl=True)
  904. kmi_props_setattr(kmi.properties, 'vertex_only', True)
  905. kmi = km.keymap_items.new('mesh.loop_select', 'SELECTMOUSE', 'PRESS', alt=True)
  906. kmi_props_setattr(kmi.properties, 'extend', False)
  907. kmi_props_setattr(kmi.properties, 'deselect', False)
  908. kmi_props_setattr(kmi.properties, 'toggle', False)
  909. kmi = km.keymap_items.new('mesh.loop_select', 'SELECTMOUSE', 'PRESS', shift=True, alt=True)
  910. kmi_props_setattr(kmi.properties, 'extend', False)
  911. kmi_props_setattr(kmi.properties, 'deselect', False)
  912. kmi_props_setattr(kmi.properties, 'toggle', True)
  913. kmi = km.keymap_items.new('mesh.edgering_select', 'SELECTMOUSE', 'PRESS', ctrl=True, alt=True)
  914. kmi_props_setattr(kmi.properties, 'extend', False)
  915. kmi_props_setattr(kmi.properties, 'deselect', False)
  916. kmi_props_setattr(kmi.properties, 'toggle', False)
  917. kmi = km.keymap_items.new('mesh.edgering_select', 'SELECTMOUSE', 'PRESS', shift=True, ctrl=True, alt=True)
  918. kmi_props_setattr(kmi.properties, 'extend', False)
  919. kmi_props_setattr(kmi.properties, 'deselect', False)
  920. kmi_props_setattr(kmi.properties, 'toggle', True)
  921. kmi = km.keymap_items.new('mesh.shortest_path_pick', 'SELECTMOUSE', 'PRESS', ctrl=True)
  922. kmi = km.keymap_items.new('mesh.select_all', 'A', 'PRESS')
  923. kmi_props_setattr(kmi.properties, 'action', 'TOGGLE')
  924. kmi = km.keymap_items.new('mesh.select_all', 'C', 'PRESS', ctrl=True)
  925. kmi_props_setattr(kmi.properties, 'action', 'INVERT')
  926. kmi = km.keymap_items.new('mesh.select_more', 'RIGHT_BRACKET', 'PRESS', ctrl=True)
  927. kmi = km.keymap_items.new('mesh.select_less', 'LEFT_BRACKET', 'PRESS', ctrl=True)
  928. kmi = km.keymap_items.new('mesh.select_non_manifold', 'M', 'PRESS', shift=True, ctrl=True, alt=True)
  929. kmi = km.keymap_items.new('mesh.select_linked', 'N', 'PRESS', ctrl=True)
  930. kmi = km.keymap_items.new('mesh.select_linked_pick', 'N', 'PRESS')
  931. kmi_props_setattr(kmi.properties, 'deselect', False)
  932. kmi = km.keymap_items.new('mesh.select_linked_pick', 'N', 'PRESS', shift=True)
  933. kmi_props_setattr(kmi.properties, 'deselect', True)
  934. kmi = km.keymap_items.new('mesh.faces_select_linked_flat', 'U', 'PRESS', shift=True, ctrl=True, alt=True)
  935. kmi = km.keymap_items.new('mesh.select_similar', 'I', 'PRESS', shift=True)
  936. kmi = km.keymap_items.new('wm.call_menu', 'TAB', 'PRESS', ctrl=True)
  937. kmi_props_setattr(kmi.properties, 'name', 'VIEW3D_MT_edit_mesh_select_mode')
  938. kmi = km.keymap_items.new('mesh.hide', 'D', 'PRESS')
  939. kmi_props_setattr(kmi.properties, 'unselected', False)
  940. kmi = km.keymap_items.new('mesh.hide', 'D', 'PRESS', shift=True)
  941. kmi_props_setattr(kmi.properties, 'unselected', True)
  942. kmi = km.keymap_items.new('mesh.reveal', 'D', 'PRESS', alt=True)
  943. kmi = km.keymap_items.new('mesh.normals_make_consistent', 'B', 'PRESS', ctrl=True)
  944. kmi_props_setattr(kmi.properties, 'inside', False)
  945. kmi = km.keymap_items.new('mesh.normals_make_consistent', 'B', 'PRESS', shift=True, ctrl=True)
  946. kmi_props_setattr(kmi.properties, 'inside', True)
  947. kmi = km.keymap_items.new('view3d.edit_mesh_extrude_move_normal', 'PERIOD', 'PRESS')
  948. kmi = km.keymap_items.new('wm.call_menu', 'PERIOD', 'PRESS', alt=True)
  949. kmi_props_setattr(kmi.properties, 'name', 'VIEW3D_MT_edit_mesh_extrude')
  950. kmi = km.keymap_items.new('transform.edge_crease', 'PERIOD', 'PRESS', shift=True)
  951. kmi = km.keymap_items.new('mesh.spin', 'P', 'PRESS', alt=True)
  952. kmi = km.keymap_items.new('mesh.fill', 'U', 'PRESS', alt=True)
  953. kmi = km.keymap_items.new('mesh.beautify_fill', 'U', 'PRESS', shift=True, alt=True)
  954. kmi = km.keymap_items.new('mesh.quads_convert_to_tris', 'Y', 'PRESS', ctrl=True)
  955. kmi_props_setattr(kmi.properties, 'quad_method', 'BEAUTY')
  956. kmi_props_setattr(kmi.properties, 'ngon_method', 'BEAUTY')
  957. kmi = km.keymap_items.new('mesh.quads_convert_to_tris', 'Y', 'PRESS', shift=True, ctrl=True)
  958. kmi_props_setattr(kmi.properties, 'quad_method', 'FIXED')
  959. kmi_props_setattr(kmi.properties, 'ngon_method', 'CLIP')
  960. kmi = km.keymap_items.new('mesh.tris_convert_to_quads', 'H', 'PRESS', alt=True)
  961. kmi = km.keymap_items.new('mesh.rip_move', 'K', 'PRESS')
  962. kmi = km.keymap_items.new('mesh.rip_move_fill', 'K', 'PRESS', alt=True)
  963. kmi = km.keymap_items.new('mesh.merge', 'M', 'PRESS', alt=True)
  964. kmi = km.keymap_items.new('transform.shrink_fatten', 'O', 'PRESS', alt=True)
  965. kmi = km.keymap_items.new('mesh.edge_face_add', 'U', 'PRESS')
  966. kmi = km.keymap_items.new('mesh.duplicate_move', 'E', 'PRESS', shift=True)
  967. kmi = km.keymap_items.new('wm.call_menu', 'A', 'PRESS', shift=True)
  968. kmi_props_setattr(kmi.properties, 'name', 'INFO_MT_mesh_add')
  969. kmi = km.keymap_items.new('mesh.separate', 'L', 'PRESS')
  970. kmi = km.keymap_items.new('mesh.split', 'F', 'PRESS')
  971. kmi = km.keymap_items.new('mesh.vert_connect', 'H', 'PRESS')
  972. kmi = km.keymap_items.new('transform.vert_slide', 'K', 'PRESS', shift=True)
  973. kmi = km.keymap_items.new('mesh.dupli_extrude_cursor', 'ACTIONMOUSE', 'CLICK', ctrl=True)
  974. kmi_props_setattr(kmi.properties, 'rotate_source', True)
  975. kmi = km.keymap_items.new('mesh.dupli_extrude_cursor', 'ACTIONMOUSE', 'CLICK', shift=True, ctrl=True)
  976. kmi_props_setattr(kmi.properties, 'rotate_source', False)
  977. kmi = km.keymap_items.new('wm.call_menu', 'BACK_SPACE', 'PRESS')
  978. kmi_props_setattr(kmi.properties, 'name', 'VIEW3D_MT_edit_mesh_delete')
  979. kmi = km.keymap_items.new('wm.call_menu', 'BACK_SPACE', 'PRESS')
  980. kmi_props_setattr(kmi.properties, 'name', 'VIEW3D_MT_edit_mesh_delete')
  981. kmi = km.keymap_items.new('mesh.dissolve_mode', 'BACK_SPACE', 'PRESS', ctrl=True)
  982. kmi = km.keymap_items.new('mesh.dissolve_mode', 'BACK_SPACE', 'PRESS', ctrl=True)
  983. kmi = km.keymap_items.new('mesh.knife_tool', 'T', 'PRESS')
  984. kmi_props_setattr(kmi.properties, 'use_occlude_geometry', True)
  985. kmi_props_setattr(kmi.properties, 'only_selected', False)
  986. kmi = km.keymap_items.new('mesh.knife_tool', 'T', 'PRESS', shift=True)
  987. kmi_props_setattr(kmi.properties, 'use_occlude_geometry', False)
  988. kmi_props_setattr(kmi.properties, 'only_selected', True)
  989. kmi = km.keymap_items.new('object.vertex_parent_set', 'L', 'PRESS', ctrl=True)
  990. kmi = km.keymap_items.new('wm.call_menu', 'COMMA', 'PRESS')
  991. kmi_props_setattr(kmi.properties, 'name', 'VIEW3D_MT_edit_mesh_specials')
  992. kmi = km.keymap_items.new('wm.call_menu', 'U', 'PRESS', ctrl=True)
  993. kmi_props_setattr(kmi.properties, 'name', 'VIEW3D_MT_edit_mesh_faces')
  994. kmi = km.keymap_items.new('wm.call_menu', 'PERIOD', 'PRESS', ctrl=True)
  995. kmi_props_setattr(kmi.properties, 'name', 'VIEW3D_MT_edit_mesh_edges')
  996. kmi = km.keymap_items.new('wm.call_menu', 'K', 'PRESS', ctrl=True)
  997. kmi_props_setattr(kmi.properties, 'name', 'VIEW3D_MT_edit_mesh_vertices')
  998. kmi = km.keymap_items.new('wm.call_menu', 'D', 'PRESS', ctrl=True)
  999. kmi_props_setattr(kmi.properties, 'name', 'VIEW3D_MT_hook')
  1000. kmi = km.keymap_items.new('wm.call_menu', 'G', 'PRESS')
  1001. kmi_props_setattr(kmi.properties, 'name', 'VIEW3D_MT_uv_map')
  1002. kmi = km.keymap_items.new('wm.call_menu', 'I', 'PRESS', ctrl=True)
  1003. kmi_props_setattr(kmi.properties, 'name', 'VIEW3D_MT_vertex_group')
  1004. kmi = km.keymap_items.new('object.subdivision_set', 'ZERO', 'PRESS', shift=True, alt=True)
  1005. kmi_props_setattr(kmi.properties, 'level', 0)
  1006. kmi = km.keymap_items.new('object.subdivision_set', 'ONE', 'PRESS', shift=True, alt=True)
  1007. kmi_props_setattr(kmi.properties, 'level', 1)
  1008. kmi = km.keymap_items.new('object.subdivision_set', 'TWO', 'PRESS', shift=True, alt=True)
  1009. kmi_props_setattr(kmi.properties, 'level', 2)
  1010. kmi = km.keymap_items.new('object.subdivision_set', 'THREE', 'PRESS', shift=True, alt=True)
  1011. kmi_props_setattr(kmi.properties, 'level', 3)
  1012. kmi = km.keymap_items.new('object.subdivision_set', 'FOUR', 'PRESS', shift=True, alt=True)
  1013. kmi_props_setattr(kmi.properties, 'level', 4)
  1014. kmi = km.keymap_items.new('object.subdivision_set', 'FIVE', 'PRESS', shift=True, alt=True)
  1015. kmi_props_setattr(kmi.properties, 'level', 5)
  1016. kmi = km.keymap_items.new('wm.context_cycle_enum', 'R', 'PRESS', shift=True)
  1017. kmi_props_setattr(kmi.properties, 'data_path', 'tool_settings.proportional_edit_falloff')
  1018. kmi = km.keymap_items.new('wm.context_toggle_enum', 'R', 'PRESS')
  1019. kmi_props_setattr(kmi.properties, 'data_path', 'tool_settings.proportional_edit')
  1020. kmi_props_setattr(kmi.properties, 'value_1', 'DISABLED')
  1021. kmi_props_setattr(kmi.properties, 'value_2', 'ENABLED')
  1022. kmi = km.keymap_items.new('wm.context_toggle_enum', 'R', 'PRESS', alt=True)
  1023. kmi_props_setattr(kmi.properties, 'data_path', 'tool_settings.proportional_edit')
  1024. kmi_props_setattr(kmi.properties, 'value_1', 'DISABLED')
  1025. kmi_props_setattr(kmi.properties, 'value_2', 'CONNECTED')
  1026.  
  1027. # Map Curve
  1028. km = kc.keymaps.new('Curve', space_type='EMPTY', region_type='WINDOW', modal=False)
  1029.  
  1030. kmi = km.keymap_items.new('wm.call_menu', 'A', 'PRESS', shift=True)
  1031. kmi_props_setattr(kmi.properties, 'name', 'INFO_MT_edit_curve_add')
  1032. kmi = km.keymap_items.new('curve.handle_type_set', 'K', 'PRESS')
  1033. kmi = km.keymap_items.new('curve.vertex_add', 'ACTIONMOUSE', 'CLICK', ctrl=True)
  1034. kmi = km.keymap_items.new('curve.select_all', 'A', 'PRESS')
  1035. kmi_props_setattr(kmi.properties, 'action', 'TOGGLE')
  1036. kmi = km.keymap_items.new('curve.select_all', 'C', 'PRESS', ctrl=True)
  1037. kmi_props_setattr(kmi.properties, 'action', 'INVERT')
  1038. kmi = km.keymap_items.new('curve.select_row', 'P', 'PRESS', shift=True)
  1039. kmi = km.keymap_items.new('curve.select_more', 'RIGHT_BRACKET', 'PRESS', ctrl=True)
  1040. kmi = km.keymap_items.new('curve.select_less', 'LEFT_BRACKET', 'PRESS', ctrl=True)
  1041. kmi = km.keymap_items.new('curve.select_linked', 'N', 'PRESS', ctrl=True)
  1042. kmi = km.keymap_items.new('curve.select_linked_pick', 'N', 'PRESS')
  1043. kmi_props_setattr(kmi.properties, 'deselect', False)
  1044. kmi = km.keymap_items.new('curve.select_linked_pick', 'N', 'PRESS', shift=True)
  1045. kmi_props_setattr(kmi.properties, 'deselect', True)
  1046. kmi = km.keymap_items.new('curve.separate', 'L', 'PRESS')
  1047. kmi = km.keymap_items.new('curve.split', 'F', 'PRESS')
  1048. kmi = km.keymap_items.new('curve.extrude_move', 'PERIOD', 'PRESS')
  1049. kmi = km.keymap_items.new('curve.duplicate_move', 'E', 'PRESS', shift=True)
  1050. kmi = km.keymap_items.new('curve.make_segment', 'U', 'PRESS')
  1051. kmi = km.keymap_items.new('curve.cyclic_toggle', 'J', 'PRESS', alt=True)
  1052. kmi = km.keymap_items.new('curve.delete', 'BACK_SPACE', 'PRESS')
  1053. kmi = km.keymap_items.new('curve.delete', 'BACK_SPACE', 'PRESS')
  1054. kmi.active = False
  1055. kmi = km.keymap_items.new('curve.tilt_clear', 'Y', 'PRESS', alt=True)
  1056. kmi = km.keymap_items.new('transform.tilt', 'Y', 'PRESS', ctrl=True)
  1057. kmi = km.keymap_items.new('transform.transform', 'O', 'PRESS', alt=True)
  1058. kmi_props_setattr(kmi.properties, 'mode', 'CURVE_SHRINKFATTEN')
  1059. kmi = km.keymap_items.new('curve.reveal', 'D', 'PRESS', alt=True)
  1060. kmi = km.keymap_items.new('curve.hide', 'D', 'PRESS')
  1061. kmi_props_setattr(kmi.properties, 'unselected', False)
  1062. kmi = km.keymap_items.new('curve.hide', 'D', 'PRESS', shift=True)
  1063. kmi_props_setattr(kmi.properties, 'unselected', True)
  1064. kmi = km.keymap_items.new('curve.normals_make_consistent', 'B', 'PRESS', ctrl=True)
  1065. kmi = km.keymap_items.new('object.vertex_parent_set', 'L', 'PRESS', ctrl=True)
  1066. kmi = km.keymap_items.new('wm.call_menu', 'COMMA', 'PRESS')
  1067. kmi_props_setattr(kmi.properties, 'name', 'VIEW3D_MT_edit_curve_specials')
  1068. kmi = km.keymap_items.new('wm.call_menu', 'D', 'PRESS', ctrl=True)
  1069. kmi_props_setattr(kmi.properties, 'name', 'VIEW3D_MT_hook')
  1070. kmi = km.keymap_items.new('wm.context_cycle_enum', 'R', 'PRESS', shift=True)
  1071. kmi_props_setattr(kmi.properties, 'data_path', 'tool_settings.proportional_edit_falloff')
  1072. kmi = km.keymap_items.new('wm.context_toggle_enum', 'R', 'PRESS')
  1073. kmi_props_setattr(kmi.properties, 'data_path', 'tool_settings.proportional_edit')
  1074. kmi_props_setattr(kmi.properties, 'value_1', 'DISABLED')
  1075. kmi_props_setattr(kmi.properties, 'value_2', 'ENABLED')
  1076. kmi = km.keymap_items.new('wm.context_toggle_enum', 'R', 'PRESS', alt=True)
  1077. kmi_props_setattr(kmi.properties, 'data_path', 'tool_settings.proportional_edit')
  1078. kmi_props_setattr(kmi.properties, 'value_1', 'DISABLED')
  1079. kmi_props_setattr(kmi.properties, 'value_2', 'CONNECTED')
  1080.  
  1081. # Map Armature
  1082. km = kc.keymaps.new('Armature', space_type='EMPTY', region_type='WINDOW', modal=False)
  1083.  
  1084. kmi = km.keymap_items.new('sketch.delete', 'BACK_SPACE', 'PRESS')
  1085. kmi = km.keymap_items.new('sketch.delete', 'BACK_SPACE', 'PRESS')
  1086. kmi.active = False
  1087. kmi = km.keymap_items.new('sketch.finish_stroke', 'RIGHTMOUSE', 'PRESS')
  1088. kmi = km.keymap_items.new('sketch.cancel_stroke', 'ESC', 'PRESS')
  1089. kmi = km.keymap_items.new('sketch.gesture', 'LEFTMOUSE', 'PRESS', shift=True)
  1090. kmi = km.keymap_items.new('sketch.draw_stroke', 'LEFTMOUSE', 'PRESS')
  1091. kmi = km.keymap_items.new('sketch.draw_stroke', 'LEFTMOUSE', 'PRESS', ctrl=True)
  1092. kmi_props_setattr(kmi.properties, 'snap', True)
  1093. kmi = km.keymap_items.new('sketch.draw_preview', 'MOUSEMOVE', 'ANY')
  1094. kmi = km.keymap_items.new('sketch.draw_preview', 'MOUSEMOVE', 'ANY', ctrl=True)
  1095. kmi_props_setattr(kmi.properties, 'snap', True)
  1096. kmi = km.keymap_items.new('armature.hide', 'D', 'PRESS')
  1097. kmi_props_setattr(kmi.properties, 'unselected', False)
  1098. kmi = km.keymap_items.new('armature.hide', 'D', 'PRESS', shift=True)
  1099. kmi_props_setattr(kmi.properties, 'unselected', True)
  1100. kmi = km.keymap_items.new('armature.reveal', 'D', 'PRESS', alt=True)
  1101. kmi = km.keymap_items.new('armature.align', 'A', 'PRESS', ctrl=True, alt=True)
  1102. kmi = km.keymap_items.new('armature.calculate_roll', 'B', 'PRESS', ctrl=True)
  1103. kmi = km.keymap_items.new('armature.switch_direction', 'U', 'PRESS', alt=True)
  1104. kmi = km.keymap_items.new('armature.bone_primitive_add', 'A', 'PRESS', shift=True)
  1105. kmi = km.keymap_items.new('armature.parent_set', 'L', 'PRESS', ctrl=True)
  1106. kmi = km.keymap_items.new('armature.parent_clear', 'L', 'PRESS', alt=True)
  1107. kmi = km.keymap_items.new('armature.select_all', 'A', 'PRESS')
  1108. kmi_props_setattr(kmi.properties, 'action', 'TOGGLE')
  1109. kmi = km.keymap_items.new('armature.select_all', 'C', 'PRESS', ctrl=True)
  1110. kmi_props_setattr(kmi.properties, 'action', 'INVERT')
  1111. kmi = km.keymap_items.new('armature.select_mirror', 'M', 'PRESS', shift=True, ctrl=True)
  1112. kmi_props_setattr(kmi.properties, 'extend', False)
  1113. kmi = km.keymap_items.new('armature.select_hierarchy', 'SLASH', 'PRESS')
  1114. kmi_props_setattr(kmi.properties, 'direction', 'PARENT')
  1115. kmi_props_setattr(kmi.properties, 'extend', False)
  1116. kmi = km.keymap_items.new('armature.select_hierarchy', 'SLASH', 'PRESS', shift=True)
  1117. kmi_props_setattr(kmi.properties, 'direction', 'PARENT')
  1118. kmi_props_setattr(kmi.properties, 'extend', True)
  1119. kmi = km.keymap_items.new('armature.select_hierarchy', 'EQUAL', 'PRESS')
  1120. kmi_props_setattr(kmi.properties, 'direction', 'CHILD')
  1121. kmi_props_setattr(kmi.properties, 'extend', False)
  1122. kmi = km.keymap_items.new('armature.select_hierarchy', 'EQUAL', 'PRESS', shift=True)
  1123. kmi_props_setattr(kmi.properties, 'direction', 'CHILD')
  1124. kmi_props_setattr(kmi.properties, 'extend', True)
  1125. kmi = km.keymap_items.new('armature.select_more', 'RIGHT_BRACKET', 'PRESS', ctrl=True)
  1126. kmi = km.keymap_items.new('armature.select_less', 'LEFT_BRACKET', 'PRESS', ctrl=True)
  1127. kmi = km.keymap_items.new('armature.select_similar', 'I', 'PRESS', shift=True)
  1128. kmi = km.keymap_items.new('armature.select_linked', 'N', 'PRESS')
  1129. kmi = km.keymap_items.new('armature.shortest_path_pick', 'SELECTMOUSE', 'PRESS', ctrl=True)
  1130. kmi = km.keymap_items.new('armature.delete', 'BACK_SPACE', 'PRESS')
  1131. kmi = km.keymap_items.new('armature.delete', 'BACK_SPACE', 'PRESS')
  1132. kmi.active = False
  1133. kmi = km.keymap_items.new('armature.duplicate_move', 'E', 'PRESS', shift=True)
  1134. kmi = km.keymap_items.new('armature.extrude_move', 'PERIOD', 'PRESS')
  1135. kmi = km.keymap_items.new('armature.extrude_forked', 'PERIOD', 'PRESS', shift=True)
  1136. kmi = km.keymap_items.new('armature.click_extrude', 'ACTIONMOUSE', 'CLICK', ctrl=True)
  1137. kmi = km.keymap_items.new('armature.fill', 'U', 'PRESS')
  1138. kmi = km.keymap_items.new('armature.merge', 'M', 'PRESS', alt=True)
  1139. kmi = km.keymap_items.new('armature.split', 'F', 'PRESS')
  1140. kmi = km.keymap_items.new('armature.separate', 'L', 'PRESS', ctrl=True, alt=True)
  1141. kmi = km.keymap_items.new('wm.call_menu', 'COMMA', 'PRESS', shift=True)
  1142. kmi_props_setattr(kmi.properties, 'name', 'VIEW3D_MT_bone_options_toggle')
  1143. kmi = km.keymap_items.new('wm.call_menu', 'COMMA', 'PRESS', shift=True, ctrl=True)
  1144. kmi_props_setattr(kmi.properties, 'name', 'VIEW3D_MT_bone_options_enable')
  1145. kmi = km.keymap_items.new('wm.call_menu', 'COMMA', 'PRESS', alt=True)
  1146. kmi_props_setattr(kmi.properties, 'name', 'VIEW3D_MT_bone_options_disable')
  1147. kmi = km.keymap_items.new('armature.layers_show_all', 'ACCENT_GRAVE', 'PRESS', ctrl=True)
  1148. kmi = km.keymap_items.new('armature.armature_layers', 'M', 'PRESS', shift=True)
  1149. kmi = km.keymap_items.new('armature.bone_layers', 'M', 'PRESS')
  1150. kmi = km.keymap_items.new('transform.transform', 'O', 'PRESS', ctrl=True, alt=True)
  1151. kmi_props_setattr(kmi.properties, 'mode', 'BONE_SIZE')
  1152. kmi = km.keymap_items.new('transform.transform', 'O', 'PRESS', alt=True)
  1153. kmi_props_setattr(kmi.properties, 'mode', 'BONE_ENVELOPE')
  1154. kmi = km.keymap_items.new('transform.transform', 'P', 'PRESS', ctrl=True)
  1155. kmi_props_setattr(kmi.properties, 'mode', 'BONE_ROLL')
  1156. kmi = km.keymap_items.new('wm.call_menu', 'COMMA', 'PRESS')
  1157. kmi_props_setattr(kmi.properties, 'name', 'VIEW3D_MT_armature_specials')
  1158.  
  1159. # Map Metaball
  1160. km = kc.keymaps.new('Metaball', space_type='EMPTY', region_type='WINDOW', modal=False)
  1161.  
  1162. kmi = km.keymap_items.new('object.metaball_add', 'A', 'PRESS', shift=True)
  1163. kmi = km.keymap_items.new('mball.reveal_metaelems', 'D', 'PRESS', alt=True)
  1164. kmi = km.keymap_items.new('mball.hide_metaelems', 'D', 'PRESS')
  1165. kmi_props_setattr(kmi.properties, 'unselected', False)
  1166. kmi = km.keymap_items.new('mball.hide_metaelems', 'D', 'PRESS', shift=True)
  1167. kmi_props_setattr(kmi.properties, 'unselected', True)
  1168. kmi = km.keymap_items.new('mball.delete_metaelems', 'BACK_SPACE', 'PRESS')
  1169. kmi = km.keymap_items.new('mball.delete_metaelems', 'BACK_SPACE', 'PRESS')
  1170. kmi.active = False
  1171. kmi = km.keymap_items.new('mball.duplicate_move', 'E', 'PRESS', shift=True)
  1172. kmi = km.keymap_items.new('mball.select_all', 'A', 'PRESS')
  1173. kmi_props_setattr(kmi.properties, 'action', 'TOGGLE')
  1174. kmi = km.keymap_items.new('mball.select_all', 'C', 'PRESS', ctrl=True)
  1175. kmi_props_setattr(kmi.properties, 'action', 'INVERT')
  1176. kmi = km.keymap_items.new('mball.select_similar', 'I', 'PRESS', shift=True)
  1177. kmi = km.keymap_items.new('wm.context_cycle_enum', 'R', 'PRESS', shift=True)
  1178. kmi_props_setattr(kmi.properties, 'data_path', 'tool_settings.proportional_edit_falloff')
  1179. kmi = km.keymap_items.new('wm.context_toggle_enum', 'R', 'PRESS')
  1180. kmi_props_setattr(kmi.properties, 'data_path', 'tool_settings.proportional_edit')
  1181. kmi_props_setattr(kmi.properties, 'value_1', 'DISABLED')
  1182. kmi_props_setattr(kmi.properties, 'value_2', 'ENABLED')
  1183. kmi = km.keymap_items.new('wm.context_toggle_enum', 'R', 'PRESS', alt=True)
  1184. kmi_props_setattr(kmi.properties, 'data_path', 'tool_settings.proportional_edit')
  1185. kmi_props_setattr(kmi.properties, 'value_1', 'DISABLED')
  1186. kmi_props_setattr(kmi.properties, 'value_2', 'CONNECTED')
  1187.  
  1188. # Map Lattice
  1189. km = kc.keymaps.new('Lattice', space_type='EMPTY', region_type='WINDOW', modal=False)
  1190.  
  1191. kmi = km.keymap_items.new('lattice.select_all', 'A', 'PRESS')
  1192. kmi_props_setattr(kmi.properties, 'action', 'TOGGLE')
  1193. kmi = km.keymap_items.new('lattice.select_all', 'C', 'PRESS', ctrl=True)
  1194. kmi_props_setattr(kmi.properties, 'action', 'INVERT')
  1195. kmi = km.keymap_items.new('lattice.select_more', 'RIGHT_BRACKET', 'PRESS', ctrl=True)
  1196. kmi = km.keymap_items.new('lattice.select_less', 'LEFT_BRACKET', 'PRESS', ctrl=True)
  1197. kmi = km.keymap_items.new('object.vertex_parent_set', 'L', 'PRESS', ctrl=True)
  1198. kmi = km.keymap_items.new('lattice.flip', 'U', 'PRESS', ctrl=True)
  1199. kmi = km.keymap_items.new('wm.call_menu', 'D', 'PRESS', ctrl=True)
  1200. kmi_props_setattr(kmi.properties, 'name', 'VIEW3D_MT_hook')
  1201. kmi = km.keymap_items.new('wm.context_cycle_enum', 'R', 'PRESS', shift=True)
  1202. kmi_props_setattr(kmi.properties, 'data_path', 'tool_settings.proportional_edit_falloff')
  1203. kmi = km.keymap_items.new('wm.context_toggle_enum', 'R', 'PRESS')
  1204. kmi_props_setattr(kmi.properties, 'data_path', 'tool_settings.proportional_edit')
  1205. kmi_props_setattr(kmi.properties, 'value_1', 'DISABLED')
  1206. kmi_props_setattr(kmi.properties, 'value_2', 'ENABLED')
  1207.  
  1208. # Map Particle
  1209. km = kc.keymaps.new('Particle', space_type='EMPTY', region_type='WINDOW', modal=False)
  1210.  
  1211. kmi = km.keymap_items.new('particle.select_all', 'A', 'PRESS')
  1212. kmi_props_setattr(kmi.properties, 'action', 'TOGGLE')
  1213. kmi = km.keymap_items.new('particle.select_all', 'C', 'PRESS', ctrl=True)
  1214. kmi_props_setattr(kmi.properties, 'action', 'INVERT')
  1215. kmi = km.keymap_items.new('particle.select_more', 'RIGHT_BRACKET', 'PRESS', ctrl=True)
  1216. kmi = km.keymap_items.new('particle.select_less', 'LEFT_BRACKET', 'PRESS', ctrl=True)
  1217. kmi = km.keymap_items.new('particle.select_linked', 'N', 'PRESS')
  1218. kmi_props_setattr(kmi.properties, 'deselect', False)
  1219. kmi = km.keymap_items.new('particle.select_linked', 'N', 'PRESS', shift=True)
  1220. kmi_props_setattr(kmi.properties, 'deselect', True)
  1221. kmi = km.keymap_items.new('particle.delete', 'BACK_SPACE', 'PRESS')
  1222. kmi = km.keymap_items.new('particle.delete', 'BACK_SPACE', 'PRESS')
  1223. kmi.active = False
  1224. kmi = km.keymap_items.new('particle.reveal', 'D', 'PRESS', alt=True)
  1225. kmi = km.keymap_items.new('particle.hide', 'D', 'PRESS')
  1226. kmi_props_setattr(kmi.properties, 'unselected', False)
  1227. kmi = km.keymap_items.new('particle.hide', 'D', 'PRESS', shift=True)
  1228. kmi_props_setattr(kmi.properties, 'unselected', True)
  1229. kmi = km.keymap_items.new('view3d.manipulator', 'LEFTMOUSE', 'PRESS', any=True)
  1230. kmi_props_setattr(kmi.properties, 'release_confirm', True)
  1231. kmi = km.keymap_items.new('particle.brush_edit', 'LEFTMOUSE', 'PRESS')
  1232. kmi = km.keymap_items.new('particle.brush_edit', 'LEFTMOUSE', 'PRESS', shift=True)
  1233. kmi = km.keymap_items.new('wm.radial_control', 'U', 'PRESS')
  1234. kmi_props_setattr(kmi.properties, 'data_path_primary', 'tool_settings.particle_edit.brush.size')
  1235. kmi = km.keymap_items.new('wm.radial_control', 'U', 'PRESS', shift=True)
  1236. kmi_props_setattr(kmi.properties, 'data_path_primary', 'tool_settings.particle_edit.brush.strength')
  1237. kmi = km.keymap_items.new('wm.call_menu', 'COMMA', 'PRESS')
  1238. kmi_props_setattr(kmi.properties, 'name', 'VIEW3D_MT_particle_specials')
  1239. kmi = km.keymap_items.new('particle.weight_set', 'T', 'PRESS', shift=True)
  1240. kmi = km.keymap_items.new('wm.context_cycle_enum', 'R', 'PRESS', shift=True)
  1241. kmi_props_setattr(kmi.properties, 'data_path', 'tool_settings.proportional_edit_falloff')
  1242. kmi = km.keymap_items.new('wm.context_toggle_enum', 'R', 'PRESS')
  1243. kmi_props_setattr(kmi.properties, 'data_path', 'tool_settings.proportional_edit')
  1244. kmi_props_setattr(kmi.properties, 'value_1', 'DISABLED')
  1245. kmi_props_setattr(kmi.properties, 'value_2', 'ENABLED')
  1246.  
  1247. # Map Font
  1248. km = kc.keymaps.new('Font', space_type='EMPTY', region_type='WINDOW', modal=False)
  1249.  
  1250. kmi = km.keymap_items.new('font.style_toggle', 'X', 'PRESS', ctrl=True)
  1251. kmi_props_setattr(kmi.properties, 'style', 'BOLD')
  1252. kmi = km.keymap_items.new('font.style_toggle', 'C', 'PRESS', ctrl=True)
  1253. kmi_props_setattr(kmi.properties, 'style', 'ITALIC')
  1254. kmi = km.keymap_items.new('font.style_toggle', 'G', 'PRESS', ctrl=True)
  1255. kmi_props_setattr(kmi.properties, 'style', 'UNDERLINE')
  1256. kmi = km.keymap_items.new('font.style_toggle', 'L', 'PRESS', ctrl=True)
  1257. kmi_props_setattr(kmi.properties, 'style', 'SMALL_CAPS')
  1258. kmi = km.keymap_items.new('font.delete', 'BACK_SPACE', 'PRESS')
  1259. kmi_props_setattr(kmi.properties, 'type', 'NEXT_OR_SELECTION')
  1260. kmi = km.keymap_items.new('font.delete', 'BACK_SPACE', 'PRESS')
  1261. kmi_props_setattr(kmi.properties, 'type', 'PREVIOUS_OR_SELECTION')
  1262. kmi.active = False
  1263. kmi = km.keymap_items.new('font.delete', 'BACK_SPACE', 'PRESS', shift=True)
  1264. kmi_props_setattr(kmi.properties, 'type', 'PREVIOUS_OR_SELECTION')
  1265. kmi = km.keymap_items.new('font.delete', 'BACK_SPACE', 'PRESS', ctrl=True)
  1266. kmi_props_setattr(kmi.properties, 'type', 'ALL')
  1267. kmi = km.keymap_items.new('font.move', 'BACK_SLASH', 'PRESS')
  1268. kmi_props_setattr(kmi.properties, 'type', 'LINE_BEGIN')
  1269. kmi = km.keymap_items.new('font.move', 'END', 'PRESS')
  1270. kmi_props_setattr(kmi.properties, 'type', 'LINE_END')
  1271. kmi = km.keymap_items.new('font.move', 'LEFT_ARROW', 'PRESS')
  1272. kmi_props_setattr(kmi.properties, 'type', 'PREVIOUS_CHARACTER')
  1273. kmi = km.keymap_items.new('font.move', 'RIGHT_ARROW', 'PRESS')
  1274. kmi_props_setattr(kmi.properties, 'type', 'NEXT_CHARACTER')
  1275. kmi = km.keymap_items.new('font.move', 'LEFT_ARROW', 'PRESS', ctrl=True)
  1276. kmi_props_setattr(kmi.properties, 'type', 'PREVIOUS_WORD')
  1277. kmi = km.keymap_items.new('font.move', 'RIGHT_ARROW', 'PRESS', ctrl=True)
  1278. kmi_props_setattr(kmi.properties, 'type', 'NEXT_WORD')
  1279. kmi = km.keymap_items.new('font.move', 'UP_ARROW', 'PRESS')
  1280. kmi_props_setattr(kmi.properties, 'type', 'PREVIOUS_LINE')
  1281. kmi = km.keymap_items.new('font.move', 'DOWN_ARROW', 'PRESS')
  1282. kmi_props_setattr(kmi.properties, 'type', 'NEXT_LINE')
  1283. kmi = km.keymap_items.new('font.move', 'PAGE_UP', 'PRESS')
  1284. kmi_props_setattr(kmi.properties, 'type', 'PREVIOUS_PAGE')
  1285. kmi = km.keymap_items.new('font.move', 'PAGE_DOWN', 'PRESS')
  1286. kmi_props_setattr(kmi.properties, 'type', 'NEXT_PAGE')
  1287. kmi = km.keymap_items.new('font.move_select', 'BACK_SLASH', 'PRESS', shift=True)
  1288. kmi_props_setattr(kmi.properties, 'type', 'LINE_BEGIN')
  1289. kmi = km.keymap_items.new('font.move_select', 'END', 'PRESS', shift=True)
  1290. kmi_props_setattr(kmi.properties, 'type', 'LINE_END')
  1291. kmi = km.keymap_items.new('font.move_select', 'LEFT_ARROW', 'PRESS', shift=True)
  1292. kmi_props_setattr(kmi.properties, 'type', 'PREVIOUS_CHARACTER')
  1293. kmi = km.keymap_items.new('font.move_select', 'RIGHT_ARROW', 'PRESS', shift=True)
  1294. kmi_props_setattr(kmi.properties, 'type', 'NEXT_CHARACTER')
  1295. kmi = km.keymap_items.new('font.move_select', 'LEFT_ARROW', 'PRESS', shift=True, ctrl=True)
  1296. kmi_props_setattr(kmi.properties, 'type', 'PREVIOUS_WORD')
  1297. kmi = km.keymap_items.new('font.move_select', 'RIGHT_ARROW', 'PRESS', shift=True, ctrl=True)
  1298. kmi_props_setattr(kmi.properties, 'type', 'NEXT_WORD')
  1299. kmi = km.keymap_items.new('font.move_select', 'UP_ARROW', 'PRESS', shift=True)
  1300. kmi_props_setattr(kmi.properties, 'type', 'PREVIOUS_LINE')
  1301. kmi = km.keymap_items.new('font.move_select', 'DOWN_ARROW', 'PRESS', shift=True)
  1302. kmi_props_setattr(kmi.properties, 'type', 'NEXT_LINE')
  1303. kmi = km.keymap_items.new('font.move_select', 'PAGE_UP', 'PRESS', shift=True)
  1304. kmi_props_setattr(kmi.properties, 'type', 'PREVIOUS_PAGE')
  1305. kmi = km.keymap_items.new('font.move_select', 'PAGE_DOWN', 'PRESS', shift=True)
  1306. kmi_props_setattr(kmi.properties, 'type', 'NEXT_PAGE')
  1307. kmi = km.keymap_items.new('font.change_spacing', 'LEFT_ARROW', 'PRESS', alt=True)
  1308. kmi_props_setattr(kmi.properties, 'delta', -1)
  1309. kmi = km.keymap_items.new('font.change_spacing', 'RIGHT_ARROW', 'PRESS', alt=True)
  1310. kmi_props_setattr(kmi.properties, 'delta', 1)
  1311. kmi = km.keymap_items.new('font.change_character', 'UP_ARROW', 'PRESS', alt=True)
  1312. kmi_props_setattr(kmi.properties, 'delta', 1)
  1313. kmi = km.keymap_items.new('font.change_character', 'DOWN_ARROW', 'PRESS', alt=True)
  1314. kmi_props_setattr(kmi.properties, 'delta', -1)
  1315. kmi = km.keymap_items.new('font.select_all', 'A', 'PRESS', ctrl=True)
  1316. kmi = km.keymap_items.new('font.text_copy', 'C', 'PRESS', ctrl=True)
  1317. kmi.active = False
  1318. kmi = km.keymap_items.new('font.text_cut', 'X', 'PRESS', ctrl=True)
  1319. kmi.active = False
  1320. kmi = km.keymap_items.new('font.text_paste', 'V', 'PRESS', ctrl=True)
  1321. kmi.active = False
  1322. kmi = km.keymap_items.new('font.text_copy', 'C', 'PRESS', oskey=True)
  1323. kmi = km.keymap_items.new('font.text_cut', 'X', 'PRESS', oskey=True)
  1324. kmi = km.keymap_items.new('font.text_paste', 'V', 'PRESS', oskey=True)
  1325. kmi = km.keymap_items.new('font.line_break', 'RET', 'PRESS')
  1326. kmi = km.keymap_items.new('font.text_insert', 'TEXTINPUT', 'ANY', any=True)
  1327. kmi = km.keymap_items.new('font.text_insert', 'BACK_SPACE', 'PRESS', alt=True)
  1328. kmi_props_setattr(kmi.properties, 'accent', True)
  1329.  
  1330. # Map Object Non-modal
  1331. km = kc.keymaps.new('Object Non-modal', space_type='EMPTY', region_type='WINDOW', modal=False)
  1332.  
  1333. kmi = km.keymap_items.new('object.mode_set', 'TAB', 'PRESS')
  1334. kmi_props_setattr(kmi.properties, 'mode', 'EDIT')
  1335. kmi_props_setattr(kmi.properties, 'toggle', True)
  1336. kmi = km.keymap_items.new('object.mode_set', 'TAB', 'PRESS', ctrl=True)
  1337. kmi_props_setattr(kmi.properties, 'mode', 'POSE')
  1338. kmi_props_setattr(kmi.properties, 'toggle', True)
  1339. kmi = km.keymap_items.new('object.mode_set', 'K', 'PRESS')
  1340. kmi_props_setattr(kmi.properties, 'mode', 'VERTEX_PAINT')
  1341. kmi_props_setattr(kmi.properties, 'toggle', True)
  1342. kmi = km.keymap_items.new('object.mode_set', 'TAB', 'PRESS', ctrl=True)
  1343. kmi_props_setattr(kmi.properties, 'mode', 'WEIGHT_PAINT')
  1344. kmi_props_setattr(kmi.properties, 'toggle', True)
  1345. kmi = km.keymap_items.new('object.origin_set', 'J', 'PRESS', shift=True, ctrl=True, alt=True)
  1346.  
  1347. # Map 3D View
  1348. km = kc.keymaps.new('3D View', space_type='VIEW_3D', region_type='WINDOW', modal=False)
  1349.  
  1350. kmi = km.keymap_items.new('view3d.manipulator', 'LEFTMOUSE', 'PRESS', any=True)
  1351. kmi_props_setattr(kmi.properties, 'release_confirm', True)
  1352. kmi = km.keymap_items.new('view3d.cursor3d', 'ACTIONMOUSE', 'PRESS')
  1353. kmi = km.keymap_items.new('view3d.rotate', 'MIDDLEMOUSE', 'PRESS')
  1354. kmi = km.keymap_items.new('view3d.move', 'MIDDLEMOUSE', 'PRESS', oskey=True)
  1355. kmi = km.keymap_items.new('view3d.zoom', 'MIDDLEMOUSE', 'PRESS', ctrl=True)
  1356. kmi = km.keymap_items.new('view3d.dolly', 'MIDDLEMOUSE', 'PRESS', shift=True, ctrl=True)
  1357. kmi = km.keymap_items.new('view3d.view_selected', 'V', 'PRESS', shift=True, ctrl=True)
  1358. kmi_props_setattr(kmi.properties, 'use_all_regions', True)
  1359. kmi = km.keymap_items.new('view3d.view_selected', 'V', 'PRESS', shift=True)
  1360. kmi_props_setattr(kmi.properties, 'use_all_regions', False)
  1361. kmi = km.keymap_items.new('view3d.view_lock_to_active', 'V', 'PRESS', shift=True, ctrl=True, alt=True)
  1362. kmi = km.keymap_items.new('view3d.view_lock_clear', 'V', 'PRESS', shift=True, alt=True)
  1363. kmi = km.keymap_items.new('view3d.navigate', 'U', 'PRESS', shift=True)
  1364. kmi = km.keymap_items.new('view3d.smoothview', 'TIMER1', 'ANY', any=True)
  1365. kmi = km.keymap_items.new('view3d.rotate', 'TRACKPADPAN', 'ANY')
  1366. kmi = km.keymap_items.new('view3d.rotate', 'MOUSEROTATE', 'ANY')
  1367. kmi = km.keymap_items.new('view3d.move', 'TRACKPADPAN', 'ANY', shift=True)
  1368. kmi = km.keymap_items.new('view3d.zoom', 'TRACKPADZOOM', 'ANY')
  1369. kmi = km.keymap_items.new('view3d.zoom', 'TRACKPADPAN', 'ANY', ctrl=True)
  1370. kmi = km.keymap_items.new('view3d.zoom', 'RIGHT_BRACKET', 'PRESS')
  1371. kmi_props_setattr(kmi.properties, 'delta', 1)
  1372. kmi = km.keymap_items.new('view3d.zoom', 'LEFT_BRACKET', 'PRESS')
  1373. kmi_props_setattr(kmi.properties, 'delta', -1)
  1374. kmi = km.keymap_items.new('view3d.zoom', 'RIGHT_BRACKET', 'PRESS', ctrl=True)
  1375. kmi_props_setattr(kmi.properties, 'delta', 1)
  1376. kmi = km.keymap_items.new('view3d.zoom', 'LEFT_BRACKET', 'PRESS', ctrl=True)
  1377. kmi_props_setattr(kmi.properties, 'delta', -1)
  1378. kmi = km.keymap_items.new('view3d.zoom', 'WHEELINMOUSE', 'PRESS')
  1379. kmi_props_setattr(kmi.properties, 'delta', 1)
  1380. kmi = km.keymap_items.new('view3d.zoom', 'WHEELOUTMOUSE', 'PRESS')
  1381. kmi_props_setattr(kmi.properties, 'delta', -1)
  1382. kmi = km.keymap_items.new('view3d.dolly', 'RIGHT_BRACKET', 'PRESS', shift=True)
  1383. kmi_props_setattr(kmi.properties, 'delta', 1)
  1384. kmi = km.keymap_items.new('view3d.dolly', 'LEFT_BRACKET', 'PRESS', shift=True)
  1385. kmi_props_setattr(kmi.properties, 'delta', -1)
  1386. kmi = km.keymap_items.new('view3d.dolly', 'RIGHT_BRACKET', 'PRESS', shift=True, ctrl=True)
  1387. kmi_props_setattr(kmi.properties, 'delta', 1)
  1388. kmi = km.keymap_items.new('view3d.dolly', 'LEFT_BRACKET', 'PRESS', shift=True, ctrl=True)
  1389. kmi_props_setattr(kmi.properties, 'delta', -1)
  1390. kmi = km.keymap_items.new('view3d.zoom_camera_1_to_1', 'NUMPAD_ENTER', 'PRESS', shift=True)
  1391. kmi = km.keymap_items.new('view3d.view_center_camera', 'BACK_SLASH', 'PRESS')
  1392. kmi = km.keymap_items.new('view3d.view_center_lock', 'BACK_SLASH', 'PRESS')
  1393. kmi = km.keymap_items.new('view3d.view_center_cursor', 'BACK_SLASH', 'PRESS', alt=True)
  1394. kmi = km.keymap_items.new('view3d.view_center_pick', 'U', 'PRESS', alt=True)
  1395. kmi = km.keymap_items.new('view3d.view_all', 'BACK_SLASH', 'PRESS')
  1396. kmi_props_setattr(kmi.properties, 'center', False)
  1397. kmi = km.keymap_items.new('view3d.view_all', 'BACK_SLASH', 'PRESS', ctrl=True)
  1398. kmi_props_setattr(kmi.properties, 'use_all_regions', True)
  1399. kmi_props_setattr(kmi.properties, 'center', False)
  1400. kmi = km.keymap_items.new('view3d.view_all', 'J', 'PRESS', shift=True)
  1401. kmi_props_setattr(kmi.properties, 'center', True)
  1402. kmi = km.keymap_items.new('view3d.viewnumpad', 'ZERO', 'PRESS', shift=True)
  1403. kmi_props_setattr(kmi.properties, 'type', 'CAMERA')
  1404. kmi = km.keymap_items.new('view3d.viewnumpad', 'ONE', 'PRESS', shift=True)
  1405. kmi_props_setattr(kmi.properties, 'type', 'FRONT')
  1406. kmi = km.keymap_items.new('view3d.view_orbit', 'TWO', 'PRESS', shift=True)
  1407. kmi_props_setattr(kmi.properties, 'type', 'ORBITDOWN')
  1408. kmi = km.keymap_items.new('view3d.viewnumpad', 'THREE', 'PRESS', shift=True)
  1409. kmi_props_setattr(kmi.properties, 'type', 'RIGHT')
  1410. kmi = km.keymap_items.new('view3d.view_orbit', 'FOUR', 'PRESS', shift=True)
  1411. kmi_props_setattr(kmi.properties, 'type', 'ORBITLEFT')
  1412. kmi = km.keymap_items.new('view3d.view_persportho', 'FIVE', 'PRESS', shift=True)
  1413. kmi = km.keymap_items.new('view3d.view_orbit', 'SIX', 'PRESS', shift=True)
  1414. kmi_props_setattr(kmi.properties, 'type', 'ORBITRIGHT')
  1415. kmi = km.keymap_items.new('view3d.viewnumpad', 'SEVEN', 'PRESS', shift=True)
  1416. kmi_props_setattr(kmi.properties, 'type', 'TOP')
  1417. kmi = km.keymap_items.new('view3d.view_orbit', 'EIGHT', 'PRESS', shift=True)
  1418. kmi_props_setattr(kmi.properties, 'type', 'ORBITUP')
  1419. kmi = km.keymap_items.new('view3d.viewnumpad', 'ONE', 'PRESS', ctrl=True)
  1420. kmi_props_setattr(kmi.properties, 'type', 'BACK')
  1421. kmi = km.keymap_items.new('view3d.viewnumpad', 'THREE', 'PRESS', ctrl=True)
  1422. kmi_props_setattr(kmi.properties, 'type', 'LEFT')
  1423. kmi = km.keymap_items.new('view3d.viewnumpad', 'SEVEN', 'PRESS', ctrl=True)
  1424. kmi_props_setattr(kmi.properties, 'type', 'BOTTOM')
  1425. kmi = km.keymap_items.new('view3d.view_pan', 'TWO', 'PRESS', ctrl=True)
  1426. kmi_props_setattr(kmi.properties, 'type', 'PANDOWN')
  1427. kmi = km.keymap_items.new('view3d.view_pan', 'FOUR', 'PRESS', ctrl=True)
  1428. kmi_props_setattr(kmi.properties, 'type', 'PANLEFT')
  1429. kmi = km.keymap_items.new('view3d.view_pan', 'SIX', 'PRESS', ctrl=True)
  1430. kmi_props_setattr(kmi.properties, 'type', 'PANRIGHT')
  1431. kmi = km.keymap_items.new('view3d.view_pan', 'EIGHT', 'PRESS', ctrl=True)
  1432. kmi_props_setattr(kmi.properties, 'type', 'PANUP')
  1433. kmi = km.keymap_items.new('view3d.view_roll', 'FOUR', 'PRESS', alt=True)
  1434. kmi_props_setattr(kmi.properties, 'angle', -0.2617993950843811)
  1435. kmi = km.keymap_items.new('view3d.view_roll', 'SIX', 'PRESS', alt=True)
  1436. kmi_props_setattr(kmi.properties, 'angle', 0.2617993950843811)
  1437. kmi = km.keymap_items.new('view3d.view_pan', 'WHEELUPMOUSE', 'PRESS', ctrl=True)
  1438. kmi_props_setattr(kmi.properties, 'type', 'PANRIGHT')
  1439. kmi = km.keymap_items.new('view3d.view_pan', 'WHEELDOWNMOUSE', 'PRESS', ctrl=True)
  1440. kmi_props_setattr(kmi.properties, 'type', 'PANLEFT')
  1441. kmi = km.keymap_items.new('view3d.view_pan', 'WHEELUPMOUSE', 'PRESS', shift=True)
  1442. kmi_props_setattr(kmi.properties, 'type', 'PANUP')
  1443. kmi = km.keymap_items.new('view3d.view_pan', 'WHEELDOWNMOUSE', 'PRESS', shift=True)
  1444. kmi_props_setattr(kmi.properties, 'type', 'PANDOWN')
  1445. kmi = km.keymap_items.new('view3d.view_orbit', 'WHEELUPMOUSE', 'PRESS', ctrl=True, alt=True)
  1446. kmi_props_setattr(kmi.properties, 'type', 'ORBITLEFT')
  1447. kmi = km.keymap_items.new('view3d.view_orbit', 'WHEELDOWNMOUSE', 'PRESS', ctrl=True, alt=True)
  1448. kmi_props_setattr(kmi.properties, 'type', 'ORBITRIGHT')
  1449. kmi = km.keymap_items.new('view3d.view_orbit', 'WHEELUPMOUSE', 'PRESS', shift=True, alt=True)
  1450. kmi_props_setattr(kmi.properties, 'type', 'ORBITUP')
  1451. kmi = km.keymap_items.new('view3d.view_orbit', 'WHEELDOWNMOUSE', 'PRESS', shift=True, alt=True)
  1452. kmi_props_setattr(kmi.properties, 'type', 'ORBITDOWN')
  1453. kmi = km.keymap_items.new('view3d.view_roll', 'WHEELUPMOUSE', 'PRESS', shift=True, ctrl=True)
  1454. kmi_props_setattr(kmi.properties, 'angle', -0.2617993950843811)
  1455. kmi = km.keymap_items.new('view3d.view_roll', 'WHEELDOWNMOUSE', 'PRESS', shift=True, ctrl=True)
  1456. kmi_props_setattr(kmi.properties, 'angle', 0.2617993950843811)
  1457. kmi = km.keymap_items.new('view3d.viewnumpad', 'ONE', 'PRESS', alt=True)
  1458. kmi_props_setattr(kmi.properties, 'type', 'FRONT')
  1459. kmi_props_setattr(kmi.properties, 'align_active', True)
  1460. kmi = km.keymap_items.new('view3d.viewnumpad', 'THREE', 'PRESS', alt=True)
  1461. kmi_props_setattr(kmi.properties, 'type', 'RIGHT')
  1462. kmi_props_setattr(kmi.properties, 'align_active', True)
  1463. kmi = km.keymap_items.new('view3d.viewnumpad', 'SEVEN', 'PRESS', alt=True)
  1464. kmi_props_setattr(kmi.properties, 'type', 'TOP')
  1465. kmi_props_setattr(kmi.properties, 'align_active', True)
  1466. kmi = km.keymap_items.new('view3d.viewnumpad', 'ONE', 'PRESS', shift=True, ctrl=True)
  1467. kmi_props_setattr(kmi.properties, 'type', 'BACK')
  1468. kmi_props_setattr(kmi.properties, 'align_active', True)
  1469. kmi = km.keymap_items.new('view3d.viewnumpad', 'THREE', 'PRESS', shift=True, ctrl=True)
  1470. kmi_props_setattr(kmi.properties, 'type', 'LEFT')
  1471. kmi_props_setattr(kmi.properties, 'align_active', True)
  1472. kmi = km.keymap_items.new('view3d.viewnumpad', 'SEVEN', 'PRESS', shift=True, ctrl=True)
  1473. kmi_props_setattr(kmi.properties, 'type', 'BOTTOM')
  1474. kmi_props_setattr(kmi.properties, 'align_active', True)
  1475. kmi = km.keymap_items.new('view3d.localview', 'NUMPAD_SLASH', 'PRESS')
  1476. kmi = km.keymap_items.new('view3d.ndof_orbit_zoom', 'NDOF_MOTION', 'ANY')
  1477. kmi = km.keymap_items.new('view3d.ndof_orbit', 'NDOF_MOTION', 'ANY', ctrl=True)
  1478. kmi = km.keymap_items.new('view3d.ndof_pan', 'NDOF_MOTION', 'ANY', shift=True)
  1479. kmi = km.keymap_items.new('view3d.ndof_all', 'NDOF_MOTION', 'ANY', shift=True, ctrl=True)
  1480. kmi = km.keymap_items.new('view3d.view_selected', 'NDOF_BUTTON_FIT', 'PRESS')
  1481. kmi_props_setattr(kmi.properties, 'use_all_regions', False)
  1482. kmi = km.keymap_items.new('view3d.view_roll', 'NDOF_BUTTON_ROLL_CCW', 'PRESS')
  1483. kmi_props_setattr(kmi.properties, 'angle', -1.5707963705062866)
  1484. kmi = km.keymap_items.new('view3d.view_roll', 'NDOF_BUTTON_ROLL_CW', 'PRESS')
  1485. kmi_props_setattr(kmi.properties, 'angle', 1.5707963705062866)
  1486. kmi = km.keymap_items.new('view3d.viewnumpad', 'NDOF_BUTTON_FRONT', 'PRESS')
  1487. kmi_props_setattr(kmi.properties, 'type', 'FRONT')
  1488. kmi = km.keymap_items.new('view3d.viewnumpad', 'NDOF_BUTTON_BACK', 'PRESS')
  1489. kmi_props_setattr(kmi.properties, 'type', 'BACK')
  1490. kmi = km.keymap_items.new('view3d.viewnumpad', 'NDOF_BUTTON_LEFT', 'PRESS')
  1491. kmi_props_setattr(kmi.properties, 'type', 'LEFT')
  1492. kmi = km.keymap_items.new('view3d.viewnumpad', 'NDOF_BUTTON_RIGHT', 'PRESS')
  1493. kmi_props_setattr(kmi.properties, 'type', 'RIGHT')
  1494. kmi = km.keymap_items.new('view3d.viewnumpad', 'NDOF_BUTTON_TOP', 'PRESS')
  1495. kmi_props_setattr(kmi.properties, 'type', 'TOP')
  1496. kmi = km.keymap_items.new('view3d.viewnumpad', 'NDOF_BUTTON_BOTTOM', 'PRESS')
  1497. kmi_props_setattr(kmi.properties, 'type', 'BOTTOM')
  1498. kmi = km.keymap_items.new('view3d.viewnumpad', 'NDOF_BUTTON_FRONT', 'PRESS', shift=True)
  1499. kmi_props_setattr(kmi.properties, 'type', 'FRONT')
  1500. kmi_props_setattr(kmi.properties, 'align_active', True)
  1501. kmi = km.keymap_items.new('view3d.viewnumpad', 'NDOF_BUTTON_RIGHT', 'PRESS', shift=True)
  1502. kmi_props_setattr(kmi.properties, 'type', 'RIGHT')
  1503. kmi_props_setattr(kmi.properties, 'align_active', True)
  1504. kmi = km.keymap_items.new('view3d.viewnumpad', 'NDOF_BUTTON_TOP', 'PRESS', shift=True)
  1505. kmi_props_setattr(kmi.properties, 'type', 'TOP')
  1506. kmi_props_setattr(kmi.properties, 'align_active', True)
  1507. kmi = km.keymap_items.new('view3d.layers', 'ACCENT_GRAVE', 'PRESS')
  1508. kmi_props_setattr(kmi.properties, 'nr', 0)
  1509. kmi = km.keymap_items.new('view3d.layers', 'ONE', 'PRESS')
  1510. kmi_props_setattr(kmi.properties, 'nr', 1)
  1511. kmi = km.keymap_items.new('view3d.layers', 'TWO', 'PRESS')
  1512. kmi_props_setattr(kmi.properties, 'nr', 2)
  1513. kmi = km.keymap_items.new('view3d.layers', 'THREE', 'PRESS')
  1514. kmi_props_setattr(kmi.properties, 'nr', 3)
  1515. kmi = km.keymap_items.new('view3d.layers', 'FOUR', 'PRESS')
  1516. kmi_props_setattr(kmi.properties, 'nr', 4)
  1517. kmi = km.keymap_items.new('view3d.layers', 'FIVE', 'PRESS')
  1518. kmi_props_setattr(kmi.properties, 'nr', 5)
  1519. kmi = km.keymap_items.new('view3d.layers', 'SIX', 'PRESS')
  1520. kmi_props_setattr(kmi.properties, 'nr', 6)
  1521. kmi = km.keymap_items.new('view3d.layers', 'SEVEN', 'PRESS')
  1522. kmi_props_setattr(kmi.properties, 'nr', 7)
  1523. kmi = km.keymap_items.new('view3d.layers', 'EIGHT', 'PRESS')
  1524. kmi_props_setattr(kmi.properties, 'nr', 8)
  1525. kmi = km.keymap_items.new('view3d.layers', 'NINE', 'PRESS')
  1526. kmi_props_setattr(kmi.properties, 'nr', 9)
  1527. kmi = km.keymap_items.new('view3d.layers', 'ZERO', 'PRESS')
  1528. kmi_props_setattr(kmi.properties, 'nr', 10)
  1529. kmi = km.keymap_items.new('wm.context_toggle_enum', 'SEMI_COLON', 'PRESS')
  1530. kmi_props_setattr(kmi.properties, 'data_path', 'space_data.viewport_shade')
  1531. kmi_props_setattr(kmi.properties, 'value_1', 'SOLID')
  1532. kmi_props_setattr(kmi.properties, 'value_2', 'WIREFRAME')
  1533. kmi = km.keymap_items.new('wm.context_toggle_enum', 'SEMI_COLON', 'PRESS', alt=True)
  1534. kmi_props_setattr(kmi.properties, 'data_path', 'space_data.viewport_shade')
  1535. kmi_props_setattr(kmi.properties, 'value_1', 'SOLID')
  1536. kmi_props_setattr(kmi.properties, 'value_2', 'TEXTURED')
  1537. kmi = km.keymap_items.new('wm.context_toggle_enum', 'SEMI_COLON', 'PRESS', oskey=True)
  1538. kmi_props_setattr(kmi.properties, 'data_path', 'space_data.viewport_shade')
  1539. kmi_props_setattr(kmi.properties, 'value_1', 'SOLID')
  1540. kmi_props_setattr(kmi.properties, 'value_2', 'RENDERED')
  1541. kmi = km.keymap_items.new('view3d.select', 'SELECTMOUSE', 'PRESS')
  1542. kmi_props_setattr(kmi.properties, 'extend', False)
  1543. kmi_props_setattr(kmi.properties, 'deselect', False)
  1544. kmi_props_setattr(kmi.properties, 'toggle', False)
  1545. kmi_props_setattr(kmi.properties, 'center', False)
  1546. kmi_props_setattr(kmi.properties, 'enumerate', False)
  1547. kmi_props_setattr(kmi.properties, 'object', False)
  1548. kmi = km.keymap_items.new('view3d.select', 'SELECTMOUSE', 'PRESS', shift=True)
  1549. kmi_props_setattr(kmi.properties, 'extend', False)
  1550. kmi_props_setattr(kmi.properties, 'deselect', False)
  1551. kmi_props_setattr(kmi.properties, 'toggle', True)
  1552. kmi_props_setattr(kmi.properties, 'center', False)
  1553. kmi_props_setattr(kmi.properties, 'enumerate', False)
  1554. kmi_props_setattr(kmi.properties, 'object', False)
  1555. kmi = km.keymap_items.new('view3d.select', 'SELECTMOUSE', 'PRESS', ctrl=True)
  1556. kmi_props_setattr(kmi.properties, 'extend', False)
  1557. kmi_props_setattr(kmi.properties, 'deselect', False)
  1558. kmi_props_setattr(kmi.properties, 'toggle', False)
  1559. kmi_props_setattr(kmi.properties, 'center', True)
  1560. kmi_props_setattr(kmi.properties, 'enumerate', False)
  1561. kmi_props_setattr(kmi.properties, 'object', True)
  1562. kmi = km.keymap_items.new('view3d.select', 'SELECTMOUSE', 'PRESS', alt=True)
  1563. kmi_props_setattr(kmi.properties, 'extend', False)
  1564. kmi_props_setattr(kmi.properties, 'deselect', False)
  1565. kmi_props_setattr(kmi.properties, 'toggle', False)
  1566. kmi_props_setattr(kmi.properties, 'center', False)
  1567. kmi_props_setattr(kmi.properties, 'enumerate', True)
  1568. kmi_props_setattr(kmi.properties, 'object', False)
  1569. kmi = km.keymap_items.new('view3d.select', 'SELECTMOUSE', 'PRESS', shift=True, ctrl=True)
  1570. kmi_props_setattr(kmi.properties, 'extend', True)
  1571. kmi_props_setattr(kmi.properties, 'deselect', False)
  1572. kmi_props_setattr(kmi.properties, 'toggle', True)
  1573. kmi_props_setattr(kmi.properties, 'center', True)
  1574. kmi_props_setattr(kmi.properties, 'enumerate', False)
  1575. kmi_props_setattr(kmi.properties, 'object', False)
  1576. kmi = km.keymap_items.new('view3d.select', 'SELECTMOUSE', 'PRESS', ctrl=True, alt=True)
  1577. kmi_props_setattr(kmi.properties, 'extend', False)
  1578. kmi_props_setattr(kmi.properties, 'deselect', False)
  1579. kmi_props_setattr(kmi.properties, 'toggle', False)
  1580. kmi_props_setattr(kmi.properties, 'center', True)
  1581. kmi_props_setattr(kmi.properties, 'enumerate', True)
  1582. kmi_props_setattr(kmi.properties, 'object', False)
  1583. kmi = km.keymap_items.new('view3d.select', 'SELECTMOUSE', 'PRESS', shift=True, alt=True)
  1584. kmi_props_setattr(kmi.properties, 'extend', False)
  1585. kmi_props_setattr(kmi.properties, 'deselect', False)
  1586. kmi_props_setattr(kmi.properties, 'toggle', True)
  1587. kmi_props_setattr(kmi.properties, 'center', False)
  1588. kmi_props_setattr(kmi.properties, 'enumerate', True)
  1589. kmi_props_setattr(kmi.properties, 'object', False)
  1590. kmi = km.keymap_items.new('view3d.select', 'SELECTMOUSE', 'PRESS', shift=True, ctrl=True, alt=True)
  1591. kmi_props_setattr(kmi.properties, 'extend', False)
  1592. kmi_props_setattr(kmi.properties, 'deselect', False)
  1593. kmi_props_setattr(kmi.properties, 'toggle', True)
  1594. kmi_props_setattr(kmi.properties, 'center', True)
  1595. kmi_props_setattr(kmi.properties, 'enumerate', True)
  1596. kmi_props_setattr(kmi.properties, 'object', False)
  1597. kmi = km.keymap_items.new('view3d.select_border', 'X', 'PRESS')
  1598. kmi = km.keymap_items.new('view3d.select_lasso', 'EVT_TWEAK_A', 'ANY', ctrl=True)
  1599. kmi_props_setattr(kmi.properties, 'deselect', False)
  1600. kmi = km.keymap_items.new('view3d.select_lasso', 'EVT_TWEAK_A', 'ANY', shift=True, ctrl=True)
  1601. kmi_props_setattr(kmi.properties, 'deselect', True)
  1602. kmi = km.keymap_items.new('view3d.select_circle', 'J', 'PRESS')
  1603. kmi = km.keymap_items.new('view3d.clip_border', 'X', 'PRESS', alt=True)
  1604. kmi = km.keymap_items.new('view3d.zoom_border', 'X', 'PRESS', shift=True)
  1605. kmi = km.keymap_items.new('view3d.render_border', 'X', 'PRESS', shift=True)
  1606. kmi_props_setattr(kmi.properties, 'camera_only', True)
  1607. kmi = km.keymap_items.new('view3d.render_border', 'X', 'PRESS', ctrl=True)
  1608. kmi_props_setattr(kmi.properties, 'camera_only', False)
  1609. kmi = km.keymap_items.new('view3d.clear_render_border', 'X', 'PRESS', ctrl=True, alt=True)
  1610. kmi = km.keymap_items.new('view3d.camera_to_view', 'NUMPAD_0', 'PRESS', ctrl=True, alt=True)
  1611. kmi = km.keymap_items.new('view3d.object_as_camera', 'NUMPAD_0', 'PRESS', ctrl=True)
  1612. kmi = km.keymap_items.new('wm.call_menu', 'O', 'PRESS', shift=True)
  1613. kmi_props_setattr(kmi.properties, 'name', 'VIEW3D_MT_snap')
  1614. kmi = km.keymap_items.new('view3d.copybuffer', 'C', 'PRESS', oskey=True)
  1615. kmi = km.keymap_items.new('view3d.pastebuffer', 'V', 'PRESS', oskey=True)
  1616. kmi = km.keymap_items.new('view3d.copybuffer', 'C', 'PRESS', ctrl=True)
  1617. kmi.active = False
  1618. kmi = km.keymap_items.new('view3d.pastebuffer', 'V', 'PRESS', ctrl=True)
  1619. kmi.active = False
  1620. kmi = km.keymap_items.new('wm.context_set_enum', 'W', 'PRESS')
  1621. kmi_props_setattr(kmi.properties, 'data_path', 'space_data.pivot_point')
  1622. kmi_props_setattr(kmi.properties, 'value', 'BOUNDING_BOX_CENTER')
  1623. kmi = km.keymap_items.new('wm.context_set_enum', 'W', 'PRESS', ctrl=True)
  1624. kmi_props_setattr(kmi.properties, 'data_path', 'space_data.pivot_point')
  1625. kmi_props_setattr(kmi.properties, 'value', 'MEDIAN_POINT')
  1626. kmi = km.keymap_items.new('wm.context_toggle', 'W', 'PRESS', alt=True)
  1627. kmi_props_setattr(kmi.properties, 'data_path', 'space_data.use_pivot_point_align')
  1628. kmi = km.keymap_items.new('wm.context_toggle', 'SPACE', 'PRESS', ctrl=True)
  1629. kmi_props_setattr(kmi.properties, 'data_path', 'space_data.show_manipulator')
  1630. kmi = km.keymap_items.new('wm.context_set_enum', 'V', 'PRESS')
  1631. kmi_props_setattr(kmi.properties, 'data_path', 'space_data.pivot_point')
  1632. kmi_props_setattr(kmi.properties, 'value', 'CURSOR')
  1633. kmi = km.keymap_items.new('wm.context_set_enum', 'V', 'PRESS', ctrl=True)
  1634. kmi_props_setattr(kmi.properties, 'data_path', 'space_data.pivot_point')
  1635. kmi_props_setattr(kmi.properties, 'value', 'INDIVIDUAL_ORIGINS')
  1636. kmi = km.keymap_items.new('wm.context_set_enum', 'V', 'PRESS', alt=True)
  1637. kmi_props_setattr(kmi.properties, 'data_path', 'space_data.pivot_point')
  1638. kmi_props_setattr(kmi.properties, 'value', 'ACTIVE_ELEMENT')
  1639. kmi = km.keymap_items.new('transform.translate', 'I', 'PRESS')
  1640. kmi = km.keymap_items.new('transform.translate', 'EVT_TWEAK_S', 'ANY')
  1641. kmi = km.keymap_items.new('transform.rotate', 'P', 'PRESS')
  1642. kmi = km.keymap_items.new('transform.resize', 'O', 'PRESS')
  1643. kmi = km.keymap_items.new('transform.bend', 'COMMA', 'PRESS', shift=True)
  1644. kmi = km.keymap_items.new('transform.tosphere', 'O', 'PRESS', shift=True, alt=True)
  1645. kmi = km.keymap_items.new('transform.shear', 'O', 'PRESS', shift=True, ctrl=True, alt=True)
  1646. kmi = km.keymap_items.new('transform.select_orientation', 'SPACE', 'PRESS', alt=True)
  1647. kmi = km.keymap_items.new('transform.create_orientation', 'SPACE', 'PRESS', ctrl=True, alt=True)
  1648. kmi_props_setattr(kmi.properties, 'use', True)
  1649. kmi = km.keymap_items.new('transform.mirror', 'M', 'PRESS', ctrl=True)
  1650. kmi = km.keymap_items.new('wm.context_toggle', 'TAB', 'PRESS', shift=True)
  1651. kmi_props_setattr(kmi.properties, 'data_path', 'tool_settings.use_snap')
  1652. kmi = km.keymap_items.new('wm.context_menu_enum', 'TAB', 'PRESS', shift=True, ctrl=True)
  1653. kmi_props_setattr(kmi.properties, 'data_path', 'tool_settings.snap_element')
  1654. kmi = km.keymap_items.new('transform.translate', 'Y', 'PRESS', shift=True)
  1655. kmi_props_setattr(kmi.properties, 'texture_space', True)
  1656. kmi = km.keymap_items.new('transform.resize', 'Y', 'PRESS', shift=True, alt=True)
  1657. kmi_props_setattr(kmi.properties, 'texture_space', True)
  1658. kmi = km.keymap_items.new('transform.skin_resize', 'A', 'PRESS', ctrl=True)
  1659.  
  1660. # Map Outliner
  1661. km = kc.keymaps.new('Outliner', space_type='OUTLINER', region_type='WINDOW', modal=False)
  1662.  
  1663. kmi = km.keymap_items.new('outliner.item_rename', 'LEFTMOUSE', 'DOUBLE_CLICK')
  1664. kmi = km.keymap_items.new('outliner.item_activate', 'LEFTMOUSE', 'CLICK')
  1665. kmi_props_setattr(kmi.properties, 'extend', False)
  1666. kmi_props_setattr(kmi.properties, 'recursive', False)
  1667. kmi = km.keymap_items.new('outliner.item_activate', 'LEFTMOUSE', 'CLICK', shift=True)
  1668. kmi_props_setattr(kmi.properties, 'extend', True)
  1669. kmi_props_setattr(kmi.properties, 'recursive', False)
  1670. kmi = km.keymap_items.new('outliner.item_activate', 'LEFTMOUSE', 'CLICK', ctrl=True)
  1671. kmi_props_setattr(kmi.properties, 'extend', False)
  1672. kmi_props_setattr(kmi.properties, 'recursive', True)
  1673. kmi = km.keymap_items.new('outliner.item_activate', 'LEFTMOUSE', 'CLICK', shift=True, ctrl=True)
  1674. kmi_props_setattr(kmi.properties, 'extend', True)
  1675. kmi_props_setattr(kmi.properties, 'recursive', True)
  1676. kmi = km.keymap_items.new('outliner.select_border', 'X', 'PRESS')
  1677. kmi = km.keymap_items.new('outliner.item_openclose', 'RET', 'PRESS')
  1678. kmi_props_setattr(kmi.properties, 'all', False)
  1679. kmi = km.keymap_items.new('outliner.item_openclose', 'RET', 'PRESS', shift=True)
  1680. kmi_props_setattr(kmi.properties, 'all', True)
  1681. kmi = km.keymap_items.new('outliner.item_rename', 'LEFTMOUSE', 'PRESS', ctrl=True)
  1682. kmi = km.keymap_items.new('outliner.operation', 'RIGHTMOUSE', 'PRESS')
  1683. kmi = km.keymap_items.new('outliner.show_hierarchy', 'BACK_SLASH', 'PRESS')
  1684. kmi = km.keymap_items.new('outliner.show_active', 'V', 'PRESS')
  1685. kmi = km.keymap_items.new('outliner.show_active', 'V', 'PRESS', ctrl=True)
  1686. kmi = km.keymap_items.new('outliner.scroll_page', 'PAGE_DOWN', 'PRESS')
  1687. kmi = km.keymap_items.new('outliner.scroll_page', 'PAGE_UP', 'PRESS')
  1688. kmi_props_setattr(kmi.properties, 'up', True)
  1689. kmi = km.keymap_items.new('outliner.show_one_level', 'RIGHT_BRACKET', 'PRESS')
  1690. kmi = km.keymap_items.new('outliner.show_one_level', 'LEFT_BRACKET', 'PRESS')
  1691. kmi_props_setattr(kmi.properties, 'open', False)
  1692. kmi = km.keymap_items.new('outliner.selected_toggle', 'A', 'PRESS')
  1693. kmi = km.keymap_items.new('outliner.expanded_toggle', 'A', 'PRESS', shift=True)
  1694. kmi = km.keymap_items.new('outliner.renderability_toggle', 'P', 'PRESS')
  1695. kmi = km.keymap_items.new('outliner.selectability_toggle', 'O', 'PRESS')
  1696. kmi = km.keymap_items.new('outliner.visibility_toggle', 'K', 'PRESS')
  1697. kmi = km.keymap_items.new('outliner.keyingset_add_selected', 'T', 'PRESS')
  1698. kmi = km.keymap_items.new('outliner.keyingset_remove_selected', 'T', 'PRESS', alt=True)
  1699. kmi = km.keymap_items.new('anim.keyframe_insert', 'C', 'PRESS')
  1700. kmi = km.keymap_items.new('anim.keyframe_delete', 'C', 'PRESS', alt=True)
  1701. kmi = km.keymap_items.new('outliner.drivers_add_selected', 'E', 'PRESS')
  1702. kmi = km.keymap_items.new('outliner.drivers_delete_selected', 'E', 'PRESS', alt=True)
  1703.  
  1704. # Map Image Generic
  1705. km = kc.keymaps.new('Image Generic', space_type='IMAGE_EDITOR', region_type='WINDOW', modal=False)
  1706.  
  1707. kmi = km.keymap_items.new('image.new', 'B', 'PRESS', alt=True)
  1708. kmi = km.keymap_items.new('image.open', 'R', 'PRESS', alt=True)
  1709. kmi = km.keymap_items.new('image.reload', 'P', 'PRESS', alt=True)
  1710. kmi = km.keymap_items.new('image.save', 'O', 'PRESS', alt=True)
  1711. kmi = km.keymap_items.new('image.save_as', 'F3', 'PRESS')
  1712. kmi = km.keymap_items.new('image.properties', 'B', 'PRESS')
  1713. kmi = km.keymap_items.new('image.toolshelf', 'Y', 'PRESS')
  1714. kmi = km.keymap_items.new('image.cycle_render_slot', 'H', 'PRESS')
  1715. kmi = km.keymap_items.new('image.cycle_render_slot', 'H', 'PRESS', alt=True)
  1716. kmi_props_setattr(kmi.properties, 'reverse', True)
  1717.  
  1718. # Map Mask Editing
  1719. km = kc.keymaps.new('Mask Editing', space_type='EMPTY', region_type='WINDOW', modal=False)
  1720.  
  1721. kmi = km.keymap_items.new('mask.new', 'B', 'PRESS', alt=True)
  1722. kmi = km.keymap_items.new('wm.call_menu', 'A', 'PRESS', shift=True)
  1723. kmi_props_setattr(kmi.properties, 'name', 'MASK_MT_add')
  1724. kmi = km.keymap_items.new('wm.context_cycle_enum', 'R', 'PRESS', shift=True)
  1725. kmi_props_setattr(kmi.properties, 'data_path', 'tool_settings.proportional_edit_falloff')
  1726. kmi = km.keymap_items.new('wm.context_toggle', 'R', 'PRESS')
  1727. kmi_props_setattr(kmi.properties, 'data_path', 'tool_settings.use_proportional_edit_mask')
  1728. kmi = km.keymap_items.new('mask.add_vertex_slide', 'ACTIONMOUSE', 'PRESS', ctrl=True)
  1729. kmi = km.keymap_items.new('mask.add_feather_vertex_slide', 'ACTIONMOUSE', 'PRESS', shift=True)
  1730. kmi = km.keymap_items.new('mask.delete', 'BACK_SPACE', 'PRESS')
  1731. kmi = km.keymap_items.new('mask.delete', 'BACK_SPACE', 'PRESS')
  1732. kmi.active = False
  1733. kmi = km.keymap_items.new('mask.select', 'SELECTMOUSE', 'PRESS')
  1734. kmi_props_setattr(kmi.properties, 'extend', False)
  1735. kmi_props_setattr(kmi.properties, 'deselect', False)
  1736. kmi_props_setattr(kmi.properties, 'toggle', False)
  1737. kmi = km.keymap_items.new('mask.select', 'SELECTMOUSE', 'PRESS', shift=True)
  1738. kmi_props_setattr(kmi.properties, 'extend', False)
  1739. kmi_props_setattr(kmi.properties, 'deselect', False)
  1740. kmi_props_setattr(kmi.properties, 'toggle', True)
  1741. kmi = km.keymap_items.new('mask.select_all', 'A', 'PRESS')
  1742. kmi_props_setattr(kmi.properties, 'action', 'TOGGLE')
  1743. kmi = km.keymap_items.new('mask.select_all', 'C', 'PRESS', ctrl=True)
  1744. kmi_props_setattr(kmi.properties, 'action', 'INVERT')
  1745. kmi = km.keymap_items.new('mask.select_linked', 'N', 'PRESS', ctrl=True)
  1746. kmi = km.keymap_items.new('mask.select_linked_pick', 'N', 'PRESS')
  1747. kmi_props_setattr(kmi.properties, 'deselect', False)
  1748. kmi = km.keymap_items.new('mask.select_linked_pick', 'N', 'PRESS', shift=True)
  1749. kmi_props_setattr(kmi.properties, 'deselect', True)
  1750. kmi = km.keymap_items.new('mask.select_border', 'X', 'PRESS')
  1751. kmi = km.keymap_items.new('mask.select_circle', 'J', 'PRESS')
  1752. kmi = km.keymap_items.new('mask.select_lasso', 'EVT_TWEAK_A', 'ANY', ctrl=True, alt=True)
  1753. kmi_props_setattr(kmi.properties, 'deselect', False)
  1754. kmi = km.keymap_items.new('mask.select_lasso', 'EVT_TWEAK_A', 'ANY', shift=True, ctrl=True, alt=True)
  1755. kmi_props_setattr(kmi.properties, 'deselect', True)
  1756. kmi = km.keymap_items.new('mask.select_more', 'RIGHT_BRACKET', 'PRESS', ctrl=True)
  1757. kmi = km.keymap_items.new('mask.select_less', 'LEFT_BRACKET', 'PRESS', ctrl=True)
  1758. kmi = km.keymap_items.new('mask.hide_view_clear', 'D', 'PRESS', alt=True)
  1759. kmi = km.keymap_items.new('mask.hide_view_set', 'D', 'PRESS')
  1760. kmi_props_setattr(kmi.properties, 'unselected', False)
  1761. kmi = km.keymap_items.new('mask.hide_view_set', 'D', 'PRESS', shift=True)
  1762. kmi_props_setattr(kmi.properties, 'unselected', True)
  1763. kmi = km.keymap_items.new('clip.select', 'SELECTMOUSE', 'PRESS', ctrl=True)
  1764. kmi_props_setattr(kmi.properties, 'extend', False)
  1765. kmi = km.keymap_items.new('mask.cyclic_toggle', 'J', 'PRESS', alt=True)
  1766. kmi = km.keymap_items.new('mask.slide_point', 'ACTIONMOUSE', 'PRESS')
  1767. kmi = km.keymap_items.new('mask.handle_type_set', 'K', 'PRESS')
  1768. kmi = km.keymap_items.new('mask.normals_make_consistent', 'B', 'PRESS', ctrl=True)
  1769. kmi = km.keymap_items.new('mask.parent_set', 'L', 'PRESS', ctrl=True)
  1770. kmi = km.keymap_items.new('mask.parent_clear', 'L', 'PRESS', alt=True)
  1771. kmi = km.keymap_items.new('mask.shape_key_insert', 'C', 'PRESS')
  1772. kmi = km.keymap_items.new('mask.shape_key_clear', 'C', 'PRESS', alt=True)
  1773. kmi = km.keymap_items.new('mask.duplicate_move', 'E', 'PRESS', shift=True)
  1774. kmi = km.keymap_items.new('uv.cursor_set', 'ACTIONMOUSE', 'PRESS')
  1775. kmi = km.keymap_items.new('transform.translate', 'I', 'PRESS')
  1776. kmi = km.keymap_items.new('transform.translate', 'EVT_TWEAK_S', 'ANY')
  1777. kmi = km.keymap_items.new('transform.resize', 'O', 'PRESS')
  1778. kmi = km.keymap_items.new('transform.rotate', 'P', 'PRESS')
  1779. kmi = km.keymap_items.new('transform.transform', 'O', 'PRESS', alt=True)
  1780. kmi_props_setattr(kmi.properties, 'mode', 'MASK_SHRINKFATTEN')
  1781.  
  1782. # Map UV Editor
  1783. km = kc.keymaps.new('UV Editor', space_type='EMPTY', region_type='WINDOW', modal=False)
  1784.  
  1785. kmi = km.keymap_items.new('wm.context_toggle', 'QUOTE', 'PRESS')
  1786. kmi_props_setattr(kmi.properties, 'data_path', 'tool_settings.use_uv_sculpt')
  1787. kmi = km.keymap_items.new('uv.mark_seam', 'PERIOD', 'PRESS', ctrl=True)
  1788. kmi = km.keymap_items.new('uv.select', 'SELECTMOUSE', 'PRESS')
  1789. kmi_props_setattr(kmi.properties, 'extend', False)
  1790. kmi = km.keymap_items.new('uv.select', 'SELECTMOUSE', 'PRESS', shift=True)
  1791. kmi_props_setattr(kmi.properties, 'extend', True)
  1792. kmi = km.keymap_items.new('uv.select_loop', 'SELECTMOUSE', 'PRESS', alt=True)
  1793. kmi_props_setattr(kmi.properties, 'extend', False)
  1794. kmi = km.keymap_items.new('uv.select_loop', 'SELECTMOUSE', 'PRESS', shift=True, alt=True)
  1795. kmi_props_setattr(kmi.properties, 'extend', True)
  1796. kmi = km.keymap_items.new('uv.select_split', 'F', 'PRESS')
  1797. kmi = km.keymap_items.new('uv.select_border', 'X', 'PRESS')
  1798. kmi_props_setattr(kmi.properties, 'pinned', False)
  1799. kmi = km.keymap_items.new('uv.select_border', 'X', 'PRESS', shift=True)
  1800. kmi_props_setattr(kmi.properties, 'pinned', True)
  1801. kmi = km.keymap_items.new('uv.circle_select', 'J', 'PRESS')
  1802. kmi = km.keymap_items.new('uv.select_lasso', 'EVT_TWEAK_A', 'ANY', ctrl=True)
  1803. kmi_props_setattr(kmi.properties, 'deselect', False)
  1804. kmi = km.keymap_items.new('uv.select_lasso', 'EVT_TWEAK_A', 'ANY', shift=True, ctrl=True)
  1805. kmi_props_setattr(kmi.properties, 'deselect', True)
  1806. kmi = km.keymap_items.new('uv.select_linked', 'N', 'PRESS', ctrl=True)
  1807. kmi_props_setattr(kmi.properties, 'extend', False)
  1808. kmi = km.keymap_items.new('uv.select_linked_pick', 'N', 'PRESS')
  1809. kmi_props_setattr(kmi.properties, 'extend', False)
  1810. kmi = km.keymap_items.new('uv.select_linked', 'N', 'PRESS', shift=True, ctrl=True)
  1811. kmi_props_setattr(kmi.properties, 'extend', True)
  1812. kmi = km.keymap_items.new('uv.select_linked_pick', 'N', 'PRESS', shift=True)
  1813. kmi_props_setattr(kmi.properties, 'extend', True)
  1814. kmi = km.keymap_items.new('uv.select_more', 'RIGHT_BRACKET', 'PRESS', ctrl=True)
  1815. kmi = km.keymap_items.new('uv.select_less', 'LEFT_BRACKET', 'PRESS', ctrl=True)
  1816. kmi = km.keymap_items.new('uv.select_all', 'A', 'PRESS')
  1817. kmi_props_setattr(kmi.properties, 'action', 'TOGGLE')
  1818. kmi = km.keymap_items.new('uv.select_all', 'C', 'PRESS', ctrl=True)
  1819. kmi_props_setattr(kmi.properties, 'action', 'INVERT')
  1820. kmi = km.keymap_items.new('uv.select_pinned', 'L', 'PRESS', shift=True)
  1821. kmi = km.keymap_items.new('wm.call_menu', 'COMMA', 'PRESS')
  1822. kmi_props_setattr(kmi.properties, 'name', 'IMAGE_MT_uvs_weldalign')
  1823. kmi = km.keymap_items.new('uv.stitch', 'K', 'PRESS')
  1824. kmi = km.keymap_items.new('uv.pin', 'L', 'PRESS')
  1825. kmi_props_setattr(kmi.properties, 'clear', False)
  1826. kmi = km.keymap_items.new('uv.pin', 'L', 'PRESS', alt=True)
  1827. kmi_props_setattr(kmi.properties, 'clear', True)
  1828. kmi = km.keymap_items.new('uv.unwrap', 'PERIOD', 'PRESS')
  1829. kmi = km.keymap_items.new('uv.minimize_stretch', 'K', 'PRESS', ctrl=True)
  1830. kmi = km.keymap_items.new('uv.pack_islands', 'L', 'PRESS', ctrl=True)
  1831. kmi = km.keymap_items.new('uv.average_islands_scale', 'A', 'PRESS', ctrl=True)
  1832. kmi = km.keymap_items.new('uv.hide', 'D', 'PRESS')
  1833. kmi_props_setattr(kmi.properties, 'unselected', False)
  1834. kmi = km.keymap_items.new('uv.hide', 'D', 'PRESS', shift=True)
  1835. kmi_props_setattr(kmi.properties, 'unselected', True)
  1836. kmi = km.keymap_items.new('uv.reveal', 'D', 'PRESS', alt=True)
  1837. kmi = km.keymap_items.new('uv.cursor_set', 'ACTIONMOUSE', 'PRESS')
  1838. kmi = km.keymap_items.new('uv.tile_set', 'ACTIONMOUSE', 'PRESS', shift=True)
  1839. kmi = km.keymap_items.new('wm.call_menu', 'O', 'PRESS', shift=True)
  1840. kmi_props_setattr(kmi.properties, 'name', 'IMAGE_MT_uvs_snap')
  1841. kmi = km.keymap_items.new('wm.call_menu', 'TAB', 'PRESS', ctrl=True)
  1842. kmi_props_setattr(kmi.properties, 'name', 'IMAGE_MT_uvs_select_mode')
  1843. kmi = km.keymap_items.new('wm.context_cycle_enum', 'R', 'PRESS', shift=True)
  1844. kmi_props_setattr(kmi.properties, 'data_path', 'tool_settings.proportional_edit_falloff')
  1845. kmi = km.keymap_items.new('wm.context_toggle_enum', 'R', 'PRESS')
  1846. kmi_props_setattr(kmi.properties, 'data_path', 'tool_settings.proportional_edit')
  1847. kmi_props_setattr(kmi.properties, 'value_1', 'DISABLED')
  1848. kmi_props_setattr(kmi.properties, 'value_2', 'ENABLED')
  1849. kmi = km.keymap_items.new('transform.translate', 'I', 'PRESS')
  1850. kmi = km.keymap_items.new('transform.translate', 'EVT_TWEAK_S', 'ANY')
  1851. kmi = km.keymap_items.new('transform.rotate', 'P', 'PRESS')
  1852. kmi = km.keymap_items.new('transform.resize', 'O', 'PRESS')
  1853. kmi = km.keymap_items.new('transform.shear', 'O', 'PRESS', shift=True, ctrl=True, alt=True)
  1854. kmi = km.keymap_items.new('transform.mirror', 'M', 'PRESS', ctrl=True)
  1855. kmi = km.keymap_items.new('wm.context_toggle', 'TAB', 'PRESS', shift=True)
  1856. kmi_props_setattr(kmi.properties, 'data_path', 'tool_settings.use_snap')
  1857. kmi = km.keymap_items.new('wm.context_menu_enum', 'TAB', 'PRESS', shift=True, ctrl=True)
  1858. kmi_props_setattr(kmi.properties, 'data_path', 'tool_settings.snap_uv_element')
  1859.  
  1860. # Map UV Sculpt
  1861. km = kc.keymaps.new('UV Sculpt', space_type='EMPTY', region_type='WINDOW', modal=False)
  1862.  
  1863. kmi = km.keymap_items.new('wm.context_toggle', 'QUOTE', 'PRESS')
  1864. kmi_props_setattr(kmi.properties, 'data_path', 'tool_settings.use_uv_sculpt')
  1865. kmi = km.keymap_items.new('sculpt.uv_sculpt_stroke', 'LEFTMOUSE', 'PRESS')
  1866. kmi_props_setattr(kmi.properties, 'mode', 'NORMAL')
  1867. kmi = km.keymap_items.new('sculpt.uv_sculpt_stroke', 'LEFTMOUSE', 'PRESS', ctrl=True)
  1868. kmi_props_setattr(kmi.properties, 'mode', 'INVERT')
  1869. kmi = km.keymap_items.new('sculpt.uv_sculpt_stroke', 'LEFTMOUSE', 'PRESS', shift=True)
  1870. kmi_props_setattr(kmi.properties, 'mode', 'RELAX')
  1871. kmi = km.keymap_items.new('brush.scale_size', 'SLASH', 'PRESS')
  1872. kmi_props_setattr(kmi.properties, 'scalar', 0.8999999761581421)
  1873. kmi = km.keymap_items.new('brush.scale_size', 'EQUAL', 'PRESS')
  1874. kmi_props_setattr(kmi.properties, 'scalar', 1.1111111640930176)
  1875. kmi = km.keymap_items.new('wm.radial_control', 'U', 'PRESS')
  1876. kmi_props_setattr(kmi.properties, 'data_path_primary', 'tool_settings.uv_sculpt.brush.size')
  1877. kmi_props_setattr(kmi.properties, 'data_path_secondary', 'tool_settings.unified_paint_settings.size')
  1878. kmi_props_setattr(kmi.properties, 'use_secondary', 'tool_settings.unified_paint_settings.use_unified_size')
  1879. kmi_props_setattr(kmi.properties, 'rotation_path', 'tool_settings.uv_sculpt.brush.texture_slot.angle')
  1880. kmi_props_setattr(kmi.properties, 'color_path', 'tool_settings.uv_sculpt.brush.cursor_color_add')
  1881. kmi_props_setattr(kmi.properties, 'fill_color_path', '')
  1882. kmi_props_setattr(kmi.properties, 'zoom_path', '')
  1883. kmi_props_setattr(kmi.properties, 'image_id', 'tool_settings.uv_sculpt.brush')
  1884. kmi_props_setattr(kmi.properties, 'secondary_tex', False)
  1885. kmi = km.keymap_items.new('wm.radial_control', 'U', 'PRESS', shift=True)
  1886. kmi_props_setattr(kmi.properties, 'data_path_primary', 'tool_settings.uv_sculpt.brush.strength')
  1887. kmi_props_setattr(kmi.properties, 'data_path_secondary', 'tool_settings.unified_paint_settings.strength')
  1888. kmi_props_setattr(kmi.properties, 'use_secondary', 'tool_settings.unified_paint_settings.use_unified_strength')
  1889. kmi_props_setattr(kmi.properties, 'rotation_path', 'tool_settings.uv_sculpt.brush.texture_slot.angle')
  1890. kmi_props_setattr(kmi.properties, 'color_path', 'tool_settings.uv_sculpt.brush.cursor_color_add')
  1891. kmi_props_setattr(kmi.properties, 'fill_color_path', '')
  1892. kmi_props_setattr(kmi.properties, 'zoom_path', '')
  1893. kmi_props_setattr(kmi.properties, 'image_id', 'tool_settings.uv_sculpt.brush')
  1894. kmi_props_setattr(kmi.properties, 'secondary_tex', False)
  1895. kmi = km.keymap_items.new('brush.uv_sculpt_tool_set', 'O', 'PRESS')
  1896. kmi_props_setattr(kmi.properties, 'tool', 'RELAX')
  1897. kmi = km.keymap_items.new('brush.uv_sculpt_tool_set', 'L', 'PRESS')
  1898. kmi_props_setattr(kmi.properties, 'tool', 'PINCH')
  1899. kmi = km.keymap_items.new('brush.uv_sculpt_tool_set', 'I', 'PRESS')
  1900. kmi_props_setattr(kmi.properties, 'tool', 'GRAB')
  1901.  
  1902. # Map Image
  1903. km = kc.keymaps.new('Image', space_type='IMAGE_EDITOR', region_type='WINDOW', modal=False)
  1904.  
  1905. kmi = km.keymap_items.new('image.view_all', 'BACK_SLASH', 'PRESS')
  1906. kmi = km.keymap_items.new('image.view_all', 'U', 'PRESS')
  1907. kmi_props_setattr(kmi.properties, 'fit_view', True)
  1908. kmi = km.keymap_items.new('image.view_selected', 'V', 'PRESS', ctrl=True)
  1909. kmi = km.keymap_items.new('image.view_pan', 'MIDDLEMOUSE', 'PRESS')
  1910. kmi = km.keymap_items.new('image.view_pan', 'MIDDLEMOUSE', 'PRESS', shift=True)
  1911. kmi = km.keymap_items.new('image.view_pan', 'TRACKPADPAN', 'ANY')
  1912. kmi = km.keymap_items.new('image.view_all', 'NDOF_BUTTON_FIT', 'PRESS')
  1913. kmi = km.keymap_items.new('image.view_ndof', 'NDOF_MOTION', 'ANY')
  1914. kmi = km.keymap_items.new('image.view_zoom_in', 'WHEELINMOUSE', 'PRESS')
  1915. kmi = km.keymap_items.new('image.view_zoom_out', 'WHEELOUTMOUSE', 'PRESS')
  1916. kmi = km.keymap_items.new('image.view_zoom_in', 'RIGHT_BRACKET', 'PRESS')
  1917. kmi = km.keymap_items.new('image.view_zoom_out', 'LEFT_BRACKET', 'PRESS')
  1918. kmi = km.keymap_items.new('image.view_zoom', 'MIDDLEMOUSE', 'PRESS', ctrl=True)
  1919. kmi = km.keymap_items.new('image.view_zoom', 'TRACKPADZOOM', 'ANY')
  1920. kmi = km.keymap_items.new('image.view_zoom', 'TRACKPADPAN', 'ANY', ctrl=True)
  1921. kmi = km.keymap_items.new('image.view_zoom_ratio', 'NUMPAD_8', 'PRESS', ctrl=True)
  1922. kmi_props_setattr(kmi.properties, 'ratio', 8.0)
  1923. kmi = km.keymap_items.new('image.view_zoom_ratio', 'NUMPAD_4', 'PRESS', ctrl=True)
  1924. kmi_props_setattr(kmi.properties, 'ratio', 4.0)
  1925. kmi = km.keymap_items.new('image.view_zoom_ratio', 'NUMPAD_2', 'PRESS', ctrl=True)
  1926. kmi_props_setattr(kmi.properties, 'ratio', 2.0)
  1927. kmi = km.keymap_items.new('image.view_zoom_ratio', 'NUMPAD_8', 'PRESS', shift=True)
  1928. kmi_props_setattr(kmi.properties, 'ratio', 8.0)
  1929. kmi = km.keymap_items.new('image.view_zoom_ratio', 'NUMPAD_4', 'PRESS', shift=True)
  1930. kmi_props_setattr(kmi.properties, 'ratio', 4.0)
  1931. kmi = km.keymap_items.new('image.view_zoom_ratio', 'NUMPAD_2', 'PRESS', shift=True)
  1932. kmi_props_setattr(kmi.properties, 'ratio', 2.0)
  1933. kmi = km.keymap_items.new('image.view_zoom_ratio', 'NUMPAD_1', 'PRESS')
  1934. kmi_props_setattr(kmi.properties, 'ratio', 1.0)
  1935. kmi = km.keymap_items.new('image.view_zoom_ratio', 'NUMPAD_2', 'PRESS')
  1936. kmi_props_setattr(kmi.properties, 'ratio', 0.5)
  1937. kmi = km.keymap_items.new('image.view_zoom_ratio', 'NUMPAD_4', 'PRESS')
  1938. kmi_props_setattr(kmi.properties, 'ratio', 0.25)
  1939. kmi = km.keymap_items.new('image.view_zoom_ratio', 'NUMPAD_8', 'PRESS')
  1940. kmi_props_setattr(kmi.properties, 'ratio', 0.125)
  1941. kmi = km.keymap_items.new('image.sample', 'ACTIONMOUSE', 'PRESS')
  1942. kmi = km.keymap_items.new('image.curves_point_set', 'ACTIONMOUSE', 'PRESS', ctrl=True)
  1943. kmi_props_setattr(kmi.properties, 'point', 'BLACK_POINT')
  1944. kmi = km.keymap_items.new('image.curves_point_set', 'ACTIONMOUSE', 'PRESS', shift=True)
  1945. kmi_props_setattr(kmi.properties, 'point', 'WHITE_POINT')
  1946. kmi = km.keymap_items.new('object.mode_set', 'TAB', 'PRESS')
  1947. kmi_props_setattr(kmi.properties, 'mode', 'EDIT')
  1948. kmi_props_setattr(kmi.properties, 'toggle', True)
  1949. kmi = km.keymap_items.new('wm.context_set_int', 'ONE', 'PRESS')
  1950. kmi_props_setattr(kmi.properties, 'data_path', 'space_data.image.render_slot')
  1951. kmi_props_setattr(kmi.properties, 'value', 0)
  1952. kmi = km.keymap_items.new('wm.context_set_int', 'TWO', 'PRESS')
  1953. kmi_props_setattr(kmi.properties, 'data_path', 'space_data.image.render_slot')
  1954. kmi_props_setattr(kmi.properties, 'value', 1)
  1955. kmi = km.keymap_items.new('wm.context_set_int', 'THREE', 'PRESS')
  1956. kmi_props_setattr(kmi.properties, 'data_path', 'space_data.image.render_slot')
  1957. kmi_props_setattr(kmi.properties, 'value', 2)
  1958. kmi = km.keymap_items.new('wm.context_set_int', 'FOUR', 'PRESS')
  1959. kmi_props_setattr(kmi.properties, 'data_path', 'space_data.image.render_slot')
  1960. kmi_props_setattr(kmi.properties, 'value', 3)
  1961. kmi = km.keymap_items.new('wm.context_set_int', 'FIVE', 'PRESS')
  1962. kmi_props_setattr(kmi.properties, 'data_path', 'space_data.image.render_slot')
  1963. kmi_props_setattr(kmi.properties, 'value', 4)
  1964. kmi = km.keymap_items.new('wm.context_set_int', 'SIX', 'PRESS')
  1965. kmi_props_setattr(kmi.properties, 'data_path', 'space_data.image.render_slot')
  1966. kmi_props_setattr(kmi.properties, 'value', 5)
  1967. kmi = km.keymap_items.new('wm.context_set_int', 'SEVEN', 'PRESS')
  1968. kmi_props_setattr(kmi.properties, 'data_path', 'space_data.image.render_slot')
  1969. kmi_props_setattr(kmi.properties, 'value', 6)
  1970. kmi = km.keymap_items.new('wm.context_set_int', 'EIGHT', 'PRESS')
  1971. kmi_props_setattr(kmi.properties, 'data_path', 'space_data.image.render_slot')
  1972. kmi_props_setattr(kmi.properties, 'value', 7)
  1973. kmi = km.keymap_items.new('wm.context_set_int', 'NINE', 'PRESS')
  1974. kmi_props_setattr(kmi.properties, 'data_path', 'space_data.image.render_slot')
  1975. kmi_props_setattr(kmi.properties, 'value', 8)
  1976. kmi = km.keymap_items.new('wm.context_set_enum', 'W', 'PRESS')
  1977. kmi_props_setattr(kmi.properties, 'data_path', 'space_data.pivot_point')
  1978. kmi_props_setattr(kmi.properties, 'value', 'CENTER')
  1979. kmi = km.keymap_items.new('wm.context_set_enum', 'W', 'PRESS', ctrl=True)
  1980. kmi_props_setattr(kmi.properties, 'data_path', 'space_data.pivot_point')
  1981. kmi_props_setattr(kmi.properties, 'value', 'MEDIAN')
  1982. kmi = km.keymap_items.new('wm.context_set_enum', 'V', 'PRESS')
  1983. kmi_props_setattr(kmi.properties, 'data_path', 'space_data.pivot_point')
  1984. kmi_props_setattr(kmi.properties, 'value', 'CURSOR')
  1985.  
  1986. # Map View3D Gesture Circle
  1987. km = kc.keymaps.new('View3D Gesture Circle', space_type='EMPTY', region_type='WINDOW', modal=True)
  1988.  
  1989. kmi = km.keymap_items.new_modal('CANCEL', 'ESC', 'PRESS', any=True)
  1990. kmi = km.keymap_items.new_modal('CANCEL', 'RIGHTMOUSE', 'ANY', any=True)
  1991. kmi = km.keymap_items.new_modal('CONFIRM', 'RET', 'PRESS', any=True)
  1992. kmi = km.keymap_items.new_modal('CONFIRM', 'NUMPAD_ENTER', 'PRESS')
  1993. kmi = km.keymap_items.new_modal('SELECT', 'LEFTMOUSE', 'PRESS')
  1994. kmi = km.keymap_items.new_modal('DESELECT', 'LEFTMOUSE', 'PRESS', shift=True)
  1995. kmi = km.keymap_items.new_modal('NOP', 'LEFTMOUSE', 'RELEASE', shift=True)
  1996. kmi = km.keymap_items.new_modal('DESELECT', 'MIDDLEMOUSE', 'PRESS')
  1997. kmi = km.keymap_items.new_modal('NOP', 'MIDDLEMOUSE', 'RELEASE')
  1998. kmi = km.keymap_items.new_modal('NOP', 'LEFTMOUSE', 'RELEASE')
  1999. kmi = km.keymap_items.new_modal('SUBTRACT', 'WHEELUPMOUSE', 'PRESS')
  2000. kmi = km.keymap_items.new_modal('SUBTRACT', 'LEFT_BRACKET', 'PRESS')
  2001. kmi = km.keymap_items.new_modal('ADD', 'WHEELDOWNMOUSE', 'PRESS')
  2002. kmi = km.keymap_items.new_modal('ADD', 'RIGHT_BRACKET', 'PRESS')
  2003. kmi = km.keymap_items.new_modal('SIZE', 'TRACKPADPAN', 'ANY')
  2004.  
  2005. # Map Animation
  2006. km = kc.keymaps.new('Animation', space_type='EMPTY', region_type='WINDOW', modal=False)
  2007.  
  2008. kmi = km.keymap_items.new('anim.change_frame', 'ACTIONMOUSE', 'PRESS')
  2009. kmi = km.keymap_items.new('wm.context_toggle', 'Y', 'PRESS', ctrl=True)
  2010. kmi_props_setattr(kmi.properties, 'data_path', 'space_data.show_seconds')
  2011. kmi = km.keymap_items.new('anim.previewrange_set', 'L', 'PRESS')
  2012. kmi = km.keymap_items.new('anim.previewrange_clear', 'L', 'PRESS', alt=True)
  2013.  
  2014. # Map Animation Channels
  2015. km = kc.keymaps.new('Animation Channels', space_type='EMPTY', region_type='WINDOW', modal=False)
  2016.  
  2017. kmi = km.keymap_items.new('anim.channels_click', 'LEFTMOUSE', 'PRESS')
  2018. kmi = km.keymap_items.new('anim.channels_click', 'LEFTMOUSE', 'PRESS', shift=True)
  2019. kmi_props_setattr(kmi.properties, 'extend', True)
  2020. kmi = km.keymap_items.new('anim.channels_click', 'LEFTMOUSE', 'PRESS', shift=True, ctrl=True)
  2021. kmi_props_setattr(kmi.properties, 'children_only', True)
  2022. kmi = km.keymap_items.new('anim.channels_rename', 'LEFTMOUSE', 'PRESS', ctrl=True)
  2023. kmi = km.keymap_items.new('anim.channels_select_all_toggle', 'A', 'PRESS')
  2024. kmi = km.keymap_items.new('anim.channels_select_all_toggle', 'C', 'PRESS', ctrl=True)
  2025. kmi_props_setattr(kmi.properties, 'invert', True)
  2026. kmi = km.keymap_items.new('anim.channels_select_border', 'X', 'PRESS')
  2027. kmi = km.keymap_items.new('anim.channels_select_border', 'EVT_TWEAK_L', 'ANY')
  2028. kmi = km.keymap_items.new('anim.channels_delete', 'BACK_SPACE', 'PRESS')
  2029. kmi = km.keymap_items.new('anim.channels_delete', 'BACK_SPACE', 'PRESS')
  2030. kmi.active = False
  2031. kmi = km.keymap_items.new('anim.channels_setting_toggle', 'COMMA', 'PRESS', shift=True)
  2032. kmi = km.keymap_items.new('anim.channels_setting_enable', 'COMMA', 'PRESS', shift=True, ctrl=True)
  2033. kmi = km.keymap_items.new('anim.channels_setting_disable', 'COMMA', 'PRESS', alt=True)
  2034. kmi = km.keymap_items.new('anim.channels_editable_toggle', 'TAB', 'PRESS')
  2035. kmi = km.keymap_items.new('anim.channels_expand', 'RIGHT_BRACKET', 'PRESS')
  2036. kmi = km.keymap_items.new('anim.channels_collapse', 'LEFT_BRACKET', 'PRESS')
  2037. kmi = km.keymap_items.new('anim.channels_expand', 'RIGHT_BRACKET', 'PRESS', ctrl=True)
  2038. kmi_props_setattr(kmi.properties, 'all', False)
  2039. kmi = km.keymap_items.new('anim.channels_collapse', 'LEFT_BRACKET', 'PRESS', ctrl=True)
  2040. kmi_props_setattr(kmi.properties, 'all', False)
  2041. kmi = km.keymap_items.new('anim.channels_move', 'PAGE_UP', 'PRESS')
  2042. kmi_props_setattr(kmi.properties, 'direction', 'UP')
  2043. kmi = km.keymap_items.new('anim.channels_move', 'PAGE_DOWN', 'PRESS')
  2044. kmi_props_setattr(kmi.properties, 'direction', 'DOWN')
  2045. kmi = km.keymap_items.new('anim.channels_move', 'PAGE_UP', 'PRESS', shift=True)
  2046. kmi_props_setattr(kmi.properties, 'direction', 'TOP')
  2047. kmi = km.keymap_items.new('anim.channels_move', 'PAGE_DOWN', 'PRESS', shift=True)
  2048. kmi_props_setattr(kmi.properties, 'direction', 'BOTTOM')
  2049. kmi = km.keymap_items.new('anim.channels_group', 'I', 'PRESS', ctrl=True)
  2050. kmi = km.keymap_items.new('anim.channels_ungroup', 'I', 'PRESS', alt=True)
  2051. kmi = km.keymap_items.new('anim.channels_visibility_set', 'K', 'PRESS')
  2052. kmi = km.keymap_items.new('anim.channels_visibility_toggle', 'K', 'PRESS', shift=True)
  2053.  
  2054. # Map Knife Tool Modal Map
  2055. km = kc.keymaps.new('Knife Tool Modal Map', space_type='EMPTY', region_type='WINDOW', modal=True)
  2056.  
  2057. kmi = km.keymap_items.new_modal('CANCEL', 'ESC', 'PRESS', any=True)
  2058. kmi = km.keymap_items.new_modal('PANNING', 'MIDDLEMOUSE', 'ANY', any=True)
  2059. kmi = km.keymap_items.new_modal('ADD_CUT', 'LEFTMOUSE', 'PRESS', any=True)
  2060. kmi = km.keymap_items.new_modal('CANCEL', 'RIGHTMOUSE', 'PRESS', any=True)
  2061. kmi = km.keymap_items.new_modal('CONFIRM', 'RET', 'PRESS', any=True)
  2062. kmi = km.keymap_items.new_modal('CONFIRM', 'NUMPAD_ENTER', 'PRESS', any=True)
  2063. kmi.active = False
  2064. kmi = km.keymap_items.new_modal('CONFIRM', 'SPACE', 'PRESS', any=True)
  2065. kmi = km.keymap_items.new_modal('NEW_CUT', 'PERIOD', 'PRESS')
  2066. kmi = km.keymap_items.new_modal('SNAP_MIDPOINTS_ON', 'LEFT_CTRL', 'PRESS', any=True)
  2067. kmi = km.keymap_items.new_modal('SNAP_MIDPOINTS_OFF', 'LEFT_CTRL', 'RELEASE', any=True)
  2068. kmi = km.keymap_items.new_modal('SNAP_MIDPOINTS_ON', 'RIGHT_CTRL', 'PRESS', any=True)
  2069. kmi = km.keymap_items.new_modal('SNAP_MIDPOINTS_OFF', 'RIGHT_CTRL', 'RELEASE', any=True)
  2070. kmi = km.keymap_items.new_modal('IGNORE_SNAP_ON', 'LEFT_SHIFT', 'PRESS', any=True)
  2071. kmi = km.keymap_items.new_modal('IGNORE_SNAP_OFF', 'LEFT_SHIFT', 'RELEASE', any=True)
  2072. kmi = km.keymap_items.new_modal('IGNORE_SNAP_ON', 'RIGHT_SHIFT', 'PRESS', any=True)
  2073. kmi = km.keymap_items.new_modal('IGNORE_SNAP_OFF', 'RIGHT_SHIFT', 'RELEASE', any=True)
  2074. kmi = km.keymap_items.new_modal('ANGLE_SNAP_TOGGLE', 'J', 'PRESS')
  2075. kmi = km.keymap_items.new_modal('CUT_THROUGH_TOGGLE', 'SEMI_COLON', 'PRESS')
  2076.  
  2077. # Map Transform Modal Map
  2078. km = kc.keymaps.new('Transform Modal Map', space_type='EMPTY', region_type='WINDOW', modal=True)
  2079.  
  2080. kmi = km.keymap_items.new_modal('CANCEL', 'ESC', 'PRESS', any=True)
  2081. kmi = km.keymap_items.new_modal('CONFIRM', 'LEFTMOUSE', 'PRESS', any=True)
  2082. kmi = km.keymap_items.new_modal('CONFIRM', 'RET', 'PRESS', any=True)
  2083. kmi = km.keymap_items.new_modal('CONFIRM', 'NUMPAD_ENTER', 'PRESS', any=True)
  2084. kmi = km.keymap_items.new_modal('TRANSLATE', 'I', 'PRESS')
  2085. kmi = km.keymap_items.new_modal('ROTATE', 'P', 'PRESS')
  2086. kmi = km.keymap_items.new_modal('RESIZE', 'O', 'PRESS')
  2087. kmi = km.keymap_items.new_modal('SNAP_TOGGLE', 'TAB', 'PRESS', shift=True)
  2088. kmi = km.keymap_items.new_modal('SNAP_INV_ON', 'LEFT_CTRL', 'PRESS', any=True)
  2089. kmi = km.keymap_items.new_modal('SNAP_INV_OFF', 'LEFT_CTRL', 'RELEASE', any=True)
  2090. kmi = km.keymap_items.new_modal('SNAP_INV_ON', 'RIGHT_CTRL', 'PRESS', any=True)
  2091. kmi = km.keymap_items.new_modal('SNAP_INV_OFF', 'RIGHT_CTRL', 'RELEASE', any=True)
  2092. kmi = km.keymap_items.new_modal('ADD_SNAP', 'A', 'PRESS')
  2093. kmi = km.keymap_items.new_modal('REMOVE_SNAP', 'A', 'PRESS', alt=True)
  2094. kmi = km.keymap_items.new_modal('PROPORTIONAL_SIZE_UP', 'PAGE_UP', 'PRESS')
  2095. kmi = km.keymap_items.new_modal('PROPORTIONAL_SIZE_DOWN', 'PAGE_DOWN', 'PRESS')
  2096. kmi = km.keymap_items.new_modal('PROPORTIONAL_SIZE_UP', 'WHEELDOWNMOUSE', 'PRESS')
  2097. kmi = km.keymap_items.new_modal('PROPORTIONAL_SIZE_DOWN', 'WHEELUPMOUSE', 'PRESS')
  2098. kmi = km.keymap_items.new_modal('PROPORTIONAL_SIZE', 'TRACKPADPAN', 'ANY')
  2099. kmi = km.keymap_items.new_modal('EDGESLIDE_EDGE_NEXT', 'WHEELDOWNMOUSE', 'PRESS', alt=True)
  2100. kmi = km.keymap_items.new_modal('EDGESLIDE_PREV_NEXT', 'WHEELUPMOUSE', 'PRESS', alt=True)
  2101. kmi = km.keymap_items.new_modal('AUTOIK_CHAIN_LEN_UP', 'PAGE_UP', 'PRESS', shift=True)
  2102. kmi = km.keymap_items.new_modal('AUTOIK_CHAIN_LEN_DOWN', 'PAGE_DOWN', 'PRESS', shift=True)
  2103. kmi = km.keymap_items.new_modal('AUTOIK_CHAIN_LEN_UP', 'WHEELDOWNMOUSE', 'PRESS', shift=True)
  2104. kmi = km.keymap_items.new_modal('AUTOIK_CHAIN_LEN_DOWN', 'WHEELUPMOUSE', 'PRESS', shift=True)
  2105.  
  2106. # Map Markers
  2107. km = kc.keymaps.new('Markers', space_type='EMPTY', region_type='WINDOW', modal=False)
  2108.  
  2109. kmi = km.keymap_items.new('marker.add', 'M', 'PRESS')
  2110. kmi = km.keymap_items.new('marker.move', 'EVT_TWEAK_S', 'ANY')
  2111. kmi = km.keymap_items.new('marker.duplicate', 'E', 'PRESS', shift=True)
  2112. kmi = km.keymap_items.new('marker.select', 'SELECTMOUSE', 'PRESS')
  2113. kmi = km.keymap_items.new('marker.select', 'SELECTMOUSE', 'PRESS', shift=True)
  2114. kmi_props_setattr(kmi.properties, 'extend', True)
  2115. kmi = km.keymap_items.new('marker.select', 'SELECTMOUSE', 'PRESS', ctrl=True)
  2116. kmi_props_setattr(kmi.properties, 'extend', False)
  2117. kmi_props_setattr(kmi.properties, 'camera', True)
  2118. kmi = km.keymap_items.new('marker.select', 'SELECTMOUSE', 'PRESS', shift=True, ctrl=True)
  2119. kmi_props_setattr(kmi.properties, 'extend', True)
  2120. kmi_props_setattr(kmi.properties, 'camera', True)
  2121. kmi = km.keymap_items.new('marker.select_border', 'X', 'PRESS')
  2122. kmi = km.keymap_items.new('marker.select_all', 'A', 'PRESS')
  2123. kmi = km.keymap_items.new('marker.delete', 'BACK_SPACE', 'PRESS')
  2124. kmi = km.keymap_items.new('marker.delete', 'BACK_SPACE', 'PRESS')
  2125. kmi.active = False
  2126. kmi = km.keymap_items.new('marker.rename', 'M', 'PRESS', ctrl=True)
  2127. kmi = km.keymap_items.new('marker.move', 'I', 'PRESS')
  2128. kmi = km.keymap_items.new('marker.camera_bind', 'X', 'PRESS', ctrl=True)
  2129.  
  2130. # Map Timeline
  2131. km = kc.keymaps.new('Timeline', space_type='TIMELINE', region_type='WINDOW', modal=False)
  2132.  
  2133. kmi = km.keymap_items.new('time.start_frame_set', 'O', 'PRESS')
  2134. kmi = km.keymap_items.new('time.end_frame_set', 'PERIOD', 'PRESS')
  2135. kmi = km.keymap_items.new('time.view_all', 'BACK_SLASH', 'PRESS')
  2136. kmi = km.keymap_items.new('time.view_all', 'NDOF_BUTTON_FIT', 'PRESS')
  2137.  
  2138. # Map View3D Fly Modal
  2139. km = kc.keymaps.new('View3D Fly Modal', space_type='EMPTY', region_type='WINDOW', modal=True)
  2140.  
  2141. kmi = km.keymap_items.new_modal('CANCEL', 'ESC', 'PRESS', any=True)
  2142. kmi = km.keymap_items.new_modal('CANCEL', 'RIGHTMOUSE', 'ANY', any=True)
  2143. kmi = km.keymap_items.new_modal('CONFIRM', 'LEFTMOUSE', 'ANY', any=True)
  2144. kmi = km.keymap_items.new_modal('CONFIRM', 'RET', 'PRESS', any=True)
  2145. kmi = km.keymap_items.new_modal('CONFIRM', 'SPACE', 'PRESS', any=True)
  2146. kmi = km.keymap_items.new_modal('CONFIRM', 'RET', 'PRESS', any=True)
  2147. kmi = km.keymap_items.new_modal('ACCELERATE', 'RIGHT_BRACKET', 'PRESS', any=True)
  2148. kmi = km.keymap_items.new_modal('DECELERATE', 'LEFT_BRACKET', 'PRESS', any=True)
  2149. kmi = km.keymap_items.new_modal('ACCELERATE', 'WHEELUPMOUSE', 'PRESS', any=True)
  2150. kmi = km.keymap_items.new_modal('DECELERATE', 'WHEELDOWNMOUSE', 'PRESS', any=True)
  2151. kmi = km.keymap_items.new_modal('CANCEL', 'TRACKPADPAN', 'ANY')
  2152. kmi = km.keymap_items.new_modal('PAN_ENABLE', 'MIDDLEMOUSE', 'PRESS', any=True)
  2153. kmi = km.keymap_items.new_modal('PAN_DISABLE', 'MIDDLEMOUSE', 'RELEASE', any=True)
  2154. kmi = km.keymap_items.new_modal('FORWARD', 'COMMA', 'PRESS')
  2155. kmi = km.keymap_items.new_modal('BACKWARD', 'O', 'PRESS')
  2156. kmi = km.keymap_items.new_modal('LEFT', 'A', 'PRESS')
  2157. kmi = km.keymap_items.new_modal('RIGHT', 'E', 'PRESS')
  2158. kmi = km.keymap_items.new_modal('UP', 'PERIOD', 'PRESS')
  2159. kmi = km.keymap_items.new_modal('DOWN', 'QUOTE', 'PRESS')
  2160. kmi = km.keymap_items.new_modal('UP', 'P', 'PRESS')
  2161. kmi = km.keymap_items.new_modal('DOWN', 'U', 'PRESS')
  2162. kmi = km.keymap_items.new_modal('FORWARD', 'UP_ARROW', 'PRESS')
  2163. kmi = km.keymap_items.new_modal('BACKWARD', 'DOWN_ARROW', 'PRESS')
  2164. kmi = km.keymap_items.new_modal('LEFT', 'LEFT_ARROW', 'PRESS')
  2165. kmi = km.keymap_items.new_modal('RIGHT', 'RIGHT_ARROW', 'PRESS')
  2166. kmi = km.keymap_items.new_modal('AXIS_LOCK_X', 'Q', 'PRESS')
  2167. kmi = km.keymap_items.new_modal('AXIS_LOCK_Z', 'SEMI_COLON', 'PRESS')
  2168. kmi = km.keymap_items.new_modal('PRECISION_ENABLE', 'LEFT_ALT', 'PRESS', any=True)
  2169. kmi = km.keymap_items.new_modal('PRECISION_DISABLE', 'LEFT_ALT', 'RELEASE', any=True)
  2170. kmi = km.keymap_items.new_modal('PRECISION_ENABLE', 'LEFT_SHIFT', 'PRESS', any=True)
  2171. kmi = km.keymap_items.new_modal('PRECISION_DISABLE', 'LEFT_SHIFT', 'RELEASE', any=True)
  2172. kmi = km.keymap_items.new_modal('FREELOOK_ENABLE', 'LEFT_CTRL', 'PRESS', any=True)
  2173. kmi = km.keymap_items.new_modal('FREELOOK_DISABLE', 'LEFT_CTRL', 'RELEASE', any=True)
  2174.  
  2175. # Map View3D Walk Modal
  2176. km = kc.keymaps.new('View3D Walk Modal', space_type='EMPTY', region_type='WINDOW', modal=True)
  2177.  
  2178. kmi = km.keymap_items.new_modal('CANCEL', 'ESC', 'PRESS', any=True)
  2179. kmi = km.keymap_items.new_modal('CANCEL', 'RIGHTMOUSE', 'ANY', any=True)
  2180. kmi = km.keymap_items.new_modal('CONFIRM', 'LEFTMOUSE', 'ANY', any=True)
  2181. kmi = km.keymap_items.new_modal('CONFIRM', 'RET', 'PRESS', any=True)
  2182. kmi = km.keymap_items.new_modal('CONFIRM', 'NUMPAD_ENTER', 'PRESS', any=True)
  2183. kmi = km.keymap_items.new_modal('FAST_ENABLE', 'LEFT_SHIFT', 'PRESS', any=True)
  2184. kmi = km.keymap_items.new_modal('FAST_DISABLE', 'LEFT_SHIFT', 'RELEASE', any=True)
  2185. kmi = km.keymap_items.new_modal('SLOW_ENABLE', 'LEFT_ALT', 'PRESS', any=True)
  2186. kmi = km.keymap_items.new_modal('SLOW_DISABLE', 'LEFT_ALT', 'RELEASE', any=True)
  2187. kmi = km.keymap_items.new_modal('FORWARD', 'COMMA', 'PRESS', any=True)
  2188. kmi = km.keymap_items.new_modal('BACKWARD', 'O', 'PRESS', any=True)
  2189. kmi = km.keymap_items.new_modal('LEFT', 'A', 'PRESS', any=True)
  2190. kmi = km.keymap_items.new_modal('RIGHT', 'E', 'PRESS', any=True)
  2191. kmi = km.keymap_items.new_modal('UP', 'PERIOD', 'PRESS', any=True)
  2192. kmi = km.keymap_items.new_modal('DOWN', 'QUOTE', 'PRESS', any=True)
  2193. kmi = km.keymap_items.new_modal('FORWARD_STOP', 'COMMA', 'RELEASE', any=True)
  2194. kmi = km.keymap_items.new_modal('BACKWARD_STOP', 'O', 'RELEASE', any=True)
  2195. kmi = km.keymap_items.new_modal('LEFT_STOP', 'A', 'RELEASE', any=True)
  2196. kmi = km.keymap_items.new_modal('RIGHT_STOP', 'E', 'RELEASE', any=True)
  2197. kmi = km.keymap_items.new_modal('UP_STOP', 'PERIOD', 'RELEASE', any=True)
  2198. kmi = km.keymap_items.new_modal('DOWN_STOP', 'QUOTE', 'RELEASE', any=True)
  2199. kmi = km.keymap_items.new_modal('FORWARD', 'UP_ARROW', 'PRESS')
  2200. kmi = km.keymap_items.new_modal('BACKWARD', 'DOWN_ARROW', 'PRESS')
  2201. kmi = km.keymap_items.new_modal('LEFT', 'LEFT_ARROW', 'PRESS')
  2202. kmi = km.keymap_items.new_modal('RIGHT', 'RIGHT_ARROW', 'PRESS')
  2203. kmi = km.keymap_items.new_modal('FORWARD_STOP', 'UP_ARROW', 'RELEASE', any=True)
  2204. kmi = km.keymap_items.new_modal('BACKWARD_STOP', 'DOWN_ARROW', 'RELEASE', any=True)
  2205. kmi = km.keymap_items.new_modal('LEFT_STOP', 'LEFT_ARROW', 'RELEASE', any=True)
  2206. kmi = km.keymap_items.new_modal('RIGHT_STOP', 'RIGHT_ARROW', 'RELEASE', any=True)
  2207. kmi = km.keymap_items.new_modal('CANCEL', 'TAB', 'PRESS')
  2208. kmi = km.keymap_items.new_modal('CANCEL', 'I', 'PRESS')
  2209. kmi = km.keymap_items.new_modal('JUMP', 'K', 'PRESS', any=True)
  2210. kmi = km.keymap_items.new_modal('JUMP_STOP', 'K', 'RELEASE', any=True)
  2211. kmi = km.keymap_items.new_modal('TELEPORT', 'SPACE', 'PRESS', any=True)
  2212. kmi = km.keymap_items.new_modal('TELEPORT', 'MIDDLEMOUSE', 'ANY', any=True)
  2213. kmi = km.keymap_items.new_modal('ACCELERATE', 'RIGHT_BRACKET', 'PRESS', any=True)
  2214. kmi = km.keymap_items.new_modal('DECELERATE', 'LEFT_BRACKET', 'PRESS', any=True)
  2215. kmi = km.keymap_items.new_modal('ACCELERATE', 'WHEELUPMOUSE', 'PRESS', any=True)
  2216. kmi = km.keymap_items.new_modal('DECELERATE', 'WHEELDOWNMOUSE', 'PRESS', any=True)
  2217.  
  2218. # Map Graph Editor Generic
  2219. km = kc.keymaps.new('Graph Editor Generic', space_type='GRAPH_EDITOR', region_type='WINDOW', modal=False)
  2220.  
  2221. kmi = km.keymap_items.new('graph.properties', 'B', 'PRESS')
  2222. kmi = km.keymap_items.new('graph.extrapolation_type', 'PERIOD', 'PRESS', shift=True)
  2223.  
  2224. # Map Graph Editor
  2225. km = kc.keymaps.new('Graph Editor', space_type='GRAPH_EDITOR', region_type='WINDOW', modal=False)
  2226.  
  2227. kmi = km.keymap_items.new('wm.context_toggle', 'D', 'PRESS', ctrl=True)
  2228. kmi_props_setattr(kmi.properties, 'data_path', 'space_data.show_handles')
  2229. kmi = km.keymap_items.new('graph.cursor_set', 'ACTIONMOUSE', 'PRESS')
  2230. kmi = km.keymap_items.new('graph.clickselect', 'SELECTMOUSE', 'PRESS')
  2231. kmi_props_setattr(kmi.properties, 'extend', False)
  2232. kmi_props_setattr(kmi.properties, 'column', False)
  2233. kmi_props_setattr(kmi.properties, 'curves', False)
  2234. kmi = km.keymap_items.new('graph.clickselect', 'SELECTMOUSE', 'PRESS', alt=True)
  2235. kmi_props_setattr(kmi.properties, 'extend', False)
  2236. kmi_props_setattr(kmi.properties, 'column', True)
  2237. kmi_props_setattr(kmi.properties, 'curves', False)
  2238. kmi = km.keymap_items.new('graph.clickselect', 'SELECTMOUSE', 'PRESS', shift=True)
  2239. kmi_props_setattr(kmi.properties, 'extend', True)
  2240. kmi_props_setattr(kmi.properties, 'column', False)
  2241. kmi_props_setattr(kmi.properties, 'curves', False)
  2242. kmi = km.keymap_items.new('graph.clickselect', 'SELECTMOUSE', 'PRESS', shift=True, alt=True)
  2243. kmi_props_setattr(kmi.properties, 'extend', True)
  2244. kmi_props_setattr(kmi.properties, 'column', True)
  2245. kmi_props_setattr(kmi.properties, 'curves', False)
  2246. kmi = km.keymap_items.new('graph.clickselect', 'SELECTMOUSE', 'PRESS', ctrl=True, alt=True)
  2247. kmi_props_setattr(kmi.properties, 'extend', False)
  2248. kmi_props_setattr(kmi.properties, 'column', False)
  2249. kmi_props_setattr(kmi.properties, 'curves', True)
  2250. kmi = km.keymap_items.new('graph.clickselect', 'SELECTMOUSE', 'PRESS', shift=True, ctrl=True, alt=True)
  2251. kmi_props_setattr(kmi.properties, 'extend', True)
  2252. kmi_props_setattr(kmi.properties, 'column', False)
  2253. kmi_props_setattr(kmi.properties, 'curves', True)
  2254. kmi = km.keymap_items.new('graph.select_leftright', 'SELECTMOUSE', 'PRESS', ctrl=True)
  2255. kmi_props_setattr(kmi.properties, 'mode', 'CHECK')
  2256. kmi_props_setattr(kmi.properties, 'extend', False)
  2257. kmi = km.keymap_items.new('graph.select_leftright', 'SELECTMOUSE', 'PRESS', shift=True, ctrl=True)
  2258. kmi_props_setattr(kmi.properties, 'mode', 'CHECK')
  2259. kmi_props_setattr(kmi.properties, 'extend', True)
  2260. kmi = km.keymap_items.new('graph.select_leftright', 'SLASH', 'PRESS')
  2261. kmi_props_setattr(kmi.properties, 'mode', 'LEFT')
  2262. kmi_props_setattr(kmi.properties, 'extend', False)
  2263. kmi = km.keymap_items.new('graph.select_leftright', 'EQUAL', 'PRESS')
  2264. kmi_props_setattr(kmi.properties, 'mode', 'RIGHT')
  2265. kmi_props_setattr(kmi.properties, 'extend', False)
  2266. kmi = km.keymap_items.new('graph.select_all_toggle', 'A', 'PRESS')
  2267. kmi_props_setattr(kmi.properties, 'invert', False)
  2268. kmi = km.keymap_items.new('graph.select_all_toggle', 'C', 'PRESS', ctrl=True)
  2269. kmi_props_setattr(kmi.properties, 'invert', True)
  2270. kmi = km.keymap_items.new('graph.select_border', 'X', 'PRESS')
  2271. kmi_props_setattr(kmi.properties, 'axis_range', False)
  2272. kmi_props_setattr(kmi.properties, 'include_handles', False)
  2273. kmi = km.keymap_items.new('graph.select_border', 'X', 'PRESS', alt=True)
  2274. kmi_props_setattr(kmi.properties, 'axis_range', True)
  2275. kmi_props_setattr(kmi.properties, 'include_handles', False)
  2276. kmi = km.keymap_items.new('graph.select_border', 'X', 'PRESS', ctrl=True)
  2277. kmi_props_setattr(kmi.properties, 'axis_range', False)
  2278. kmi_props_setattr(kmi.properties, 'include_handles', True)
  2279. kmi = km.keymap_items.new('graph.select_border', 'X', 'PRESS', ctrl=True, alt=True)
  2280. kmi_props_setattr(kmi.properties, 'axis_range', True)
  2281. kmi_props_setattr(kmi.properties, 'include_handles', True)
  2282. kmi = km.keymap_items.new('graph.select_column', 'T', 'PRESS')
  2283. kmi_props_setattr(kmi.properties, 'mode', 'KEYS')
  2284. kmi = km.keymap_items.new('graph.select_column', 'T', 'PRESS', ctrl=True)
  2285. kmi_props_setattr(kmi.properties, 'mode', 'CFRA')
  2286. kmi = km.keymap_items.new('graph.select_column', 'T', 'PRESS', shift=True)
  2287. kmi_props_setattr(kmi.properties, 'mode', 'MARKERS_COLUMN')
  2288. kmi = km.keymap_items.new('graph.select_column', 'T', 'PRESS', alt=True)
  2289. kmi_props_setattr(kmi.properties, 'mode', 'MARKERS_BETWEEN')
  2290. kmi = km.keymap_items.new('graph.select_more', 'RIGHT_BRACKET', 'PRESS', ctrl=True)
  2291. kmi = km.keymap_items.new('graph.select_less', 'LEFT_BRACKET', 'PRESS', ctrl=True)
  2292. kmi = km.keymap_items.new('graph.select_linked', 'N', 'PRESS')
  2293. kmi = km.keymap_items.new('graph.frame_jump', 'I', 'PRESS', ctrl=True)
  2294. kmi = km.keymap_items.new('graph.snap', 'O', 'PRESS', shift=True)
  2295. kmi = km.keymap_items.new('graph.mirror', 'M', 'PRESS', shift=True)
  2296. kmi = km.keymap_items.new('graph.handle_type', 'K', 'PRESS')
  2297. kmi = km.keymap_items.new('graph.interpolation_type', 'Y', 'PRESS')
  2298. kmi = km.keymap_items.new('graph.clean', 'R', 'PRESS')
  2299. kmi = km.keymap_items.new('graph.smooth', 'R', 'PRESS', alt=True)
  2300. kmi = km.keymap_items.new('graph.sample', 'R', 'PRESS', shift=True)
  2301. kmi = km.keymap_items.new('graph.bake', 'J', 'PRESS', alt=True)
  2302. kmi = km.keymap_items.new('graph.delete', 'BACK_SPACE', 'PRESS')
  2303. kmi = km.keymap_items.new('graph.delete', 'BACK_SPACE', 'PRESS')
  2304. kmi.active = False
  2305. kmi = km.keymap_items.new('graph.duplicate_move', 'E', 'PRESS', shift=True)
  2306. kmi = km.keymap_items.new('graph.keyframe_insert', 'C', 'PRESS')
  2307. kmi = km.keymap_items.new('graph.click_insert', 'ACTIONMOUSE', 'CLICK', ctrl=True)
  2308. kmi = km.keymap_items.new('graph.copy', 'C', 'PRESS', ctrl=True)
  2309. kmi.active = False
  2310. kmi = km.keymap_items.new('graph.paste', 'V', 'PRESS', ctrl=True)
  2311. kmi.active = False
  2312. kmi = km.keymap_items.new('graph.copy', 'C', 'PRESS', oskey=True)
  2313. kmi = km.keymap_items.new('graph.paste', 'V', 'PRESS', oskey=True)
  2314. kmi = km.keymap_items.new('graph.previewrange_set', 'L', 'PRESS', ctrl=True, alt=True)
  2315. kmi = km.keymap_items.new('graph.view_all', 'BACK_SLASH', 'PRESS')
  2316. kmi = km.keymap_items.new('graph.view_all', 'NDOF_BUTTON_FIT', 'PRESS')
  2317. kmi = km.keymap_items.new('graph.view_selected', 'V', 'PRESS', shift=True)
  2318. kmi = km.keymap_items.new('graph.fmodifier_add', 'M', 'PRESS', shift=True, ctrl=True)
  2319. kmi_props_setattr(kmi.properties, 'only_active', False)
  2320. kmi = km.keymap_items.new('anim.channels_editable_toggle', 'TAB', 'PRESS')
  2321. kmi = km.keymap_items.new('transform.translate', 'I', 'PRESS')
  2322. kmi = km.keymap_items.new('transform.translate', 'EVT_TWEAK_S', 'ANY')
  2323. kmi = km.keymap_items.new('transform.transform', 'PERIOD', 'PRESS')
  2324. kmi_props_setattr(kmi.properties, 'mode', 'TIME_EXTEND')
  2325. kmi = km.keymap_items.new('transform.rotate', 'P', 'PRESS')
  2326. kmi = km.keymap_items.new('transform.resize', 'O', 'PRESS')
  2327. kmi = km.keymap_items.new('marker.add', 'M', 'PRESS')
  2328. kmi = km.keymap_items.new('marker.rename', 'M', 'PRESS', ctrl=True)
  2329.  
  2330. # Map Node Generic
  2331. km = kc.keymaps.new('Node Generic', space_type='NODE_EDITOR', region_type='WINDOW', modal=False)
  2332.  
  2333. kmi = km.keymap_items.new('node.properties', 'B', 'PRESS')
  2334. kmi = km.keymap_items.new('node.toolbar', 'Y', 'PRESS')
  2335.  
  2336. # Map Node Editor
  2337. km = kc.keymaps.new('Node Editor', space_type='NODE_EDITOR', region_type='WINDOW', modal=False)
  2338.  
  2339. kmi = km.keymap_items.new('node.select', 'ACTIONMOUSE', 'PRESS')
  2340. kmi_props_setattr(kmi.properties, 'extend', False)
  2341. kmi = km.keymap_items.new('node.select', 'SELECTMOUSE', 'PRESS')
  2342. kmi_props_setattr(kmi.properties, 'extend', False)
  2343. kmi = km.keymap_items.new('node.select', 'ACTIONMOUSE', 'PRESS', ctrl=True)
  2344. kmi_props_setattr(kmi.properties, 'extend', False)
  2345. kmi = km.keymap_items.new('node.select', 'SELECTMOUSE', 'PRESS', ctrl=True)
  2346. kmi_props_setattr(kmi.properties, 'extend', False)
  2347. kmi = km.keymap_items.new('node.select', 'ACTIONMOUSE', 'PRESS', alt=True)
  2348. kmi_props_setattr(kmi.properties, 'extend', False)
  2349. kmi = km.keymap_items.new('node.select', 'SELECTMOUSE', 'PRESS', alt=True)
  2350. kmi_props_setattr(kmi.properties, 'extend', False)
  2351. kmi = km.keymap_items.new('node.select', 'ACTIONMOUSE', 'PRESS', ctrl=True, alt=True)
  2352. kmi_props_setattr(kmi.properties, 'extend', False)
  2353. kmi = km.keymap_items.new('node.select', 'SELECTMOUSE', 'PRESS', ctrl=True, alt=True)
  2354. kmi_props_setattr(kmi.properties, 'extend', False)
  2355. kmi = km.keymap_items.new('node.select', 'ACTIONMOUSE', 'PRESS', shift=True)
  2356. kmi_props_setattr(kmi.properties, 'extend', True)
  2357. kmi = km.keymap_items.new('node.select', 'SELECTMOUSE', 'PRESS', shift=True)
  2358. kmi_props_setattr(kmi.properties, 'extend', True)
  2359. kmi = km.keymap_items.new('node.select', 'ACTIONMOUSE', 'PRESS', shift=True, ctrl=True)
  2360. kmi_props_setattr(kmi.properties, 'extend', True)
  2361. kmi = km.keymap_items.new('node.select', 'SELECTMOUSE', 'PRESS', shift=True, ctrl=True)
  2362. kmi_props_setattr(kmi.properties, 'extend', True)
  2363. kmi = km.keymap_items.new('node.select', 'ACTIONMOUSE', 'PRESS', shift=True, alt=True)
  2364. kmi_props_setattr(kmi.properties, 'extend', True)
  2365. kmi = km.keymap_items.new('node.select', 'SELECTMOUSE', 'PRESS', shift=True, alt=True)
  2366. kmi_props_setattr(kmi.properties, 'extend', True)
  2367. kmi = km.keymap_items.new('node.select', 'ACTIONMOUSE', 'PRESS', shift=True, ctrl=True, alt=True)
  2368. kmi_props_setattr(kmi.properties, 'extend', True)
  2369. kmi = km.keymap_items.new('node.select', 'SELECTMOUSE', 'PRESS', shift=True, ctrl=True, alt=True)
  2370. kmi_props_setattr(kmi.properties, 'extend', True)
  2371. kmi = km.keymap_items.new('node.select_border', 'EVT_TWEAK_S', 'ANY')
  2372. kmi_props_setattr(kmi.properties, 'tweak', True)
  2373. kmi = km.keymap_items.new('node.select_lasso', 'EVT_TWEAK_A', 'ANY', ctrl=True, alt=True)
  2374. kmi_props_setattr(kmi.properties, 'deselect', False)
  2375. kmi = km.keymap_items.new('node.select_lasso', 'EVT_TWEAK_A', 'ANY', shift=True, ctrl=True, alt=True)
  2376. kmi_props_setattr(kmi.properties, 'deselect', True)
  2377. kmi = km.keymap_items.new('node.select_circle', 'J', 'PRESS')
  2378. kmi = km.keymap_items.new('node.link', 'LEFTMOUSE', 'PRESS')
  2379. kmi_props_setattr(kmi.properties, 'detach', False)
  2380. kmi = km.keymap_items.new('node.link', 'LEFTMOUSE', 'PRESS', ctrl=True)
  2381. kmi_props_setattr(kmi.properties, 'detach', True)
  2382. kmi = km.keymap_items.new('node.resize', 'LEFTMOUSE', 'PRESS')
  2383. kmi = km.keymap_items.new('node.add_reroute', 'LEFTMOUSE', 'PRESS', shift=True)
  2384. kmi = km.keymap_items.new('node.links_cut', 'LEFTMOUSE', 'PRESS', ctrl=True)
  2385. kmi = km.keymap_items.new('node.select_link_viewer', 'LEFTMOUSE', 'PRESS', shift=True, ctrl=True)
  2386. kmi = km.keymap_items.new('node.backimage_move', 'MIDDLEMOUSE', 'PRESS', alt=True)
  2387. kmi = km.keymap_items.new('node.backimage_zoom', 'K', 'PRESS')
  2388. kmi_props_setattr(kmi.properties, 'factor', 0.833329975605011)
  2389. kmi = km.keymap_items.new('node.backimage_zoom', 'K', 'PRESS', alt=True)
  2390. kmi_props_setattr(kmi.properties, 'factor', 1.2000000476837158)
  2391. kmi = km.keymap_items.new('node.backimage_fit', 'BACK_SLASH', 'PRESS', alt=True)
  2392. kmi = km.keymap_items.new('node.backimage_sample', 'ACTIONMOUSE', 'PRESS', alt=True)
  2393. kmi = km.keymap_items.new('node.link_make', 'U', 'PRESS')
  2394. kmi_props_setattr(kmi.properties, 'replace', False)
  2395. kmi = km.keymap_items.new('node.link_make', 'U', 'PRESS', shift=True)
  2396. kmi_props_setattr(kmi.properties, 'replace', True)
  2397. kmi = km.keymap_items.new('wm.call_menu', 'A', 'PRESS', shift=True)
  2398. kmi_props_setattr(kmi.properties, 'name', 'NODE_MT_add')
  2399. kmi = km.keymap_items.new('node.duplicate_move', 'E', 'PRESS', shift=True)
  2400. kmi = km.keymap_items.new('node.duplicate_move_keep_inputs', 'E', 'PRESS', shift=True, ctrl=True)
  2401. kmi = km.keymap_items.new('node.parent_set', 'L', 'PRESS', ctrl=True)
  2402. kmi = km.keymap_items.new('node.parent_clear', 'L', 'PRESS', alt=True)
  2403. kmi = km.keymap_items.new('node.join', 'H', 'PRESS', ctrl=True)
  2404. kmi = km.keymap_items.new('node.hide_toggle', 'D', 'PRESS')
  2405. kmi = km.keymap_items.new('node.mute_toggle', 'M', 'PRESS')
  2406. kmi = km.keymap_items.new('node.preview_toggle', 'D', 'PRESS', shift=True)
  2407. kmi = km.keymap_items.new('node.hide_socket_toggle', 'D', 'PRESS', ctrl=True)
  2408. kmi = km.keymap_items.new('node.view_all', 'BACK_SLASH', 'PRESS')
  2409. kmi = km.keymap_items.new('node.view_all', 'NDOF_BUTTON_FIT', 'PRESS')
  2410. kmi = km.keymap_items.new('node.view_selected', 'V', 'PRESS', shift=True)
  2411. kmi = km.keymap_items.new('node.select_border', 'X', 'PRESS')
  2412. kmi_props_setattr(kmi.properties, 'tweak', False)
  2413. kmi = km.keymap_items.new('node.delete', 'BACK_SPACE', 'PRESS')
  2414. kmi = km.keymap_items.new('node.delete', 'BACK_SPACE', 'PRESS')
  2415. kmi.active = False
  2416. kmi = km.keymap_items.new('node.delete_reconnect', 'Q', 'PRESS', ctrl=True)
  2417. kmi = km.keymap_items.new('node.select_all', 'A', 'PRESS')
  2418. kmi_props_setattr(kmi.properties, 'action', 'TOGGLE')
  2419. kmi = km.keymap_items.new('node.select_all', 'C', 'PRESS', ctrl=True)
  2420. kmi_props_setattr(kmi.properties, 'action', 'INVERT')
  2421. kmi = km.keymap_items.new('node.select_linked_to', 'N', 'PRESS', shift=True)
  2422. kmi = km.keymap_items.new('node.select_linked_from', 'N', 'PRESS')
  2423. kmi = km.keymap_items.new('node.select_same_type', 'I', 'PRESS', shift=True)
  2424. kmi = km.keymap_items.new('node.select_same_type_step', 'EQUAL', 'PRESS', shift=True)
  2425. kmi_props_setattr(kmi.properties, 'prev', False)
  2426. kmi = km.keymap_items.new('node.select_same_type_step', 'SLASH', 'PRESS', shift=True)
  2427. kmi_props_setattr(kmi.properties, 'prev', True)
  2428. kmi = km.keymap_items.new('node.find_node', 'U', 'PRESS', ctrl=True)
  2429. kmi = km.keymap_items.new('node.group_make', 'I', 'PRESS', ctrl=True)
  2430. kmi = km.keymap_items.new('node.group_ungroup', 'I', 'PRESS', alt=True)
  2431. kmi = km.keymap_items.new('node.group_separate', 'L', 'PRESS')
  2432. kmi = km.keymap_items.new('node.group_edit', 'TAB', 'PRESS')
  2433. kmi_props_setattr(kmi.properties, 'exit', False)
  2434. kmi = km.keymap_items.new('node.group_edit', 'TAB', 'PRESS', shift=True)
  2435. kmi_props_setattr(kmi.properties, 'exit', True)
  2436. kmi = km.keymap_items.new('node.read_renderlayers', 'P', 'PRESS', ctrl=True)
  2437. kmi = km.keymap_items.new('node.read_fullsamplelayers', 'P', 'PRESS', shift=True)
  2438. kmi = km.keymap_items.new('node.render_changed', 'SEMI_COLON', 'PRESS')
  2439. kmi = km.keymap_items.new('node.clipboard_copy', 'C', 'PRESS', ctrl=True)
  2440. kmi.active = False
  2441. kmi = km.keymap_items.new('node.clipboard_paste', 'V', 'PRESS', ctrl=True)
  2442. kmi.active = False
  2443. kmi = km.keymap_items.new('node.clipboard_copy', 'C', 'PRESS', oskey=True)
  2444. kmi = km.keymap_items.new('node.clipboard_paste', 'V', 'PRESS', oskey=True)
  2445. kmi = km.keymap_items.new('node.viewer_border', 'X', 'PRESS', ctrl=True)
  2446. kmi = km.keymap_items.new('node.translate_attach', 'I', 'PRESS')
  2447. kmi = km.keymap_items.new('node.translate_attach', 'EVT_TWEAK_A', 'ANY')
  2448. kmi = km.keymap_items.new('node.translate_attach', 'EVT_TWEAK_S', 'ANY')
  2449. kmi = km.keymap_items.new('transform.translate', 'I', 'PRESS')
  2450. kmi_props_setattr(kmi.properties, 'release_confirm', True)
  2451. kmi = km.keymap_items.new('transform.translate', 'EVT_TWEAK_A', 'ANY')
  2452. kmi_props_setattr(kmi.properties, 'release_confirm', True)
  2453. kmi = km.keymap_items.new('transform.translate', 'EVT_TWEAK_S', 'ANY')
  2454. kmi_props_setattr(kmi.properties, 'release_confirm', True)
  2455. kmi = km.keymap_items.new('transform.rotate', 'P', 'PRESS')
  2456. kmi = km.keymap_items.new('transform.resize', 'O', 'PRESS')
  2457. kmi = km.keymap_items.new('node.move_detach_links', 'PERIOD', 'PRESS', alt=True)
  2458. kmi = km.keymap_items.new('node.move_detach_links_release', 'EVT_TWEAK_A', 'ANY', alt=True)
  2459. kmi = km.keymap_items.new('node.move_detach_links', 'EVT_TWEAK_S', 'ANY', alt=True)
  2460. kmi = km.keymap_items.new('node.detach_translate_attach', 'U', 'PRESS', alt=True)
  2461.  
  2462. # Map Info
  2463. km = kc.keymaps.new('Info', space_type='INFO', region_type='WINDOW', modal=False)
  2464.  
  2465. kmi = km.keymap_items.new('info.select_pick', 'SELECTMOUSE', 'PRESS')
  2466. kmi = km.keymap_items.new('info.select_all_toggle', 'A', 'PRESS')
  2467. kmi = km.keymap_items.new('info.select_border', 'X', 'PRESS')
  2468. kmi = km.keymap_items.new('info.report_replay', 'P', 'PRESS')
  2469. kmi = km.keymap_items.new('info.report_delete', 'BACK_SPACE', 'PRESS')
  2470. kmi = km.keymap_items.new('info.report_delete', 'BACK_SPACE', 'PRESS')
  2471. kmi.active = False
  2472. kmi = km.keymap_items.new('info.report_copy', 'C', 'PRESS', ctrl=True)
  2473. kmi.active = False
  2474. kmi = km.keymap_items.new('info.report_copy', 'C', 'PRESS', oskey=True)
  2475.  
  2476. # Map File Browser
  2477. km = kc.keymaps.new('File Browser', space_type='FILE_BROWSER', region_type='WINDOW', modal=False)
  2478.  
  2479. kmi = km.keymap_items.new('file.bookmark_toggle', 'Y', 'PRESS')
  2480. kmi = km.keymap_items.new('file.parent', 'L', 'PRESS')
  2481. kmi = km.keymap_items.new('file.bookmark_add', 'X', 'PRESS', ctrl=True)
  2482. kmi = km.keymap_items.new('file.hidedot', 'D', 'PRESS')
  2483. kmi = km.keymap_items.new('file.previous', 'EQUAL', 'PRESS')
  2484. kmi = km.keymap_items.new('file.next', 'SLASH', 'PRESS')
  2485. kmi = km.keymap_items.new('file.directory_new', 'C', 'PRESS')
  2486. kmi = km.keymap_items.new('file.delete', 'BACK_SPACE', 'PRESS')
  2487. kmi = km.keymap_items.new('file.delete', 'BACK_SPACE', 'PRESS')
  2488. kmi.active = False
  2489. kmi = km.keymap_items.new('file.smoothscroll', 'TIMER1', 'ANY', any=True)
  2490.  
  2491. # Map File Browser Main
  2492. km = kc.keymaps.new('File Browser Main', space_type='FILE_BROWSER', region_type='WINDOW', modal=False)
  2493.  
  2494. kmi = km.keymap_items.new('file.execute', 'LEFTMOUSE', 'DOUBLE_CLICK')
  2495. kmi_props_setattr(kmi.properties, 'need_active', True)
  2496. kmi = km.keymap_items.new('file.select', 'LEFTMOUSE', 'CLICK')
  2497. kmi = km.keymap_items.new('file.select', 'LEFTMOUSE', 'CLICK', shift=True)
  2498. kmi_props_setattr(kmi.properties, 'extend', True)
  2499. kmi = km.keymap_items.new('file.select', 'LEFTMOUSE', 'CLICK', alt=True)
  2500. kmi_props_setattr(kmi.properties, 'extend', True)
  2501. kmi_props_setattr(kmi.properties, 'fill', True)
  2502. kmi = km.keymap_items.new('file.select', 'RIGHTMOUSE', 'CLICK')
  2503. kmi_props_setattr(kmi.properties, 'open', False)
  2504. kmi = km.keymap_items.new('file.select', 'RIGHTMOUSE', 'CLICK', shift=True)
  2505. kmi_props_setattr(kmi.properties, 'extend', True)
  2506. kmi_props_setattr(kmi.properties, 'open', False)
  2507. kmi = km.keymap_items.new('file.select', 'RIGHTMOUSE', 'CLICK', alt=True)
  2508. kmi_props_setattr(kmi.properties, 'extend', True)
  2509. kmi_props_setattr(kmi.properties, 'fill', True)
  2510. kmi_props_setattr(kmi.properties, 'open', False)
  2511. kmi = km.keymap_items.new('file.previous', 'BUTTON4MOUSE', 'CLICK')
  2512. kmi = km.keymap_items.new('file.next', 'BUTTON5MOUSE', 'CLICK')
  2513. kmi = km.keymap_items.new('file.select_all_toggle', 'A', 'PRESS')
  2514. kmi = km.keymap_items.new('file.refresh', 'V', 'PRESS', ctrl=True)
  2515. kmi = km.keymap_items.new('file.select_border', 'X', 'PRESS')
  2516. kmi = km.keymap_items.new('file.select_border', 'EVT_TWEAK_L', 'ANY')
  2517. kmi = km.keymap_items.new('file.rename', 'LEFTMOUSE', 'PRESS', ctrl=True)
  2518. kmi = km.keymap_items.new('file.highlight', 'MOUSEMOVE', 'ANY', any=True)
  2519. kmi = km.keymap_items.new('file.filenum', 'RIGHT_BRACKET', 'PRESS')
  2520. kmi_props_setattr(kmi.properties, 'increment', 1)
  2521. kmi = km.keymap_items.new('file.filenum', 'RIGHT_BRACKET', 'PRESS', shift=True)
  2522. kmi_props_setattr(kmi.properties, 'increment', 10)
  2523. kmi = km.keymap_items.new('file.filenum', 'RIGHT_BRACKET', 'PRESS', ctrl=True)
  2524. kmi_props_setattr(kmi.properties, 'increment', 100)
  2525. kmi = km.keymap_items.new('file.filenum', 'LEFT_BRACKET', 'PRESS')
  2526. kmi_props_setattr(kmi.properties, 'increment', -1)
  2527. kmi = km.keymap_items.new('file.filenum', 'LEFT_BRACKET', 'PRESS', shift=True)
  2528. kmi_props_setattr(kmi.properties, 'increment', -10)
  2529. kmi = km.keymap_items.new('file.filenum', 'LEFT_BRACKET', 'PRESS', ctrl=True)
  2530. kmi_props_setattr(kmi.properties, 'increment', -100)
  2531.  
  2532. # Map File Browser Buttons
  2533. km = kc.keymaps.new('File Browser Buttons', space_type='FILE_BROWSER', region_type='WINDOW', modal=False)
  2534.  
  2535. kmi = km.keymap_items.new('file.filenum', 'RIGHT_BRACKET', 'PRESS')
  2536. kmi_props_setattr(kmi.properties, 'increment', 1)
  2537. kmi = km.keymap_items.new('file.filenum', 'RIGHT_BRACKET', 'PRESS', shift=True)
  2538. kmi_props_setattr(kmi.properties, 'increment', 10)
  2539. kmi = km.keymap_items.new('file.filenum', 'RIGHT_BRACKET', 'PRESS', ctrl=True)
  2540. kmi_props_setattr(kmi.properties, 'increment', 100)
  2541. kmi = km.keymap_items.new('file.filenum', 'LEFT_BRACKET', 'PRESS')
  2542. kmi_props_setattr(kmi.properties, 'increment', -1)
  2543. kmi = km.keymap_items.new('file.filenum', 'LEFT_BRACKET', 'PRESS', shift=True)
  2544. kmi_props_setattr(kmi.properties, 'increment', -10)
  2545. kmi = km.keymap_items.new('file.filenum', 'LEFT_BRACKET', 'PRESS', ctrl=True)
  2546. kmi_props_setattr(kmi.properties, 'increment', -100)
  2547.  
  2548. # Map Dopesheet
  2549. km = kc.keymaps.new('Dopesheet', space_type='DOPESHEET_EDITOR', region_type='WINDOW', modal=False)
  2550.  
  2551. kmi = km.keymap_items.new('action.clickselect', 'SELECTMOUSE', 'PRESS')
  2552. kmi_props_setattr(kmi.properties, 'extend', False)
  2553. kmi_props_setattr(kmi.properties, 'column', False)
  2554. kmi_props_setattr(kmi.properties, 'channel', False)
  2555. kmi = km.keymap_items.new('action.clickselect', 'SELECTMOUSE', 'PRESS', alt=True)
  2556. kmi_props_setattr(kmi.properties, 'extend', False)
  2557. kmi_props_setattr(kmi.properties, 'column', True)
  2558. kmi_props_setattr(kmi.properties, 'channel', False)
  2559. kmi = km.keymap_items.new('action.clickselect', 'SELECTMOUSE', 'PRESS', shift=True)
  2560. kmi_props_setattr(kmi.properties, 'extend', True)
  2561. kmi_props_setattr(kmi.properties, 'column', False)
  2562. kmi_props_setattr(kmi.properties, 'channel', False)
  2563. kmi = km.keymap_items.new('action.clickselect', 'SELECTMOUSE', 'PRESS', shift=True, alt=True)
  2564. kmi_props_setattr(kmi.properties, 'extend', True)
  2565. kmi_props_setattr(kmi.properties, 'column', True)
  2566. kmi_props_setattr(kmi.properties, 'channel', False)
  2567. kmi = km.keymap_items.new('action.clickselect', 'SELECTMOUSE', 'PRESS', ctrl=True, alt=True)
  2568. kmi_props_setattr(kmi.properties, 'extend', False)
  2569. kmi_props_setattr(kmi.properties, 'column', False)
  2570. kmi_props_setattr(kmi.properties, 'channel', True)
  2571. kmi = km.keymap_items.new('action.clickselect', 'SELECTMOUSE', 'PRESS', shift=True, ctrl=True, alt=True)
  2572. kmi_props_setattr(kmi.properties, 'extend', True)
  2573. kmi_props_setattr(kmi.properties, 'column', False)
  2574. kmi_props_setattr(kmi.properties, 'channel', True)
  2575. kmi = km.keymap_items.new('action.select_leftright', 'SELECTMOUSE', 'PRESS', ctrl=True)
  2576. kmi_props_setattr(kmi.properties, 'mode', 'CHECK')
  2577. kmi_props_setattr(kmi.properties, 'extend', False)
  2578. kmi = km.keymap_items.new('action.select_leftright', 'SELECTMOUSE', 'PRESS', shift=True, ctrl=True)
  2579. kmi_props_setattr(kmi.properties, 'mode', 'CHECK')
  2580. kmi_props_setattr(kmi.properties, 'extend', True)
  2581. kmi = km.keymap_items.new('action.select_leftright', 'SLASH', 'PRESS')
  2582. kmi_props_setattr(kmi.properties, 'mode', 'LEFT')
  2583. kmi_props_setattr(kmi.properties, 'extend', False)
  2584. kmi = km.keymap_items.new('action.select_leftright', 'EQUAL', 'PRESS')
  2585. kmi_props_setattr(kmi.properties, 'mode', 'RIGHT')
  2586. kmi_props_setattr(kmi.properties, 'extend', False)
  2587. kmi = km.keymap_items.new('action.select_all_toggle', 'A', 'PRESS')
  2588. kmi_props_setattr(kmi.properties, 'invert', False)
  2589. kmi = km.keymap_items.new('action.select_all_toggle', 'C', 'PRESS', ctrl=True)
  2590. kmi_props_setattr(kmi.properties, 'invert', True)
  2591. kmi = km.keymap_items.new('action.select_border', 'X', 'PRESS')
  2592. kmi_props_setattr(kmi.properties, 'axis_range', False)
  2593. kmi = km.keymap_items.new('action.select_border', 'X', 'PRESS', alt=True)
  2594. kmi_props_setattr(kmi.properties, 'axis_range', True)
  2595. kmi = km.keymap_items.new('action.select_column', 'T', 'PRESS')
  2596. kmi_props_setattr(kmi.properties, 'mode', 'KEYS')
  2597. kmi = km.keymap_items.new('action.select_column', 'T', 'PRESS', ctrl=True)
  2598. kmi_props_setattr(kmi.properties, 'mode', 'CFRA')
  2599. kmi = km.keymap_items.new('action.select_column', 'T', 'PRESS', shift=True)
  2600. kmi_props_setattr(kmi.properties, 'mode', 'MARKERS_COLUMN')
  2601. kmi = km.keymap_items.new('action.select_column', 'T', 'PRESS', alt=True)
  2602. kmi_props_setattr(kmi.properties, 'mode', 'MARKERS_BETWEEN')
  2603. kmi = km.keymap_items.new('action.select_more', 'RIGHT_BRACKET', 'PRESS', ctrl=True)
  2604. kmi = km.keymap_items.new('action.select_less', 'LEFT_BRACKET', 'PRESS', ctrl=True)
  2605. kmi = km.keymap_items.new('action.select_linked', 'N', 'PRESS')
  2606. kmi = km.keymap_items.new('action.frame_jump', 'I', 'PRESS', ctrl=True)
  2607. kmi = km.keymap_items.new('action.snap', 'O', 'PRESS', shift=True)
  2608. kmi = km.keymap_items.new('action.mirror', 'M', 'PRESS', shift=True)
  2609. kmi = km.keymap_items.new('action.handle_type', 'K', 'PRESS')
  2610. kmi = km.keymap_items.new('action.interpolation_type', 'Y', 'PRESS')
  2611. kmi = km.keymap_items.new('action.extrapolation_type', 'PERIOD', 'PRESS', shift=True)
  2612. kmi = km.keymap_items.new('action.keyframe_type', 'P', 'PRESS')
  2613. kmi = km.keymap_items.new('action.clean', 'R', 'PRESS')
  2614. kmi = km.keymap_items.new('action.sample', 'R', 'PRESS', shift=True)
  2615. kmi = km.keymap_items.new('action.delete', 'BACK_SPACE', 'PRESS')
  2616. kmi = km.keymap_items.new('action.delete', 'BACK_SPACE', 'PRESS')
  2617. kmi.active = False
  2618. kmi = km.keymap_items.new('action.duplicate_move', 'E', 'PRESS', shift=True)
  2619. kmi = km.keymap_items.new('action.keyframe_insert', 'C', 'PRESS')
  2620. kmi = km.keymap_items.new('action.copy', 'C', 'PRESS', ctrl=True)
  2621. kmi.active = False
  2622. kmi = km.keymap_items.new('action.paste', 'V', 'PRESS', ctrl=True)
  2623. kmi.active = False
  2624. kmi = km.keymap_items.new('action.copy', 'C', 'PRESS', oskey=True)
  2625. kmi = km.keymap_items.new('action.paste', 'V', 'PRESS', oskey=True)
  2626. kmi = km.keymap_items.new('action.previewrange_set', 'L', 'PRESS', ctrl=True, alt=True)
  2627. kmi = km.keymap_items.new('action.view_all', 'BACK_SLASH', 'PRESS')
  2628. kmi = km.keymap_items.new('action.view_all', 'NDOF_BUTTON_FIT', 'PRESS')
  2629. kmi = km.keymap_items.new('action.view_selected', 'V', 'PRESS', shift=True)
  2630. kmi = km.keymap_items.new('anim.channels_editable_toggle', 'TAB', 'PRESS')
  2631. kmi = km.keymap_items.new('transform.transform', 'I', 'PRESS')
  2632. kmi_props_setattr(kmi.properties, 'mode', 'TIME_TRANSLATE')
  2633. kmi = km.keymap_items.new('transform.transform', 'EVT_TWEAK_S', 'ANY')
  2634. kmi_props_setattr(kmi.properties, 'mode', 'TIME_TRANSLATE')
  2635. kmi = km.keymap_items.new('transform.transform', 'PERIOD', 'PRESS')
  2636. kmi_props_setattr(kmi.properties, 'mode', 'TIME_EXTEND')
  2637. kmi = km.keymap_items.new('transform.transform', 'O', 'PRESS')
  2638. kmi_props_setattr(kmi.properties, 'mode', 'TIME_SCALE')
  2639. kmi = km.keymap_items.new('transform.transform', 'Y', 'PRESS', shift=True)
  2640. kmi_props_setattr(kmi.properties, 'mode', 'TIME_SLIDE')
  2641. kmi = km.keymap_items.new('marker.add', 'M', 'PRESS')
  2642. kmi = km.keymap_items.new('marker.rename', 'M', 'PRESS', ctrl=True)
  2643.  
  2644. # Map NLA Generic
  2645. km = kc.keymaps.new('NLA Generic', space_type='NLA_EDITOR', region_type='WINDOW', modal=False)
  2646.  
  2647. kmi = km.keymap_items.new('nla.properties', 'B', 'PRESS')
  2648. kmi = km.keymap_items.new('nla.tweakmode_enter', 'TAB', 'PRESS')
  2649. kmi = km.keymap_items.new('nla.tweakmode_exit', 'TAB', 'PRESS')
  2650.  
  2651. # Map NLA Channels
  2652. km = kc.keymaps.new('NLA Channels', space_type='NLA_EDITOR', region_type='WINDOW', modal=False)
  2653.  
  2654. kmi = km.keymap_items.new('nla.channels_click', 'LEFTMOUSE', 'PRESS')
  2655. kmi_props_setattr(kmi.properties, 'extend', False)
  2656. kmi = km.keymap_items.new('nla.channels_click', 'LEFTMOUSE', 'PRESS', shift=True)
  2657. kmi_props_setattr(kmi.properties, 'extend', True)
  2658. kmi = km.keymap_items.new('nla.tracks_add', 'A', 'PRESS', shift=True)
  2659. kmi_props_setattr(kmi.properties, 'above_selected', False)
  2660. kmi = km.keymap_items.new('nla.tracks_add', 'A', 'PRESS', shift=True, ctrl=True)
  2661. kmi_props_setattr(kmi.properties, 'above_selected', True)
  2662. kmi = km.keymap_items.new('nla.tracks_delete', 'BACK_SPACE', 'PRESS')
  2663. kmi = km.keymap_items.new('nla.tracks_delete', 'BACK_SPACE', 'PRESS')
  2664. kmi.active = False
  2665.  
  2666. # Map NLA Editor
  2667. km = kc.keymaps.new('NLA Editor', space_type='NLA_EDITOR', region_type='WINDOW', modal=False)
  2668.  
  2669. kmi = km.keymap_items.new('nla.click_select', 'SELECTMOUSE', 'PRESS')
  2670. kmi_props_setattr(kmi.properties, 'extend', False)
  2671. kmi = km.keymap_items.new('nla.click_select', 'SELECTMOUSE', 'PRESS', shift=True)
  2672. kmi_props_setattr(kmi.properties, 'extend', True)
  2673. kmi = km.keymap_items.new('nla.select_leftright', 'SELECTMOUSE', 'PRESS', ctrl=True)
  2674. kmi_props_setattr(kmi.properties, 'mode', 'CHECK')
  2675. kmi_props_setattr(kmi.properties, 'extend', False)
  2676. kmi = km.keymap_items.new('nla.select_leftright', 'SELECTMOUSE', 'PRESS', shift=True, ctrl=True)
  2677. kmi_props_setattr(kmi.properties, 'mode', 'CHECK')
  2678. kmi_props_setattr(kmi.properties, 'extend', True)
  2679. kmi = km.keymap_items.new('nla.select_leftright', 'SLASH', 'PRESS')
  2680. kmi_props_setattr(kmi.properties, 'mode', 'LEFT')
  2681. kmi_props_setattr(kmi.properties, 'extend', False)
  2682. kmi = km.keymap_items.new('nla.select_leftright', 'EQUAL', 'PRESS')
  2683. kmi_props_setattr(kmi.properties, 'mode', 'RIGHT')
  2684. kmi_props_setattr(kmi.properties, 'extend', False)
  2685. kmi = km.keymap_items.new('nla.select_all_toggle', 'A', 'PRESS')
  2686. kmi_props_setattr(kmi.properties, 'invert', False)
  2687. kmi = km.keymap_items.new('nla.select_all_toggle', 'C', 'PRESS', ctrl=True)
  2688. kmi_props_setattr(kmi.properties, 'invert', True)
  2689. kmi = km.keymap_items.new('nla.select_border', 'X', 'PRESS')
  2690. kmi_props_setattr(kmi.properties, 'axis_range', False)
  2691. kmi = km.keymap_items.new('nla.select_border', 'X', 'PRESS', alt=True)
  2692. kmi_props_setattr(kmi.properties, 'axis_range', True)
  2693. kmi = km.keymap_items.new('nla.view_all', 'BACK_SLASH', 'PRESS')
  2694. kmi = km.keymap_items.new('nla.view_all', 'NDOF_BUTTON_FIT', 'PRESS')
  2695. kmi = km.keymap_items.new('nla.view_selected', 'V', 'PRESS', shift=True)
  2696. kmi = km.keymap_items.new('nla.actionclip_add', 'A', 'PRESS', shift=True)
  2697. kmi = km.keymap_items.new('nla.transition_add', 'Y', 'PRESS', shift=True)
  2698. kmi = km.keymap_items.new('nla.soundclip_add', 'T', 'PRESS', shift=True)
  2699. kmi = km.keymap_items.new('nla.meta_add', 'I', 'PRESS', shift=True)
  2700. kmi = km.keymap_items.new('nla.meta_remove', 'I', 'PRESS', alt=True)
  2701. kmi = km.keymap_items.new('nla.duplicate', 'E', 'PRESS', shift=True)
  2702. kmi = km.keymap_items.new('nla.delete', 'BACK_SPACE', 'PRESS')
  2703. kmi = km.keymap_items.new('nla.delete', 'BACK_SPACE', 'PRESS')
  2704. kmi.active = False
  2705. kmi = km.keymap_items.new('nla.split', 'F', 'PRESS')
  2706. kmi = km.keymap_items.new('nla.mute_toggle', 'D', 'PRESS')
  2707. kmi = km.keymap_items.new('nla.swap', 'U', 'PRESS', alt=True)
  2708. kmi = km.keymap_items.new('nla.move_up', 'PAGE_UP', 'PRESS')
  2709. kmi = km.keymap_items.new('nla.move_down', 'PAGE_DOWN', 'PRESS')
  2710. kmi = km.keymap_items.new('nla.apply_scale', 'A', 'PRESS', ctrl=True)
  2711. kmi = km.keymap_items.new('nla.clear_scale', 'O', 'PRESS', ctrl=True)
  2712. kmi = km.keymap_items.new('nla.snap', 'O', 'PRESS', shift=True)
  2713. kmi = km.keymap_items.new('nla.fmodifier_add', 'M', 'PRESS', shift=True, ctrl=True)
  2714. kmi = km.keymap_items.new('transform.transform', 'I', 'PRESS')
  2715. kmi_props_setattr(kmi.properties, 'mode', 'TRANSLATION')
  2716. kmi = km.keymap_items.new('transform.transform', 'EVT_TWEAK_S', 'ANY')
  2717. kmi_props_setattr(kmi.properties, 'mode', 'TRANSLATION')
  2718. kmi = km.keymap_items.new('transform.transform', 'PERIOD', 'PRESS')
  2719. kmi_props_setattr(kmi.properties, 'mode', 'TIME_EXTEND')
  2720. kmi = km.keymap_items.new('transform.transform', 'O', 'PRESS')
  2721. kmi_props_setattr(kmi.properties, 'mode', 'TIME_SCALE')
  2722. kmi = km.keymap_items.new('marker.add', 'M', 'PRESS')
  2723. kmi = km.keymap_items.new('marker.rename', 'M', 'PRESS', ctrl=True)
  2724.  
  2725. # Map Text Generic
  2726. km = kc.keymaps.new('Text Generic', space_type='TEXT_EDITOR', region_type='WINDOW', modal=False)
  2727.  
  2728. kmi = km.keymap_items.new('text.start_find', 'F', 'PRESS', oskey=True)
  2729. kmi = km.keymap_items.new('text.jump', 'H', 'PRESS', ctrl=True)
  2730. kmi = km.keymap_items.new('text.find', 'I', 'PRESS', ctrl=True)
  2731. kmi = km.keymap_items.new('text.replace', 'D', 'PRESS', ctrl=True)
  2732. kmi = km.keymap_items.new('text.properties', 'Y', 'PRESS', ctrl=True)
  2733. kmi = km.keymap_items.new('text.start_find', 'F', 'PRESS', ctrl=True)
  2734. kmi.active = False
  2735.  
  2736. # Map Text
  2737. km = kc.keymaps.new('Text', space_type='TEXT_EDITOR', region_type='WINDOW', modal=False)
  2738.  
  2739. kmi = km.keymap_items.new('text.move', 'LEFT_ARROW', 'PRESS', oskey=True)
  2740. kmi_props_setattr(kmi.properties, 'type', 'LINE_BEGIN')
  2741. kmi = km.keymap_items.new('text.move', 'RIGHT_ARROW', 'PRESS', oskey=True)
  2742. kmi_props_setattr(kmi.properties, 'type', 'LINE_END')
  2743. kmi = km.keymap_items.new('text.move', 'LEFT_ARROW', 'PRESS', alt=True)
  2744. kmi_props_setattr(kmi.properties, 'type', 'PREVIOUS_WORD')
  2745. kmi = km.keymap_items.new('text.move', 'RIGHT_ARROW', 'PRESS', alt=True)
  2746. kmi_props_setattr(kmi.properties, 'type', 'NEXT_WORD')
  2747. kmi = km.keymap_items.new('text.move', 'UP_ARROW', 'PRESS', oskey=True)
  2748. kmi_props_setattr(kmi.properties, 'type', 'FILE_TOP')
  2749. kmi = km.keymap_items.new('text.move', 'DOWN_ARROW', 'PRESS', oskey=True)
  2750. kmi_props_setattr(kmi.properties, 'type', 'FILE_BOTTOM')
  2751. kmi = km.keymap_items.new('text.move_select', 'LEFT_ARROW', 'PRESS', shift=True, oskey=True)
  2752. kmi_props_setattr(kmi.properties, 'type', 'LINE_BEGIN')
  2753. kmi = km.keymap_items.new('text.move_select', 'RIGHT_ARROW', 'PRESS', shift=True, oskey=True)
  2754. kmi_props_setattr(kmi.properties, 'type', 'LINE_END')
  2755. kmi = km.keymap_items.new('text.move_select', 'LEFT_ARROW', 'PRESS', shift=True, alt=True)
  2756. kmi_props_setattr(kmi.properties, 'type', 'PREVIOUS_WORD')
  2757. kmi = km.keymap_items.new('text.move_select', 'RIGHT_ARROW', 'PRESS', shift=True, alt=True)
  2758. kmi_props_setattr(kmi.properties, 'type', 'NEXT_WORD')
  2759. kmi = km.keymap_items.new('text.move_select', 'UP_ARROW', 'PRESS', shift=True, oskey=True)
  2760. kmi_props_setattr(kmi.properties, 'type', 'FILE_TOP')
  2761. kmi = km.keymap_items.new('text.move_select', 'DOWN_ARROW', 'PRESS', shift=True, oskey=True)
  2762. kmi_props_setattr(kmi.properties, 'type', 'FILE_BOTTOM')
  2763. kmi = km.keymap_items.new('text.delete', 'BACK_SPACE', 'PRESS', alt=True)
  2764. kmi_props_setattr(kmi.properties, 'type', 'PREVIOUS_WORD')
  2765. kmi = km.keymap_items.new('text.save', 'S', 'PRESS', alt=True, oskey=True)
  2766. kmi = km.keymap_items.new('text.save_as', 'S', 'PRESS', shift=True, alt=True, oskey=True)
  2767. kmi = km.keymap_items.new('text.cut', 'X', 'PRESS', oskey=True)
  2768. kmi = km.keymap_items.new('text.copy', 'C', 'PRESS', oskey=True)
  2769. kmi = km.keymap_items.new('text.paste', 'V', 'PRESS', oskey=True)
  2770. kmi = km.keymap_items.new('text.find_set_selected', 'E', 'PRESS', oskey=True)
  2771. kmi = km.keymap_items.new('text.select_all', 'A', 'PRESS', oskey=True)
  2772. kmi = km.keymap_items.new('text.select_line', 'A', 'PRESS', shift=True, oskey=True)
  2773. kmi = km.keymap_items.new('wm.context_cycle_int', 'WHEELUPMOUSE', 'PRESS', ctrl=True)
  2774. kmi_props_setattr(kmi.properties, 'data_path', 'space_data.font_size')
  2775. kmi_props_setattr(kmi.properties, 'reverse', False)
  2776. kmi = km.keymap_items.new('wm.context_cycle_int', 'WHEELDOWNMOUSE', 'PRESS', ctrl=True)
  2777. kmi_props_setattr(kmi.properties, 'data_path', 'space_data.font_size')
  2778. kmi_props_setattr(kmi.properties, 'reverse', True)
  2779. kmi = km.keymap_items.new('wm.context_cycle_int', 'RIGHT_BRACKET', 'PRESS', ctrl=True)
  2780. kmi_props_setattr(kmi.properties, 'data_path', 'space_data.font_size')
  2781. kmi_props_setattr(kmi.properties, 'reverse', False)
  2782. kmi = km.keymap_items.new('wm.context_cycle_int', 'LEFT_BRACKET', 'PRESS', ctrl=True)
  2783. kmi_props_setattr(kmi.properties, 'data_path', 'space_data.font_size')
  2784. kmi_props_setattr(kmi.properties, 'reverse', True)
  2785. kmi = km.keymap_items.new('text.new', 'B', 'PRESS', ctrl=True)
  2786. kmi = km.keymap_items.new('text.open', 'R', 'PRESS', alt=True)
  2787. kmi = km.keymap_items.new('text.reload', 'P', 'PRESS', alt=True)
  2788. kmi = km.keymap_items.new('text.save', 'O', 'PRESS', alt=True)
  2789. kmi = km.keymap_items.new('text.save_as', 'O', 'PRESS', shift=True, ctrl=True, alt=True)
  2790. kmi = km.keymap_items.new('text.run_script', 'L', 'PRESS', alt=True)
  2791. kmi = km.keymap_items.new('text.cut', 'X', 'PRESS', ctrl=True)
  2792. kmi.active = False
  2793. kmi = km.keymap_items.new('text.copy', 'C', 'PRESS', ctrl=True)
  2794. kmi.active = False
  2795. kmi = km.keymap_items.new('text.paste', 'V', 'PRESS', ctrl=True)
  2796. kmi.active = False
  2797. kmi = km.keymap_items.new('text.cut', 'DEL', 'PRESS', shift=True)
  2798. kmi.active = False
  2799. kmi = km.keymap_items.new('text.copy', 'INSERT', 'PRESS', ctrl=True)
  2800. kmi.active = False
  2801. kmi = km.keymap_items.new('text.paste', 'INSERT', 'PRESS', shift=True)
  2802. kmi.active = False
  2803. kmi = km.keymap_items.new('text.duplicate_line', 'E', 'PRESS', ctrl=True)
  2804. kmi = km.keymap_items.new('text.to_3d_object', 'M', 'PRESS', alt=True)
  2805. kmi_props_setattr(kmi.properties, 'split_lines', False)
  2806. kmi = km.keymap_items.new('text.to_3d_object', 'M', 'PRESS', ctrl=True)
  2807. kmi_props_setattr(kmi.properties, 'split_lines', True)
  2808. kmi = km.keymap_items.new('text.select_all', 'A', 'PRESS', ctrl=True)
  2809. kmi = km.keymap_items.new('text.select_line', 'A', 'PRESS', shift=True, ctrl=True)
  2810. kmi = km.keymap_items.new('text.select_word', 'LEFTMOUSE', 'DOUBLE_CLICK')
  2811. kmi = km.keymap_items.new('text.move_lines', 'UP_ARROW', 'PRESS', shift=True, ctrl=True)
  2812. kmi_props_setattr(kmi.properties, 'direction', 'UP')
  2813. kmi = km.keymap_items.new('text.move_lines', 'DOWN_ARROW', 'PRESS', shift=True, ctrl=True)
  2814. kmi_props_setattr(kmi.properties, 'direction', 'DOWN')
  2815. kmi = km.keymap_items.new('text.indent', 'TAB', 'PRESS')
  2816. kmi = km.keymap_items.new('text.unindent', 'TAB', 'PRESS', shift=True)
  2817. kmi = km.keymap_items.new('text.uncomment', 'E', 'PRESS', shift=True, ctrl=True)
  2818. kmi = km.keymap_items.new('text.move', 'BACK_SLASH', 'PRESS')
  2819. kmi_props_setattr(kmi.properties, 'type', 'LINE_BEGIN')
  2820. kmi.active = False
  2821. kmi = km.keymap_items.new('text.move', 'END', 'PRESS')
  2822. kmi_props_setattr(kmi.properties, 'type', 'LINE_END')
  2823. kmi.active = False
  2824. kmi = km.keymap_items.new('text.move', 'PERIOD', 'PRESS', ctrl=True)
  2825. kmi_props_setattr(kmi.properties, 'type', 'LINE_END')
  2826. kmi = km.keymap_items.new('text.move', 'PERIOD', 'PRESS', shift=True, ctrl=True)
  2827. kmi_props_setattr(kmi.properties, 'type', 'LINE_END')
  2828. kmi = km.keymap_items.new('text.move', 'LEFT_ARROW', 'PRESS')
  2829. kmi_props_setattr(kmi.properties, 'type', 'PREVIOUS_CHARACTER')
  2830. kmi = km.keymap_items.new('text.move', 'RIGHT_ARROW', 'PRESS')
  2831. kmi_props_setattr(kmi.properties, 'type', 'NEXT_CHARACTER')
  2832. kmi = km.keymap_items.new('text.move', 'LEFT_ARROW', 'PRESS', ctrl=True)
  2833. kmi_props_setattr(kmi.properties, 'type', 'PREVIOUS_WORD')
  2834. kmi = km.keymap_items.new('text.move', 'RIGHT_ARROW', 'PRESS', ctrl=True)
  2835. kmi_props_setattr(kmi.properties, 'type', 'NEXT_WORD')
  2836. kmi = km.keymap_items.new('text.move', 'UP_ARROW', 'PRESS')
  2837. kmi_props_setattr(kmi.properties, 'type', 'PREVIOUS_LINE')
  2838. kmi = km.keymap_items.new('text.move', 'DOWN_ARROW', 'PRESS')
  2839. kmi_props_setattr(kmi.properties, 'type', 'NEXT_LINE')
  2840. kmi = km.keymap_items.new('text.move', 'PAGE_UP', 'PRESS')
  2841. kmi_props_setattr(kmi.properties, 'type', 'PREVIOUS_PAGE')
  2842. kmi = km.keymap_items.new('text.move', 'PAGE_DOWN', 'PRESS')
  2843. kmi_props_setattr(kmi.properties, 'type', 'NEXT_PAGE')
  2844. kmi = km.keymap_items.new('text.move', 'BACK_SLASH', 'PRESS', ctrl=True)
  2845. kmi_props_setattr(kmi.properties, 'type', 'FILE_TOP')
  2846. kmi = km.keymap_items.new('text.move', 'MINUS', 'PRESS', ctrl=True)
  2847. kmi_props_setattr(kmi.properties, 'type', 'FILE_BOTTOM')
  2848. kmi = km.keymap_items.new('text.move_select', 'BACK_SLASH', 'PRESS', shift=True, ctrl=True)
  2849. kmi_props_setattr(kmi.properties, 'type', 'LINE_BEGIN')
  2850. kmi = km.keymap_items.new('text.move_select', 'MINUS', 'PRESS', shift=True, ctrl=True)
  2851. kmi_props_setattr(kmi.properties, 'type', 'LINE_END')
  2852. kmi = km.keymap_items.new('text.move_select', 'LEFT_ARROW', 'PRESS', shift=True)
  2853. kmi_props_setattr(kmi.properties, 'type', 'PREVIOUS_CHARACTER')
  2854. kmi = km.keymap_items.new('text.move_select', 'RIGHT_ARROW', 'PRESS', shift=True)
  2855. kmi_props_setattr(kmi.properties, 'type', 'NEXT_CHARACTER')
  2856. kmi = km.keymap_items.new('text.move_select', 'LEFT_ARROW', 'PRESS', shift=True, ctrl=True)
  2857. kmi_props_setattr(kmi.properties, 'type', 'PREVIOUS_WORD')
  2858. kmi = km.keymap_items.new('text.move_select', 'RIGHT_ARROW', 'PRESS', shift=True, ctrl=True)
  2859. kmi_props_setattr(kmi.properties, 'type', 'NEXT_WORD')
  2860. kmi = km.keymap_items.new('text.move_select', 'UP_ARROW', 'PRESS', shift=True)
  2861. kmi_props_setattr(kmi.properties, 'type', 'PREVIOUS_LINE')
  2862. kmi = km.keymap_items.new('text.move_select', 'DOWN_ARROW', 'PRESS', shift=True)
  2863. kmi_props_setattr(kmi.properties, 'type', 'NEXT_LINE')
  2864. kmi = km.keymap_items.new('text.move_select', 'PAGE_UP', 'PRESS', shift=True)
  2865. kmi_props_setattr(kmi.properties, 'type', 'PREVIOUS_PAGE')
  2866. kmi = km.keymap_items.new('text.move_select', 'PAGE_DOWN', 'PRESS', shift=True)
  2867. kmi_props_setattr(kmi.properties, 'type', 'NEXT_PAGE')
  2868. kmi = km.keymap_items.new('text.move_select', 'BACK_SLASH', 'PRESS', shift=True, ctrl=True, alt=True)
  2869. kmi_props_setattr(kmi.properties, 'type', 'FILE_TOP')
  2870. kmi = km.keymap_items.new('text.move_select', 'MINUS', 'PRESS', shift=True, ctrl=True, alt=True)
  2871. kmi_props_setattr(kmi.properties, 'type', 'FILE_BOTTOM')
  2872. kmi = km.keymap_items.new('text.delete', 'DEL', 'PRESS')
  2873. kmi_props_setattr(kmi.properties, 'type', 'NEXT_CHARACTER')
  2874. kmi.active = False
  2875. kmi = km.keymap_items.new('text.delete', 'BACK_SPACE', 'PRESS')
  2876. kmi_props_setattr(kmi.properties, 'type', 'PREVIOUS_CHARACTER')
  2877. kmi = km.keymap_items.new('text.delete', 'BACK_SPACE', 'PRESS', shift=True)
  2878. kmi_props_setattr(kmi.properties, 'type', 'PREVIOUS_CHARACTER')
  2879. kmi = km.keymap_items.new('text.delete', 'DEL', 'PRESS', ctrl=True)
  2880. kmi_props_setattr(kmi.properties, 'type', 'NEXT_WORD')
  2881. kmi.active = False
  2882. kmi = km.keymap_items.new('text.delete', 'BACK_SPACE', 'PRESS', ctrl=True)
  2883. kmi_props_setattr(kmi.properties, 'type', 'PREVIOUS_WORD')
  2884. kmi = km.keymap_items.new('text.overwrite_toggle', 'INSERT', 'PRESS')
  2885. kmi.active = False
  2886. kmi = km.keymap_items.new('text.scroll_bar', 'LEFTMOUSE', 'PRESS')
  2887. kmi = km.keymap_items.new('text.scroll_bar', 'MIDDLEMOUSE', 'PRESS')
  2888. kmi = km.keymap_items.new('text.scroll', 'MIDDLEMOUSE', 'PRESS')
  2889. kmi = km.keymap_items.new('text.scroll', 'TRACKPADPAN', 'ANY')
  2890. kmi = km.keymap_items.new('text.selection_set', 'EVT_TWEAK_L', 'ANY')
  2891. kmi = km.keymap_items.new('text.cursor_set', 'LEFTMOUSE', 'PRESS')
  2892. kmi = km.keymap_items.new('text.selection_set', 'LEFTMOUSE', 'PRESS', shift=True)
  2893. kmi_props_setattr(kmi.properties, 'select', True)
  2894. kmi = km.keymap_items.new('text.scroll', 'WHEELUPMOUSE', 'PRESS')
  2895. kmi_props_setattr(kmi.properties, 'lines', -1)
  2896. kmi = km.keymap_items.new('text.scroll', 'WHEELDOWNMOUSE', 'PRESS')
  2897. kmi_props_setattr(kmi.properties, 'lines', 1)
  2898. kmi = km.keymap_items.new('text.line_break', 'RET', 'PRESS')
  2899. kmi = km.keymap_items.new('text.line_break', 'NUMPAD_ENTER', 'PRESS')
  2900. kmi = km.keymap_items.new('wm.call_menu', 'RIGHTMOUSE', 'PRESS', any=True)
  2901. kmi_props_setattr(kmi.properties, 'name', 'TEXT_MT_toolbox')
  2902. kmi = km.keymap_items.new('text.autocomplete', 'SPACE', 'PRESS', ctrl=True)
  2903. kmi = km.keymap_items.new('text.line_number', 'TEXTINPUT', 'ANY', any=True)
  2904. kmi = km.keymap_items.new('text.insert', 'TEXTINPUT', 'ANY', any=True)
  2905.  
  2906. # Map SequencerCommon
  2907. km = kc.keymaps.new('SequencerCommon', space_type='SEQUENCE_EDITOR', region_type='WINDOW', modal=False)
  2908.  
  2909. kmi = km.keymap_items.new('sequencer.properties', 'B', 'PRESS')
  2910. kmi = km.keymap_items.new('wm.context_toggle', 'R', 'PRESS', shift=True)
  2911. kmi_props_setattr(kmi.properties, 'data_path', 'scene.sequence_editor.show_overlay')
  2912. kmi = km.keymap_items.new('sequencer.view_toggle', 'TAB', 'PRESS', ctrl=True)
  2913.  
  2914. # Map Sequencer
  2915. km = kc.keymaps.new('Sequencer', space_type='SEQUENCE_EDITOR', region_type='WINDOW', modal=False)
  2916.  
  2917. kmi = km.keymap_items.new('sequencer.select_all', 'A', 'PRESS')
  2918. kmi_props_setattr(kmi.properties, 'action', 'TOGGLE')
  2919. kmi = km.keymap_items.new('sequencer.select_all', 'C', 'PRESS', ctrl=True)
  2920. kmi_props_setattr(kmi.properties, 'action', 'INVERT')
  2921. kmi = km.keymap_items.new('sequencer.cut', 'T', 'PRESS')
  2922. kmi_props_setattr(kmi.properties, 'type', 'SOFT')
  2923. kmi = km.keymap_items.new('sequencer.cut', 'T', 'PRESS', shift=True)
  2924. kmi_props_setattr(kmi.properties, 'type', 'HARD')
  2925. kmi = km.keymap_items.new('sequencer.mute', 'D', 'PRESS')
  2926. kmi_props_setattr(kmi.properties, 'unselected', False)
  2927. kmi = km.keymap_items.new('sequencer.mute', 'D', 'PRESS', shift=True)
  2928. kmi_props_setattr(kmi.properties, 'unselected', True)
  2929. kmi = km.keymap_items.new('sequencer.unmute', 'D', 'PRESS', alt=True)
  2930. kmi_props_setattr(kmi.properties, 'unselected', False)
  2931. kmi = km.keymap_items.new('sequencer.unmute', 'D', 'PRESS', shift=True, alt=True)
  2932. kmi_props_setattr(kmi.properties, 'unselected', True)
  2933. kmi = km.keymap_items.new('sequencer.lock', 'N', 'PRESS', shift=True)
  2934. kmi = km.keymap_items.new('sequencer.unlock', 'N', 'PRESS', shift=True, alt=True)
  2935. kmi = km.keymap_items.new('sequencer.reassign_inputs', 'P', 'PRESS')
  2936. kmi = km.keymap_items.new('sequencer.reload', 'P', 'PRESS', alt=True)
  2937. kmi = km.keymap_items.new('sequencer.reload', 'P', 'PRESS', shift=True, alt=True)
  2938. kmi_props_setattr(kmi.properties, 'adjust_length', True)
  2939. kmi = km.keymap_items.new('sequencer.offset_clear', 'R', 'PRESS', alt=True)
  2940. kmi = km.keymap_items.new('sequencer.duplicate_move', 'E', 'PRESS', shift=True)
  2941. kmi = km.keymap_items.new('sequencer.delete', 'BACK_SPACE', 'PRESS')
  2942. kmi = km.keymap_items.new('sequencer.delete', 'BACK_SPACE', 'PRESS')
  2943. kmi.active = False
  2944. kmi = km.keymap_items.new('sequencer.copy', 'C', 'PRESS', ctrl=True)
  2945. kmi.active = False
  2946. kmi = km.keymap_items.new('sequencer.paste', 'V', 'PRESS', ctrl=True)
  2947. kmi.active = False
  2948. kmi = km.keymap_items.new('sequencer.copy', 'C', 'PRESS', oskey=True)
  2949. kmi = km.keymap_items.new('sequencer.paste', 'V', 'PRESS', oskey=True)
  2950. kmi = km.keymap_items.new('sequencer.images_separate', 'F', 'PRESS')
  2951. kmi = km.keymap_items.new('sequencer.meta_toggle', 'TAB', 'PRESS')
  2952. kmi = km.keymap_items.new('sequencer.meta_make', 'I', 'PRESS', ctrl=True)
  2953. kmi = km.keymap_items.new('sequencer.meta_separate', 'I', 'PRESS', alt=True)
  2954. kmi = km.keymap_items.new('sequencer.view_all', 'BACK_SLASH', 'PRESS')
  2955. kmi = km.keymap_items.new('sequencer.view_all', 'NDOF_BUTTON_FIT', 'PRESS')
  2956. kmi = km.keymap_items.new('sequencer.view_selected', 'V', 'PRESS', shift=True)
  2957. kmi = km.keymap_items.new('sequencer.strip_jump', 'PAGE_UP', 'PRESS')
  2958. kmi_props_setattr(kmi.properties, 'next', True)
  2959. kmi_props_setattr(kmi.properties, 'center', False)
  2960. kmi = km.keymap_items.new('sequencer.strip_jump', 'PAGE_DOWN', 'PRESS')
  2961. kmi_props_setattr(kmi.properties, 'next', False)
  2962. kmi_props_setattr(kmi.properties, 'center', False)
  2963. kmi = km.keymap_items.new('sequencer.strip_jump', 'PAGE_UP', 'PRESS', alt=True)
  2964. kmi_props_setattr(kmi.properties, 'next', True)
  2965. kmi_props_setattr(kmi.properties, 'center', True)
  2966. kmi = km.keymap_items.new('sequencer.strip_jump', 'PAGE_DOWN', 'PRESS', alt=True)
  2967. kmi_props_setattr(kmi.properties, 'next', False)
  2968. kmi_props_setattr(kmi.properties, 'center', True)
  2969. kmi = km.keymap_items.new('sequencer.swap', 'LEFT_ARROW', 'PRESS', alt=True)
  2970. kmi_props_setattr(kmi.properties, 'side', 'LEFT')
  2971. kmi = km.keymap_items.new('sequencer.swap', 'RIGHT_ARROW', 'PRESS', alt=True)
  2972. kmi_props_setattr(kmi.properties, 'side', 'RIGHT'</