Blender V5.0
blender::modifier::greasepencil::LayerGroup Class Reference

#include <BKE_grease_pencil.hh>

Inherits GreasePencilLayerTreeGroup.

Public Member Functions

 LayerGroup ()
 LayerGroup (StringRef name)
 LayerGroup (const LayerGroup &other)
 ~LayerGroup ()
LayerGroupoperator= (const LayerGroup &other)
const TreeNodeas_node () const
TreeNodeas_node ()
bool is_empty () const
int64_t num_direct_nodes () const
int64_t num_nodes_total () const
Span< const TreeNode * > nodes () const
Span< TreeNode * > nodes_for_write ()
Span< const Layer * > layers () const
Span< Layer * > layers_for_write ()
Span< const LayerGroup * > groups () const
Span< LayerGroup * > groups_for_write ()
const TreeNodefind_node_by_name (StringRef name) const
TreeNodefind_node_by_name (StringRef name)
bool is_expanded () const
void set_expanded (bool expanded)
void print_nodes (StringRef header) const
void prepare_for_dna_write ()
void update_from_dna_read ()

Public Attributes

 TREENODE_COMMON_METHODS
Public Attributes inherited from GreasePencilLayerTreeGroup
GreasePencilLayerTreeNode base
ListBase children
int8_t color_tag
char _pad [7]
GreasePencilLayerGroupRuntimeHandleruntime

Protected Member Functions

TreeNodeadd_node (TreeNode &node)
void add_node_before (TreeNode &node, TreeNode &link)
void add_node_after (TreeNode &node, TreeNode &link)
void move_node_up (TreeNode &node, int step=1)
void move_node_down (TreeNode &node, int step=1)
void move_node_top (TreeNode &node)
void move_node_bottom (TreeNode &node)
bool unlink_node (TreeNode &link, bool keep_children=false)

Friends

struct ::GreasePencil

Detailed Description

A LayerGroup is a grouping of zero or more Layers.

Definition at line 671 of file BKE_grease_pencil.hh.

Constructor & Destructor Documentation

◆ LayerGroup() [1/3]

◆ LayerGroup() [2/3]

◆ LayerGroup() [3/3]

Definition at line 1630 of file grease_pencil.cc.

◆ ~LayerGroup()

Member Function Documentation

◆ add_node()

Adds an existing node at the end of this group.

Definition at line 1694 of file grease_pencil.cc.

◆ add_node_after()

Adds an existing node after link of this group.

Definition at line 1708 of file grease_pencil.cc.

◆ add_node_before()

Adds an existing node before link of this group.

Definition at line 1701 of file grease_pencil.cc.

◆ as_node() [1/2]

◆ as_node() [2/2]

Returns
the group as a TreeNode.

Definition at line 881 of file BKE_grease_pencil.hh.

◆ find_node_by_name() [1/2]

◆ find_node_by_name() [2/2]

Returns a pointer to the node with name. If no such node was found, returns nullptr.

Definition at line 1838 of file grease_pencil.cc.

◆ groups()

Returns a Span of pointers to all the LayerGroupss in this group.

Definition at line 1826 of file grease_pencil.cc.

◆ groups_for_write()

◆ is_empty()

Returns true if the group is empty.

Definition at line 1689 of file grease_pencil.cc.

◆ is_expanded()

Returns true if the group is expanded in the UI.

Definition at line 1858 of file grease_pencil.cc.

◆ layers()

Returns a Span of pointers to all the Layers in this group.

Definition at line 1814 of file grease_pencil.cc.

◆ layers_for_write()

◆ move_node_bottom()

Definition at line 1732 of file grease_pencil.cc.

◆ move_node_down()

void blender::bke::greasepencil::LayerGroup::move_node_down ( TreeNode & node,
int step = 1 )
protected

Definition at line 1721 of file grease_pencil.cc.

◆ move_node_top()

Move child node to the top/bottom.

Definition at line 1726 of file grease_pencil.cc.

◆ move_node_up()

void blender::bke::greasepencil::LayerGroup::move_node_up ( TreeNode & node,
int step = 1 )
protected

Move child node up/down by step.

Definition at line 1716 of file grease_pencil.cc.

◆ nodes()

Returns a Span of pointers to all the TreeNodes in this group.

Definition at line 1802 of file grease_pencil.cc.

◆ nodes_for_write()

◆ num_direct_nodes()

Returns the number of direct nodes in this group.

Definition at line 1739 of file grease_pencil.cc.

◆ num_nodes_total()

Returns the total number of nodes in this group.

Definition at line 1744 of file grease_pencil.cc.

◆ operator=()

LayerGroup & blender::bke::greasepencil::LayerGroup::operator= ( const LayerGroup & other)

Definition at line 1677 of file grease_pencil.cc.

◆ prepare_for_dna_write()

Prepare the DNA GreasePencilLayerTreeGroup data before blend-file writing.

Definition at line 1937 of file grease_pencil.cc.

◆ print_nodes()

Print the nodes. For debugging purposes.

Definition at line 1868 of file grease_pencil.cc.

◆ set_expanded()

Expand/collapse the group in the UI.

Definition at line 1863 of file grease_pencil.cc.

◆ unlink_node()

bool blender::bke::greasepencil::LayerGroup::unlink_node ( TreeNode & link,
bool keep_children = false )
protected

Unlink the node from the list of nodes in this group.

Returns
true, if the node was successfully unlinked.

Definition at line 1750 of file grease_pencil.cc.

◆ update_from_dna_read()

Update from DNA GreasePencilLayerTreeGroup data after blend-file reading.

Definition at line 1953 of file grease_pencil.cc.

◆ ::GreasePencil

friend struct ::GreasePencil
friend

Definition at line 672 of file BKE_grease_pencil.hh.

Member Data Documentation

◆ TREENODE_COMMON_METHODS


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