|
Blender V4.3
|
#include <FN_lazy_function_graph.hh>
Inherits blender::NonCopyable, and blender::NonMovable.
Classes | |
| class | ToDotOptions |
Public Member Functions | |
| Graph (StringRef name="unkown") | |
| ~Graph () | |
| FunctionNode & | add_function (const LazyFunction &fn) |
| GraphInputSocket & | add_input (const CPPType &type, std::string name="") |
| GraphOutputSocket & | add_output (const CPPType &type, std::string name="") |
| void | add_link (OutputSocket &from, InputSocket &to) |
| void | clear_origin (InputSocket &socket) |
| void | update_node_indices () |
| void | update_socket_indices () |
| bool | node_indices_are_valid () const |
| std::string | to_dot (const ToDotOptions &options={}) const |
#Graph Inline Methods | |
| StringRefNull | name () const |
| Span< const Node * > | nodes () const |
| Span< Node * > | nodes () |
| Span< const FunctionNode * > | function_nodes () const |
| Span< FunctionNode * > | function_nodes () |
| Span< GraphInputSocket * > | graph_inputs () |
| Span< GraphOutputSocket * > | graph_outputs () |
| Span< const GraphInputSocket * > | graph_inputs () const |
| Span< const GraphOutputSocket * > | graph_outputs () const |
| int | socket_num () const |
A container for an arbitrary number of nodes and links between their sockets.
Definition at line 205 of file FN_lazy_function_graph.hh.
| blender::fn::lazy_function::Graph::Graph | ( | StringRef | name = "unkown" | ) |
Definition at line 13 of file lazy_function_graph.cc.
References blender::LinearAllocator< Allocator >::construct(), and blender::LinearAllocator< Allocator >::copy_string().
| blender::fn::lazy_function::Graph::~Graph | ( | ) |
Definition at line 22 of file lazy_function_graph.cc.
References function_nodes().
| FunctionNode & blender::fn::lazy_function::Graph::add_function | ( | const LazyFunction & | fn | ) |
Add a new function node with sockets that match the passed in #LazyFunction.
Definition at line 44 of file lazy_function_graph.cc.
References blender::LinearAllocator< Allocator >::construct(), blender::LinearAllocator< Allocator >::construct_elements_and_pointer_array(), blender::fn::lazy_function::Socket::index_in_node_, blender::fn::lazy_function::LazyFunction::inputs(), blender::fn::lazy_function::LazyFunction::inputs_, blender::fn::lazy_function::Socket::is_input_, node, blender::fn::lazy_function::Socket::node_, blender::fn::lazy_function::LazyFunction::outputs(), and blender::fn::lazy_function::Socket::type_.
Referenced by blender::nodes::LazyFunctionForForeachGeometryElementZone::build_graph_contents().
| GraphInputSocket & blender::fn::lazy_function::Graph::add_input | ( | const CPPType & | type, |
| std::string | name = "" ) |
Add inputs and outputs to the graph.
Definition at line 73 of file lazy_function_graph.cc.
References blender::Vector< T, InlineBufferCapacity, Allocator >::append(), blender::LinearAllocator< Allocator >::construct(), blender::fn::lazy_function::Socket::index_in_node_, blender::fn::lazy_function::Socket::is_input_, blender::fn::lazy_function::Socket::node_, blender::fn::lazy_function::Node::outputs_, and blender::fn::lazy_function::Socket::type_.
Referenced by blender::nodes::LazyFunctionForForeachGeometryElementZone::initialize_execution_graph().
| void blender::fn::lazy_function::Graph::add_link | ( | OutputSocket & | from, |
| InputSocket & | to ) |
Add a link between the two given sockets. This has undefined behavior when the input is linked to something else already.
Definition at line 99 of file lazy_function_graph.cc.
References BLI_assert, and from.
Referenced by blender::nodes::LazyFunctionForForeachGeometryElementZone::build_graph_contents().
| GraphOutputSocket & blender::fn::lazy_function::Graph::add_output | ( | const CPPType & | type, |
| std::string | name = "" ) |
Definition at line 86 of file lazy_function_graph.cc.
References blender::Vector< T, InlineBufferCapacity, Allocator >::append(), blender::LinearAllocator< Allocator >::construct(), blender::fn::lazy_function::Socket::index_in_node_, blender::fn::lazy_function::Node::inputs_, blender::fn::lazy_function::Socket::is_input_, blender::fn::lazy_function::Socket::node_, and blender::fn::lazy_function::Socket::type_.
Referenced by blender::nodes::LazyFunctionForForeachGeometryElementZone::initialize_execution_graph().
| void blender::fn::lazy_function::Graph::clear_origin | ( | InputSocket & | socket | ) |
If the socket is linked, remove the link.
Definition at line 107 of file lazy_function_graph.cc.
|
inline |
Definition at line 518 of file FN_lazy_function_graph.hh.
References blender::Vector< T, InlineBufferCapacity, Allocator >::as_span().
|
inline |
Definition at line 513 of file FN_lazy_function_graph.hh.
References blender::Vector< T, InlineBufferCapacity, Allocator >::as_span().
Referenced by ~Graph().
|
inline |
Definition at line 523 of file FN_lazy_function_graph.hh.
|
inline |
Definition at line 533 of file FN_lazy_function_graph.hh.
|
inline |
Definition at line 528 of file FN_lazy_function_graph.hh.
|
inline |
Definition at line 538 of file FN_lazy_function_graph.hh.
|
inline |
Definition at line 498 of file FN_lazy_function_graph.hh.
| bool blender::fn::lazy_function::Graph::node_indices_are_valid | ( | ) | const |
Can be used to assert that update_node_indices has been called.
Definition at line 136 of file lazy_function_graph.cc.
Referenced by blender::fn::lazy_function::Executor::Executor().
Definition at line 508 of file FN_lazy_function_graph.hh.
Get all nodes in the graph. The index in the span corresponds to Node::index_in_graph.
Definition at line 503 of file FN_lazy_function_graph.hh.
Referenced by blender::fn::lazy_function::GraphExecutor::GraphExecutor().
|
inline |
Number of sockets in the graph.
Definition at line 543 of file FN_lazy_function_graph.hh.
| std::string blender::fn::lazy_function::Graph::to_dot | ( | const ToDotOptions & | options = {} | ) | const |
Utility to generate a dot graph string for the graph. This can be used for debugging.
Definition at line 192 of file lazy_function_graph.cc.
References blender::dot::NodeWithSockets::add_input(), blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add_new(), blender::dot::NodeWithSockets::add_output(), blender::dot::Node::attributes, blender::dot::NodeWithSockets::Socket::fontcolor, blender::dot::NodeWithSocketsRef::input(), blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::lookup(), blender::dot::DirectedGraph::new_edge(), blender::dot::Graph::new_node(), blender::dot::NodeWithSockets::node_name, options, blender::dot::NodeWithSocketsRef::output(), blender::dot::Attributes::set(), blender::dot::Node::set_background_color(), blender::dot::Graph::set_rankdir(), blender::dot::Node::set_shape(), blender::dot::DirectedGraph::to_dot_string(), and blender::CPPType::to_string().
Referenced by blender::nodes::LazyFunctionForForeachGeometryElementZone::initialize_execution_graph().
| void blender::fn::lazy_function::Graph::update_node_indices | ( | ) |
Make sure that Node::index_in_graph is up to date.
Definition at line 115 of file lazy_function_graph.cc.
Referenced by blender::nodes::LazyFunctionForForeachGeometryElementZone::initialize_execution_graph().
| void blender::fn::lazy_function::Graph::update_socket_indices | ( | ) |
Make sure that Socket::index_in_graph is up to date.
Definition at line 122 of file lazy_function_graph.cc.