[Bf-extensions-cvs] SVN commit: /data/svn/bf-extensions [4590] contrib/py/scripts/addons/ presets/keyconfig/blender_2012_experimental.py: Finally started working on the new keymap again.

Nathan Vegdahl cessen at cessen.com
Sun Jun 23 20:13:00 CEST 2013


Revision: 4590
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-extensions&revision=4590
Author:   cessen
Date:     2013-06-23 18:13:00 +0000 (Sun, 23 Jun 2013)
Log Message:
-----------
Finally started working on the new keymap again.

- Tweaked knife tool: right-click now completes rather than cancels.
  This is consistent with e.g. loop cut, where right click only
  cancels the next step, not the entire operation.
- Added sculpt mode keymap.  Didn't see much that needed to change
  here.  Only minor tweaks from the current keymap.
- Added keymap for the text editor.  Right now it's pretty much identical
  to the old keymap.  Need to consider if it needs changes or not.  But
  for now this will work fine.
- Added keymap for the console.  Identical to old keymap.  May need
  minor tweaks, but is quite good as-is.
- Added keymaps for frame stepping, timeline scrubbing, and managing
  markers.

The mesh-edit and sculpt mode keymaps should be essentially "complete" now.
Which isn't to say further changes can't/won't be made, but rather that
I think people can start using them for serious work now.  A tutorial/
overview may be in order.

Modified Paths:
--------------
    contrib/py/scripts/addons/presets/keyconfig/blender_2012_experimental.py

Modified: contrib/py/scripts/addons/presets/keyconfig/blender_2012_experimental.py
===================================================================
--- contrib/py/scripts/addons/presets/keyconfig/blender_2012_experimental.py	2013-06-23 01:04:39 UTC (rev 4589)
+++ contrib/py/scripts/addons/presets/keyconfig/blender_2012_experimental.py	2013-06-23 18:13:00 UTC (rev 4590)
@@ -1359,7 +1359,276 @@
     kmi = km.keymap_items.new('wm.call_menu', 'G', 'CLICK', ctrl=True)
     kmi.properties.name = 'VIEW3D_MT_vertex_group'
 
+def MapAdd_KnifeToolModal(kc):
+    # Map Knife Tool Modal Map
+    km = kc.keymaps.new('Knife Tool Modal Map', space_type='EMPTY', region_type='WINDOW', modal=True)
 
