Files
test2/source/blender/sequencer/SEQ_channels.hh
Richard Antalik a4c86b13ba VSE: Add seq::channel_get_by_index documentation
Usage of this function was quite confusing.

Pull Request: https://projects.blender.org/blender/blender/pulls/136161
2025-03-20 18:10:44 +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(ListBase *seqbase, ListBase *channels, const Strip *strip);
} // namespace blender::seq