Blender
V4.3
source
blender
editors
space_outliner
tree
tree_element_id_grease_pencil.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
9
#include "
BLI_listbase.h
"
10
11
#include "
BKE_grease_pencil.hh
"
12
13
#include "
DNA_outliner_types.h
"
14
15
#include "
../outliner_intern.hh
"
16
17
#include "
tree_element_id_grease_pencil.hh
"
18
19
namespace
blender::ed::outliner
{
20
21
TreeElementIDGreasePencil::TreeElementIDGreasePencil
(
TreeElement
&legacy_te,
22
GreasePencil
&grease_pencil)
23
:
TreeElementID
(legacy_te, grease_pencil.id), grease_pencil_(grease_pencil)
24
{
25
}
26
27
void
TreeElementIDGreasePencil::expand
(
SpaceOutliner
&
/*space_outliner*/
)
const
28
{
29
expand_animation_data
(grease_pencil_.
adt
);
30
31
expand_layer_tree();
32
}
33
34
void
TreeElementIDGreasePencil::expand_layer_tree()
const
35
{
36
LISTBASE_FOREACH_BACKWARD
(
37
GreasePencilLayerTreeNode
*, child, &grease_pencil_.root_group().children)
38
{
39
add_element
(
40
&
legacy_te_
.
subtree
, &grease_pencil_.
id
, child, &
legacy_te_
,
TSE_GREASE_PENCIL_NODE
, 0);
41
}
42
}
43
44
}
// namespace blender::ed::outliner
BKE_grease_pencil.hh
Low-level operations for grease pencil.
BLI_listbase.h
LISTBASE_FOREACH_BACKWARD
#define LISTBASE_FOREACH_BACKWARD(type, var, list)
Definition
BLI_listbase.h:384
DNA_outliner_types.h
TSE_GREASE_PENCIL_NODE
@ TSE_GREASE_PENCIL_NODE
Definition
DNA_outliner_types.h:116
blender::ed::outliner::AbstractTreeElement::add_element
TreeElement * add_element(ListBase *lb, ID *owner_id, void *create_data, TreeElement *parent, short type, short index, const bool expand=true) const
Definition
tree_element.cc:240
blender::ed::outliner::AbstractTreeElement::legacy_te_
TreeElement & legacy_te_
Definition
tree_element.hh:36
blender::ed::outliner::TreeElementIDGreasePencil::expand
void expand(SpaceOutliner &) const override
Definition
tree_element_id_grease_pencil.cc:27
blender::ed::outliner::TreeElementIDGreasePencil::TreeElementIDGreasePencil
TreeElementIDGreasePencil(TreeElement &legacy_te, GreasePencil &grease_pencil_)
Definition
tree_element_id_grease_pencil.cc:21
blender::ed::outliner::TreeElementID
Definition
tree_element_id.hh:20
blender::ed::outliner::TreeElementID::expand_animation_data
void expand_animation_data(AnimData *) const
Definition
tree_element_id.cc:132
blender::ed::outliner
Definition
outliner_collections.cc:42
outliner_intern.hh
GreasePencilLayerTreeNode
Definition
DNA_grease_pencil_types.h:248
GreasePencil
Definition
DNA_grease_pencil_types.h:442
GreasePencil::id
ID id
Definition
DNA_grease_pencil_types.h:443
GreasePencil::adt
struct AnimData * adt
Definition
DNA_grease_pencil_types.h:445
SpaceOutliner
Definition
DNA_space_types.h:289
blender::ed::outliner::TreeElement
Definition
outliner_intern.hh:84
blender::ed::outliner::TreeElement::subtree
ListBase subtree
Definition
outliner_intern.hh:95
tree_element_id_grease_pencil.hh
Generated on Thu Feb 6 2025 07:36:39 for Blender by
doxygen
1.11.0