diff options
author | Campbell Barton <ideasman42@gmail.com> | 2021-12-08 13:02:29 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2021-12-08 13:05:06 +0300 |
commit | 32b1a13fa1e427bc5b2cce2bf179fd274679e08f (patch) | |
tree | 0c8715816dc675ba37b29b89062ff4da3f12124b /source/blender/sequencer/intern/iterator.c | |
parent | e89d42ddffef8892a8eb52d29e2a7329ad381204 (diff) |
Cleanup: move public doc-strings into headers for 'sequencer'
Ref T92709
Diffstat (limited to 'source/blender/sequencer/intern/iterator.c')
-rw-r--r-- | source/blender/sequencer/intern/iterator.c | 135 |
1 files changed, 0 insertions, 135 deletions
diff --git a/source/blender/sequencer/intern/iterator.c b/source/blender/sequencer/intern/iterator.c index a12a5cbdc61..6cd53f08b3a 100644 --- a/source/blender/sequencer/intern/iterator.c +++ b/source/blender/sequencer/intern/iterator.c @@ -44,18 +44,6 @@ /** \Iterator API * \{ */ -/** - * Utility function for SEQ_ITERATOR_FOREACH macro. - * Ensure, that iterator is initialized. During initialization return pointer to collection element - * and step gset iterator. When this function is called after iterator has been initialized, it - * will do nothing and return true. - * - * \param collection: collection to iterate - * \param iterator: iterator to be initialized - * \param r_seq: pointer to Sequence pointer - * - * \return false when iterator can not be initialized, true otherwise - */ bool SEQ_iterator_ensure(SeqCollection *collection, SeqIterator *iterator, Sequence **r_seq) { if (iterator->iterator_initialized) { @@ -76,14 +64,6 @@ bool SEQ_iterator_ensure(SeqCollection *collection, SeqIterator *iterator, Seque return true; } -/** - * Utility function for SEQ_ITERATOR_FOREACH macro. - * Yield collection element - * - * \param iterator: iterator to be initialized - * - * \return collection element or NULL when iteration has ended - */ Sequence *SEQ_iterator_yield(SeqIterator *iterator) { Sequence *seq = BLI_gsetIterator_done(&iterator->gsi) ? NULL : @@ -108,36 +88,17 @@ static bool seq_for_each_recursive(ListBase *seqbase, SeqForEachFunc callback, v return true; } -/** - * Utility function to recursively iterate through all sequence strips in a `seqbase` list. - * Uses callback to do operations on each sequence element. - * The callback can stop the iteration if needed. - * - * \param seqbase: #ListBase of sequences to be iterated over. - * \param callback: query function callback, returns false if iteration should stop. - * \param user_data: pointer to user data that can be used in the callback function. - */ void SEQ_for_each_callback(ListBase *seqbase, SeqForEachFunc callback, void *user_data) { seq_for_each_recursive(seqbase, callback, user_data); } -/** - * Free strip collection. - * - * \param collection: collection to be freed - */ void SEQ_collection_free(SeqCollection *collection) { BLI_gset_free(collection->set, NULL); MEM_freeN(collection); } -/** - * Create new empty strip collection. - * - * \return empty strip collection. - */ SeqCollection *SEQ_collection_create(const char *name) { SeqCollection *collection = MEM_callocN(sizeof(SeqCollection), name); @@ -146,30 +107,16 @@ SeqCollection *SEQ_collection_create(const char *name) return collection; } -/** - * Return number of items in collection. - */ uint SEQ_collection_len(const SeqCollection *collection) { return BLI_gset_len(collection->set); } -/** - * Check if seq is in collection. - */ bool SEQ_collection_has_strip(const Sequence *seq, const SeqCollection *collection) { return BLI_gset_haskey(collection->set, seq); } -/** - * Query strips from seqbase. seq_reference is used by query function as filter condition. - * - * \param seq_reference: reference strip for query function - * \param seqbase: ListBase in which strips are queried - * \param seq_query_func: query function callback - * \return strip collection - */ SeqCollection *SEQ_query_by_reference(Sequence *seq_reference, ListBase *seqbase, void seq_query_func(Sequence *seq_reference, @@ -180,13 +127,6 @@ SeqCollection *SEQ_query_by_reference(Sequence *seq_reference, seq_query_func(seq_reference, seqbase, collection); return collection; } -/** - * Add strip to collection. - * - * \param seq: strip to be added - * \param collection: collection to which strip will be added - * \return false if strip is already in set, otherwise true - */ bool SEQ_collection_append_strip(Sequence *seq, SeqCollection *collection) { void **key; @@ -198,24 +138,11 @@ bool SEQ_collection_append_strip(Sequence *seq, SeqCollection *collection) return true; } -/** - * Remove strip from collection. - * - * \param seq: strip to be removed - * \param collection: collection from which strip will be removed - * \return true if strip exists in set and it was removed from set, otherwise false - */ bool SEQ_collection_remove_strip(Sequence *seq, SeqCollection *collection) { return BLI_gset_remove(collection->set, seq, NULL); } -/** - * Move strips from collection_src to collection_dst. Source collection will be freed. - * - * \param collection_dst: destination collection - * \param collection_src: source collection - */ void SEQ_collection_merge(SeqCollection *collection_dst, SeqCollection *collection_src) { Sequence *seq; @@ -225,13 +152,6 @@ void SEQ_collection_merge(SeqCollection *collection_dst, SeqCollection *collecti SEQ_collection_free(collection_src); } -/** - * 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; @@ -241,14 +161,6 @@ void SEQ_collection_exclude(SeqCollection *collection, SeqCollection *exclude_el 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. - * - * \param seqbase: ListBase in which strips are queried - * \param collection: SeqCollection to be expanded - * \param seq_query_func: query function callback - */ void SEQ_collection_expand(ListBase *seqbase, SeqCollection *collection, void seq_query_func(Sequence *seq_reference, @@ -267,12 +179,6 @@ void SEQ_collection_expand(ListBase *seqbase, SEQ_collection_merge(collection, query_matches); } -/** - * Duplicate collection - * - * \param collection: collection to be duplicated - * \return duplicate of collection - */ SeqCollection *SEQ_collection_duplicate(SeqCollection *collection) { SeqCollection *duplicate = SEQ_collection_create(__func__); @@ -295,12 +201,6 @@ static void query_all_strips_recursive(ListBase *seqbase, SeqCollection *collect } } -/** - * Query all strips in seqbase and nested meta strips. - * - * \param seqbase: ListBase in which strips are queried - * \return strip collection - */ SeqCollection *SEQ_query_all_strips_recursive(ListBase *seqbase) { SeqCollection *collection = SEQ_collection_create(__func__); @@ -313,12 +213,6 @@ SeqCollection *SEQ_query_all_strips_recursive(ListBase *seqbase) return collection; } -/** - * Query all strips in seqbase. This does not include strips nested in meta strips. - * - * \param seqbase: ListBase in which strips are queried - * \return strip collection - */ SeqCollection *SEQ_query_all_strips(ListBase *seqbase) { SeqCollection *collection = SEQ_collection_create(__func__); @@ -328,12 +222,6 @@ SeqCollection *SEQ_query_all_strips(ListBase *seqbase) return collection; } -/** - * Query all selected strips in seqbase. - * - * \param seqbase: ListBase in which strips are queried - * \return strip collection - */ SeqCollection *SEQ_query_selected_strips(ListBase *seqbase) { SeqCollection *collection = SEQ_collection_create(__func__); @@ -434,14 +322,6 @@ static void collection_filter_rendered_strips(SeqCollection *collection) } } -/** - * Query strips that are rendered at \a timeline_frame when \a displayed channel is viewed - * - * \param seqbase: ListBase in which strips are queried - * \param timeline_frame: viewed frame - * \param displayed_channel: viewed channel. when set to 0, no channel filter is applied - * \return strip collection - */ SeqCollection *SEQ_query_rendered_strips(ListBase *seqbase, const int timeline_frame, const int displayed_channel) @@ -454,12 +334,6 @@ SeqCollection *SEQ_query_rendered_strips(ListBase *seqbase, return collection; } -/** - * Query all unselected strips in seqbase. - * - * \param seqbase: ListBase in which strips are queried - * \return strip collection - */ SeqCollection *SEQ_query_unselected_strips(ListBase *seqbase) { SeqCollection *collection = SEQ_collection_create(__func__); @@ -472,15 +346,6 @@ SeqCollection *SEQ_query_unselected_strips(ListBase *seqbase) return collection; } -/** - * Query all effect strips that are directly or indirectly connected to seq_reference. - * This includes all effects of seq_reference, strips used by another inputs and their effects, so - * that whole chain is fully independent of other strips. - * - * \param seq_reference: reference strip - * \param seqbase: ListBase in which strips are queried - * \param collection: collection to be filled - */ void SEQ_query_strip_effect_chain(Sequence *seq_reference, ListBase *seqbase, SeqCollection *collection) |