Blender V5.3
blender::nodes::socket_usage_inference::SocketUsageParams Class Reference

#include <NOD_socket_usage_inference.hh>

Public Member Functions

 SocketUsageParams (SocketUsageInferencer &inferencer, const ComputeContext *compute_context, const bNodeTree &tree, const bNode &node, const bNodeSocket &socket)
InferenceValue get_input (UString identifier) const
std::optional< bool > any_output_is_used () const
bool menu_input_may_be (UString identifier, int enum_value) const
bool bool_input_may_be (UString identifier, bool bool_value) const

Public Attributes

const bNodeTree & tree
const bNode & node
const bNodeSocket & socket

Detailed Description

Definition at line 61 of file NOD_socket_usage_inference.hh.

Constructor & Destructor Documentation

◆ SocketUsageParams()

blender::nodes::socket_usage_inference::SocketUsageParams::SocketUsageParams ( SocketUsageInferencer & inferencer,
const ComputeContext * compute_context,
const bNodeTree & tree,
const bNode & node,
const bNodeSocket & socket )

Definition at line 1106 of file socket_usage_inference.cc.

References node, socket, SocketUsageParams(), and tree.

Referenced by SocketUsageParams().

Member Function Documentation

◆ any_output_is_used()

std::optional< bool > blender::nodes::socket_usage_inference::SocketUsageParams::any_output_is_used ( ) const

Returns true if any output is known to be used or false if no output is used. std::nullopt is returned if it's not known yet if any output is used. In this case, the caller should return early, it will be checked again once new information about output usages becomes available.

Definition at line 1125 of file socket_usage_inference.cc.

Referenced by blender::nodes::node_geo_sample_sound_frequencies_cc::node_declare(), blender::nodes::BaseSocketDeclarationBuilder::usage_by_bool(), blender::nodes::BaseSocketDeclarationBuilder::usage_by_menu(), and blender::nodes::BaseSocketDeclarationBuilder::usage_by_single_menu().

◆ bool_input_may_be()

◆ get_input()

InferenceValue blender::nodes::socket_usage_inference::SocketUsageParams::get_input ( UString identifier) const

Get an the statically known input value for the given socket identifier. The value may be unknown, in which case null is returned.

Definition at line 1119 of file socket_usage_inference.cc.

Referenced by bool_input_may_be(), menu_input_may_be(), and blender::nodes::node_geo_sample_sound_frequencies_cc::node_declare().

◆ menu_input_may_be()

bool blender::nodes::socket_usage_inference::SocketUsageParams::menu_input_may_be ( UString identifier,
int enum_value ) const

Member Data Documentation

◆ node

◆ socket

◆ tree

const bNodeTree& blender::nodes::socket_usage_inference::SocketUsageParams::tree

Definition at line 67 of file NOD_socket_usage_inference.hh.

Referenced by SocketUsageParams().


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