Blender
V5.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
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
(*
display_
, &space_outliner, &collection_, &
legacy_te_
);
27
}
28
}
29
30
}
// namespace blender::ed::outliner
DNA_collection_types.h
Object groups, one object can be in many groups at once.
blender::ed::outliner::AbstractTreeElement::display_
AbstractTreeDisplay * display_
Definition
tree_element.hh:43
blender::ed::outliner::AbstractTreeElement::legacy_te_
TreeElement & legacy_te_
Definition
tree_element.hh:39
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:109
blender::bke::id
Definition
AS_asset_library.hh:32
blender::ed::outliner
Definition
outliner_collections.cc:51
blender::ed::outliner::outliner_add_collection_recursive
TreeElement * outliner_add_collection_recursive(AbstractTreeDisplay &tree_display, SpaceOutliner *space_outliner, Collection *collection, TreeElement *ten)
Definition
outliner_tree.cc:289
blender::ID_OB
@ ID_OB
Definition
DNA_ID_enums.h:139
outliner_intern.hh
blender::Collection
Definition
DNA_collection_types.h:176
blender::SpaceOutliner
Definition
DNA_space_types.h:178
blender::ed::outliner::TreeElement
Definition
outliner_intern.hh:111
blender::ed::outliner::TreeElement::idcode
short idcode
Definition
outliner_intern.hh:127
blender::ed::outliner::TreeElement::parent
TreeElement * parent
Definition
outliner_intern.hh:112
tree_element_id_collection.hh
Generated on
for Blender by
doxygen
1.18.0