diff options
author | Richard Antalik <richardantalik@gmail.com> | 2021-07-26 15:55:14 +0300 |
---|---|---|
committer | Richard Antalik <richardantalik@gmail.com> | 2021-07-26 15:57:13 +0300 |
commit | 14f94fd1ca592bb532bbbfa9d65056fba955db17 (patch) | |
tree | 10417a43cd8e9be45856144481e5afaea0b07a50 /source/blender/sequencer/intern | |
parent | 1b53fde9fc39c888ede7533f1cd55b028bb4bfad (diff) |
VSE: Fix snapping bugs
Fix hold offset check causing missing snapping point when strip have
only still frames.
Fix effect strips of transformed strips causing snapping to prevoius
strip positions.
Reviewed By: mano-wii
Differential Revision: https://developer.blender.org/D11948
Diffstat (limited to 'source/blender/sequencer/intern')
-rw-r--r-- | source/blender/sequencer/intern/iterator.c | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/source/blender/sequencer/intern/iterator.c b/source/blender/sequencer/intern/iterator.c index 20a2ee3b183..09f033e70fb 100644 --- a/source/blender/sequencer/intern/iterator.c +++ b/source/blender/sequencer/intern/iterator.c @@ -184,6 +184,22 @@ void SEQ_collection_merge(SeqCollection *collection_dst, SeqCollection *collecti } /** + * Remove strips from collection that are also in `exclude_elements`. Source collection will be + * freed. + * + * \param collection: collection from which strips are removed + * \param exclude_elements: collection of strips to be removed + */ +void SEQ_collection_exclude(SeqCollection *collection, SeqCollection *exclude_elements) +{ + Sequence *seq; + SEQ_ITERATOR_FOREACH (seq, exclude_elements) { + SEQ_collection_remove_strip(seq, collection); + } + SEQ_collection_free(exclude_elements); +} + +/** * Expand collection by running SEQ_query() for each strip, which will be used as reference. * Results of these queries will be merged into provided collection. * @@ -213,6 +229,22 @@ void SEQ_collection_expand(ListBase *seqbase, } } +/** + * Duplicate collection + * + * \param collection: collection to be duplicated + * \return duplicate of collection + */ +SeqCollection *SEQ_collection_duplicate(SeqCollection *collection) +{ + SeqCollection *duplicate = SEQ_collection_create(__func__); + Sequence *seq; + SEQ_ITERATOR_FOREACH (seq, collection) { + SEQ_collection_append_strip(seq, duplicate); + } + return duplicate; +} + /** \} */ /** |