Blender V4.3
tree_display_data.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
9#include "BLI_mempool.h"
10
11#include "DNA_space_types.h"
12
13#include "RNA_access.hh"
14
15#include "../outliner_intern.hh"
16#include "tree_display.hh"
17
18namespace blender::ed::outliner {
19
21 : AbstractTreeDisplay(space_outliner)
22{
23}
24
26{
27 ListBase tree = {nullptr};
28
30
31 TreeElement *te = add_element(&tree, nullptr, (void *)&mainptr, nullptr, TSE_RNA_STRUCT, -1);
32
33 /* On first view open parent data elements */
34 const int show_opened = !space_outliner_.treestore ||
36 if (show_opened) {
37 TreeStoreElem *tselem = TREESTORE(te);
38 tselem->flag &= ~TSE_CLOSED;
39 }
40 return tree;
41}
42
44{
45 return true;
46}
47
48} // namespace blender::ed::outliner
int BLI_mempool_len(const BLI_mempool *pool) ATTR_NONNULL(1)
@ TSE_RNA_STRUCT
Base Class For Tree-Displays.
static TreeElement * add_element(SpaceOutliner *space_outliner, ListBase *lb, ID *owner_id, void *create_data, TreeElement *parent, short type, short index, const bool expand=true)
TreeDisplayDataAPI(SpaceOutliner &space_outliner)
ListBase build_tree(const TreeSourceData &source_data) override
GPU_SHADER_INTERFACE_INFO(depth_2d_update_iface, "").smooth(Type fragColor push_constant(Type::VEC2, "extent") .push_constant(Type source_data
KDTree_3d * tree
#define TREESTORE(a)
PointerRNA RNA_main_pointer_create(Main *main)
struct BLI_mempool * treestore
The data to build the tree from.
Establish and manage Outliner trees for different display modes.