Blender V5.3
blender::MutableNodeAndSocket Struct Reference

#include <node_intern.hh>

Public Member Functions

 MutableNodeAndSocket (bNode &node, const StringRef socket_identifier, const eNodeSocketInOut in_out, const bool link_muted, std::optional< int > multi_input_sort_id=std::nullopt)
 MutableNodeAndSocket (bNode &node, bNodeSocket &socket, const bool link_muted, std::optional< int > multi_input_sort_id=std::nullopt)
 MutableNodeAndSocket (bNodeSocket &socket, const bool link_muted, std::optional< int > multi_input_sort_id=std::nullopt)
NodeAndSocket operator() () const
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
bNodeSocket * find_socket () const

Public Attributes

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

Friends

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

Detailed Description

Utility for referencing a mutable 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 121 of file node_intern.hh.

Constructor & Destructor Documentation

◆ MutableNodeAndSocket() [1/3]

blender::MutableNodeAndSocket::MutableNodeAndSocket ( 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 128 of file node_intern.hh.

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

Referenced by operator==.

◆ MutableNodeAndSocket() [2/3]

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

Definition at line 140 of file node_intern.hh.

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

◆ MutableNodeAndSocket() [3/3]

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

Definition at line 151 of file node_intern.hh.

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

Member Function Documentation

◆ find_socket()

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

Definition at line 180 of file node_intern.hh.

References find_socket_in_node().

◆ find_socket_in_node() [1/2]

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

Definition at line 80 of file node_copy_util.cc.

References find_socket_in_node().

◆ find_socket_in_node() [2/2]

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

◆ is_input()

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

Definition at line 167 of file node_intern.hh.

References in_out, and blender::SOCK_IN.

◆ is_output()

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

Definition at line 172 of file node_intern.hh.

References in_out, and blender::SOCK_OUT.

◆ operator()()

NodeAndSocket blender::MutableNodeAndSocket::operator() ( ) const
inline

Definition at line 162 of file node_intern.hh.

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

◆ operator==

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

Member Data Documentation

◆ in_out

◆ link_muted

◆ multi_input_sort_id

std::optional<int> blender::MutableNodeAndSocket::multi_input_sort_id

◆ node

◆ socket_identifier

std::string blender::MutableNodeAndSocket::socket_identifier

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