Blender V5.3
blender::nodes::NodeInContext Struct Reference

#include <NOD_node_in_compute_context.hh>

Public Member Functions

#NodeInContext Inline Methods
uint64_t hash () const
ComputeContextHash context_hash () const
const bNode * operator-> () const
const bNode & operator* () const
 operator bool () const
SocketInContext input_socket (int index) const
SocketInContext output_socket (int index) const

Public Attributes

const ComputeContext * context = nullptr
const bNode * node = nullptr

Friends

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

Detailed Description

Utility struct to pair a node with a compute context. This uniquely identifies a node in an node-tree evaluation.

Definition at line 30 of file NOD_node_in_compute_context.hh.

Member Function Documentation

◆ context_hash()

ComputeContextHash blender::nodes::NodeInContext::context_hash ( ) const
inline

Definition at line 102 of file NOD_node_in_compute_context.hh.

References context, and blender::ComputeContext::hash().

Referenced by hash(), and operator==.

◆ hash()

uint64_t blender::nodes::NodeInContext::hash ( ) const
inline

Definition at line 97 of file NOD_node_in_compute_context.hh.

References context_hash(), blender::get_default_hash(), and node.

◆ input_socket()

SocketInContext blender::nodes::NodeInContext::input_socket ( int index) const
inline

Definition at line 122 of file NOD_node_in_compute_context.hh.

References context, and node.

Referenced by blender::nodes::find_origin_sockets_through_contexts().

◆ operator bool()

blender::nodes::NodeInContext::operator bool ( ) const
inline

Definition at line 117 of file NOD_node_in_compute_context.hh.

References node.

◆ operator*()

const bNode & blender::nodes::NodeInContext::operator* ( ) const
inline

Definition at line 112 of file NOD_node_in_compute_context.hh.

References node.

◆ operator->()

const bNode * blender::nodes::NodeInContext::operator-> ( ) const
inline

Definition at line 107 of file NOD_node_in_compute_context.hh.

References node.

◆ output_socket()

SocketInContext blender::nodes::NodeInContext::output_socket ( int index) const
inline

Definition at line 127 of file NOD_node_in_compute_context.hh.

References context, and node.

Referenced by blender::nodes::find_target_sockets_through_contexts().

◆ operator==

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

Two nodes in context compare equal if their context hash is equal, not the pointer to the context. This is important as the same compute context may be constructed multiple times.

Definition at line 47 of file NOD_node_in_compute_context.hh.

References b, context_hash(), and node.

Member Data Documentation

◆ context

◆ node


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