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/blenloader/intern/versioning_300.c | |
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/blenloader/intern/versioning_300.c')
-rw-r--r-- | source/blender/blenloader/intern/versioning_300.c | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/source/blender/blenloader/intern/versioning_300.c b/source/blender/blenloader/intern/versioning_300.c index 8190de649bd..e6a214452fe 100644 --- a/source/blender/blenloader/intern/versioning_300.c +++ b/source/blender/blenloader/intern/versioning_300.c @@ -786,6 +786,33 @@ void do_versions_after_linking_300(Main *bmain, ReportList *UNUSED(reports)) } } + if (!MAIN_VERSION_ATLEAST(bmain, 302, 14)) { + /* Sequencer channels region. */ + for (bScreen *screen = bmain->screens.first; screen; screen = screen->id.next) { + LISTBASE_FOREACH (ScrArea *, area, &screen->areabase) { + LISTBASE_FOREACH (SpaceLink *, sl, &area->spacedata) { + if (sl->spacetype != SPACE_SEQ) { + continue; + } + SpaceSeq *sseq = (SpaceSeq *)sl; + sseq->flag |= SEQ_CLAMP_VIEW; + + if (ELEM(sseq->view, SEQ_VIEW_PREVIEW, SEQ_VIEW_SEQUENCE_PREVIEW)) { + continue; + } + + ARegion *timeline_region = BKE_area_find_region_type(area, RGN_TYPE_WINDOW); + + if (timeline_region == NULL) { + continue; + } + + timeline_region->v2d.cur.ymax = 8.5f; + timeline_region->v2d.align &= ~V2D_ALIGN_NO_NEG_Y; + } + } + } + } /** * Versioning code until next subversion bump goes here. * |