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:
authorJacques Lucke <mail@jlucke.com>2019-05-07 16:09:14 +0300
committerJacques Lucke <mail@jlucke.com>2019-05-07 16:09:14 +0300
commitf2b7582b27fa1235a013b2d92af72428c0fc1623 (patch)
tree6585abf521e82cc1933aa498fc6688970be9f5a8 /source/blender/editors/space_action/space_action.c
parente4669199bf9c819d82072f7dd93ff7156e9e72aa (diff)
UI: Animation editor scrubbing area
The main reason for this change is to allow setting the active frame with the left mouse button, while still being able to select e.g. keyframes with the same mouse button. The solution is to introduce a new scrubbing region with a specialized keymap. There are a couple of related todos, that will be handled in separate commits. Those are listed in D4654. This solves T63193. Differential Revision: https://developer.blender.org/D4654 Reviewers: brecht, billreynish
Diffstat (limited to 'source/blender/editors/space_action/space_action.c')
-rw-r--r--source/blender/editors/space_action/space_action.c20
1 files changed, 9 insertions, 11 deletions
diff --git a/source/blender/editors/space_action/space_action.c b/source/blender/editors/space_action/space_action.c
index 5ac6297e108..aba75f9e56c 100644
--- a/source/blender/editors/space_action/space_action.c
+++ b/source/blender/editors/space_action/space_action.c
@@ -47,11 +47,13 @@
#include "UI_resources.h"
#include "UI_view2d.h"
+#include "UI_interface.h"
#include "ED_space_api.h"
#include "ED_screen.h"
#include "ED_anim_api.h"
#include "ED_markers.h"
+#include "ED_scrubbing.h"
#include "action_intern.h" /* own include */
#include "GPU_framebuffer.h"
@@ -234,20 +236,13 @@ static void action_main_region_draw(const bContext *C, ARegion *ar)
/* reset view matrix */
UI_view2d_view_restore(C);
+ /* scrubbing region */
+ ED_scrubbing_draw(ar, scene, saction->flag & SACTION_DRAWTIME, true);
+
/* scrollers */
scrollers = UI_view2d_scrollers_calc(v2d, NULL);
UI_view2d_scrollers_draw(v2d, scrollers);
UI_view2d_scrollers_free(scrollers);
-
- /* frame numbers */
- UI_view2d_draw_scale_x__discrete_frames_or_seconds(
- ar, v2d, &v2d->hor, scene, saction->flag & SACTION_DRAWTIME, TH_TEXT);
-
- /* draw current frame number-indicator on top of scrollers */
- if ((saction->flag & SACTION_NODRAWCFRANUM) == 0) {
- UI_view2d_view_orthoSpecial(ar, v2d, 1);
- ANIM_draw_cfra_number(C, v2d, cfra_flag);
- }
}
/* add handlers, stuff you only do once or on area/region changes */
@@ -285,6 +280,9 @@ static void action_channel_region_draw(const bContext *C, ARegion *ar)
draw_channel_names((bContext *)C, &ac, ar);
}
+ /* channel filter next to scrubbing area */
+ ED_channel_search_draw(C, ar, ac.ads);
+
/* reset view matrix */
UI_view2d_view_restore(C);
@@ -869,7 +867,7 @@ void ED_spacetype_action(void)
art->draw = action_main_region_draw;
art->listener = action_main_region_listener;
art->message_subscribe = saction_main_region_message_subscribe;
- art->keymapflag = ED_KEYMAP_VIEW2D | ED_KEYMAP_MARKERS | ED_KEYMAP_ANIMATION | ED_KEYMAP_FRAMES;
+ art->keymapflag = ED_KEYMAP_VIEW2D | ED_KEYMAP_ANIMATION | ED_KEYMAP_FRAMES;
BLI_addhead(&st->regiontypes, art);