Blender V4.3
tree_element_grease_pencil_node.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_listbase.h"
10
11#include "BKE_grease_pencil.hh"
12
13#include "DNA_outliner_types.h"
14
15#include "../outliner_intern.hh"
16
18
19namespace blender::ed::outliner {
20
22 GreasePencil &owner_grease_pencil,
24 : AbstractTreeElement(legacy_te), owner_grease_pencil_(owner_grease_pencil), node_(node)
25{
27 legacy_te.name = node.name().c_str();
28}
29
30void TreeElementGreasePencilNode::expand(SpaceOutliner & /*space_outliner*/) const
31{
32 if (!node_.is_group()) {
33 return;
34 }
37 &owner_grease_pencil_.id,
38 child,
41 0);
42 }
43}
44
49
50} // namespace blender::ed::outliner
Low-level operations for grease pencil.
#define BLI_assert(a)
Definition BLI_assert.h:50
#define LISTBASE_FOREACH_BACKWARD(type, var, list)
@ TSE_GREASE_PENCIL_NODE
const LayerGroup & as_group() const
TreeElement * add_element(ListBase *lb, ID *owner_id, void *create_data, TreeElement *parent, short type, short index, const bool expand=true) const
TreeElementGreasePencilNode(TreeElement &legacy_te, GreasePencil &owner_grease_pencil, blender::bke::greasepencil::TreeNode &node)
blender::bke::greasepencil::TreeNode & node() const