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:
-rw-r--r--source/blender/sequencer/SEQ_relations.h5
-rw-r--r--source/blender/sequencer/intern/strip_relations.c5
-rw-r--r--source/blender/sequencer/intern/strip_transform.c3
3 files changed, 13 insertions, 0 deletions
diff --git a/source/blender/sequencer/SEQ_relations.h b/source/blender/sequencer/SEQ_relations.h
index 735b5659ca9..917f549f16d 100644
--- a/source/blender/sequencer/SEQ_relations.h
+++ b/source/blender/sequencer/SEQ_relations.h
@@ -19,6 +19,10 @@ struct Scene;
struct Sequence;
/**
+ * Check if one sequence is input to the other.
+ */
+bool SEQ_relation_is_effect_of_strip(const struct Sequence *effect, const struct Sequence *input);
+/**
* Function to free imbuf and anim data on changes.
*/
void SEQ_relations_sequence_free_anim(struct Sequence *seq);
@@ -64,6 +68,7 @@ void SEQ_cache_iterate(
struct Sequence *SEQ_find_metastrip_by_sequence(ListBase *seqbase /* = ed->seqbase */,
struct Sequence *meta /* = NULL */,
struct Sequence *seq);
+
#ifdef __cplusplus
}
#endif
diff --git a/source/blender/sequencer/intern/strip_relations.c b/source/blender/sequencer/intern/strip_relations.c
index a65a331c650..ff6d9481f42 100644
--- a/source/blender/sequencer/intern/strip_relations.c
+++ b/source/blender/sequencer/intern/strip_relations.c
@@ -34,6 +34,11 @@
#include "image_cache.h"
#include "utils.h"
+bool SEQ_relation_is_effect_of_strip(const Sequence *effect, const Sequence *input)
+{
+ return ELEM(input, effect->seq1, effect->seq2);
+}
+
/* check whether sequence cur depends on seq */
static bool seq_relations_check_depend(Sequence *seq, Sequence *cur)
{
diff --git a/source/blender/sequencer/intern/strip_transform.c b/source/blender/sequencer/intern/strip_transform.c
index e614dfa9b82..2c9ab0a3335 100644
--- a/source/blender/sequencer/intern/strip_transform.c
+++ b/source/blender/sequencer/intern/strip_transform.c
@@ -297,6 +297,9 @@ static int shuffle_seq_time_offset_test(SeqCollection *strips_to_shuffle,
if (!SEQ_transform_test_overlap_seq_seq(seq, seq_other)) {
continue;
}
+ if (SEQ_relation_is_effect_of_strip(seq_other, seq)) {
+ continue;
+ }
if (UNLIKELY(SEQ_collection_has_strip(seq_other, strips_to_shuffle))) {
CLOG_WARN(&LOG,
"Strip overlaps with itself or another strip, that is to be shuffled. "