diff options
Diffstat (limited to 'source/blender/sequencer/intern/iterator.c')
-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; +} + /** \} */ /** |