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

#include <BKE_node_runtime.hh>

Public Member Functions

 NodeLinkKey (const bNodeLink &link)
bNodeLink * try_find (bNodeTree &ntree) const
const bNodeLink * try_find (const bNodeTree &ntree) const
uint64_t hash () const

Friends

bool operator== (const NodeLinkKey &a, const NodeLinkKey &b)=default

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 90 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 590 of file node_runtime.cc.

References blender::bNode::identifier, NodeLinkKey(), blender::bNodeLink::tonode, and blender::bNodeLink::tosock.

Referenced by NodeLinkKey(), and operator==.

Member Function Documentation

◆ hash()

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

Definition at line 103 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 598 of file node_runtime.cc.

References try_find().

Referenced by try_find(), and try_find().

◆ try_find() [2/2]

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

Definition at line 603 of file node_runtime.cc.

References try_find().

◆ operator==

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

References b, and NodeLinkKey().


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