Blender
V4.5
source
blender
editors
space_outliner
tree
tree_element_id_scene.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_outliner_types.h
"
10
#include "
DNA_scene_types.h
"
11
12
#include "
../outliner_intern.hh
"
13
14
#include "
tree_element_id_scene.hh
"
15
16
namespace
blender::ed::outliner
{
17
18
TreeElementIDScene::TreeElementIDScene
(
TreeElement
&legacy_te,
Scene
&
scene
)
19
:
TreeElementID
(legacy_te,
scene
.id), scene_(
scene
)
20
{
21
}
22
23
void
TreeElementIDScene::expand
(
SpaceOutliner
&
/*space_outliner*/
)
const
24
{
25
expand_view_layers();
26
expand_world();
27
expand_collections();
28
expand_objects();
29
30
expand_animation_data
(scene_.
adt
);
31
}
32
33
void
TreeElementIDScene::expand_view_layers()
const
34
{
35
add_element
(&
legacy_te_
.
subtree
, &scene_.
id
,
nullptr
, &
legacy_te_
,
TSE_R_LAYER_BASE
, 0);
36
}
37
38
void
TreeElementIDScene::expand_world()
const
39
{
40
add_element
(&
legacy_te_
.
subtree
,
41
reinterpret_cast<
ID
*
>
(scene_.
world
),
42
nullptr
,
43
&
legacy_te_
,
44
TSE_SOME_ID
,
45
0);
46
}
47
48
void
TreeElementIDScene::expand_collections()
const
49
{
50
add_element
(&
legacy_te_
.
subtree
, &scene_.
id
,
nullptr
, &
legacy_te_
,
TSE_SCENE_COLLECTION_BASE
, 0);
51
}
52
53
void
TreeElementIDScene::expand_objects()
const
54
{
55
add_element
(&
legacy_te_
.
subtree
, &scene_.
id
,
nullptr
, &
legacy_te_
,
TSE_SCENE_OBJECTS_BASE
, 0);
56
}
57
58
}
// namespace blender::ed::outliner
DNA_outliner_types.h
TSE_SCENE_COLLECTION_BASE
@ TSE_SCENE_COLLECTION_BASE
Definition
DNA_outliner_types.h:107
TSE_SCENE_OBJECTS_BASE
@ TSE_SCENE_OBJECTS_BASE
Definition
DNA_outliner_types.h:109
TSE_R_LAYER_BASE
@ TSE_R_LAYER_BASE
Definition
DNA_outliner_types.h:86
TSE_SOME_ID
@ TSE_SOME_ID
Definition
DNA_outliner_types.h:65
DNA_scene_types.h
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::TreeElementIDScene::expand
void expand(SpaceOutliner &) const override
Definition
tree_element_id_scene.cc:23
blender::ed::outliner::TreeElementIDScene::TreeElementIDScene
TreeElementIDScene(TreeElement &legacy_te, Scene &scene)
Definition
tree_element_id_scene.cc:18
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
scene
Scene scene
Definition
deg_eval_copy_on_write.cc:98
blender::ed::outliner
Definition
outliner_collections.cc:44
outliner_intern.hh
ID
Definition
DNA_ID.h:404
Scene
Definition
DNA_scene_types.h:2106
Scene::id
ID id
Definition
DNA_scene_types.h:2112
Scene::adt
struct AnimData * adt
Definition
DNA_scene_types.h:2114
Scene::world
struct World * world
Definition
DNA_scene_types.h:2117
SpaceOutliner
Definition
DNA_space_types.h:187
blender::ed::outliner::TreeElement
Definition
outliner_intern.hh:86
blender::ed::outliner::TreeElement::subtree
ListBase subtree
Definition
outliner_intern.hh:97
tree_element_id_scene.hh
Generated on Fri Apr 3 2026 06:33:18 for Blender by
doxygen
1.11.0