Blender  V2.93
tree_element_id_scene.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 "DNA_listBase.h"
22 
23 #include "../outliner_intern.h"
24 #include "tree_display.h"
25 
26 #include "tree_element_id_scene.hh"
27 
28 namespace blender::ed::outliner {
29 
31  : TreeElementID(legacy_te, scene.id), scene_(scene)
32 {
33 }
34 
36 {
37  return true;
38 }
39 
40 void TreeElementIDScene::expand(SpaceOutliner &space_outliner) const
41 {
42  expandViewLayers(space_outliner);
43  expandWorld(space_outliner);
44  expandCollections(space_outliner);
45  expandObjects(space_outliner);
46 
47  expand_animation_data(space_outliner, scene_.adt);
48 }
49 
50 void TreeElementIDScene::expandViewLayers(SpaceOutliner &space_outliner) const
51 {
53  &space_outliner, &legacy_te_.subtree, &scene_, &legacy_te_, TSE_R_LAYER_BASE, 0);
54 }
55 
56 void TreeElementIDScene::expandWorld(SpaceOutliner &space_outliner) const
57 {
59  &space_outliner, &legacy_te_.subtree, scene_.world, &legacy_te_, TSE_SOME_ID, 0);
60 }
61 
62 void TreeElementIDScene::expandCollections(SpaceOutliner &space_outliner) const
63 {
65  &space_outliner, &legacy_te_.subtree, &scene_, &legacy_te_, TSE_SCENE_COLLECTION_BASE, 0);
66 }
67 
68 void TreeElementIDScene::expandObjects(SpaceOutliner &space_outliner) const
69 {
71  &space_outliner, &legacy_te_.subtree, &scene_, &legacy_te_, TSE_SCENE_OBJECTS_BASE, 0);
72 }
73 
74 } // 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)
struct AnimData * adt
struct World * world
ListBase subtree