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:
authorRichard Antalik <richardantalik@gmail.com>2022-04-04 13:52:48 +0300
committerRichard Antalik <richardantalik@gmail.com>2022-04-04 13:56:43 +0300
commit277fa2f441f4ab2c00e7f329ba34a3466956647c (patch)
treebde615d956239337f88575dc7ce79d26f0f6cf4f /source/blender/sequencer/intern
parent5a0b4e97e67446ef3a180acb0ad03b4cbf91b356 (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')
-rw-r--r--source/blender/sequencer/intern/channels.c83
-rw-r--r--source/blender/sequencer/intern/effects.c8
-rw-r--r--source/blender/sequencer/intern/iterator.c10
-rw-r--r--source/blender/sequencer/intern/prefetch.c13
-rw-r--r--source/blender/sequencer/intern/render.c31
-rw-r--r--source/blender/sequencer/intern/render.h4
-rw-r--r--source/blender/sequencer/intern/sequencer.c19
-rw-r--r--source/blender/sequencer/intern/strip_edit.c14
-rw-r--r--source/blender/sequencer/intern/strip_time.c6
-rw-r--r--source/blender/sequencer/intern/strip_transform.c7
-rw-r--r--source/blender/sequencer/intern/utils.c6
11 files changed, 174 insertions, 27 deletions
diff --git a/source/blender/sequencer/intern/channels.c b/source/blender/sequencer/intern/channels.c
new file mode 100644
index 00000000000..e8e82af03f5
--- /dev/null
+++ b/source/blender/sequencer/intern/channels.c
@@ -0,0 +1,83 @@
+/* SPDX-License-Identifier: GPL-2.0-or-later
+ * Copyright 2022 Blender Foundation. All rights reserved. */
+
+/** \file
+ * \ingroup sequencer
+ */
+
+#include <string.h>
+
+#include "MEM_guardedalloc.h"
+
+#include "DNA_listBase.h"
+#include "DNA_scene_types.h"
+#include "DNA_sequence_types.h"
+
+#include "BLI_blenlib.h"
+
+#include "SEQ_channels.h"
+#include "SEQ_iterator.h"
+#include "SEQ_relations.h"
+#include "SEQ_sequencer.h"
+
+ListBase *SEQ_channels_displayed_get(Editing *ed)
+{
+ return ed->displayed_channels;
+}
+
+void SEQ_channels_displayed_set(Editing *ed, ListBase *channels)
+{
+ ed->displayed_channels = channels;
+}
+
+void SEQ_channels_ensure(ListBase *channels)
+{
+ /* Allocate channels. Channel 0 is never used, but allocated to prevent off by 1 issues. */
+ for (int i = 0; i < MAXSEQ + 1; i++) {
+ SeqTimelineChannel *channel = MEM_callocN(sizeof(SeqTimelineChannel), "seq timeline channel");
+ BLI_snprintf(channel->name, sizeof(channel->name), "Channel %d", i);
+ channel->index = i;
+ BLI_addtail(channels, channel);
+ }
+}
+
+void SEQ_channels_duplicate(ListBase *channels_dst, ListBase *channels_src)
+{
+ LISTBASE_FOREACH (SeqTimelineChannel *, channel, channels_src) {
+ SeqTimelineChannel *channel_duplicate = MEM_dupallocN(channel);
+ BLI_addtail(channels_dst, channel_duplicate);
+ }
+}
+
+void SEQ_channels_free(ListBase *channels)
+{
+ LISTBASE_FOREACH_MUTABLE (SeqTimelineChannel *, channel, channels) {
+ MEM_freeN(channel);
+ }
+}
+
+SeqTimelineChannel *SEQ_channel_get_by_index(const ListBase *channels, const int channel_index)
+{
+ return BLI_findlink(channels, channel_index);
+}
+
+char *SEQ_channel_name_get(ListBase *channels, const int channel_index)
+{
+ SeqTimelineChannel *channel = SEQ_channel_get_by_index(channels, channel_index);
+ return channel->name;
+}
+
+int SEQ_channel_index_get(const SeqTimelineChannel *channel)
+{
+ return channel->index;
+}
+
+bool SEQ_channel_is_locked(const SeqTimelineChannel *channel)
+{
+ return (channel->flag & SEQ_CHANNEL_LOCK) != 0;
+}
+
+bool SEQ_channel_is_muted(const SeqTimelineChannel *channel)
+{
+ return (channel->flag & SEQ_CHANNEL_MUTE) != 0;
+}
diff --git a/source/blender/sequencer/intern/effects.c b/source/blender/sequencer/intern/effects.c
index a4ab7671eb0..70f83485bb5 100644
--- a/source/blender/sequencer/intern/effects.c
+++ b/source/blender/sequencer/intern/effects.c
@@ -2422,6 +2422,7 @@ static ImBuf *do_multicam(const SeqRenderData *context,
ImBuf *out;
Editing *ed;
ListBase *seqbasep;
+ ListBase *channels = &seq->channels;
if (seq->multicam_source == 0 || seq->multicam_source >= seq->machine) {
return NULL;
@@ -2436,7 +2437,8 @@ static ImBuf *do_multicam(const SeqRenderData *context,
return NULL;
}
- out = seq_render_give_ibuf_seqbase(context, timeline_frame, seq->multicam_source, seqbasep);
+ out = seq_render_give_ibuf_seqbase(
+ context, timeline_frame, seq->multicam_source, channels, seqbasep);
return out;
}
@@ -2462,6 +2464,7 @@ static ImBuf *do_adjustment_impl(const SeqRenderData *context, Sequence *seq, fl
{
Editing *ed;
ListBase *seqbasep;
+ ListBase *channels = &seq->channels;
ImBuf *i = NULL;
ed = context->scene->ed;
@@ -2474,7 +2477,8 @@ static ImBuf *do_adjustment_impl(const SeqRenderData *context, Sequence *seq, fl
timeline_frame = clamp_i(timeline_frame, seq->startdisp, seq->enddisp - 1);
if (seq->machine > 1) {
- i = seq_render_give_ibuf_seqbase(context, timeline_frame, seq->machine - 1, seqbasep);
+ i = seq_render_give_ibuf_seqbase(
+ context, timeline_frame, seq->machine - 1, channels, seqbasep);
}
/* Found nothing? so let's work the way up the meta-strip stack, so
diff --git a/source/blender/sequencer/intern/iterator.c b/source/blender/sequencer/intern/iterator.c
index 4b378738c89..a4d8cf79d1f 100644
--- a/source/blender/sequencer/intern/iterator.c
+++ b/source/blender/sequencer/intern/iterator.c
@@ -20,6 +20,7 @@
#include "BKE_scene.h"
#include "SEQ_iterator.h"
+#include "SEQ_render.h"
#include "SEQ_time.h"
#include "render.h"
@@ -285,14 +286,14 @@ static bool must_render_strip(const Sequence *seq, SeqCollection *strips_at_time
}
/* Remove strips we don't want to render from collection. */
-static void collection_filter_rendered_strips(SeqCollection *collection)
+static void collection_filter_rendered_strips(ListBase *channels, SeqCollection *collection)
{
Sequence *seq;
/* Remove sound strips and muted strips from collection, because these are not rendered.
* Function #must_render_strip() don't have to check for these strips anymore. */
SEQ_ITERATOR_FOREACH (seq, collection) {
- if (seq->type == SEQ_TYPE_SOUND_RAM || (seq->flag & SEQ_MUTE) != 0) {
+ if (seq->type == SEQ_TYPE_SOUND_RAM || SEQ_render_is_muted(channels, seq)) {
SEQ_collection_remove_strip(seq, collection);
}
}
@@ -305,7 +306,8 @@ static void collection_filter_rendered_strips(SeqCollection *collection)
}
}
-SeqCollection *SEQ_query_rendered_strips(ListBase *seqbase,
+SeqCollection *SEQ_query_rendered_strips(ListBase *channels,
+ ListBase *seqbase,
const int timeline_frame,
const int displayed_channel)
{
@@ -313,7 +315,7 @@ SeqCollection *SEQ_query_rendered_strips(ListBase *seqbase,
if (displayed_channel != 0) {
collection_filter_channel_up_to_incl(collection, displayed_channel);
}
- collection_filter_rendered_strips(collection);
+ collection_filter_rendered_strips(channels, collection);
return collection;
}
diff --git a/source/blender/sequencer/intern/prefetch.c b/source/blender/sequencer/intern/prefetch.c
index 0b5ab0dd86c..01f581bc6c1 100644
--- a/source/blender/sequencer/intern/prefetch.c
+++ b/source/blender/sequencer/intern/prefetch.c
@@ -37,6 +37,7 @@
#include "DEG_depsgraph_debug.h"
#include "DEG_depsgraph_query.h"
+#include "SEQ_channels.h"
#include "SEQ_iterator.h"
#include "SEQ_prefetch.h"
#include "SEQ_relations.h"
@@ -387,19 +388,20 @@ static bool seq_prefetch_seq_has_disk_cache(PrefetchJob *pfjob,
}
static bool seq_prefetch_scene_strip_is_rendered(PrefetchJob *pfjob,
+ ListBase *channels,
ListBase *seqbase,
SeqCollection *scene_strips,
bool is_recursive_check)
{
float cfra = seq_prefetch_cfra(pfjob);
Sequence *seq_arr[MAXSEQ + 1];
- int count = seq_get_shown_sequences(seqbase, cfra, 0, seq_arr);
+ int count = seq_get_shown_sequences(channels, seqbase, cfra, 0, seq_arr);
/* Iterate over rendered strips. */
for (int i = 0; i < count; i++) {
Sequence *seq = seq_arr[i];
if (seq->type == SEQ_TYPE_META &&
- seq_prefetch_scene_strip_is_rendered(pfjob, &seq->seqbase, scene_strips, true)) {
+ seq_prefetch_scene_strip_is_rendered(pfjob, channels, &seq->seqbase, scene_strips, true)) {
return true;
}
@@ -433,10 +435,10 @@ static SeqCollection *query_scene_strips(ListBase *seqbase)
/* Prefetch must avoid rendering scene strips, because rendering in background locks UI and can
* make it unresponsive for long time periods. */
-static bool seq_prefetch_must_skip_frame(PrefetchJob *pfjob, ListBase *seqbase)
+static bool seq_prefetch_must_skip_frame(PrefetchJob *pfjob, ListBase *channels, ListBase *seqbase)
{
SeqCollection *scene_strips = query_scene_strips(seqbase);
- if (seq_prefetch_scene_strip_is_rendered(pfjob, seqbase, scene_strips, false)) {
+ if (seq_prefetch_scene_strip_is_rendered(pfjob, channels, seqbase, scene_strips, false)) {
SEQ_collection_free(scene_strips);
return true;
}
@@ -485,7 +487,8 @@ static void *seq_prefetch_frames(void *job)
pfjob->scene_eval->ed->prefetch_job = pfjob;
ListBase *seqbase = SEQ_active_seqbase_get(SEQ_editing_get(pfjob->scene_eval));
- if (seq_prefetch_must_skip_frame(pfjob, seqbase)) {
+ ListBase *channels = SEQ_channels_displayed_get(SEQ_editing_get(pfjob->scene_eval));
+ if (seq_prefetch_must_skip_frame(pfjob, channels, seqbase)) {
pfjob->num_frames_prefetched++;
continue;
}
diff --git a/source/blender/sequencer/intern/render.c b/source/blender/sequencer/intern/render.c
index 3f4d1e875f3..18b0794dc72 100644
--- a/source/blender/sequencer/intern/render.c
+++ b/source/blender/sequencer/intern/render.c
@@ -50,6 +50,7 @@
#include "RE_engine.h"
#include "RE_pipeline.h"
+#include "SEQ_channels.h"
#include "SEQ_effects.h"
#include "SEQ_iterator.h"
#include "SEQ_modifier.h"
@@ -72,6 +73,7 @@
static ImBuf *seq_render_strip_stack(const SeqRenderData *context,
SeqRenderState *state,
+ ListBase *channels,
ListBase *seqbasep,
float timeline_frame,
int chanshown);
@@ -256,12 +258,14 @@ static int seq_channel_cmp_fn(const void *a, const void *b)
return (*(Sequence **)a)->machine - (*(Sequence **)b)->machine;
}
-int seq_get_shown_sequences(ListBase *seqbase,
+int seq_get_shown_sequences(ListBase *channels,
+ ListBase *seqbase,
const int timeline_frame,
const int chanshown,
Sequence **r_seq_arr)
{
- SeqCollection *collection = SEQ_query_rendered_strips(seqbase, timeline_frame, chanshown);
+ SeqCollection *collection = SEQ_query_rendered_strips(
+ channels, seqbase, timeline_frame, chanshown);
const int strip_count = BLI_gset_len(collection->set);
if (strip_count > MAXSEQ) {
@@ -1582,6 +1586,7 @@ static ImBuf *do_render_strip_seqbase(const SeqRenderData *context,
{
ImBuf *ibuf = NULL;
ListBase *seqbase = NULL;
+ ListBase *channels = &seq->channels;
int offset;
seqbase = SEQ_get_seqbase_from_sequence(seq, &offset);
@@ -1594,6 +1599,7 @@ static ImBuf *do_render_strip_seqbase(const SeqRenderData *context,
ibuf = seq_render_strip_stack(context,
state,
+ channels,
seqbase,
/* scene strips don't have their start taken into account */
frame_index + offset,
@@ -1809,6 +1815,7 @@ static ImBuf *seq_render_strip_stack_apply_effect(
static ImBuf *seq_render_strip_stack(const SeqRenderData *context,
SeqRenderState *state,
+ ListBase *channels,
ListBase *seqbasep,
float timeline_frame,
int chanshown)
@@ -1818,7 +1825,8 @@ static ImBuf *seq_render_strip_stack(const SeqRenderData *context,
int i;
ImBuf *out = NULL;
- count = seq_get_shown_sequences(seqbasep, timeline_frame, chanshown, (Sequence **)&seq_arr);
+ count = seq_get_shown_sequences(
+ channels, seqbasep, timeline_frame, chanshown, (Sequence **)&seq_arr);
if (count == 0) {
return NULL;
@@ -1909,6 +1917,7 @@ ImBuf *SEQ_render_give_ibuf(const SeqRenderData *context, float timeline_frame,
Scene *scene = context->scene;
Editing *ed = SEQ_editing_get(scene);
ListBase *seqbasep;
+ ListBase *channels;
if (ed == NULL) {
return NULL;
@@ -1918,9 +1927,11 @@ ImBuf *SEQ_render_give_ibuf(const SeqRenderData *context, float timeline_frame,
int count = BLI_listbase_count(&ed->metastack);
count = max_ii(count + chanshown, 0);
seqbasep = ((MetaStack *)BLI_findlink(&ed->metastack, count))->oldbasep;
+ channels = ((MetaStack *)BLI_findlink(&ed->metastack, count))->old_channels;
}
else {
seqbasep = ed->seqbasep;
+ channels = ed->displayed_channels;
}
SeqRenderState state;
@@ -1929,7 +1940,7 @@ ImBuf *SEQ_render_give_ibuf(const SeqRenderData *context, float timeline_frame,
Sequence *seq_arr[MAXSEQ + 1];
int count;
- count = seq_get_shown_sequences(seqbasep, timeline_frame, chanshown, seq_arr);
+ count = seq_get_shown_sequences(channels, seqbasep, timeline_frame, chanshown, seq_arr);
if (count) {
out = seq_cache_get(context, seq_arr[count - 1], timeline_frame, SEQ_CACHE_STORE_FINAL_OUT);
@@ -1941,7 +1952,7 @@ ImBuf *SEQ_render_give_ibuf(const SeqRenderData *context, float timeline_frame,
if (count && !out) {
BLI_mutex_lock(&seq_render_mutex);
- out = seq_render_strip_stack(context, &state, seqbasep, timeline_frame, chanshown);
+ out = seq_render_strip_stack(context, &state, channels, seqbasep, timeline_frame, chanshown);
if (context->is_prefetch_render) {
seq_cache_put(context, seq_arr[count - 1], timeline_frame, SEQ_CACHE_STORE_FINAL_OUT, out);
@@ -1961,12 +1972,13 @@ ImBuf *SEQ_render_give_ibuf(const SeqRenderData *context, float timeline_frame,
ImBuf *seq_render_give_ibuf_seqbase(const SeqRenderData *context,
float timeline_frame,
int chan_shown,
+ ListBase *channels,
ListBase *seqbasep)
{
SeqRenderState state;
seq_render_state_init(&state);
- return seq_render_strip_stack(context, &state, seqbasep, timeline_frame, chan_shown);
+ return seq_render_strip_stack(context, &state, channels, seqbasep, timeline_frame, chan_shown);
}
ImBuf *SEQ_render_give_ibuf_direct(const SeqRenderData *context,
@@ -2135,4 +2147,11 @@ void SEQ_render_thumbnails_base_set(const SeqRenderData *context,
}
}
+bool SEQ_render_is_muted(const ListBase *channels, const Sequence *seq)
+{
+
+ SeqTimelineChannel *channel = SEQ_channel_get_by_index(channels, seq->machine);
+ return seq->flag & SEQ_MUTE || SEQ_channel_is_muted(channel);
+}
+
/** \} */
diff --git a/source/blender/sequencer/intern/render.h b/source/blender/sequencer/intern/render.h
index 9a41cd8888a..d41a0e3f86f 100644
--- a/source/blender/sequencer/intern/render.h
+++ b/source/blender/sequencer/intern/render.h
@@ -33,6 +33,7 @@ void seq_render_state_init(SeqRenderState *state);
struct ImBuf *seq_render_give_ibuf_seqbase(const struct SeqRenderData *context,
float timeline_frame,
int chan_shown,
+ struct ListBase *channels,
struct ListBase *seqbasep);
struct ImBuf *seq_render_effect_execute_threaded(struct SeqEffectHandle *sh,
const struct SeqRenderData *context,
@@ -43,7 +44,8 @@ struct ImBuf *seq_render_effect_execute_threaded(struct SeqEffectHandle *sh,
struct ImBuf *ibuf2,
struct ImBuf *ibuf3);
void seq_imbuf_to_sequencer_space(struct Scene *scene, struct ImBuf *ibuf, bool make_float);
-int seq_get_shown_sequences(struct ListBase *seqbase,
+int seq_get_shown_sequences(struct ListBase *channels,
+ struct ListBase *seqbase,
int timeline_frame,
int chanshown,
struct Sequence **r_seq_arr);
diff --git a/source/blender/sequencer/intern/sequencer.c b/source/blender/sequencer/intern/sequencer.c
index 345d26718fd..baa06e133b7 100644
--- a/source/blender/sequencer/intern/sequencer.c
+++ b/source/blender/sequencer/intern/sequencer.c
@@ -27,6 +27,7 @@
#include "IMB_colormanagement.h"
#include "IMB_imbuf.h"
+#include "SEQ_channels.h"
#include "SEQ_edit.h"
#include "SEQ_effects.h"
#include "SEQ_iterator.h"
@@ -135,6 +136,10 @@ Sequence *SEQ_sequence_alloc(ListBase *lb, int timeline_frame, int machine, int
seq->color_tag = SEQUENCE_COLOR_NONE;
+ if (seq->type == SEQ_TYPE_META) {
+ SEQ_channels_ensure(&seq->channels);
+ }
+
SEQ_relations_session_uuid_generate(seq);
return seq;
@@ -201,6 +206,9 @@ static void seq_sequence_free_ex(Scene *scene,
SEQ_relations_invalidate_cache_raw(scene, seq);
}
}
+ if (seq->type == SEQ_TYPE_META) {
+ SEQ_channels_free(&seq->channels);
+ }
MEM_freeN(seq);
}
@@ -260,6 +268,7 @@ void SEQ_editing_free(Scene *scene, const bool do_id_user)
BLI_freelistN(&ed->metastack);
SEQ_sequence_lookup_free(scene);
+ SEQ_channels_free(&ed->channels);
MEM_freeN(ed);
scene->ed = NULL;
@@ -386,6 +395,7 @@ MetaStack *SEQ_meta_stack_alloc(Editing *ed, Sequence *seq_meta)
BLI_addtail(&ed->metastack, ms);
ms->parseq = seq_meta;
ms->oldbasep = ed->seqbasep;
+ ms->old_channels = ed->displayed_channels;
copy_v2_v2_int(ms->disp_range, &ms->parseq->startdisp);
return ms;
}
@@ -460,6 +470,9 @@ static Sequence *seq_dupli(const Scene *scene_src,
BLI_listbase_clear(&seqn->seqbase);
/* WARNING: This meta-strip is not recursively duplicated here - do this after! */
// seq_dupli_recursive(&seq->seqbase, &seqn->seqbase);
+
+ BLI_listbase_clear(&seqn->channels);
+ SEQ_channels_duplicate(&seqn->channels, &seq->channels);
}
else if (seq->type == SEQ_TYPE_SCENE) {
seqn->strip->stripdata = NULL;
@@ -686,6 +699,10 @@ static bool seq_write_data_cb(Sequence *seq, void *userdata)
}
SEQ_modifier_blend_write(writer, &seq->modifiers);
+
+ LISTBASE_FOREACH (SeqTimelineChannel *, channel, &seq->channels) {
+ BLO_write_struct(writer, SeqTimelineChannel, channel);
+ }
return true;
}
@@ -753,6 +770,8 @@ static bool seq_read_data_cb(Sequence *seq, void *user_data)
}
SEQ_modifier_blend_read_data(reader, &seq->modifiers);
+
+ BLO_read_list(reader, &seq->channels);
return true;
}
void SEQ_blend_read(BlendDataReader *reader, ListBase *seqbase)
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);
}
}
}
diff --git a/source/blender/sequencer/intern/strip_time.c b/source/blender/sequencer/intern/strip_time.c
index ec908dcdc93..06571b7ad43 100644
--- a/source/blender/sequencer/intern/strip_time.c
+++ b/source/blender/sequencer/intern/strip_time.c
@@ -20,6 +20,7 @@
#include "DNA_sound_types.h"
#include "IMB_imbuf.h"
+#include "SEQ_channels.h"
#include "SEQ_iterator.h"
#include "SEQ_render.h"
#include "SEQ_sequencer.h"
@@ -321,6 +322,7 @@ int SEQ_time_find_next_prev_edit(Scene *scene,
const bool do_unselected)
{
Editing *ed = SEQ_editing_get(scene);
+ ListBase *channels = SEQ_channels_displayed_get(ed);
Sequence *seq;
int dist, best_dist, best_frame = timeline_frame;
@@ -338,7 +340,7 @@ int SEQ_time_find_next_prev_edit(Scene *scene,
for (seq = ed->seqbasep->first; seq; seq = seq->next) {
int i;
- if (do_skip_mute && (seq->flag & SEQ_MUTE)) {
+ if (do_skip_mute && SEQ_render_is_muted(channels, seq)) {
continue;
}
@@ -442,7 +444,7 @@ void SEQ_timeline_expand_boundbox(const ListBase *seqbase, rctf *rect)
if (rect->xmax < seq->enddisp + 1) {
rect->xmax = seq->enddisp + 1;
}
- if (rect->ymax < seq->machine + 2) {
+ if (rect->ymax < seq->machine) {
rect->ymax = seq->machine + 2;
}
}
diff --git a/source/blender/sequencer/intern/strip_transform.c b/source/blender/sequencer/intern/strip_transform.c
index ddf75f3d664..618fed079f4 100644
--- a/source/blender/sequencer/intern/strip_transform.c
+++ b/source/blender/sequencer/intern/strip_transform.c
@@ -17,6 +17,7 @@
#include "BKE_sound.h"
#include "SEQ_animation.h"
+#include "SEQ_channels.h"
#include "SEQ_effects.h"
#include "SEQ_iterator.h"
#include "SEQ_relations.h"
@@ -391,6 +392,12 @@ void SEQ_transform_offset_after_frame(Scene *scene,
}
}
+bool SEQ_transform_is_locked(ListBase *channels, Sequence *seq)
+{
+ SeqTimelineChannel *channel = SEQ_channel_get_by_index(channels, seq->machine);
+ return seq->flag & SEQ_LOCK || SEQ_channel_is_locked(channel);
+}
+
void SEQ_image_transform_mirror_factor_get(const Sequence *seq, float r_mirror[2])
{
r_mirror[0] = 1.0f;
diff --git a/source/blender/sequencer/intern/utils.c b/source/blender/sequencer/intern/utils.c
index 0c37fb11c04..da422c4228f 100644
--- a/source/blender/sequencer/intern/utils.c
+++ b/source/blender/sequencer/intern/utils.c
@@ -24,6 +24,7 @@
#include "BKE_scene.h"
#include "SEQ_animation.h"
+#include "SEQ_channels.h"
#include "SEQ_edit.h"
#include "SEQ_iterator.h"
#include "SEQ_relations.h"
@@ -380,7 +381,8 @@ void seq_open_anim_file(Scene *scene, Sequence *seq, bool openfile)
const Sequence *SEQ_get_topmost_sequence(const Scene *scene, int frame)
{
- const Editing *ed = scene->ed;
+ Editing *ed = scene->ed;
+ ListBase *channels = SEQ_channels_displayed_get(ed);
const Sequence *seq, *best_seq = NULL;
int best_machine = -1;
@@ -389,7 +391,7 @@ const Sequence *SEQ_get_topmost_sequence(const Scene *scene, int frame)
}
for (seq = ed->seqbasep->first; seq; seq = seq->next) {
- if (seq->flag & SEQ_MUTE || !SEQ_time_strip_intersects_frame(seq, frame)) {
+ if (SEQ_render_is_muted(channels, seq) || !SEQ_time_strip_intersects_frame(seq, frame)) {
continue;
}
/* Only use strips that generate an image, not ones that combine