diff options
author | Martin Poirier <theeth@yahoo.com> | 2009-03-23 04:01:44 +0300 |
---|---|---|
committer | Martin Poirier <theeth@yahoo.com> | 2009-03-23 04:01:44 +0300 |
commit | 438ba310ed39cabb5a22ca7387922316ee2feeac (patch) | |
tree | df2f9b8664a5855bb5a8957bd1326cfaaedd95c0 /source/blender/editors/space_view3d | |
parent | fe1169f6356501c84cb51701ef6b7a8488f3110a (diff) |
Finished porting etch-a-ton to 2.5
Changes: Gestures are now Shift-ActionMouse (doing it with SelectMouse required a bit of juggling and triggered a display glitch that I'll try to debug later)
Everything else should be as functional as in trunk, apart from the dotted rubber band line which doesn't update while the view is rotated and only the current area getting redrawn while drawing (the later should be easy to fix).
Diffstat (limited to 'source/blender/editors/space_view3d')
-rw-r--r-- | source/blender/editors/space_view3d/space_view3d.c | 7 | ||||
-rw-r--r-- | source/blender/editors/space_view3d/view3d_ops.c | 11 |
2 files changed, 17 insertions, 1 deletions
diff --git a/source/blender/editors/space_view3d/space_view3d.c b/source/blender/editors/space_view3d/space_view3d.c index ab04fbdd490..b7682225fe3 100644 --- a/source/blender/editors/space_view3d/space_view3d.c +++ b/source/blender/editors/space_view3d/space_view3d.c @@ -243,6 +243,13 @@ static void view3d_modal_keymaps(wmWindowManager *wm, ARegion *ar, int stype) else WM_event_remove_keymap_handler(&ar->handlers, keymap); + /* armature sketching needs to take over mouse */ + keymap= WM_keymap_listbase(wm, "Armature_Sketch", 0, 0); + if(stype==NS_EDITMODE_TEXT) + WM_event_add_keymap_handler_priority(&ar->handlers, keymap, 10); + else + WM_event_remove_keymap_handler(&ar->handlers, keymap); + keymap= WM_keymap_listbase(wm, "Particle", 0, 0); if(stype==NS_MODE_PARTICLE) WM_event_add_keymap_handler(&ar->handlers, keymap); diff --git a/source/blender/editors/space_view3d/view3d_ops.c b/source/blender/editors/space_view3d/view3d_ops.c index 7ff6e6b88a8..b8bf2a61cae 100644 --- a/source/blender/editors/space_view3d/view3d_ops.c +++ b/source/blender/editors/space_view3d/view3d_ops.c @@ -122,7 +122,16 @@ void view3d_keymap(wmWindowManager *wm) WM_keymap_add_item(keymap, "SCULPT_OT_brush_stroke", LEFTMOUSE, KM_PRESS, 0, 0); WM_keymap_add_item(keymap, "SCULPT_OT_brush_stroke", LEFTMOUSE, KM_PRESS, KM_SHIFT, 0); - + + /* sketch poll checks mode */ + WM_keymap_add_item(keymap, "SKETCH_OT_gesture", ACTIONMOUSE, KM_PRESS, KM_SHIFT, 0); + WM_keymap_add_item(keymap, "SKETCH_OT_draw_stroke", ACTIONMOUSE, KM_PRESS, 0, 0); + km = WM_keymap_add_item(keymap, "SKETCH_OT_draw_stroke", ACTIONMOUSE, KM_PRESS, KM_CTRL, 0); + RNA_boolean_set(km->ptr, "snap", 1); + WM_keymap_add_item(keymap, "SKETCH_OT_draw_preview", MOUSEMOVE, KM_ANY, 0, 0); + km = WM_keymap_add_item(keymap, "SKETCH_OT_draw_preview", MOUSEMOVE, KM_ANY, KM_CTRL, 0); + RNA_boolean_set(km->ptr, "snap", 1); + WM_keymap_verify_item(keymap, "VIEW3D_OT_cursor3d", ACTIONMOUSE, KM_PRESS, 0, 0); WM_keymap_verify_item(keymap, "VIEW3D_OT_viewrotate", MIDDLEMOUSE, KM_PRESS, 0, 0); |