Files
test2/source/blender/sequencer/SEQ_channels.hh
Richard Antalik 0b633fab3e Fix #135631: Locked strip visibility can't be changed
Strip locking was meant to be used with strip transformation only. So
the check, whether strip is locked is removed from hide/unhide operator.

Further it was requested to lock sound strip subframe offset. Since this
is time related property, it was moved to time panel. This also
addresses request to make it more obvious, why the value can't be
changed.
The name of the property was clarified from "Offset" to
"Sound offset", because there are another 2 offsets in the panel.

Finally, when channel is locked, properties in side panel now reflects
this state. This is done by adding RNA get function for `Strip.lock`
property. Function `seq::transform_is_locked` is used instead of
checking `SEQ_LOCK` flag, because it also checks channel state. With
this setup, the lock property can't be disabled while channel is locked.
However strip lock flag will be unset, which can be prevented. (I am not sure which is better. Both are fine in my eyes.)

Pull Request: https://projects.blender.org/blender/blender/pulls/135831
2025-03-25 21:50:05 +01:00

38 lines
1.2 KiB
C++

/* SPDX-FileCopyrightText: 2022 Blender Authors
*
* SPDX-License-Identifier: GPL-2.0-or-later */
#pragma once
/** \file
* \ingroup sequencer
*/
struct Editing;
struct ListBase;
struct SeqTimelineChannel;
struct Strip;
namespace blender::seq {
ListBase *channels_displayed_get(Editing *ed);
void channels_displayed_set(Editing *ed, ListBase *channels);
void channels_ensure(ListBase *channels);
void channels_duplicate(ListBase *channels_dst, ListBase *channels_src);
void channels_free(ListBase *channels);
/**
* Returns SeqTimelineChannel by index
* Note: `Strip::machine` and `SeqTimelineChannel::index` are both counted from 0, but index of 0
* is never used. Therefore, it is valid to call `SeqTimelineChannel(channels, strip->machine)` to
* get channel corresponding to strip position.
*/
SeqTimelineChannel *channel_get_by_index(const ListBase *channels, int channel_index);
char *channel_name_get(ListBase *channels, int channel_index);
bool channel_is_locked(const SeqTimelineChannel *channel);
bool channel_is_muted(const SeqTimelineChannel *channel);
int channel_index_get(const SeqTimelineChannel *channel);
ListBase *get_channels_by_seq(Editing *ed, const Strip *strip);
} // namespace blender::seq