Blender  V2.93
tree_element_view_layer.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_layer_types.h"
22 
23 #include "BLI_listbase_wrapper.hh"
24 
25 #include "BLT_translation.h"
26 
27 #include "../outliner_intern.h"
28 #include "tree_display.h"
29 
31 
32 namespace blender::ed::outliner {
33 
35  : AbstractTreeElement(legacy_te), scene_(scene)
36 {
38  legacy_te_.name = IFACE_("View Layers");
39 }
40 
42 {
43  for (auto *view_layer : ListBaseWrapper<ViewLayer>(scene_.view_layers)) {
45  &space_outliner, &legacy_te_.subtree, &scene_, &legacy_te_, TSE_R_LAYER, 0);
46  tenlay->name = view_layer->name;
47  tenlay->directdata = view_layer;
48  }
49 }
50 
51 } // namespace blender::ed::outliner
#define BLI_assert(a)
Definition: BLI_assert.h:58
#define IFACE_(msgid)
@ TSE_R_LAYER_BASE
@ TSE_R_LAYER
TreeElementViewLayerBase(TreeElement &legacy_te, Scene &scene)
Scene scene
TreeElement * outliner_add_element(SpaceOutliner *space_outliner, ListBase *lb, void *idv, TreeElement *parent, short type, short index)
ListBase view_layers
ListBase subtree
TreeStoreElem * store_elem
void * directdata
const char * name