diff options
author | Richard Antalik <richardantalik@gmail.com> | 2020-12-15 23:42:06 +0300 |
---|---|---|
committer | Richard Antalik <richardantalik@gmail.com> | 2020-12-15 23:49:15 +0300 |
commit | 9e4a4c2e996c3741c2beaf5ed5aadc8cb8801ac3 (patch) | |
tree | 87e2a0d3abe242a80e93b0c3507c46dfb70540ae /source/blender/editors/space_sequencer/sequencer_view.c | |
parent | 7e8f6985d89866197be8465a8aec57f9b4ef7b51 (diff) |
VSE: Move remove gaps operator logic to module code
Logic was broken into finding gaps and ofsetting strips.
Functions were modified so they work on explicitly defined seqbase,
so they can be used as python API functions.
Functional changes:
- Improve performance by calculating gap length and offseting strips
at once. Previously strips were offset by one frame.
- Calculate gap from start frame. Previously gap was considered only
inbetween strips.
Reviewed By: sergey
Differential Revision: https://developer.blender.org/D9730
Diffstat (limited to 'source/blender/editors/space_sequencer/sequencer_view.c')
-rw-r--r-- | source/blender/editors/space_sequencer/sequencer_view.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/source/blender/editors/space_sequencer/sequencer_view.c b/source/blender/editors/space_sequencer/sequencer_view.c index 75d92d5f00d..d2166705943 100644 --- a/source/blender/editors/space_sequencer/sequencer_view.c +++ b/source/blender/editors/space_sequencer/sequencer_view.c @@ -87,8 +87,14 @@ static int sequencer_view_all_exec(bContext *C, wmOperator *op) rctf box; const int smooth_viewtx = WM_operator_smooth_viewtx_get(op); + Scene *scene = CTX_data_scene(C); + const Editing *ed = BKE_sequencer_editing_get(scene, false); + + if (ed == NULL) { + return OPERATOR_FINISHED; + } - boundbox_seq(CTX_data_scene(C), &box); + SEQ_timeline_boundbox(scene, ed->seqbasep, &box); UI_view2d_smooth_view(C, region, &box, smooth_viewtx); return OPERATOR_FINISHED; } |