Blender  V3.3
tree_element_id_scene.cc
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 
7 #include "DNA_listBase.h"
8 #include "DNA_outliner_types.h"
9 #include "DNA_scene_types.h"
10 
11 #include "../outliner_intern.hh"
12 
13 #include "tree_element_id_scene.hh"
14 
15 namespace blender::ed::outliner {
16 
18  : TreeElementID(legacy_te, scene.id), scene_(scene)
19 {
20 }
21 
23 {
24  return true;
25 }
26 
27 void TreeElementIDScene::expand(SpaceOutliner &space_outliner) const
28 {
29  expandViewLayers(space_outliner);
30  expandWorld(space_outliner);
31  expandCollections(space_outliner);
32  expandObjects(space_outliner);
33 
34  expand_animation_data(space_outliner, scene_.adt);
35 }
36 
37 void TreeElementIDScene::expandViewLayers(SpaceOutliner &space_outliner) const
38 {
40  &space_outliner, &legacy_te_.subtree, &scene_, &legacy_te_, TSE_R_LAYER_BASE, 0);
41 }
42 
43 void TreeElementIDScene::expandWorld(SpaceOutliner &space_outliner) const
44 {
46  &space_outliner, &legacy_te_.subtree, scene_.world, &legacy_te_, TSE_SOME_ID, 0);
47 }
48 
49 void TreeElementIDScene::expandCollections(SpaceOutliner &space_outliner) const
50 {
52  &space_outliner, &legacy_te_.subtree, &scene_, &legacy_te_, TSE_SCENE_COLLECTION_BASE, 0);
53 }
54 
55 void TreeElementIDScene::expandObjects(SpaceOutliner &space_outliner) const
56 {
58  &space_outliner, &legacy_te_.subtree, &scene_, &legacy_te_, TSE_SCENE_OBJECTS_BASE, 0);
59 }
60 
61 } // namespace blender::ed::outliner
These structs are the foundation for all linked lists in the library system.
@ TSE_SCENE_COLLECTION_BASE
@ TSE_SCENE_OBJECTS_BASE
@ TSE_R_LAYER_BASE
@ TSE_SOME_ID
void expand(SpaceOutliner &) const override
TreeElementIDScene(TreeElement &legacy_te, Scene &scene)
void expand_animation_data(SpaceOutliner &, const AnimData *) const
Scene scene
TreeElement * outliner_add_element(SpaceOutliner *space_outliner, ListBase *lb, void *idv, TreeElement *parent, short type, short index, const bool expand)
struct AnimData * adt
struct World * world
ListBase subtree