diff options
author | Joshua Leung <aligorith@gmail.com> | 2009-02-09 06:06:52 +0300 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2009-02-09 06:06:52 +0300 |
commit | 52e1121669cdf4a0b23bbc41eb8d1d342c19ba87 (patch) | |
tree | 4c7ef31634b7aba1f463839cd55e72c2b214c777 /source/blender/editors/animation/anim_ops.c | |
parent | 85231e5fd44ee67469eedcbdc9d1a0dc64ff822f (diff) |
2.5 - Animation UI tweaks
* Frame-change (scrubbing) now works when using LMB select. It now uses ACTIONMOUSE, so it doesn't conflict with selection. However, the check for exiting the modal op currently needs to check for LEFTMOUSE and/or RIGHTMOUSE instead of ACTIONMOUSE otherwise errors occur.
* Renamed the 'DopeSheet Editor' entry to simply 'DopeSheet'
Diffstat (limited to 'source/blender/editors/animation/anim_ops.c')
-rw-r--r-- | source/blender/editors/animation/anim_ops.c | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/source/blender/editors/animation/anim_ops.c b/source/blender/editors/animation/anim_ops.c index 80b9ba9801e..5aa0d50bdbf 100644 --- a/source/blender/editors/animation/anim_ops.c +++ b/source/blender/editors/animation/anim_ops.c @@ -172,12 +172,20 @@ static int change_frame_modal(bContext *C, wmOperator *op, wmEvent *event) { /* execute the events */ switch (event->type) { + case ESCKEY: + change_frame_exit(C, op); + return OPERATOR_FINISHED; + case MOUSEMOVE: RNA_int_set(op->ptr, "frame", frame_from_event(C, event)); change_frame_apply(C, op); break; - - case LEFTMOUSE: + + case LEFTMOUSE: + case RIGHTMOUSE: + /* we check for either mouse-button to end, as checking for ACTIONMOUSE (which is used to init + * the modal op) doesn't work for some reason + */ if (event->val==0) { change_frame_exit(C, op); return OPERATOR_FINISHED; @@ -378,11 +386,12 @@ void ED_keymap_anim(wmWindowManager *wm) { ListBase *keymap= WM_keymap_listbase(wm, "Animation", 0, 0); - /* frame management */ - WM_keymap_verify_item(keymap, "ANIM_OT_change_frame", LEFTMOUSE, KM_PRESS, 0, 0); + /* frame management */ + /* NOTE: 'ACTIONMOUSE' not 'LEFTMOUSE', as user may have swapped mouse-buttons */ + WM_keymap_verify_item(keymap, "ANIM_OT_change_frame", ACTIONMOUSE, KM_PRESS, 0, 0); WM_keymap_verify_item(keymap, "ANIM_OT_time_toggle", TKEY, KM_PRESS, KM_CTRL, 0); - /* preview range */ + /* preview range */ WM_keymap_verify_item(keymap, "ANIM_OT_previewrange_define", PKEY, KM_PRESS, KM_CTRL, 0); WM_keymap_verify_item(keymap, "ANIM_OT_previewrange_clear", PKEY, KM_PRESS, KM_ALT, 0); } |