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'
This commit is contained in:
2009-02-09 03:06:52 +00:00
parent 85231e5fd4
commit 52e1121669
2 changed files with 15 additions and 6 deletions

View File

@@ -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);
}

View File

@@ -771,7 +771,7 @@ static char *windowtype_pup(void)
"|%l" // 33
"|Graph Editor %x2" //54
"|DopeSheet Editor %x12" //73
"|DopeSheet %x12" //73
"|NLA Editor %x13" //94
"|%l" //97