diff options
author | Richard Antalik <richardantalik@gmail.com> | 2021-12-01 14:30:57 +0300 |
---|---|---|
committer | Richard Antalik <richardantalik@gmail.com> | 2021-12-01 14:49:17 +0300 |
commit | 1ef8ef4941dd84c8968109b5c858ed8d082d9187 (patch) | |
tree | 38bbdc6eabd661b2022ed1b0bb833ad601e87d3d /source/blender/sequencer | |
parent | d5d91b4ae41b9861d8294d055f4e7db0499b0026 (diff) |
Cleanup: Remove seq->tmp_flag DNA member
Commit f0d20198b290 used this field to flag rendered strips which were
queried by `SEQ_query_rendered_strips()`. Then operators iterate all
strips and checks state of `seq->tmp_flag`.
Use collection returned by `SEQ_query_rendered_strips` directly.
There should be no functional changes.
This commit adds functions `all_strips_from_context` and
`selected_strips_from_context` that provide collection of strips based
on context. Most operators can use this collection directly.
There is already `seq->tmp` DNA field, but is should not be used unless
absolutely necessary. Better option is to use human readable flag.
Best is to not use DNA fields for temporary storage in runtime.
Diffstat (limited to 'source/blender/sequencer')
-rw-r--r-- | source/blender/sequencer/SEQ_iterator.h | 5 | ||||
-rw-r--r-- | source/blender/sequencer/intern/iterator.c | 26 |
2 files changed, 0 insertions, 31 deletions
diff --git a/source/blender/sequencer/SEQ_iterator.h b/source/blender/sequencer/SEQ_iterator.h index 4de7c09640b..d2a47a13db3 100644 --- a/source/blender/sequencer/SEQ_iterator.h +++ b/source/blender/sequencer/SEQ_iterator.h @@ -104,11 +104,6 @@ void SEQ_query_strip_effect_chain(struct Sequence *seq_reference, SeqCollection *collection); void SEQ_filter_selected_strips(SeqCollection *collection); -/* Utilities to access these as tags. */ -int SEQ_query_rendered_strips_to_tag(ListBase *seqbase, - const int timeline_frame, - const int displayed_channel); - #ifdef __cplusplus } #endif diff --git a/source/blender/sequencer/intern/iterator.c b/source/blender/sequencer/intern/iterator.c index 68f632ddb28..a12a5cbdc61 100644 --- a/source/blender/sequencer/intern/iterator.c +++ b/source/blender/sequencer/intern/iterator.c @@ -520,29 +520,3 @@ void SEQ_filter_selected_strips(SeqCollection *collection) } } } - -static void seq_collection_to_tag(ListBase *seqbase, SeqCollection *collection) -{ - LISTBASE_FOREACH (Sequence *, seq, seqbase) { - seq->tmp_tag = false; - } - Sequence *seq; - SEQ_ITERATOR_FOREACH (seq, collection) { - seq->tmp_tag = true; - } -} - -/* Utilities to access these as tags. */ -int SEQ_query_rendered_strips_to_tag(ListBase *seqbase, - const int timeline_frame, - const int displayed_channel) -{ - SeqCollection *collection = SEQ_query_rendered_strips( - seqbase, timeline_frame, displayed_channel); - - seq_collection_to_tag(seqbase, collection); - - const int len = SEQ_collection_len(collection); - SEQ_collection_free(collection); - return len; -} |