Blender  V3.3
Classes | Public Types | Public Member Functions | List of all members
blender::nodes::NodeTreeRef Class Reference

#include <NOD_node_tree_ref.hh>

Inheritance diagram for blender::nodes::NodeTreeRef:
blender::NonCopyable blender::NonMovable

Classes

struct  ToposortResult
 

Public Types

enum class  ToposortDirection { LeftToRight , RightToLeft }
 

Public Member Functions

 NodeTreeRef (bNodeTree *btree)
 
 ~NodeTreeRef ()
 
const NodeReffind_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 NodeRefgroup_output_node () const
 
bNodeTreebtree () const
 
StringRefNull name () const
 

Detailed Description

Definition at line 239 of file NOD_node_tree_ref.hh.

Member Enumeration Documentation

◆ ToposortDirection

Enumerator
LeftToRight 
RightToLeft 

Definition at line 279 of file NOD_node_tree_ref.hh.

Constructor & Destructor Documentation

◆ NodeTreeRef()

blender::nodes::NodeTreeRef::NodeTreeRef ( bNodeTree btree)

◆ ~NodeTreeRef()

blender::nodes::NodeTreeRef::~NodeTreeRef ( )

Definition at line 123 of file node_tree_ref.cc.

References node.

Member Function Documentation

◆ btree()

bNodeTree * blender::nodes::NodeTreeRef::btree ( ) const
inline

◆ find_node()

const NodeRef * blender::nodes::NodeTreeRef::find_node ( const bNode bnode) const

Definition at line 612 of file node_tree_ref.cc.

References node, nodes_by_type(), and bNode::typeinfo.

◆ group_output_node()

const NodeRef * blender::nodes::NodeTreeRef::group_output_node ( ) const
inline

This is the active group output node if there are multiple.

Definition at line 743 of file NOD_node_tree_ref.hh.

◆ has_link_cycles()

bool blender::nodes::NodeTreeRef::has_link_cycles ( ) const
Returns
True when there is a link cycle. Unavailable sockets are ignored.

Definition at line 447 of file node_tree_ref.cc.

References blender::nodes::has_link_cycles_recursive(), node, and visited.

◆ has_undefined_nodes_or_sockets()

bool blender::nodes::NodeTreeRef::has_undefined_nodes_or_sockets ( ) const

Definition at line 461 of file node_tree_ref.cc.

References node.

◆ input_sockets()

Span< const InputSocketRef * > blender::nodes::NodeTreeRef::input_sockets ( ) const
inline

Definition at line 728 of file NOD_node_tree_ref.hh.

◆ links()

Span< const LinkRef * > blender::nodes::NodeTreeRef::links ( ) const
inline

Definition at line 738 of file NOD_node_tree_ref.hh.

◆ name()

StringRefNull blender::nodes::NodeTreeRef::name ( ) const
inline

Definition at line 753 of file NOD_node_tree_ref.hh.

References bNodeTree::id, and ID::name.

◆ nodes()

Span< const NodeRef * > blender::nodes::NodeTreeRef::nodes ( ) const
inline

Definition at line 707 of file NOD_node_tree_ref.hh.

Referenced by find_sockets_to_preview_for_spreadsheet().

◆ nodes_by_type() [1/2]

Span< const NodeRef * > blender::nodes::NodeTreeRef::nodes_by_type ( const bNodeType nodetype) const
inline

Definition at line 718 of file NOD_node_tree_ref.hh.

◆ nodes_by_type() [2/2]

Span< const NodeRef * > blender::nodes::NodeTreeRef::nodes_by_type ( StringRefNull  idname) const
inline

◆ output_sockets()

Span< const OutputSocketRef * > blender::nodes::NodeTreeRef::output_sockets ( ) const
inline

Definition at line 733 of file NOD_node_tree_ref.hh.

◆ sockets()

Span< const SocketRef * > blender::nodes::NodeTreeRef::sockets ( ) const
inline

Definition at line 723 of file NOD_node_tree_ref.hh.

◆ to_dot()

std::string blender::nodes::NodeTreeRef::to_dot ( ) const

◆ toposort()

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().


The documentation for this class was generated from the following files: