diff options
author | Jacques Lucke <mail@jlucke.com> | 2019-05-07 16:09:14 +0300 |
---|---|---|
committer | Jacques Lucke <mail@jlucke.com> | 2019-05-07 16:09:14 +0300 |
commit | f2b7582b27fa1235a013b2d92af72428c0fc1623 (patch) | |
tree | 6585abf521e82cc1933aa498fc6688970be9f5a8 /source/blender/editors/space_graph | |
parent | e4669199bf9c819d82072f7dd93ff7156e9e72aa (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_graph')
-rw-r--r-- | source/blender/editors/space_graph/space_graph.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/source/blender/editors/space_graph/space_graph.c b/source/blender/editors/space_graph/space_graph.c index 390ea0cf00b..ee9b303831a 100644 --- a/source/blender/editors/space_graph/space_graph.c +++ b/source/blender/editors/space_graph/space_graph.c @@ -42,6 +42,7 @@ #include "ED_screen.h" #include "ED_anim_api.h" #include "ED_markers.h" +#include "ED_scrubbing.h" #include "GPU_immediate.h" #include "GPU_state.h" @@ -309,6 +310,9 @@ static void graph_main_region_draw(const bContext *C, ARegion *ar) /* reset view matrix */ UI_view2d_view_restore(C); + /* time-scrubbing */ + ED_scrubbing_draw(ar, scene, display_seconds, false); + /* scrollers */ // FIXME: args for scrollers depend on the type of data being shown... scrollers = UI_view2d_scrollers_calc(v2d, NULL); @@ -316,14 +320,7 @@ static void graph_main_region_draw(const bContext *C, ARegion *ar) UI_view2d_scrollers_free(scrollers); /* scale numbers */ - UI_view2d_draw_scale_x__frames_or_seconds(ar, v2d, &v2d->hor, scene, display_seconds, TH_TEXT); - UI_view2d_draw_scale_y__values(ar, v2d, &v2d->vert, TH_TEXT); - - /* draw current frame number-indicator on top of scrollers */ - if ((sipo->mode != SIPO_MODE_DRIVERS) && ((sipo->flag & SIPO_NODRAWCFRANUM) == 0)) { - UI_view2d_view_orthoSpecial(ar, v2d, 1); - ANIM_draw_cfra_number(C, v2d, cfra_flag); - } + UI_view2d_draw_scale_y__values(ar, v2d, &v2d->vert, TH_SCROLL_TEXT); } static void graph_channel_region_init(wmWindowManager *wm, ARegion *ar) @@ -367,6 +364,9 @@ static void graph_channel_region_draw(const bContext *C, ARegion *ar) graph_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); @@ -849,7 +849,7 @@ void ED_spacetype_ipo(void) art->draw = graph_main_region_draw; art->listener = graph_region_listener; art->message_subscribe = graph_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); |