Blender V4.3
tree_element_seq.cc
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2023 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
10#include "DNA_sequence_types.h"
11
12#include "BLI_listbase.h"
13
14#include "BLT_translation.hh"
15
16#include "../outliner_intern.hh"
17#include "tree_element_seq.hh"
18
19namespace blender::ed::outliner {
20
22 : AbstractTreeElement(legacy_te), sequence_(sequence)
23{
25 legacy_te.name = sequence_.name + 2;
26}
27
28bool TreeElementSequence::expand_poll(const SpaceOutliner & /*space_outliner*/) const
29{
30 return !(sequence_.type & SEQ_TYPE_EFFECT);
31}
32
33void TreeElementSequence::expand(SpaceOutliner & /*space_outliner*/) const
34{
35 /*
36 * This work like the sequence.
37 * If the sequence have a name (not default name)
38 * show it, in other case put the filename.
39 */
40
41 if (sequence_.type == SEQ_TYPE_META) {
42 LISTBASE_FOREACH (Sequence *, child, &sequence_.seqbase) {
44 }
45 }
46 else {
47 add_element(&legacy_te_.subtree, nullptr, sequence_.strip, &legacy_te_, TSE_SEQ_STRIP, 0);
48 }
49}
50
52{
53 return sequence_;
54}
55
60
61/* -------------------------------------------------------------------- */
62/* Strip */
63
65 : AbstractTreeElement(legacy_te)
66{
68
69 if (strip.dirpath[0] != '\0') {
70 legacy_te_.name = strip.dirpath;
71 }
72 else {
73 legacy_te_.name = IFACE_("Strip None");
74 }
75}
76
77/* -------------------------------------------------------------------- */
78/* Strip Duplicate */
79
87
89{
90 return sequence_;
91}
92
93} // namespace blender::ed::outliner
#define BLI_assert(a)
Definition BLI_assert.h:50
#define LISTBASE_FOREACH(type, var, list)
#define IFACE_(msgid)
@ TSE_SEQUENCE_DUP
@ TSE_SEQUENCE
@ TSE_SEQ_STRIP
@ SEQ_TYPE_META
@ SEQ_TYPE_EFFECT
TreeElement * add_element(ListBase *lb, ID *owner_id, void *create_data, TreeElement *parent, short type, short index, const bool expand=true) const
TreeElementSequenceStripDuplicate(TreeElement &legacy_te, Sequence &sequence)
TreeElementSequenceStrip(TreeElement &legacy_te, Strip &strip)
bool expand_poll(const SpaceOutliner &) const override
void expand(SpaceOutliner &) const override
TreeElementSequence(TreeElement &legacy_te, Sequence &sequence)
char filename[256]
char dirpath[768]
StripElem * stripdata