|
Blender
V2.93
|
#include <FN_multi_function_network.hh>
Inherits blender::NonCopyable, and blender::NonMovable.
Definition at line 189 of file FN_multi_function_network.hh.
|
default |
| blender::fn::MFNetwork::~MFNetwork | ( | ) |
Definition at line 24 of file multi_function_network.cc.
References node.
| MFDummyNode & blender::fn::MFNetwork::add_dummy | ( | StringRef | name, |
| Span< MFDataType > | input_types, | ||
| Span< MFDataType > | output_types, | ||
| Span< StringRef > | input_names, | ||
| Span< StringRef > | output_names | ||
| ) |
Add a dummy node with the given input and output sockets.
Definition at line 123 of file multi_function_network.cc.
References blender::LinearAllocator< Allocator >::allocate_array(), blender::assert_same_size(), blender::LinearAllocator< Allocator >::construct(), blender::LinearAllocator< Allocator >::construct_elements_and_pointer_array(), blender::LinearAllocator< Allocator >::copy_string(), blender::fn::MFSocket::data_type_, blender::fn::MFSocket::id_, blender::fn::MFSocket::index_, blender::Span< T >::index_range(), blender::fn::MFSocket::is_output_, blender::fn::MFSocket::name_, node, blender::fn::MFSocket::node_, and blender::Span< T >::size().
Referenced by add_input(), add_output(), and blender::nodes::insert_dummy_node().
| MFFunctionNode & blender::fn::MFNetwork::add_function | ( | const MultiFunction & | function | ) |
Add a new function node to the network. The caller keeps the ownership of the function. The function should not be freed before the network. A reference to the new node is returned. The node is owned by the network.
Definition at line 51 of file multi_function_network.cc.
References blender::Vector< T, InlineBufferCapacity, Allocator >::append(), BLI_assert, blender::LinearAllocator< Allocator >::construct(), blender::LinearAllocator< Allocator >::construct_array_copy(), blender::LinearAllocator< Allocator >::construct_elements_and_pointer_array(), blender::fn::MFParamType::data_type(), blender::fn::MFSocket::data_type_, blender::fn::MFSocket::id_, blender::fn::MFSocket::index_, blender::Vector< T, InlineBufferCapacity, Allocator >::index_range(), blender::fn::MFParamType::Input, blender::fn::MFParamType::is_input_or_mutable(), blender::fn::MFSocket::is_output_, blender::fn::MFParamType::is_output_or_mutable(), blender::fn::MFParamType::Mutable, blender::fn::MFSocket::name_, node, blender::fn::MFSocket::node_, blender::fn::MFParamType::Output, and blender::Vector< T, InlineBufferCapacity, Allocator >::size().
Referenced by blender::fn::mf_network_optimization::add_constant_folded_sockets(), blender::nodes::insert_default_value_for_type(), blender::nodes::SocketMFNetworkBuilder::set_generator_fn(), blender::nodes::NodeMFNetworkBuilder::set_matching_fn(), and sh_node_math_expand_in_mf_network().
| MFOutputSocket & blender::fn::MFNetwork::add_input | ( | StringRef | name, |
| MFDataType | data_type | ||
| ) |
Definition at line 187 of file multi_function_network.cc.
References add_dummy(), and output.
Referenced by blender::nodes::create_function_for_node_that_expands_into_multiple().
| void blender::fn::MFNetwork::add_link | ( | MFOutputSocket & | from, |
| MFInputSocket & | to | ||
| ) |
Connect two sockets. This invokes undefined behavior if the sockets belong to different networks, the sockets have a different data type, or the to socket is connected to something else already.
Definition at line 178 of file multi_function_network.cc.
References BLI_assert, blender::fn::MFSocket::data_type_, from, blender::fn::MFNode::network_, and blender::fn::MFSocket::node_.
Referenced by blender::nodes::create_function_for_node_that_expands_into_multiple(), blender::fn::mf_network_optimization::find_constant_inputs_to_fold(), and sh_node_math_expand_in_mf_network().
| MFInputSocket & blender::fn::MFNetwork::add_output | ( | StringRef | name, |
| MFDataType | data_type | ||
| ) |
Definition at line 192 of file multi_function_network.cc.
References add_dummy().
Referenced by blender::nodes::create_function_for_node_that_expands_into_multiple(), and blender::fn::mf_network_optimization::find_constant_inputs_to_fold().
|
inline |
Definition at line 496 of file FN_multi_function_network.hh.
Referenced by blender::fn::mf_network_optimization::compute_node_hashes(), blender::fn::mf_network_optimization::dead_node_removal(), and blender::fn::mf_network_optimization::find_non_constant_nodes().
| void blender::fn::MFNetwork::find_dependencies | ( | Span< const MFInputSocket * > | sockets, |
| VectorSet< const MFOutputSocket * > & | r_dummy_sockets, | ||
| VectorSet< const MFInputSocket * > & | r_unlinked_inputs | ||
| ) | const |
Definition at line 243 of file multi_function_network.cc.
References blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add(), blender::VectorSet< Key, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add(), blender::fn::MFNode::inputs(), blender::fn::MFNode::is_dummy(), blender::Stack< T, InlineBufferCapacity, Allocator >::is_empty(), blender::fn::MFSocket::node(), blender::fn::MFInputSocket::origin(), blender::Stack< T, InlineBufferCapacity, Allocator >::pop(), and blender::Stack< T, InlineBufferCapacity, Allocator >::push_multiple().
Referenced by have_dummy_or_unlinked_dependencies().
|
inline |
Definition at line 501 of file FN_multi_function_network.hh.
Referenced by blender::fn::mf_network_optimization::compute_node_hashes(), and blender::fn::mf_network_optimization::find_non_constant_nodes().
| bool blender::fn::MFNetwork::have_dummy_or_unlinked_dependencies | ( | Span< const MFInputSocket * > | sockets | ) | const |
Definition at line 272 of file multi_function_network.cc.
References find_dependencies(), and blender::VectorSet< Key, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::size().
|
inline |
Definition at line 531 of file FN_multi_function_network.hh.
References blender::Vector< T, InlineBufferCapacity, Allocator >::size().
Referenced by blender::fn::mf_network_optimization::compute_node_hashes(), blender::fn::mf_network_optimization::group_nodes_by_hash(), blender::fn::mf_network_optimization::mask_nodes_to_the_left(), blender::fn::mf_network_optimization::mask_nodes_to_the_right(), and blender::fn::mf_network_optimization::relink_duplicate_nodes().
|
inline |
Definition at line 506 of file FN_multi_function_network.hh.
References id.
Referenced by blender::fn::mf_network_optimization::find_nodes_based_on_mask(), and blender::fn::mf_network_optimization::group_nodes_by_hash().
|
inline |
Definition at line 511 of file FN_multi_function_network.hh.
References id.
| void blender::fn::MFNetwork::relink | ( | MFOutputSocket & | old_output, |
| MFOutputSocket & | new_output | ||
| ) |
Definition at line 197 of file multi_function_network.cc.
References BLI_assert, blender::fn::MFSocket::data_type_, and blender::fn::MFOutputSocket::targets().
Referenced by blender::fn::mf_network_optimization::constant_folding(), and blender::fn::mf_network_optimization::relink_duplicate_nodes().
| void blender::fn::MFNetwork::remove | ( | MFNode & | node | ) |
Definition at line 208 of file multi_function_network.cc.
References blender::fn::MFSocket::id_, and node.
Referenced by blender::fn::mf_network_optimization::constant_folding(), blender::fn::mf_network_optimization::dead_node_removal(), and remove().
Definition at line 236 of file multi_function_network.cc.
|
inline |
Definition at line 526 of file FN_multi_function_network.hh.
References blender::Vector< T, InlineBufferCapacity, Allocator >::size().
Referenced by blender::fn::MFNetworkEvaluator::call().
|
inline |
Definition at line 516 of file FN_multi_function_network.hh.
References id.
|
inline |
Definition at line 521 of file FN_multi_function_network.hh.
References id.
Definition at line 280 of file multi_function_network.cc.
References blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add_new(), blender::Vector< T, InlineBufferCapacity, Allocator >::append(), blender::fn::MFSocket::data_type(), blender::Vector< T, InlineBufferCapacity, Allocator >::extend(), blender::fn::MFSocket::index_, blender::dot::NodeWithSocketsRef::input(), blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::lookup(), blender::fn::MFSocket::name(), blender::dot::DirectedGraph::new_edge(), blender::dot::Graph::new_node(), node, blender::fn::MFSocket::node_, blender::dot::NodeWithSocketsRef::output(), blender::dot::Graph::set_rankdir(), blender::dot::DirectedGraph::to_dot_string(), and blender::fn::MFDataType::to_string().