Blender
V3.3
|
#include <NOD_node_tree_ref.hh>
Classes | |
struct | ToposortResult |
Public Types | |
enum class | ToposortDirection { LeftToRight , RightToLeft } |
Public Member Functions | |
NodeTreeRef (bNodeTree *btree) | |
~NodeTreeRef () | |
const NodeRef * | find_node (const bNode &bnode) const |
bool | has_link_cycles () const |
bool | has_undefined_nodes_or_sockets () const |
ToposortResult | toposort (ToposortDirection direction) const |
std::string | to_dot () const |
#NodeTreeRef Inline Methods | |
Span< const NodeRef * > | nodes () const |
Span< const NodeRef * > | nodes_by_type (StringRefNull idname) const |
Span< const NodeRef * > | nodes_by_type (const bNodeType *nodetype) const |
Span< const SocketRef * > | sockets () const |
Span< const InputSocketRef * > | input_sockets () const |
Span< const OutputSocketRef * > | output_sockets () const |
Span< const LinkRef * > | links () const |
const NodeRef * | group_output_node () const |
bNodeTree * | btree () const |
StringRefNull | name () const |
Definition at line 239 of file NOD_node_tree_ref.hh.
|
strong |
Enumerator | |
---|---|
LeftToRight | |
RightToLeft |
Definition at line 279 of file NOD_node_tree_ref.hh.
blender::nodes::NodeTreeRef::NodeTreeRef | ( | bNodeTree * | btree | ) |
Definition at line 14 of file node_tree_ref.cc.
References Freestyle::a, blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add_new(), usdtokens::b(), BLI_assert, blender::nodes::SocketRef::bsocket_, btree(), blender::LinearAllocator< Allocator >::construct(), blender::nodes::SocketRef::directly_linked_links_, blender::Span< T >::first(), blender::nodes::SocketRef::id_, blender::nodes::SocketRef::index_, blender::Span< T >::is_empty(), blender::nodes::SocketRef::is_input_, bNodeTree::links, LISTBASE_FOREACH, node, blender::nodes::SocketRef::node_, NODE_DO_OUTPUT, bNodeTree::nodes, nodes_by_type(), blender::Span< T >::size(), and sort().
blender::nodes::NodeTreeRef::~NodeTreeRef | ( | ) |
Definition at line 123 of file node_tree_ref.cc.
References node.
|
inline |
Definition at line 748 of file NOD_node_tree_ref.hh.
Referenced by blender::nodes::NodeRef::btree(), NodeTreeRef(), blender::nodes::NodeRef::rna(), and blender::ed::space_node::viewer_linking::socket_can_be_viewed().
Definition at line 612 of file node_tree_ref.cc.
References node, nodes_by_type(), and bNode::typeinfo.
|
inline |
This is the active group output node if there are multiple.
Definition at line 743 of file NOD_node_tree_ref.hh.
bool blender::nodes::NodeTreeRef::has_link_cycles | ( | ) | const |
Definition at line 447 of file node_tree_ref.cc.
References blender::nodes::has_link_cycles_recursive(), node, and visited.
bool blender::nodes::NodeTreeRef::has_undefined_nodes_or_sockets | ( | ) | const |
Definition at line 461 of file node_tree_ref.cc.
References node.
|
inline |
Definition at line 728 of file NOD_node_tree_ref.hh.
Definition at line 738 of file NOD_node_tree_ref.hh.
|
inline |
Definition at line 753 of file NOD_node_tree_ref.hh.
References bNodeTree::id, and ID::name.
Definition at line 707 of file NOD_node_tree_ref.hh.
Referenced by find_sockets_to_preview_for_spreadsheet().
|
inline |
Definition at line 718 of file NOD_node_tree_ref.hh.
|
inline |
Definition at line 712 of file NOD_node_tree_ref.hh.
References blender::StringRefNull::c_str(), and nodeTypeFind().
Referenced by blender::io::obj::find_bsdf_node(), find_node(), find_sockets_to_preview_for_spreadsheet(), blender::nodes::DOutputSocket::get_active_corresponding_group_output_socket(), blender::nodes::DInputSocket::get_corresponding_group_input_sockets(), modifyGeometry(), and NodeTreeRef().
|
inline |
Definition at line 733 of file NOD_node_tree_ref.hh.
Definition at line 723 of file NOD_node_tree_ref.hh.
std::string blender::nodes::NodeTreeRef::to_dot | ( | ) | const |
Definition at line 622 of file node_tree_ref.cc.
References blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add_new(), blender::Vector< T, InlineBufferCapacity, Allocator >::append(), blender::nodes::InputSocketRef::directly_linked_sockets(), blender::dot::NodeWithSocketsRef::input(), blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::lookup(), blender::dot::DirectedGraph::new_edge(), blender::dot::Graph::new_node(), node, blender::dot::NodeWithSocketsRef::output(), blender::dot::Node::set_background_color(), blender::dot::Graph::set_rankdir(), and blender::dot::DirectedGraph::to_dot_string().
NodeTreeRef::ToposortResult blender::nodes::NodeTreeRef::toposort | ( | ToposortDirection | direction | ) | const |
Sort nodes topologically from left to right or right to left. In the future the result if this could be cached on NodeTreeRef.
Definition at line 574 of file node_tree_ref.cc.
References BLI_assert, LeftToRight, node, result, SOCK_IN, SOCK_OUT, and blender::nodes::toposort_from_start_node().