diff options
author | Shrey Aggarwal <shrey_agg> | 2022-04-21 01:44:57 +0300 |
---|---|---|
committer | Richard Antalik <richardantalik@gmail.com> | 2022-04-21 03:01:10 +0300 |
commit | 502f3debf9a683280d12a5fa19bf4b3a2e2731bf (patch) | |
tree | 34a27ab7818fa929bcd6054788d76196deee0140 /source/blender/sequencer/intern | |
parent | e16ff4132e35cab6a757105741b8563679bda0bd (diff) |
Fix T70844: Incorrect snappping of strips when effects attached
Sometimes, when moving strip with 2 input effect attached and causing
strip overlap, this overlap is resolved incorrectly - too big offset
is applied. This is because effects are not taken into consideration
when "shuffeling" to resolve overlap.
To fix usual cases (transitions), overlap between strip and it's effect
is considered to be impossible.
There are edge cases, but these would be much more complicated to
implement and could have negative impact on performance.
Reviewed By: ISS
Differential Revision: https://developer.blender.org/D14578
Diffstat (limited to 'source/blender/sequencer/intern')
-rw-r--r-- | source/blender/sequencer/intern/strip_relations.c | 5 | ||||
-rw-r--r-- | source/blender/sequencer/intern/strip_transform.c | 3 |
2 files changed, 8 insertions, 0 deletions
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. " |