|
Blender V5.3
|
#include <BKE_grease_pencil.hh>
Inherits blender::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 blender::GreasePencilLayerTreeGroup | |
| GreasePencilLayerTreeNode | base |
| ListBaseT< GreasePencilLayerTreeNode > | children = {nullptr, nullptr} |
| GroupColorTag | color_tag = LAYERGROUP_COLOR_01 |
| char | _pad [7] = {} |
| bke::greasepencil::LayerGroupRuntime * | runtime = nullptr |
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 | blender::GreasePencil |
A LayerGroup is a grouping of zero or more Layers.
Definition at line 737 of file BKE_grease_pencil.hh.
| blender::bke::greasepencil::LayerGroup::LayerGroup | ( | ) |
Definition at line 2087 of file grease_pencil.cc.
References blender::GreasePencilLayerTreeGroup::base, blender::GreasePencilLayerTreeGroup::children, blender::GreasePencilLayerTreeGroup::color_tag, blender::GP_LAYER_TREE_GROUP, blender::LAYERGROUP_COLOR_NONE, blender::GreasePencilLayerTreeGroup::runtime, and blender::bke::greasepencil::TreeNode::TreeNode().
Referenced by blender::GreasePencil, LayerGroup(), LayerGroup(), and operator=().
|
explicit |
Definition at line 2097 of file grease_pencil.cc.
References blender::GreasePencilLayerTreeGroup::base, blender::GP_LAYER_TREE_GROUP, LayerGroup(), and blender::bke::greasepencil::TreeNode::TreeNode().
| blender::bke::greasepencil::LayerGroup::LayerGroup | ( | const LayerGroup & | other | ) |
Definition at line 2102 of file grease_pencil.cc.
References add_node(), blender::bke::greasepencil::Layer::as_node(), as_node(), blender::GreasePencilLayerTreeGroup::base, blender::GreasePencilLayerTreeGroup::children, blender::GreasePencilLayerTreeGroup::color_tag, blender::GP_LAYER_TREE_GROUP, blender::GP_LAYER_TREE_LEAF, layer, LayerGroup(), blender::bke::greasepencil::TreeNode::TreeNode(), and blender::GreasePencilLayerTreeNode::type.
| blender::bke::greasepencil::LayerGroup::~LayerGroup | ( | ) |
Definition at line 2126 of file grease_pencil.cc.
References blender::GreasePencilLayerTreeGroup::base, blender::GreasePencilLayerTreeGroup::children, blender::GP_LAYER_TREE_GROUP, blender::GP_LAYER_TREE_LEAF, layer, and blender::GreasePencilLayerTreeGroup::runtime.
Adds an existing node at the end of this group.
Definition at line 2166 of file grease_pencil.cc.
References blender::BLI_addtail(), blender::GreasePencilLayerTreeGroup::children, and node.
Referenced by LayerGroup().
|
protected |
Adds an existing node after link of this group.
Definition at line 2180 of file grease_pencil.cc.
References blender::BLI_assert(), blender::BLI_findindex(), blender::BLI_insertlinkafter(), blender::GreasePencilLayerTreeGroup::children, and node.
|
protected |
Adds an existing node before link of this group.
Definition at line 2173 of file grease_pencil.cc.
References blender::BLI_assert(), blender::BLI_findindex(), blender::BLI_insertlinkbefore(), blender::GreasePencilLayerTreeGroup::children, and node.
|
inline |
Definition at line 951 of file BKE_grease_pencil.hh.
|
inline |
Definition at line 947 of file BKE_grease_pencil.hh.
Referenced by blender::BKE_grease_pencil_copy_layer_group_parameters(), blender::bke::greasepencil::TreeNode::depth(), blender::ed::greasepencil::grease_pencil_layer_group_add_exec(), blender::grease_pencil_set_runtime_visibilities(), and LayerGroup().
Definition at line 2319 of file grease_pencil.cc.
References node, and nodes_for_write().
Returns a pointer to the node with name. If no such node was found, returns nullptr.
Definition at line 2309 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 2297 of file grease_pencil.cc.
References blender::bke::greasepencil::LayerGroupRuntime::layer_group_cache_, and blender::GreasePencilLayerTreeGroup::runtime.
| Span< LayerGroup * > blender::bke::greasepencil::LayerGroup::groups_for_write | ( | ) |
Definition at line 2303 of file grease_pencil.cc.
References blender::bke::greasepencil::LayerGroupRuntime::layer_group_cache_, and blender::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 2161 of file grease_pencil.cc.
References blender::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 2329 of file grease_pencil.cc.
References blender::GreasePencilLayerTreeGroup::base, blender::GreasePencilLayerTreeNode::flag, and blender::GP_LAYER_TREE_NODE_EXPANDED.
Referenced by blender::animdata_filter_grease_pencil_layer_node_recursive(), and blender::click_select_channel_grease_pencil_layer_group().
Returns a Span of pointers to all the Layers in this group.
Definition at line 2285 of file grease_pencil.cc.
References blender::bke::greasepencil::LayerGroupRuntime::layer_cache_, and blender::GreasePencilLayerTreeGroup::runtime.
Referenced by blender::ed::greasepencil::grease_pencil_merge_layer_exec().
Definition at line 2291 of file grease_pencil.cc.
References blender::bke::greasepencil::LayerGroupRuntime::layer_cache_, and blender::GreasePencilLayerTreeGroup::runtime.
|
protected |
Definition at line 2204 of file grease_pencil.cc.
References blender::BLI_insertlinkbefore(), blender::BLI_remlink(), blender::GreasePencilLayerTreeGroup::children, and node.
|
protected |
Definition at line 2193 of file grease_pencil.cc.
References blender::BLI_listbase_link_move(), blender::GreasePencilLayerTreeGroup::children, node, and step.
|
protected |
Move child node to the top/bottom.
Definition at line 2198 of file grease_pencil.cc.
References blender::BLI_insertlinkafter(), blender::BLI_remlink(), blender::GreasePencilLayerTreeGroup::children, and node.
|
protected |
Move child node up/down by step.
Definition at line 2188 of file grease_pencil.cc.
References blender::BLI_listbase_link_move(), blender::GreasePencilLayerTreeGroup::children, node, and step.
Returns a Span of pointers to all the TreeNodes in this group.
Definition at line 2273 of file grease_pencil.cc.
References blender::bke::greasepencil::LayerGroupRuntime::nodes_cache_, and blender::GreasePencilLayerTreeGroup::runtime.
Referenced by find_node_by_name().
Definition at line 2279 of file grease_pencil.cc.
References blender::bke::greasepencil::LayerGroupRuntime::nodes_cache_, and blender::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 2211 of file grease_pencil.cc.
References blender::GreasePencilLayerTreeGroup::children.
Referenced by blender::ed::greasepencil::grease_pencil_layer_move_poll().
| int64_t blender::bke::greasepencil::LayerGroup::num_nodes_total | ( | ) | const |
Returns the total number of nodes in this group.
Definition at line 2216 of file grease_pencil.cc.
References blender::bke::greasepencil::LayerGroupRuntime::nodes_cache_, and blender::GreasePencilLayerTreeGroup::runtime.
| LayerGroup & blender::bke::greasepencil::LayerGroup::operator= | ( | const LayerGroup & | other | ) |
Definition at line 2149 of file grease_pencil.cc.
References LayerGroup().
Referenced by blender::GreasePencil.
| void blender::bke::greasepencil::LayerGroup::prepare_for_dna_write | ( | ) |
Prepare the DNA GreasePencilLayerTreeGroup data before blend-file writing.
Definition at line 2408 of file grease_pencil.cc.
References blender::bke::greasepencil::TreeNode::as_group(), blender::bke::greasepencil::TreeNode::as_layer(), blender::GreasePencilLayerTreeGroup::children, blender::GP_LAYER_TREE_GROUP, blender::GP_LAYER_TREE_LEAF, blender::bke::greasepencil::Layer::prepare_for_dna_write(), prepare_for_dna_write(), and blender::GreasePencilLayerTreeNode::type.
Referenced by prepare_for_dna_write().
| void blender::bke::greasepencil::LayerGroup::print_nodes | ( | StringRef | header | ) | const |
Print the nodes. For debugging purposes.
Definition at line 2339 of file grease_pencil.cc.
References blender::GreasePencilLayerTreeGroup::children, blender::Stack< T, InlineBufferCapacity, Allocator >::is_empty(), node, 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 2334 of file grease_pencil.cc.
References blender::GreasePencilLayerTreeGroup::base, blender::GreasePencilLayerTreeNode::flag, blender::GP_LAYER_TREE_NODE_EXPANDED, and SET_FLAG_FROM_TEST.
Referenced by blender::click_select_channel_grease_pencil_layer_group().
|
protected |
Unlink the node from the list of nodes in this group.
Definition at line 2222 of file grease_pencil.cc.
References blender::bke::greasepencil::TreeNode::as_group(), blender::BLI_findindex(), blender::BLI_listbase_clear(), blender::BLI_remlink_safe(), blender::GreasePencilLayerTreeGroup::children, is_empty(), blender::bke::greasepencil::TreeNode::is_group(), blender::GreasePencilLayerTreeNode::next, blender::GreasePencilLayerTreeNode::parent, and blender::GreasePencilLayerTreeNode::prev.
| void blender::bke::greasepencil::LayerGroup::update_from_dna_read | ( | ) |
Update from DNA GreasePencilLayerTreeGroup data after blend-file reading.
Definition at line 2425 of file grease_pencil.cc.
References blender::bke::greasepencil::TreeNode::as_group(), blender::bke::greasepencil::TreeNode::as_layer(), blender::GreasePencilLayerTreeGroup::children, blender::GP_LAYER_TREE_GROUP, blender::GP_LAYER_TREE_LEAF, blender::GreasePencilLayerTreeNode::type, blender::bke::greasepencil::Layer::update_from_dna_read(), and update_from_dna_read().
Referenced by update_from_dna_read().
|
friend |
Definition at line 738 of file BKE_grease_pencil.hh.
References LayerGroup(), and operator=().
| blender::bke::greasepencil::LayerGroup::TREENODE_COMMON_METHODS |
Definition at line 750 of file BKE_grease_pencil.hh.