Changeset View
Changeset View
Standalone View
Standalone View
source/blender/nodes/intern/node_tree_ref.cc
| Show First 20 Lines • Show All 340 Lines • ▼ Show 20 Lines | bool NodeTreeRef::has_link_cycles() const | ||||
| for (const NodeRef *node : nodes_by_id_) { | for (const NodeRef *node : nodes_by_id_) { | ||||
| if (has_link_cycles_recursive(*node, visited, is_in_stack)) { | if (has_link_cycles_recursive(*node, visited, is_in_stack)) { | ||||
| return true; | return true; | ||||
| } | } | ||||
| } | } | ||||
| return false; | return false; | ||||
| } | } | ||||
| bool NodeTreeRef::has_undefined_nodes_or_sockets() const | |||||
| { | |||||
| for (const NodeRef *node : nodes_by_id_) { | |||||
| if (node->is_undefined()) { | |||||
| return true; | |||||
| } | |||||
| } | |||||
| for (const SocketRef *socket : sockets_by_id_) { | |||||
| if (socket->is_undefined()) { | |||||
| return true; | |||||
| } | |||||
| } | |||||
| return false; | |||||
| } | |||||
| std::string NodeTreeRef::to_dot() const | std::string NodeTreeRef::to_dot() const | ||||
| { | { | ||||
| dot::DirectedGraph digraph; | dot::DirectedGraph digraph; | ||||
| digraph.set_rankdir(dot::Attr_rankdir::LeftToRight); | digraph.set_rankdir(dot::Attr_rankdir::LeftToRight); | ||||
| Map<const NodeRef *, dot::NodeWithSocketsRef> dot_nodes; | Map<const NodeRef *, dot::NodeWithSocketsRef> dot_nodes; | ||||
| for (const NodeRef *node : nodes_by_id_) { | for (const NodeRef *node : nodes_by_id_) { | ||||
| Show All 36 Lines | |||||