Blender V4.3
tree_element_id_grease_pencil.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 &grease_pencil)
23 : TreeElementID(legacy_te, grease_pencil.id), grease_pencil_(grease_pencil)
24{
25}
26
27void TreeElementIDGreasePencil::expand(SpaceOutliner & /*space_outliner*/) const
28{
29 expand_animation_data(grease_pencil_.adt);
30
31 expand_layer_tree();
32}
33
34void TreeElementIDGreasePencil::expand_layer_tree() const
35{
37 GreasePencilLayerTreeNode *, child, &grease_pencil_.root_group().children)
38 {
40 &legacy_te_.subtree, &grease_pencil_.id, child, &legacy_te_, TSE_GREASE_PENCIL_NODE, 0);
41 }
42}
43
44} // namespace blender::ed::outliner
Low-level operations for grease pencil.
#define LISTBASE_FOREACH_BACKWARD(type, var, list)
@ TSE_GREASE_PENCIL_NODE
TreeElement * add_element(ListBase *lb, ID *owner_id, void *create_data, TreeElement *parent, short type, short index, const bool expand=true) const
TreeElementIDGreasePencil(TreeElement &legacy_te, GreasePencil &grease_pencil_)
void expand_animation_data(AnimData *) const
struct AnimData * adt