Blender
V2.93
source
blender
editors
space_outliner
tree
tree_element_scene_objects.cc
Go to the documentation of this file.
1
/*
2
* This program is free software; you can redistribute it and/or
3
* modify it under the terms of the GNU General Public License
4
* as published by the Free Software Foundation; either version 2
5
* of the License, or (at your option) any later version.
6
*
7
* This program is distributed in the hope that it will be useful,
8
* but WITHOUT ANY WARRANTY; without even the implied warranty of
9
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10
* GNU General Public License for more details.
11
*
12
* You should have received a copy of the GNU General Public License
13
* along with this program; if not, write to the Free Software Foundation,
14
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
15
*/
16
21
#include "
BKE_collection.h
"
22
23
#include "
BLI_utildefines.h
"
24
25
#include "
BLT_translation.h
"
26
27
#include "../outliner_intern.h"
28
#include "
tree_display.h
"
29
30
#include "
tree_element_scene_objects.hh
"
31
32
namespace
blender::ed::outliner
{
33
34
TreeElementSceneObjectsBase::TreeElementSceneObjectsBase
(
TreeElement
&legacy_te,
Scene
&
scene
)
35
:
AbstractTreeElement
(legacy_te), scene_(
scene
)
36
{
37
BLI_assert
(legacy_te.
store_elem
->
type
==
TSE_SCENE_OBJECTS_BASE
);
38
legacy_te.
name
=
IFACE_
(
"Objects"
);
39
}
40
41
void
TreeElementSceneObjectsBase::expand
(
SpaceOutliner
&space_outliner)
const
42
{
43
FOREACH_SCENE_OBJECT_BEGIN
(&scene_, ob) {
44
outliner_add_element
(&space_outliner, &
legacy_te_
.
subtree
, ob, &
legacy_te_
,
TSE_SOME_ID
, 0);
45
}
46
FOREACH_SCENE_OBJECT_END
;
47
outliner_make_object_parent_hierarchy
(&
legacy_te_
.
subtree
);
48
}
49
50
}
// namespace blender::ed::outliner
BKE_collection.h
FOREACH_SCENE_OBJECT_END
#define FOREACH_SCENE_OBJECT_END
Definition:
BKE_collection.h:279
FOREACH_SCENE_OBJECT_BEGIN
#define FOREACH_SCENE_OBJECT_BEGIN(scene, _instance)
Definition:
BKE_collection.h:271
BLI_assert
#define BLI_assert(a)
Definition:
BLI_assert.h:58
BLI_utildefines.h
BLT_translation.h
IFACE_
#define IFACE_(msgid)
Definition:
BLT_translation.h:64
TSE_SCENE_OBJECTS_BASE
@ TSE_SCENE_OBJECTS_BASE
Definition:
DNA_outliner_types.h:128
TSE_SOME_ID
@ TSE_SOME_ID
Definition:
DNA_outliner_types.h:84
blender::ed::outliner::AbstractTreeElement
Definition:
tree_element.hh:30
blender::ed::outliner::AbstractTreeElement::legacy_te_
TreeElement & legacy_te_
Definition:
tree_element.hh:37
blender::ed::outliner::TreeElementSceneObjectsBase::TreeElementSceneObjectsBase
TreeElementSceneObjectsBase(TreeElement &legacy_te, Scene &scene)
Definition:
tree_element_scene_objects.cc:34
blender::ed::outliner::TreeElementSceneObjectsBase::expand
void expand(SpaceOutliner &) const override
Definition:
tree_element_scene_objects.cc:41
scene
Scene scene
Definition:
deg_eval_copy_on_write.cc:120
blender::ed::outliner
Definition:
tree_display.hh:45
outliner_add_element
TreeElement * outliner_add_element(SpaceOutliner *space_outliner, ListBase *lb, void *idv, TreeElement *parent, short type, short index)
Definition:
outliner_tree.c:832
outliner_make_object_parent_hierarchy
void outliner_make_object_parent_hierarchy(ListBase *lb)
Definition:
outliner_tree.c:1179
Scene
Definition:
DNA_scene_types.h:1684
SpaceOutliner
Definition:
DNA_space_types.h:265
TreeElement
Definition:
outliner_intern.h:77
TreeElement::subtree
ListBase subtree
Definition:
outliner_intern.h:87
TreeElement::store_elem
TreeStoreElem * store_elem
Definition:
outliner_intern.h:89
TreeElement::name
const char * name
Definition:
outliner_intern.h:94
TreeStoreElem::type
short type
Definition:
DNA_outliner_types.h:35
tree_display.h
tree_element_scene_objects.hh
Generated on Tue Jan 31 2023 14:37:24 for Blender by
doxygen
1.9.1