Blender V5.0
blender::nodes::socket_usage_inference::InputSocketUsageParams Class Reference

#include <NOD_socket_usage_inference.hh>

Public Member Functions

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

Public Attributes

const bNodeTreetree
const bNodenode
const bNodeSocketsocket

Detailed Description

Definition at line 54 of file NOD_socket_usage_inference.hh.

Constructor & Destructor Documentation

◆ InputSocketUsageParams()

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

Definition at line 973 of file socket_usage_inference.cc.

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

Referenced by InputSocketUsageParams().

Member Function Documentation

◆ any_output_is_used()

std::optional< bool > blender::nodes::socket_usage_inference::InputSocketUsageParams::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 992 of file socket_usage_inference.cc.

◆ get_input()

InferenceValue blender::nodes::socket_usage_inference::InputSocketUsageParams::get_input ( StringRef 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 986 of file socket_usage_inference.cc.

Referenced by menu_input_may_be().

◆ menu_input_may_be()

bool blender::nodes::socket_usage_inference::InputSocketUsageParams::menu_input_may_be ( StringRef identifier,
int enum_value ) const

Utility for the case when the socket depends on a specific menu input to have a certain value.

Definition at line 1014 of file socket_usage_inference.cc.

References BLI_assert, get_input(), blender::nodes::InferenceValue::get_primitive(), blender::nodes::InferenceValue::is_primitive_value(), and SOCK_MENU.

Member Data Documentation

◆ node

const bNode& blender::nodes::socket_usage_inference::InputSocketUsageParams::node

Definition at line 61 of file NOD_socket_usage_inference.hh.

Referenced by InputSocketUsageParams().

◆ socket

const bNodeSocket& blender::nodes::socket_usage_inference::InputSocketUsageParams::socket

Definition at line 62 of file NOD_socket_usage_inference.hh.

Referenced by InputSocketUsageParams().

◆ tree

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

Definition at line 60 of file NOD_socket_usage_inference.hh.

Referenced by InputSocketUsageParams().


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