Blender
V5.3
source
blender
editors
space_outliner
tree
tree_element_id_curve.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
8
9
#include "
DNA_curve_types.h
"
10
#include "
DNA_outliner_types.h
"
11
12
#include "
../outliner_intern.hh
"
13
14
#include "
tree_display.hh
"
15
#include "
tree_element_id_curve.hh
"
16
17
namespace
blender::ed::outliner
{
18
19
TreeElementIDCurve::TreeElementIDCurve
(
TreeElement
&legacy_te,
Curve
&curve)
20
:
TreeElementID
(legacy_te, curve.
id
), curve_(curve)
21
{
22
}
23
24
void
TreeElementIDCurve::expand
(
SpaceOutliner
&
/*space_outliner*/
)
const
25
{
26
expand_animation_data
(curve_.adt);
27
28
expand_materials();
29
}
30
31
void
TreeElementIDCurve::expand_materials()
const
32
{
33
for
(
int
a = 0; a < curve_.
totcol
; a++) {
34
add_id_element
({.index = a},
reinterpret_cast<
ID
*
>
(curve_.
mat
[a]));
35
}
36
}
37
38
}
// namespace blender::ed::outliner
DNA_curve_types.h
DNA_outliner_types.h
blender::ed::outliner::AbstractTreeElement::add_id_element
TreeElement * add_id_element(const TreeElementAddParams ¶ms, ID *id) const
Definition
tree_element.cc:73
blender::ed::outliner::TreeElementIDCurve::TreeElementIDCurve
TreeElementIDCurve(TreeElement &legacy_te, Curve &curve)
Definition
tree_element_id_curve.cc:19
blender::ed::outliner::TreeElementIDCurve::expand
void expand(SpaceOutliner &) const override
Definition
tree_element_id_curve.cc:24
blender::ed::outliner::TreeElementID::TreeElementID
TreeElementID(TreeElement &legacy_te, ID &id)
Definition
tree_element_id.cc:109
blender::ed::outliner::TreeElementID::expand_animation_data
void expand_animation_data(AnimData *) const
Definition
tree_element_id.cc:135
blender::bke::id
Definition
AS_asset_library.hh:32
blender::ed::outliner
Definition
outliner_collections.cc:51
outliner_intern.hh
blender::Curve
Definition
DNA_curve_types.h:213
blender::Curve::totcol
short totcol
Definition
DNA_curve_types.h:254
blender::Curve::mat
struct Material ** mat
Definition
DNA_curve_types.h:232
blender::ID
Definition
DNA_ID.h:415
blender::SpaceOutliner
Definition
DNA_space_types.h:178
blender::ed::outliner::TreeElement
Definition
outliner_intern.hh:111
tree_display.hh
Establish and manage Outliner trees for different display modes.
tree_element_id_curve.hh
Generated on
for Blender by
doxygen
1.18.0