Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Antalik <richardantalik@gmail.com>2021-06-02 22:41:38 +0300
committerRichard Antalik <richardantalik@gmail.com>2021-06-02 22:41:38 +0300
commit925df8ef26a353497c8088657a82b6b8545c67c1 (patch)
tree83dcc1f9fadaff90a3b7729b915bedfcda52a67d /source/blender/sequencer/intern/utils.c
parent2ee575fc1f2b13f083bc5996e20e7350570be546 (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/sequencer/intern/utils.c')
-rw-r--r--source/blender/sequencer/intern/utils.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/sequencer/intern/utils.c b/source/blender/sequencer/intern/utils.c
index cf1d7d66476..9aeb2961751 100644
--- a/source/blender/sequencer/intern/utils.c
+++ b/source/blender/sequencer/intern/utils.c
@@ -43,6 +43,7 @@
#include "SEQ_relations.h"
#include "SEQ_select.h"
#include "SEQ_sequencer.h"
+#include "SEQ_time.h"
#include "SEQ_utils.h"
#include "IMB_imbuf.h"
@@ -406,7 +407,7 @@ const Sequence *SEQ_get_topmost_sequence(const Scene *scene, int frame)
}
for (seq = ed->seqbasep->first; seq; seq = seq->next) {
- if (seq->flag & SEQ_MUTE || seq->startdisp > frame || seq->enddisp <= frame) {
+ if (seq->flag & SEQ_MUTE || !SEQ_time_strip_intersects_frame(seq, frame)) {
continue;
}
/* Only use strips that generate an image, not ones that combine