Blender V5.0
blender::ed::greasepencil::TreeNode Class Reference

#include <BKE_grease_pencil.hh>

Inherits GreasePencilLayerTreeNode.

Public Member Functions

 TreeNode ()
 TreeNode (GreasePencilLayerTreeNodeType type)
 TreeNode (GreasePencilLayerTreeNodeType type, StringRef name)
 TreeNode (const TreeNode &other)
 ~TreeNode ()
bool is_group () const
bool is_layer () const
const Layeras_layer () const
Layeras_layer ()
const LayerGroupas_group () const
LayerGroupas_group ()
const LayerGroupparent_group () const
LayerGroupparent_group ()
const TreeNodeparent_node () const
TreeNodeparent_node ()
int64_t depth () const

Public Attributes

 TREENODE_COMMON_METHODS
Public Attributes inherited from GreasePencilLayerTreeNode
struct GreasePencilLayerTreeNodenext
struct GreasePencilLayerTreeNodeprev
struct GreasePencilLayerTreeGroupparent
char * name
int8_t type
char _pad [7]
float color [3]
uint32_t flag

Detailed Description

A TreeNode represents one node in the layer tree. It can either be a layer or a group. The node has zero children if it is a layer or zero or more children if it is a group.

Definition at line 291 of file BKE_grease_pencil.hh.

Constructor & Destructor Documentation

◆ TreeNode() [1/4]

◆ TreeNode() [2/4]

◆ TreeNode() [3/4]

◆ TreeNode() [4/4]

Definition at line 1054 of file grease_pencil.cc.

◆ ~TreeNode()

Member Function Documentation

◆ as_group() [1/2]

◆ as_group() [2/2]

Returns
this node as a LayerGroup.

Definition at line 1072 of file grease_pencil.cc.

◆ as_layer() [1/2]

◆ as_layer() [2/2]

Returns
this node as a Layer.

Definition at line 1077 of file grease_pencil.cc.

◆ depth()

Returns
the number of non-null parents of the node.

Definition at line 1109 of file grease_pencil.cc.

◆ is_group()

Returns
true if this node is a LayerGroup.

Definition at line 813 of file BKE_grease_pencil.hh.

◆ is_layer()

Returns
true if this node is a Layer.

Definition at line 817 of file BKE_grease_pencil.hh.

◆ parent_group() [1/2]

◆ parent_group() [2/2]

Returns
the parent layer group or nullptr for the root group.

Definition at line 1092 of file grease_pencil.cc.

◆ parent_node() [1/2]

◆ parent_node() [2/2]

Member Data Documentation

◆ TREENODE_COMMON_METHODS


The documentation for this class was generated from the following files: