|
Blender V5.0
|
#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 bNodeTree & | tree |
| const bNode & | node |
| const bNodeSocket & | socket |
Definition at line 54 of file NOD_socket_usage_inference.hh.
| 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().
| 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.
| 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().
| 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.
| const bNode& blender::nodes::socket_usage_inference::InputSocketUsageParams::node |
Definition at line 61 of file NOD_socket_usage_inference.hh.
Referenced by InputSocketUsageParams().
| const bNodeSocket& blender::nodes::socket_usage_inference::InputSocketUsageParams::socket |
Definition at line 62 of file NOD_socket_usage_inference.hh.
Referenced by InputSocketUsageParams().
| const bNodeTree& blender::nodes::socket_usage_inference::InputSocketUsageParams::tree |
Definition at line 60 of file NOD_socket_usage_inference.hh.
Referenced by InputSocketUsageParams().