From f7a14c116c4de9a0ac2a07d7c6fa3097a018a668 Mon Sep 17 00:00:00 2001 From: Richard Antalik Date: Tue, 18 May 2021 23:28:00 +0200 Subject: VSE: Move whole strip chain to meta Python API function Sequence.move_to_meta() did delete effect chain when strip with effects was moved. Use iterator API to query effect strips and move whole chain to meta. Reviewed By: sergey Differential Revision: https://developer.blender.org/D11206 --- .../editors/space_sequencer/sequencer_select.c | 33 +--------------------- 1 file changed, 1 insertion(+), 32 deletions(-) (limited to 'source/blender/editors/space_sequencer/sequencer_select.c') diff --git a/source/blender/editors/space_sequencer/sequencer_select.c b/source/blender/editors/space_sequencer/sequencer_select.c index e08af8f0977..3128ec06b68 100644 --- a/source/blender/editors/space_sequencer/sequencer_select.c +++ b/source/blender/editors/space_sequencer/sequencer_select.c @@ -1621,37 +1621,6 @@ static bool select_grouped_time_overlap(Editing *ed, Sequence *actseq) return changed; } -/* Query all effect strips that are directly or indirectly connected to seq_reference. */ -static void query_strip_effect_chain(Sequence *seq_reference, - ListBase *seqbase, - SeqCollection *collection) -{ - if (!SEQ_collection_append_strip(seq_reference, collection)) { - return; /* Strip is already in set, so all effects connected to it are as well. */ - } - - /* Find all strips that seq_reference is connected to. */ - if (seq_reference->type & SEQ_TYPE_EFFECT) { - if (seq_reference->seq1) { - query_strip_effect_chain(seq_reference->seq1, seqbase, collection); - } - if (seq_reference->seq2) { - query_strip_effect_chain(seq_reference->seq2, seqbase, collection); - } - if (seq_reference->seq3) { - query_strip_effect_chain(seq_reference->seq3, seqbase, collection); - } - } - - /* Find all strips connected to seq_reference. */ - LISTBASE_FOREACH (Sequence *, seq_test, seqbase) { - if (seq_test->seq1 == seq_reference || seq_test->seq2 == seq_reference || - seq_test->seq3 == seq_reference) { - query_strip_effect_chain(seq_test, seqbase, collection); - } - } -} - /* Query strips that are in lower channel and intersect in time with seq_reference. */ static void query_lower_channel_strips(Sequence *seq_reference, ListBase *seqbase, @@ -1681,7 +1650,7 @@ static bool select_grouped_effect_link(Editing *ed, SeqCollection *collection = SEQ_query_selected_strips(seqbase); const int selected_strip_count = BLI_gset_len(collection->set); SEQ_collection_expand(seqbase, collection, query_lower_channel_strips); - SEQ_collection_expand(seqbase, collection, query_strip_effect_chain); + SEQ_collection_expand(seqbase, collection, SEQ_query_strip_effect_chain); /* Check if other strips will be affected. */ const bool changed = BLI_gset_len(collection->set) > selected_strip_count; -- cgit v1.2.3 From 7655cc45eb9256f699d40be105cbb6fe93f2e119 Mon Sep 17 00:00:00 2001 From: Richard Antalik Date: Thu, 20 May 2021 05:00:13 +0200 Subject: VSE: Fix select strips at current frame feature This feature of `select_side_of_frame` was disabled by removing option from operator property enum but functional code was never removed. Add back option to use this feature. Feature was disabled due to keymap issue. Currently this feature doesn't have keymap assigned. --- source/blender/editors/space_sequencer/sequencer_select.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'source/blender/editors/space_sequencer/sequencer_select.c') diff --git a/source/blender/editors/space_sequencer/sequencer_select.c b/source/blender/editors/space_sequencer/sequencer_select.c index 3128ec06b68..e386a48ed7e 100644 --- a/source/blender/editors/space_sequencer/sequencer_select.c +++ b/source/blender/editors/space_sequencer/sequencer_select.c @@ -1186,7 +1186,7 @@ static int sequencer_select_side_of_frame_exec(bContext *C, wmOperator *op) case 1: test = (timeline_frame <= seq->startdisp); break; - case 0: + case 2: test = (timeline_frame <= seq->enddisp) && (timeline_frame >= seq->startdisp); break; } @@ -1209,6 +1209,7 @@ void SEQUENCER_OT_select_side_of_frame(wmOperatorType *ot) static const EnumPropertyItem sequencer_select_left_right_types[] = { {-1, "LEFT", 0, "Left", "Select to the left of the current frame"}, {1, "RIGHT", 0, "Right", "Select to the right of the current frame"}, + {2, "CURRENT", 0, "Current frame", "Select intersecting with the current frame"}, {0, NULL, 0, NULL, NULL}, }; -- cgit v1.2.3 From ba9cf9173667ceb5995838d33a2c35becfd9d693 Mon Sep 17 00:00:00 2001 From: Richard Antalik Date: Fri, 21 May 2021 01:05:46 +0200 Subject: Cleanup: spelling --- source/blender/editors/space_sequencer/sequencer_select.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender/editors/space_sequencer/sequencer_select.c') diff --git a/source/blender/editors/space_sequencer/sequencer_select.c b/source/blender/editors/space_sequencer/sequencer_select.c index e386a48ed7e..cfc11afce13 100644 --- a/source/blender/editors/space_sequencer/sequencer_select.c +++ b/source/blender/editors/space_sequencer/sequencer_select.c @@ -1209,7 +1209,7 @@ void SEQUENCER_OT_select_side_of_frame(wmOperatorType *ot) static const EnumPropertyItem sequencer_select_left_right_types[] = { {-1, "LEFT", 0, "Left", "Select to the left of the current frame"}, {1, "RIGHT", 0, "Right", "Select to the right of the current frame"}, - {2, "CURRENT", 0, "Current frame", "Select intersecting with the current frame"}, + {2, "CURRENT", 0, "Current Frame", "Select intersecting with the current frame"}, {0, NULL, 0, NULL, NULL}, }; -- cgit v1.2.3