diff options
author | Richard Antalik <richardantalik@gmail.com> | 2021-06-02 22:41:38 +0300 |
---|---|---|
committer | Richard Antalik <richardantalik@gmail.com> | 2021-06-02 22:41:38 +0300 |
commit | 925df8ef26a353497c8088657a82b6b8545c67c1 (patch) | |
tree | 83dcc1f9fadaff90a3b7729b915bedfcda52a67d /source/blender/editors | |
parent | 2ee575fc1f2b13f083bc5996e20e7350570be546 (diff) |
VSE: Add strip-time intersection test function
Use SEQ_time_strip_intersects_frame function to test if strip intersects with frame.
Note: There are cases where this function should not be used. For example splitting
strips require at least 1 frame "inside" strip. Another example is drawing, where
playhead technically doesn't intersect strip, but it is rendered, because current
frame has "duration" or "thickness" of 1 frame.
Reviewed By: sergey
Differential Revision: https://developer.blender.org/D11320
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/space_sequencer/sequencer_select.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/editors/space_sequencer/sequencer_select.c b/source/blender/editors/space_sequencer/sequencer_select.c index 867b8e3d40a..7e515271b13 100644 --- a/source/blender/editors/space_sequencer/sequencer_select.c +++ b/source/blender/editors/space_sequencer/sequencer_select.c @@ -42,6 +42,7 @@ #include "SEQ_iterator.h" #include "SEQ_select.h" #include "SEQ_sequencer.h" +#include "SEQ_time.h" #include "SEQ_transform.h" /* For menu, popup, icons, etc. */ @@ -1187,7 +1188,7 @@ static int sequencer_select_side_of_frame_exec(bContext *C, wmOperator *op) test = (timeline_frame <= seq->startdisp); break; case 2: - test = (timeline_frame <= seq->enddisp) && (timeline_frame >= seq->startdisp); + test = SEQ_time_strip_intersects_frame(seq, timeline_frame); break; } |