Blender
V5.0
source
blender
editors
space_outliner
tree
tree_element_id_linestyle.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_ID.h
"
10
#include "
DNA_linestyle_types.h
"
11
#include "
DNA_outliner_types.h
"
12
#include "
DNA_texture_types.h
"
13
14
#include "
../outliner_intern.hh
"
15
16
#include "
tree_element_id_linestyle.hh
"
17
18
namespace
blender::ed::outliner
{
19
20
TreeElementIDLineStyle::TreeElementIDLineStyle
(
TreeElement
&legacy_te,
21
FreestyleLineStyle
&linestyle)
22
:
TreeElementID
(legacy_te, linestyle.id), linestyle_(linestyle)
23
{
24
}
25
26
void
TreeElementIDLineStyle::expand
(
SpaceOutliner
&
/*space_outliner*/
)
const
27
{
28
expand_animation_data
(linestyle_.adt);
29
30
expand_textures();
31
}
32
33
void
TreeElementIDLineStyle::expand_textures()
const
34
{
35
for
(
int
a = 0; a <
MAX_MTEX
; a++) {
36
if
(linestyle_.
mtex
[a]) {
37
add_element
(&
legacy_te_
.
subtree
,
38
reinterpret_cast<
ID
*
>
((linestyle_.
mtex
[a])->tex),
39
nullptr
,
40
&
legacy_te_
,
41
TSE_SOME_ID
,
42
a);
43
}
44
}
45
}
46
47
}
// namespace blender::ed::outliner
DNA_ID.h
ID and Library types, which are fundamental for SDNA.
DNA_linestyle_types.h
DNA_outliner_types.h
TSE_SOME_ID
@ TSE_SOME_ID
Definition
DNA_outliner_types.h:65
DNA_texture_types.h
MAX_MTEX
#define MAX_MTEX
Definition
Stroke.h:31
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:243
blender::ed::outliner::AbstractTreeElement::legacy_te_
TreeElement & legacy_te_
Definition
tree_element.hh:36
blender::ed::outliner::TreeElementIDLineStyle::TreeElementIDLineStyle
TreeElementIDLineStyle(TreeElement &legacy_te, FreestyleLineStyle &linestyle)
Definition
tree_element_id_linestyle.cc:20
blender::ed::outliner::TreeElementIDLineStyle::expand
void expand(SpaceOutliner &) const override
Definition
tree_element_id_linestyle.cc:26
blender::ed::outliner::TreeElementID::TreeElementID
TreeElementID(TreeElement &legacy_te, ID &id)
Definition
tree_element_id.cc:103
blender::ed::outliner::TreeElementID::expand_animation_data
void expand_animation_data(AnimData *) const
Definition
tree_element_id.cc:129
blender::ed::outliner
Definition
outliner_collections.cc:44
outliner_intern.hh
FreestyleLineStyle
Definition
DNA_linestyle_types.h:640
FreestyleLineStyle::mtex
struct MTex * mtex[18]
Definition
DNA_linestyle_types.h:673
ID
Definition
DNA_ID.h:414
SpaceOutliner
Definition
DNA_space_types.h:187
blender::ed::outliner::TreeElement
Definition
outliner_intern.hh:87
blender::ed::outliner::TreeElement::subtree
ListBase subtree
Definition
outliner_intern.hh:98
tree_element_id_linestyle.hh
Generated on
for Blender by
doxygen
1.16.1