diff options
author | Richard Antalik <richardantalik@gmail.com> | 2022-04-04 13:52:48 +0300 |
---|---|---|
committer | Richard Antalik <richardantalik@gmail.com> | 2022-04-04 13:56:43 +0300 |
commit | 277fa2f441f4ab2c00e7f329ba34a3466956647c (patch) | |
tree | bde615d956239337f88575dc7ce79d26f0f6cf4f /source/blender/sequencer/intern/strip_edit.c | |
parent | 5a0b4e97e67446ef3a180acb0ad03b4cbf91b356 (diff) |
VSE: Add channel headers
This patch adds channel region to VSE timeline area for drawing channel
headers. It is synchronizedwith timeline region. 3 basic features are
implemented - channel visibility, locking and name.
Channel data is stored in `SeqTimelineChannel` which can be top-level
owned by `Editing`, or it is owned by meta strip to support nesting.
Strip properties are completely independent and channel properties are
applied on top of particular strip property, thus overriding it.
Implementation is separate from channel regions in other editors. This
is mainly because style and topology is quite different in VSE. But
also code seems to be much more readable this way.
Currently channels use functions similar to VSE timeline to draw
background to provide illusion of transparency, but only for background
and sfra/efra regions.
Great portion of this patch is change from using strip visibility and
lock status to include channel state - this is facilitated by functions
`SEQ_transform_is_locked` and `SEQ_render_is_muted`
Originally this included changes in D14263, but patch was split for
easier review.
Reviewed By: fsiddi, Severin
Differential Revision: https://developer.blender.org/D13836
Diffstat (limited to 'source/blender/sequencer/intern/strip_edit.c')
-rw-r--r-- | source/blender/sequencer/intern/strip_edit.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/source/blender/sequencer/intern/strip_edit.c b/source/blender/sequencer/intern/strip_edit.c index 2f76b6240cf..d678518e3b0 100644 --- a/source/blender/sequencer/intern/strip_edit.c +++ b/source/blender/sequencer/intern/strip_edit.c @@ -31,6 +31,7 @@ #include "SEQ_effects.h" #include "SEQ_iterator.h" #include "SEQ_relations.h" +#include "SEQ_render.h" #include "SEQ_sequencer.h" #include "SEQ_time.h" #include "SEQ_transform.h" @@ -91,7 +92,10 @@ int SEQ_edit_sequence_swap(Sequence *seq_a, Sequence *seq_b, const char **error_ return 1; } -static void seq_update_muting_recursive(ListBase *seqbasep, Sequence *metaseq, int mute) +static void seq_update_muting_recursive(ListBase *channels, + ListBase *seqbasep, + Sequence *metaseq, + int mute) { Sequence *seq; int seqmute; @@ -99,7 +103,7 @@ static void seq_update_muting_recursive(ListBase *seqbasep, Sequence *metaseq, i /* For sound we go over full meta tree to update muted state, * since sound is played outside of evaluating the imbufs. */ for (seq = seqbasep->first; seq; seq = seq->next) { - seqmute = (mute || (seq->flag & SEQ_MUTE)); + seqmute = (mute || SEQ_render_is_muted(channels, seq)); if (seq->type == SEQ_TYPE_META) { /* if this is the current meta sequence, unmute because @@ -108,7 +112,7 @@ static void seq_update_muting_recursive(ListBase *seqbasep, Sequence *metaseq, i seqmute = 0; } - seq_update_muting_recursive(&seq->seqbase, metaseq, seqmute); + seq_update_muting_recursive(&seq->channels, &seq->seqbase, metaseq, seqmute); } else if (ELEM(seq->type, SEQ_TYPE_SOUND_RAM, SEQ_TYPE_SCENE)) { if (seq->scene_sound) { @@ -125,10 +129,10 @@ void SEQ_edit_update_muting(Editing *ed) MetaStack *ms = ed->metastack.last; if (ms) { - seq_update_muting_recursive(&ed->seqbase, ms->parseq, 1); + seq_update_muting_recursive(&ed->channels, &ed->seqbase, ms->parseq, 1); } else { - seq_update_muting_recursive(&ed->seqbase, NULL, 0); + seq_update_muting_recursive(&ed->channels, &ed->seqbase, NULL, 0); } } } |