Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2021-10-28 06:31:17 +0300
committerCampbell Barton <ideasman42@gmail.com>2021-10-28 08:52:22 +0300
commitf0d20198b290338a9f58392f98ee43957b0bad61 (patch)
treeecc1e3a68848349e2005d98c4c60a17bcd4df2ed /source/blender/sequencer
parente1fb7740f8866cf2179783c2b13c1d15b3a0e6ec (diff)
Sequencer: support basic selection & delete from previews
Expose select & strip menus and shortcuts for sequencer preview.
Diffstat (limited to 'source/blender/sequencer')
-rw-r--r--source/blender/sequencer/SEQ_iterator.h5
-rw-r--r--source/blender/sequencer/intern/iterator.c26
2 files changed, 31 insertions, 0 deletions
diff --git a/source/blender/sequencer/SEQ_iterator.h b/source/blender/sequencer/SEQ_iterator.h
index d2a47a13db3..4de7c09640b 100644
--- a/source/blender/sequencer/SEQ_iterator.h
+++ b/source/blender/sequencer/SEQ_iterator.h
@@ -104,6 +104,11 @@ 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 a12a5cbdc61..68f632ddb28 100644
--- a/source/blender/sequencer/intern/iterator.c
+++ b/source/blender/sequencer/intern/iterator.c
@@ -520,3 +520,29 @@ 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;
+}