Blender
V5.0
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
8
9
#include "
DNA_collection_types.h
"
10
11
#include "
../outliner_intern.hh
"
12
13
#include "
tree_element_id_collection.hh
"
14
15
namespace
blender::ed::outliner
{
16
17
TreeElementIDCollection::TreeElementIDCollection
(
TreeElement
&legacy_te,
Collection
&collection)
18
:
TreeElementID
(legacy_te, collection.id), collection_(collection)
19
{
20
}
21
22
void
TreeElementIDCollection::expand
(
SpaceOutliner
&space_outliner)
const
23
{
24
/* Don't expand for instances, creates too many elements. */
25
if
(!(
legacy_te_
.parent &&
legacy_te_
.parent->idcode ==
ID_OB
)) {
26
outliner_add_collection_recursive
(&space_outliner, &collection_, &
legacy_te_
);
27
}
28
}
29
30
}
// namespace blender::ed::outliner
ID_OB
@ ID_OB
Definition
DNA_ID_enums.h:119
DNA_collection_types.h
Object groups, one object can be in many groups at once.
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:22
blender::ed::outliner::TreeElementIDCollection::TreeElementIDCollection
TreeElementIDCollection(TreeElement &legacy_te, Collection &collection)
Definition
tree_element_id_collection.cc:17
blender::ed::outliner::TreeElementID::TreeElementID
TreeElementID(TreeElement &legacy_te, ID &id)
Definition
tree_element_id.cc:103
blender::ed::outliner
Definition
outliner_collections.cc:44
blender::ed::outliner::outliner_add_collection_recursive
TreeElement * outliner_add_collection_recursive(SpaceOutliner *space_outliner, Collection *collection, TreeElement *ten)
Definition
outliner_tree.cc:413
outliner_intern.hh
Collection
Definition
DNA_collection_types.h:113
SpaceOutliner
Definition
DNA_space_types.h:187
blender::ed::outliner::TreeElement
Definition
outliner_intern.hh:87
tree_element_id_collection.hh
Generated on
for Blender by
doxygen
1.16.1