Blender
V4.3
source
blender
editors
space_outliner
tree
tree_element_id_collection.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_ID.h
"
10
#include "
DNA_collection_types.h
"
11
#include "
DNA_listBase.h
"
12
13
#include "
../outliner_intern.hh
"
14
15
#include "
tree_element_id_collection.hh
"
16
17
namespace
blender::ed::outliner
{
18
19
TreeElementIDCollection::TreeElementIDCollection
(
TreeElement
&legacy_te,
Collection
&collection)
20
:
TreeElementID
(legacy_te, collection.id), collection_(collection)
21
{
22
}
23
24
void
TreeElementIDCollection::expand
(
SpaceOutliner
&space_outliner)
const
25
{
26
/* Don't expand for instances, creates too many elements. */
27
if
(!(
legacy_te_
.
parent
&&
legacy_te_
.
parent
->
idcode
==
ID_OB
)) {
28
outliner_add_collection_recursive
(&space_outliner, &collection_, &
legacy_te_
);
29
}
30
}
31
32
}
// namespace blender::ed::outliner
DNA_ID.h
ID and Library types, which are fundamental for SDNA.
ID_OB
@ ID_OB
Definition
DNA_ID_enums.h:120
DNA_collection_types.h
Object groups, one object can be in many groups at once.
DNA_listBase.h
These structs are the foundation for all linked lists in the library system.
blender::ed::outliner::AbstractTreeElement::legacy_te_
TreeElement & legacy_te_
Definition
tree_element.hh:36
blender::ed::outliner::TreeElementIDCollection::expand
void expand(SpaceOutliner &) const override
Definition
tree_element_id_collection.cc:24
blender::ed::outliner::TreeElementIDCollection::TreeElementIDCollection
TreeElementIDCollection(TreeElement &legacy_te, Collection &collection)
Definition
tree_element_id_collection.cc:19
blender::ed::outliner::TreeElementID
Definition
tree_element_id.hh:20
blender::ed::outliner
Definition
outliner_collections.cc:42
blender::ed::outliner::outliner_add_collection_recursive
TreeElement * outliner_add_collection_recursive(SpaceOutliner *space_outliner, Collection *collection, TreeElement *ten)
Definition
outliner_tree.cc:410
outliner_intern.hh
Collection
Definition
DNA_collection_types.h:126
SpaceOutliner
Definition
DNA_space_types.h:289
blender::ed::outliner::TreeElement
Definition
outliner_intern.hh:84
blender::ed::outliner::TreeElement::idcode
short idcode
Definition
outliner_intern.hh:100
blender::ed::outliner::TreeElement::parent
TreeElement * parent
Definition
outliner_intern.hh:85
tree_element_id_collection.hh
Generated on Thu Feb 6 2025 07:36:39 for Blender by
doxygen
1.11.0