Blender V5.0
blender::bke::NodeLinkKey Struct Reference

#include <BKE_node_runtime.hh>

Public Member Functions

 NodeLinkKey (const bNodeLink &link)
bNodeLinktry_find (bNodeTree &ntree) const
const bNodeLinktry_find (const bNodeTree &ntree) const
uint64_t hash () const
 BLI_STRUCT_EQUALITY_OPERATORS_3 (NodeLinkKey, to_node_id_, input_socket_index_, input_link_index_)

Detailed Description

Utility to weakly reference a link. Weak references are safer because they avoid dangling references which can easily happen temporarily when editing the node tree.

Definition at line 80 of file BKE_node_runtime.hh.

Constructor & Destructor Documentation

◆ NodeLinkKey()

blender::bke::NodeLinkKey::NodeLinkKey ( const bNodeLink & link)
explicit

Assumes that the topology cache is up to date.

Definition at line 583 of file node_runtime.cc.

References bNode::identifier, bNodeLink::tonode, and bNodeLink::tosock.

Referenced by BLI_STRUCT_EQUALITY_OPERATORS_3().

Member Function Documentation

◆ BLI_STRUCT_EQUALITY_OPERATORS_3()

blender::bke::NodeLinkKey::BLI_STRUCT_EQUALITY_OPERATORS_3 ( NodeLinkKey ,
to_node_id_ ,
input_socket_index_ ,
input_link_index_  )

References NodeLinkKey().

◆ hash()

uint64_t blender::bke::NodeLinkKey::hash ( ) const
inline

Definition at line 93 of file BKE_node_runtime.hh.

References blender::get_default_hash().

◆ try_find() [1/2]

bNodeLink * blender::bke::NodeLinkKey::try_find ( bNodeTree & ntree) const

Definition at line 591 of file node_runtime.cc.

References try_find().

Referenced by try_find().

◆ try_find() [2/2]

const bNodeLink * blender::bke::NodeLinkKey::try_find ( const bNodeTree & ntree) const

Definition at line 596 of file node_runtime.cc.


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