|
Blender V5.3
|
Classes | |
| struct | SocketUsage |
| class | SocketUsageInferencer |
| class | SocketUsageInferencerImpl |
| class | SocketUsageParams |
Functions | |
| static bool | input_may_affect_visibility (const bNodeTreeInterfaceSocket &socket) |
| static bool | input_may_affect_visibility (const bNodeSocket &socket) |
| Array< SocketUsage > | infer_all_sockets_usage (const bNodeTree &tree) |
| void | infer_group_interface_usage (const bNodeTree &group, const Span< InferenceValue > group_input_values, const MutableSpan< SocketUsage > r_input_usages, const std::optional< MutableSpan< SocketUsage > > r_output_usages) |
| void | infer_group_interface_inputs_usage (const bNodeTree &group, Span< const bNodeSocket * > input_sockets, MutableSpan< SocketUsage > r_input_usages) |
| void | infer_group_interface_inputs_usage (const bNodeTree &group, const PointerRNA &properties_ptr, MutableSpan< SocketUsage > r_input_usages, std::optional< MutableSpan< SocketUsage > > r_output_usages) |
| Array< SocketUsage > blender::nodes::socket_usage_inference::infer_all_sockets_usage | ( | const bNodeTree & | tree | ) |
Determine which sockets in the tree are currently used and thus which should be grayed out or made invisible.
Definition at line 898 of file socket_usage_inference.cc.
References blender::Span< T >::index_range(), infer_all_sockets_usage(), blender::nodes::socket_usage_inference::SocketUsageInferencer::is_socket_used(), blender::nodes::socket_usage_inference::SocketUsageInferencer::mark_top_level_node_outputs_as_used(), blender::threading::parallel_for(), and blender::Span< T >::size().
Referenced by blender::ensure_inference_usage_cache(), and infer_all_sockets_usage().
| void blender::nodes::socket_usage_inference::infer_group_interface_inputs_usage | ( | const bNodeTree & | group, |
| const PointerRNA & | properties_ptr, | ||
| MutableSpan< SocketUsage > | r_input_usages, | ||
| std::optional< MutableSpan< SocketUsage > > | r_output_usages = std::nullopt ) |
Same as above, but automatically retrieves the input values from the given properties. This is used with the geometry nodes modifier and node tools.
Definition at line 1094 of file socket_usage_inference.cc.
References blender::nodes::get_geometry_nodes_input_inference_values(), infer_group_interface_inputs_usage(), and infer_group_interface_usage().
| void blender::nodes::socket_usage_inference::infer_group_interface_inputs_usage | ( | const bNodeTree & | group, |
| Span< const bNodeSocket * > | input_sockets, | ||
| MutableSpan< SocketUsage > | r_input_usages ) |
Same as above, but automatically retrieves the input values from the given sockets.. This is used for group nodes.
Definition at line 1065 of file socket_usage_inference.cc.
References blender::ResourceScope::allocate_owned(), blender::bke::bNodeSocketType::base_cpp_type, blender::BLI_assert(), blender::bNodeSocket::default_value, blender::nodes::InferenceValue::from_primitive(), blender::bke::bNodeSocketType::get_base_cpp_value, blender::Span< T >::index_range(), infer_group_interface_inputs_usage(), infer_group_interface_usage(), blender::Span< T >::size(), blender::bNodeSocket::typeinfo, and blender::nodes::InferenceValue::Unknown().
Referenced by blender::nodes::draw_compositor_nodes_modifier_ui(), blender::ui::draw_effect_inputs(), blender::nodes::draw_geometry_nodes_operator_redo_ui(), infer_group_interface_inputs_usage(), and infer_group_interface_inputs_usage().
| void blender::nodes::socket_usage_inference::infer_group_interface_usage | ( | const bNodeTree & | group, |
| Span< InferenceValue > | group_input_values, | ||
| MutableSpan< SocketUsage > | r_input_usages, | ||
| std::optional< MutableSpan< SocketUsage > > | r_output_usages = std::nullopt ) |
Get usage of the inputs and outputs of the node group given the set of input values. The result can be used to e.g. gray out or hide individual inputs that are unused.
| group | The node group that is called. |
| group_input_values | An optional input value for each node group input. The type is expected to be bNodeSocketType::base_cpp_type. If the input value for a socket is not known or can't be represented as base type, null has to be passed instead. |
| r_input_usages | The destination array where the inferred input usages are written. |
| r_output_usages | The destination array where the inferred output usages are written. |
Definition at line 985 of file socket_usage_inference.cc.
References blender::MutableSpan< T >::fill(), infer_group_interface_usage(), input_may_affect_visibility(), blender::nodes::socket_usage_inference::SocketUsageInferencer::is_disabled_group_output(), blender::nodes::socket_usage_inference::SocketUsageInferencer::is_group_input_used(), blender::nodes::socket_usage_inference::SocketUsage::is_used, blender::nodes::socket_usage_inference::SocketUsage::is_visible, and blender::nodes::InferenceValue::Unknown().
Referenced by blender::seq::compositor_effect_nodes_input_usages(), blender::NodesModifierUsageInferenceCache::ensure(), infer_group_interface_inputs_usage(), infer_group_interface_inputs_usage(), and infer_group_interface_usage().
|
static |
Definition at line 893 of file socket_usage_inference.cc.
References input_may_affect_visibility(), blender::SOCK_MENU, and blender::bNodeSocket::type.
|
static |
Definition at line 888 of file socket_usage_inference.cc.
References input_may_affect_visibility(), blender::bNodeTreeInterfaceSocket::socket_type, and blender::StringRef::StringRef().
Referenced by infer_group_interface_usage(), input_may_affect_visibility(), and input_may_affect_visibility().