Blender V5.3
blender::NodeAndSocket Struct Reference

#include <node_intern.hh>

Public Member Functions

 NodeAndSocket (const bNode &node, const StringRef socket_identifier, const eNodeSocketInOut in_out, const bool link_muted, std::optional< int > multi_input_sort_id=std::nullopt)
 NodeAndSocket (const bNode &node, const bNodeSocket &socket, const bool link_muted, std::optional< int > multi_input_sort_id=std::nullopt)
 NodeAndSocket (const bNodeSocket &socket, const bool link_muted, std::optional< int > multi_input_sort_id=std::nullopt)
bool is_input () const
bool is_output () const
const bNodeSocket * find_socket_in_node (const bNode &other_node) const
bNodeSocket * find_socket_in_node (bNode &other_node) const
const bNodeSocket * find_socket () const

Public Attributes

const bNode & node
std::string socket_identifier
eNodeSocketInOut in_out
bool link_muted
std::optional< int > multi_input_sort_id

Friends

bool operator== (const NodeAndSocket &a, const NodeAndSocket &b)

Detailed Description

Utility for referencing a const socket and its owner node.

Note
This is needed because the socket owner_node pointer depends on topology cache, which becomes invalid by adding new links.

Definition at line 49 of file node_intern.hh.

Constructor & Destructor Documentation

◆ NodeAndSocket() [1/3]

blender::NodeAndSocket::NodeAndSocket ( const bNode & node,
const StringRef socket_identifier,
const eNodeSocketInOut in_out,
const bool link_muted,
std::optional< int > multi_input_sort_id = std::nullopt )
inline

Definition at line 56 of file node_intern.hh.

References in_out, link_muted, multi_input_sort_id, node, and socket_identifier.

Referenced by operator==.

◆ NodeAndSocket() [2/3]

blender::NodeAndSocket::NodeAndSocket ( const bNode & node,
const bNodeSocket & socket,
const bool link_muted,
std::optional< int > multi_input_sort_id = std::nullopt )
inline

Definition at line 68 of file node_intern.hh.

References in_out, link_muted, multi_input_sort_id, node, and socket_identifier.

◆ NodeAndSocket() [3/3]

blender::NodeAndSocket::NodeAndSocket ( const bNodeSocket & socket,
const bool link_muted,
std::optional< int > multi_input_sort_id = std::nullopt )
inline

Definition at line 79 of file node_intern.hh.

References in_out, link_muted, multi_input_sort_id, node, and socket_identifier.

Member Function Documentation

◆ find_socket()

const bNodeSocket * blender::NodeAndSocket::find_socket ( ) const
inline

Definition at line 103 of file node_intern.hh.

References find_socket_in_node().

◆ find_socket_in_node() [1/2]

bNodeSocket * blender::NodeAndSocket::find_socket_in_node ( bNode & other_node) const

Definition at line 65 of file node_copy_util.cc.

References find_socket_in_node().

◆ find_socket_in_node() [2/2]

◆ is_input()

bool blender::NodeAndSocket::is_input ( ) const
inline

Definition at line 90 of file node_intern.hh.

References in_out, and blender::SOCK_IN.

◆ is_output()

bool blender::NodeAndSocket::is_output ( ) const
inline

Definition at line 95 of file node_intern.hh.

References in_out, and blender::SOCK_OUT.

◆ operator==

bool operator== ( const NodeAndSocket & a,
const NodeAndSocket & b )
friend

Definition at line 108 of file node_intern.hh.

References b, in_out, link_muted, multi_input_sort_id, node, NodeAndSocket(), and socket_identifier.

Member Data Documentation

◆ in_out

◆ link_muted

◆ multi_input_sort_id

◆ node

◆ socket_identifier


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