+    # Add cut
+    kmi = km.keymap_items.new_modal('ADD_CUT', 'LEFTMOUSE', 'PRESS', any=True)
+    
+    # Finish
+    kmi = km.keymap_items.new_modal('CONFIRM', 'RIGHTMOUSE', 'PRESS', any=True)
+    kmi = km.keymap_items.new_modal('CONFIRM', 'RET', 'PRESS', any=True)
+    kmi = km.keymap_items.new_modal('CONFIRM', 'NUMPAD_ENTER', 'PRESS', any=True)
+    #kmi = km.keymap_items.new_modal('CONFIRM', 'SPACE', 'PRESS', any=True)
+    
+    # Cancel
+    kmi = km.keymap_items.new_modal('CANCEL', 'ESC', 'PRESS', any=True)
+    
+    
+    kmi = km.keymap_items.new_modal('NEW_CUT', 'E', 'PRESS')
+    
+    # Snapping
+    kmi = km.keymap_items.new_modal('SNAP_MIDPOINTS_ON', 'LEFT_CTRL', 'PRESS', any=True)
+    kmi = km.keymap_items.new_modal('SNAP_MIDPOINTS_OFF', 'LEFT_CTRL', 'RELEASE', any=True)
+    kmi = km.keymap_items.new_modal('SNAP_MIDPOINTS_ON', 'RIGHT_CTRL', 'PRESS', any=True)
+    kmi = km.keymap_items.new_modal('SNAP_MIDPOINTS_OFF', 'RIGHT_CTRL', 'RELEASE', any=True)
+    kmi = km.keymap_items.new_modal('ANGLE_SNAP_TOGGLE', 'C', 'PRESS')
+    
+    # Ignore snapping
+    kmi = km.keymap_items.new_modal('IGNORE_SNAP_ON', 'LEFT_SHIFT', 'PRESS', any=True)
+    kmi = km.keymap_items.new_modal('IGNORE_SNAP_OFF', 'LEFT_SHIFT', 'RELEASE', any=True)
+    kmi = km.keymap_items.new_modal('IGNORE_SNAP_ON', 'RIGHT_SHIFT', 'PRESS', any=True)
+    kmi = km.keymap_items.new_modal('IGNORE_SNAP_OFF', 'RIGHT_SHIFT', 'RELEASE', any=True)
+    
+    # Cut through toggle
+    kmi = km.keymap_items.new_modal('CUT_THROUGH_TOGGLE', 'Z', 'PRESS')
+    
+
+def MapAdd_Sculpt(kc):
+    # Map Sculpt
+    km = kc.keymaps.new('Sculpt', space_type='EMPTY', region_type='WINDOW', modal=False)
+
+    # Sculpt strokes
+    # TODO: alt for MASK(?)
+    kmi = km.keymap_items.new('sculpt.brush_stroke', 'LEFTMOUSE', 'PRESS')
+    kmi.properties.mode = 'NORMAL'
+    kmi = km.keymap_items.new('sculpt.brush_stroke', 'LEFTMOUSE', 'PRESS', ctrl=True)
+    kmi.properties.mode = 'INVERT'
+    kmi = km.keymap_items.new('sculpt.brush_stroke', 'LEFTMOUSE', 'PRESS', shift=True)
+    kmi.properties.mode = 'SMOOTH'
+    #kmi = km.keymap_items.new('sculpt.brush_stroke', 'LEFTMOUSE', 'PRESS', alt=True)
+    #kmi.properties.mode = 'MASK'
+    #kmi = km.keymap_items.new('sculpt.brush_stroke', 'LEFTMOUSE', 'PRESS', alt=True, ctrl=True)
+    #kmi.properties.mode = 'MASK_INVERT'
+    #kmi = km.keymap_items.new('sculpt.brush_stroke', 'LEFTMOUSE', 'PRESS', alt=True, shift=True)
+    #kmi.properties.mode = 'MASK_SMOOTH'
+    
+    # Change stroke methods
+    kmi = km.keymap_items.new('wm.context_menu_enum', 'A', 'PRESS')
+    kmi.properties.data_path = 'tool_settings.sculpt.brush.sculpt_stroke_method'
+    kmi = km.keymap_items.new('wm.context_toggle', 'S', 'PRESS', shift=True)
+    kmi.properties.data_path = 'tool_settings.sculpt.brush.use_smooth_stroke'
+    kmi = km.keymap_items.new('wm.context_menu_enum', 'R', 'PRESS')
+    kmi.properties.data_path = 'tool_settings.sculpt.brush.texture_angle_source_random'
+    
+    # Brush scale
+    kmi = km.keymap_items.new('brush.scale_size', 'LEFT_BRACKET', 'PRESS')
+    kmi.properties.scalar = 0.9
+    kmi = km.keymap_items.new('brush.scale_size', 'RIGHT_BRACKET', 'PRESS')
+    kmi.properties.scalar = 1.1111111111
+    kmi = km.keymap_items.new('wm.radial_control', 'F', 'PRESS')
+    kmi.properties.data_path_primary = 'tool_settings.sculpt.brush.size'
+    kmi.properties.data_path_secondary = 'tool_settings.unified_paint_settings.size'
+    kmi.properties.use_secondary = 'tool_settings.unified_paint_settings.use_unified_size'
+    kmi.properties.rotation_path = 'tool_settings.sculpt.brush.texture_slot.angle'
+    kmi.properties.color_path = 'tool_settings.sculpt.brush.cursor_color_add'
+    kmi.properties.fill_color_path = ''
+    kmi.properties.zoom_path = ''
+    kmi.properties.image_id = 'tool_settings.sculpt.brush'
+    
+    # Brush strength
+    kmi = km.keymap_items.new('wm.radial_control', 'F', 'PRESS', shift=True)
+    kmi.properties.data_path_primary = 'tool_settings.sculpt.brush.strength'
+    kmi.properties.data_path_secondary = 'tool_settings.unified_paint_settings.strength'
+    kmi.properties.use_secondary = 'tool_settings.unified_paint_settings.use_unified_strength'
+    kmi.properties.rotation_path = 'tool_settings.sculpt.brush.texture_slot.angle'
+    kmi.properties.color_path = 'tool_settings.sculpt.brush.cursor_color_add'
+    kmi.properties.fill_color_path = ''
+    kmi.properties.zoom_path = ''
+    kmi.properties.image_id = 'tool_settings.sculpt.brush'
+    
+    # Brush angle
+    kmi = km.keymap_items.new('wm.radial_control', 'F', 'PRESS', ctrl=True)
+    kmi.properties.data_path_primary = 'tool_settings.sculpt.brush.texture_slot.angle'
+    kmi.properties.data_path_secondary = ''
+    kmi.properties.use_secondary = ''
+    kmi.properties.rotation_path = 'tool_settings.sculpt.brush.texture_slot.angle'
+    kmi.properties.color_path = 'tool_settings.sculpt.brush.cursor_color_add'
+    kmi.properties.fill_color_path = ''
+    kmi.properties.zoom_path = ''
+    kmi.properties.image_id = 'tool_settings.sculpt.brush'
+    
+    # Dyntopo detail size
+    kmi = km.keymap_items.new('wm.radial_control', 'D', 'PRESS', shift=True)
+    kmi.properties.data_path_primary = 'tool_settings.sculpt.detail_size'
+    kmi.properties.data_path_secondary = ''
+    kmi.properties.use_secondary = ''
+    kmi.properties.rotation_path = 'tool_settings.sculpt.brush.texture_slot.angle'
+    kmi.properties.color_path = 'tool_settings.sculpt.brush.cursor_color_add'
+    kmi.properties.fill_color_path = ''
+    kmi.properties.zoom_path = ''
+    kmi.properties.image_id = 'tool_settings.sculpt.brush'
+    
+    # Dynamic topology
+    kmi = km.keymap_items.new('sculpt.dynamic_topology_toggle', 'D', 'PRESS', ctrl=True)
+    
+    # Hiding
+    kmi = km.keymap_items.new('paint.hide_show', 'H', 'PRESS')
+    kmi.properties.action = 'HIDE'
+    kmi.properties.area = 'INSIDE'
+    kmi = km.keymap_items.new('paint.hide_show', 'H', 'PRESS', shift=True)
+    kmi.properties.action = 'SHOW'
+    kmi.properties.area = 'INSIDE'
+    kmi = km.keymap_items.new('paint.hide_show', 'H', 'PRESS', alt=True)
+    kmi.properties.action = 'SHOW'
+    kmi.properties.area = 'ALL'
+    
+    # Masking
+    # TODO: mask menu on alt-m
+    kmi = km.keymap_items.new('paint.mask_flood_fill', 'M', 'PRESS', alt=True)
+    kmi.properties.mode = 'VALUE'
+    kmi.properties.value = 0.0
+    kmi = km.keymap_items.new('paint.mask_flood_fill', 'I', 'PRESS', ctrl=True)
+    kmi.properties.mode = 'INVERT'
+    
+    # Subdivision levels
+    kmi = km.keymap_items.new('object.subdivision_set', 'EQUAL', 'PRESS')
+    kmi.properties.level = 1
+    kmi.properties.relative = True
+    kmi = km.keymap_items.new('object.subdivision_set', 'MINUS', 'PRESS')
+    kmi.properties.level = -1
+    kmi.properties.relative = True
+    #kmi = km.keymap_items.new('object.subdivision_set', 'ZERO', 'PRESS', ctrl=True)
+    #kmi.properties.level = 0
+    #kmi = km.keymap_items.new('object.subdivision_set', 'ONE', 'PRESS', ctrl=True)
+    #kmi.properties.level = 1
+    #kmi = km.keymap_items.new('object.subdivision_set', 'TWO', 'PRESS', ctrl=True)
+    #kmi.properties.level = 2
+    #kmi = km.keymap_items.new('object.subdivision_set', 'THREE', 'PRESS', ctrl=True)
+    #kmi.properties.level = 3
+    #kmi = km.keymap_items.new('object.subdivision_set', 'FOUR', 'PRESS', ctrl=True)
+    #kmi.properties.level = 4
+    #kmi = km.keymap_items.new('object.subdivision_set', 'FIVE', 'PRESS', ctrl=True)
+    #kmi.properties.level = 5
+    
+    # Brush switching by index
+    kmi = km.keymap_items.new('brush.active_index_set', 'ONE', 'PRESS')
+    kmi.properties.mode = 'sculpt'
+    kmi.properties.index = 0
+    kmi = km.keymap_items.new('brush.active_index_set', 'TWO', 'PRESS')
+    kmi.properties.mode = 'sculpt'
+    kmi.properties.index = 1
+    kmi = km.keymap_items.new('brush.active_index_set', 'THREE', 'PRESS')
+    kmi.properties.mode = 'sculpt'
+    kmi.properties.index = 2
+    kmi = km.keymap_items.new('brush.active_index_set', 'FOUR', 'PRESS')
+    kmi.properties.mode = 'sculpt'
+    kmi.properties.index = 3
+    kmi = km.keymap_items.new('brush.active_index_set', 'FIVE', 'PRESS')
+    kmi.properties.mode = 'sculpt'
+    kmi.properties.index = 4
+    kmi = km.keymap_items.new('brush.active_index_set', 'SIX', 'PRESS')
+    kmi.properties.mode = 'sculpt'
+    kmi.properties.index = 5
+    kmi = km.keymap_items.new('brush.active_index_set', 'SEVEN', 'PRESS')
+    kmi.properties.mode = 'sculpt'
+    kmi.properties.index = 6
+    kmi = km.keymap_items.new('brush.active_index_set', 'EIGHT', 'PRESS')
+    kmi.properties.mode = 'sculpt'
+    kmi.properties.index = 7
+    kmi = km.keymap_items.new('brush.active_index_set', 'NINE', 'PRESS')
+    kmi.properties.mode = 'sculpt'
+    kmi.properties.index = 8
+    kmi = km.keymap_items.new('brush.active_index_set', 'ZERO', 'PRESS')
+    kmi.properties.mode = 'sculpt'
+    kmi.properties.index = 9
+    kmi = km.keymap_items.new('brush.active_index_set', 'ONE', 'PRESS', shift=True)
+    kmi.properties.mode = 'sculpt'
+    kmi.properties.index = 10
+    kmi = km.keymap_items.new('brush.active_index_set', 'TWO', 'PRESS', shift=True)
+    kmi.properties.mode = 'sculpt'
+    kmi.properties.index = 11
+    kmi = km.keymap_items.new('brush.active_index_set', 'THREE', 'PRESS', shift=True)
+    kmi.properties.mode = 'sculpt'
+    kmi.properties.index = 12
+    kmi = km.keymap_items.new('brush.active_index_set', 'FOUR', 'PRESS', shift=True)
+    kmi.properties.mode = 'sculpt'
+    kmi.properties.index = 13
+    kmi = km.keymap_items.new('brush.active_index_set', 'FIVE', 'PRESS', shift=True)

@@ Diff output truncated at 10240 characters. @@


More information about the Bf-extensions-cvs mailing list