Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoshua Leung <aligorith@gmail.com>2009-02-09 06:06:52 +0300
committerJoshua Leung <aligorith@gmail.com>2009-02-09 06:06:52 +0300
commit52e1121669cdf4a0b23bbc41eb8d1d342c19ba87 (patch)
tree4c7ef31634b7aba1f463839cd55e72c2b214c777 /source/blender
parent85231e5fd44ee67469eedcbdc9d1a0dc64ff822f (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')
-rw-r--r--source/blender/editors/animation/anim_ops.c19
-rw-r--r--source/blender/editors/screen/area.c2
2 files changed, 15 insertions, 6 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);
}
diff --git a/source/blender/editors/screen/area.c b/source/blender/editors/screen/area.c
index bc90728f23e..c22be24fd0b 100644
--- a/source/blender/editors/screen/area.c
+++ b/source/blender/editors/screen/area.c
@@ -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