Blender
V4.3
source
blender
editors
space_outliner
tree
tree_element_id_metaball.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 "
DNA_listBase.h
"
10
#include "
DNA_meta_types.h
"
11
#include "
DNA_outliner_types.h
"
12
13
#include "
../outliner_intern.hh
"
14
15
#include "
tree_element_id_metaball.hh
"
16
17
namespace
blender::ed::outliner
{
18
19
TreeElementIDMetaBall::TreeElementIDMetaBall
(
TreeElement
&legacy_te,
MetaBall
&
metaball
)
20
:
TreeElementID
(legacy_te,
metaball
.id), metaball_(
metaball
)
21
{
22
}
23
24
void
TreeElementIDMetaBall::expand
(
SpaceOutliner
&
/*space_outliner*/
)
const
25
{
26
expand_animation_data
(metaball_.
adt
);
27
28
expand_materials();
29
}
30
31
void
TreeElementIDMetaBall::expand_materials()
const
32
{
33
for
(
int
a = 0; a < metaball_.
totcol
; a++) {
34
add_element
(&
legacy_te_
.
subtree
,
35
reinterpret_cast<
ID
*
>
(metaball_.
mat
[a]),
36
nullptr
,
37
&
legacy_te_
,
38
TSE_SOME_ID
,
39
a);
40
}
41
}
42
43
}
// namespace blender::ed::outliner
DNA_listBase.h
These structs are the foundation for all linked lists in the library system.
DNA_meta_types.h
DNA_outliner_types.h
TSE_SOME_ID
@ TSE_SOME_ID
Definition
DNA_outliner_types.h:65
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::TreeElementIDMetaBall::TreeElementIDMetaBall
TreeElementIDMetaBall(TreeElement &legacy_te, MetaBall &metaball)
Definition
tree_element_id_metaball.cc:19
blender::ed::outliner::TreeElementIDMetaBall::expand
void expand(SpaceOutliner &) const override
Definition
tree_element_id_metaball.cc:24
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
metaball
static float metaball(PROCESS *process, float x, float y, float z)
Definition
mball_tessellate.cc:407
blender::ed::outliner
Definition
outliner_collections.cc:42
outliner_intern.hh
ID
Definition
DNA_ID.h:413
MetaBall
Definition
DNA_meta_types.h:49
MetaBall::totcol
short totcol
Definition
DNA_meta_types.h:64
MetaBall::adt
struct AnimData * adt
Definition
DNA_meta_types.h:51
MetaBall::mat
struct Material ** mat
Definition
DNA_meta_types.h:60
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_metaball.hh
Generated on Thu Feb 6 2025 07:36:39 for Blender by
doxygen
1.11.0