|
Blender V4.3
|
#include <NOD_derived_node_tree.hh>
Public Member Functions | |
| DerivedNodeTree (const bNodeTree &btree) | |
| ~DerivedNodeTree () | |
| const DTreeContext & | active_context () const |
| bool | has_link_cycles () const |
| bool | has_undefined_nodes_or_sockets () const |
| void | foreach_node (FunctionRef< void(DNode)> callback) const |
| std::string | to_dot () const |
#DerivedNodeTree Inline Methods | |
| const DTreeContext & | root_context () const |
| Span< const bNodeTree * > | used_btrees () const |
Definition at line 179 of file NOD_derived_node_tree.hh.
| blender::nodes::DerivedNodeTree::DerivedNodeTree | ( | const bNodeTree & | btree | ) |
Construct a new derived node tree for a given root node tree. The generated derived node tree does not own the used node tree refs (so that those can be used by others as well). The caller has to make sure that the node tree refs added to #node_tree_refs live at least as long as the derived node tree.
Definition at line 11 of file derived_node_tree.cc.
References blender::bke::NODE_INSTANCE_KEY_BASE.
| blender::nodes::DerivedNodeTree::~DerivedNodeTree | ( | ) |
Definition at line 49 of file derived_node_tree.cc.
| const DTreeContext & blender::nodes::DerivedNodeTree::active_context | ( | ) | const |
Returns the active context for the node tree. The active context represents the node tree currently being edited. In most cases, that would be the top level node tree itself, but in the case where the user is editing the node tree of a node group, the active context would be a representation of the node tree of that node group. Note that the context also stores the group node that the user selected to edit the node tree, so the context fully represents a particular instance of the node group.
Definition at line 344 of file derived_node_tree.cc.
References blender::nodes::find_active_context_recursive(), blender::bke::NODE_INSTANCE_KEY_NONE, root_context(), and bNodeInstanceKey::value.
| void blender::nodes::DerivedNodeTree::foreach_node | ( | FunctionRef< void(DNode)> | callback | ) | const |
Calls the given callback on all nodes in the (possibly nested) derived node tree.
Definition at line 83 of file derived_node_tree.cc.
References callback.
Referenced by to_dot().
| bool blender::nodes::DerivedNodeTree::has_link_cycles | ( | ) | const |
Definition at line 63 of file derived_node_tree.cc.
| bool blender::nodes::DerivedNodeTree::has_undefined_nodes_or_sockets | ( | ) | const |
Definition at line 73 of file derived_node_tree.cc.
|
inline |
Definition at line 437 of file NOD_derived_node_tree.hh.
Referenced by active_context().
| std::string blender::nodes::DerivedNodeTree::to_dot | ( | ) | const |
Generates a graph in dot format. The generated graph has all node groups inlined.
Definition at line 377 of file derived_node_tree.cc.
References blender::dot::NodeWithSockets::add_input(), blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add_new(), blender::dot::NodeWithSockets::add_output(), blender::nodes::DSocket::context(), foreach_node(), blender::nodes::get_dot_cluster_for_context(), blender::dot::NodeWithSocketsRef::input(), blender::dot::Graph::new_node(), blender::dot::NodeWithSocketsRef::output(), blender::dot::Node::set_background_color(), blender::dot::Node::set_parent_cluster(), and blender::dot::Graph::set_rankdir().
Definition at line 442 of file NOD_derived_node_tree.hh.