diff options
author | Richard Antalik <richardantalik@gmail.com> | 2022-04-28 17:07:57 +0300 |
---|---|---|
committer | Richard Antalik <richardantalik@gmail.com> | 2022-04-28 17:14:51 +0300 |
commit | 17769489d920f86310464297e8906f34d5ec61b9 (patch) | |
tree | 7880dd7b626d9254a46894eaf11b06ae311a8cee /source/blender/editors/animation | |
parent | b1b153b88c14b516183f7dd43b2c0111c0e7b041 (diff) |
VSE: Add option to limit timeline view height
When height is limited, it is defined by space occupied by strips,
but at least channels 1 to 7 will be always visible. This allows it to
easily overview timeline content by zooming out to maximum extent in Y
axis and panning in X axis.
More channels can be "created" on demand by moving strip to higher
channel. When strip is removed and highest channel becomes empty, view
will stay as is until it is moved down. Then new highest point is
remembered and it is not possible to pan upwards until strip is moved to
higher channel.
Limiting takes into account height of scrubbing and markers area as
well as scrollers. This means that when zoomed out to maximum extent,
no strips are obstructed by fixed UI element.
Fixes T57976
Reviewed By: Severin
Differential Revision: https://developer.blender.org/D14263
Diffstat (limited to 'source/blender/editors/animation')
-rw-r--r-- | source/blender/editors/animation/time_scrub_ui.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/editors/animation/time_scrub_ui.c b/source/blender/editors/animation/time_scrub_ui.c index ba7b83173ce..623d4e605ba 100644 --- a/source/blender/editors/animation/time_scrub_ui.c +++ b/source/blender/editors/animation/time_scrub_ui.c @@ -32,7 +32,7 @@ #include "RNA_access.h" #include "RNA_prototypes.h" -static void get_time_scrub_region_rect(const ARegion *region, rcti *rect) +void ED_time_scrub_region_rect_get(const ARegion *region, rcti *rect) { rect->xmin = 0; rect->xmax = region->winx; @@ -154,7 +154,7 @@ void ED_time_scrub_draw_current_frame(const ARegion *region, wmOrtho2_region_pixelspace(region); rcti scrub_region_rect; - get_time_scrub_region_rect(region, &scrub_region_rect); + ED_time_scrub_region_rect_get(region, &scrub_region_rect); draw_current_frame(scene, display_seconds, v2d, &scrub_region_rect, scene->r.cfra); GPU_matrix_pop_projection(); @@ -171,7 +171,7 @@ void ED_time_scrub_draw(const ARegion *region, wmOrtho2_region_pixelspace(region); rcti scrub_region_rect; - get_time_scrub_region_rect(region, &scrub_region_rect); + ED_time_scrub_region_rect_get(region, &scrub_region_rect); draw_background(&scrub_region_rect); |