|
Blender V5.0
|
#include <BKE_grease_pencil.hh>
Inherits GreasePencilLayerTreeGroup.
Public Member Functions | |
| LayerGroup () | |
| LayerGroup (StringRef name) | |
| LayerGroup (const LayerGroup &other) | |
| ~LayerGroup () | |
| LayerGroup & | operator= (const LayerGroup &other) |
| const TreeNode & | as_node () const |
| TreeNode & | as_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 TreeNode * | find_node_by_name (StringRef name) const |
| TreeNode * | find_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] |
| GreasePencilLayerGroupRuntimeHandle * | runtime |
Protected Member Functions | |
| TreeNode & | add_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 |
A LayerGroup is a grouping of zero or more Layers.
Definition at line 671 of file BKE_grease_pencil.hh.
| blender::bke::greasepencil::LayerGroup::LayerGroup | ( | ) |
Definition at line 1615 of file grease_pencil.cc.
References GreasePencilLayerTreeGroup::base, BLI_listbase_clear(), GreasePencilLayerTreeGroup::children, GreasePencilLayerTreeGroup::color_tag, GP_LAYER_TREE_GROUP, LAYERGROUP_COLOR_NONE, and GreasePencilLayerTreeGroup::runtime.
Referenced by ::GreasePencil, LayerGroup(), LayerGroup(), and operator=().
|
explicit |
Definition at line 1625 of file grease_pencil.cc.
References GreasePencilLayerTreeGroup::base, GP_LAYER_TREE_GROUP, LayerGroup(), and name.
| blender::bke::greasepencil::LayerGroup::LayerGroup | ( | const LayerGroup & | other | ) |
Definition at line 1630 of file grease_pencil.cc.
References add_node(), blender::bke::greasepencil::Layer::as_node(), as_node(), GreasePencilLayerTreeGroup::base, GreasePencilLayerTreeGroup::children, GreasePencilLayerTreeGroup::color_tag, GP_LAYER_TREE_GROUP, GP_LAYER_TREE_LEAF, LayerGroup(), and LISTBASE_FOREACH.
| blender::bke::greasepencil::LayerGroup::~LayerGroup | ( | ) |
Definition at line 1654 of file grease_pencil.cc.
References GreasePencilLayerTreeGroup::base, GreasePencilLayerTreeGroup::children, GP_LAYER_TREE_GROUP, GP_LAYER_TREE_LEAF, LISTBASE_FOREACH_MUTABLE, and GreasePencilLayerTreeGroup::runtime.
Referenced by operator=().
Adds an existing node at the end of this group.
Definition at line 1694 of file grease_pencil.cc.
References BLI_addtail(), GreasePencilLayerTreeGroup::children, and GreasePencilLayerTreeNode::parent.
Referenced by LayerGroup().
|
protected |
Adds an existing node after link of this group.
Definition at line 1708 of file grease_pencil.cc.
References BLI_assert, BLI_findindex(), BLI_insertlinkafter(), GreasePencilLayerTreeGroup::children, and GreasePencilLayerTreeNode::parent.
|
protected |
Adds an existing node before link of this group.
Definition at line 1701 of file grease_pencil.cc.
References BLI_assert, BLI_findindex(), BLI_insertlinkbefore(), GreasePencilLayerTreeGroup::children, and GreasePencilLayerTreeNode::parent.
|
inline |
Definition at line 885 of file BKE_grease_pencil.hh.
|
inline |
Definition at line 881 of file BKE_grease_pencil.hh.
Referenced by BKE_grease_pencil_copy_layer_group_parameters(), blender::ed::greasepencil::grease_pencil_layer_group_add_exec(), grease_pencil_set_runtime_visibilities(), and LayerGroup().
Definition at line 1848 of file grease_pencil.cc.
References name, and nodes_for_write().
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.
| Span< const LayerGroup * > blender::bke::greasepencil::LayerGroup::groups | ( | ) | const |
Returns a Span of pointers to all the LayerGroupss in this group.
Definition at line 1826 of file grease_pencil.cc.
References GreasePencilLayerTreeGroup::runtime.
| Span< LayerGroup * > blender::bke::greasepencil::LayerGroup::groups_for_write | ( | ) |
Definition at line 1832 of file grease_pencil.cc.
References GreasePencilLayerTreeGroup::runtime.
Referenced by blender::ed::greasepencil::grease_pencil_merge_layer_exec().
| bool blender::bke::greasepencil::LayerGroup::is_empty | ( | ) | const |
Returns true if the group is empty.
Definition at line 1689 of file grease_pencil.cc.
References BLI_listbase_is_empty(), and GreasePencilLayerTreeGroup::children.
Referenced by unlink_node().
| bool blender::bke::greasepencil::LayerGroup::is_expanded | ( | ) | const |
Returns true if the group is expanded in the UI.
Definition at line 1858 of file grease_pencil.cc.
References GreasePencilLayerTreeGroup::base, and GP_LAYER_TREE_NODE_EXPANDED.
Referenced by animdata_filter_grease_pencil_layer_node_recursive(), and click_select_channel_grease_pencil_layer_group().
Returns a Span of pointers to all the Layers in this group.
Definition at line 1814 of file grease_pencil.cc.
References GreasePencilLayerTreeGroup::runtime.
Referenced by blender::ed::greasepencil::grease_pencil_merge_layer_exec().
Definition at line 1820 of file grease_pencil.cc.
References GreasePencilLayerTreeGroup::runtime.
|
protected |
Definition at line 1732 of file grease_pencil.cc.
References BLI_insertlinkbefore(), BLI_remlink(), and GreasePencilLayerTreeGroup::children.
|
protected |
Definition at line 1721 of file grease_pencil.cc.
References BLI_listbase_link_move(), GreasePencilLayerTreeGroup::children, and step.
|
protected |
Move child node to the top/bottom.
Definition at line 1726 of file grease_pencil.cc.
References BLI_insertlinkafter(), BLI_remlink(), and GreasePencilLayerTreeGroup::children.
|
protected |
Move child node up/down by step.
Definition at line 1716 of file grease_pencil.cc.
References BLI_listbase_link_move(), GreasePencilLayerTreeGroup::children, and step.
Returns a Span of pointers to all the TreeNodes in this group.
Definition at line 1802 of file grease_pencil.cc.
References GreasePencilLayerTreeGroup::runtime.
Referenced by find_node_by_name().
Definition at line 1808 of file grease_pencil.cc.
References GreasePencilLayerTreeGroup::runtime.
Referenced by find_node_by_name().
| int64_t blender::bke::greasepencil::LayerGroup::num_direct_nodes | ( | ) | const |
Returns the number of direct nodes in this group.
Definition at line 1739 of file grease_pencil.cc.
References BLI_listbase_count(), and GreasePencilLayerTreeGroup::children.
Referenced by blender::ed::greasepencil::grease_pencil_layer_move_poll(), and blender::ed::outliner::outliner_draw_hierarchy_lines_recursive().
| int64_t blender::bke::greasepencil::LayerGroup::num_nodes_total | ( | ) | const |
Returns the total number of nodes in this group.
Definition at line 1744 of file grease_pencil.cc.
References GreasePencilLayerTreeGroup::runtime.
| LayerGroup & blender::bke::greasepencil::LayerGroup::operator= | ( | const LayerGroup & | other | ) |
Definition at line 1677 of file grease_pencil.cc.
References LayerGroup(), and ~LayerGroup().
| void blender::bke::greasepencil::LayerGroup::prepare_for_dna_write | ( | ) |
Prepare the DNA GreasePencilLayerTreeGroup data before blend-file writing.
Definition at line 1937 of file grease_pencil.cc.
References GreasePencilLayerTreeGroup::children, GP_LAYER_TREE_GROUP, GP_LAYER_TREE_LEAF, and LISTBASE_FOREACH.
| void blender::bke::greasepencil::LayerGroup::print_nodes | ( | StringRef | header | ) | const |
Print the nodes. For debugging purposes.
Definition at line 1868 of file grease_pencil.cc.
References GreasePencilLayerTreeGroup::children, i, blender::Stack< T, InlineBufferCapacity, Allocator >::is_empty(), LISTBASE_FOREACH_BACKWARD, blender::Stack< T, InlineBufferCapacity, Allocator >::pop(), and blender::Stack< T, InlineBufferCapacity, Allocator >::push().
| void blender::bke::greasepencil::LayerGroup::set_expanded | ( | bool | expanded | ) |
Expand/collapse the group in the UI.
Definition at line 1863 of file grease_pencil.cc.
References GreasePencilLayerTreeGroup::base, GP_LAYER_TREE_NODE_EXPANDED, and SET_FLAG_FROM_TEST.
Referenced by click_select_channel_grease_pencil_layer_group().
|
protected |
Unlink the node from the list of nodes in this group.
Definition at line 1750 of file grease_pencil.cc.
References blender::bke::greasepencil::TreeNode::as_group(), BLI_findindex(), BLI_listbase_clear(), BLI_remlink_safe(), GreasePencilLayerTreeGroup::children, ListBase::first, is_empty(), blender::bke::greasepencil::TreeNode::is_group(), ListBase::last, LISTBASE_FOREACH, GreasePencilLayerTreeNode::next, GreasePencilLayerTreeNode::parent, and GreasePencilLayerTreeNode::prev.
| void blender::bke::greasepencil::LayerGroup::update_from_dna_read | ( | ) |
Update from DNA GreasePencilLayerTreeGroup data after blend-file reading.
Definition at line 1953 of file grease_pencil.cc.
References GreasePencilLayerTreeGroup::children, GP_LAYER_TREE_GROUP, GP_LAYER_TREE_LEAF, and LISTBASE_FOREACH.
|
friend |
Definition at line 672 of file BKE_grease_pencil.hh.
References LayerGroup(), and name.
| blender::bke::greasepencil::LayerGroup::TREENODE_COMMON_METHODS |
Definition at line 684 of file BKE_grease_pencil.hh.