|
Blender V5.0
|
#include <FN_lazy_function_graph.hh>
Inherits blender::NonCopyable, and blender::NonMovable.
Classes | |
| class | ToDotOptions |
Public Member Functions | |
| Graph (StringRef name="unknown") | |
| ~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 = "unknown" | ) |
Definition at line 13 of file lazy_function_graph.cc.
References name().
| 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::fn::lazy_function::Node::fn_, i, blender::fn::lazy_function::Socket::index_in_node_, inputs, blender::fn::lazy_function::Node::inputs_, blender::fn::lazy_function::Socket::is_input_, blender::fn::lazy_function::Socket::node_, outputs, blender::fn::lazy_function::Node::outputs_, and blender::fn::lazy_function::Socket::type_.
Referenced by blender::nodes::LazyFunctionForForeachGeometryElementZone::build_graph_contents(), blender::nodes::LazyFunctionForClosureZone::execute_impl(), blender::nodes::LazyFunctionForEvaluateClosureNode::initialize_execution_graph(), blender::nodes::LazyFunctionForEvaluateClosureNode::initialize_pass_through_graph(), blender::fn::lazy_function::tests::TEST(), and blender::fn::lazy_function::tests::TEST().
| 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::fn::lazy_function::Socket::index_in_node_, blender::fn::lazy_function::Socket::is_input_, name(), blender::fn::lazy_function::Socket::node_, and blender::fn::lazy_function::Socket::type_.
Referenced by blender::nodes::LazyFunctionForClosureZone::execute_impl(), blender::nodes::LazyFunctionForEvaluateClosureNode::initialize_execution_graph(), blender::nodes::LazyFunctionForForeachGeometryElementZone::initialize_execution_graph(), blender::nodes::LazyFunctionForEvaluateClosureNode::initialize_pass_through_graph(), blender::fn::lazy_function::tests::TEST(), and blender::fn::lazy_function::tests::TEST().
| 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 blender::fn::lazy_function::Socket::type_.
Referenced by blender::nodes::LazyFunctionForForeachGeometryElementZone::build_graph_contents(), blender::nodes::LazyFunctionForClosureZone::execute_impl(), blender::nodes::LazyFunctionForEvaluateClosureNode::initialize_execution_graph(), blender::nodes::LazyFunctionForEvaluateClosureNode::initialize_pass_through_graph(), blender::fn::lazy_function::tests::TEST(), and blender::fn::lazy_function::tests::TEST().
| 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::fn::lazy_function::Socket::index_in_node_, blender::fn::lazy_function::Socket::is_input_, name(), blender::fn::lazy_function::Socket::node_, and blender::fn::lazy_function::Socket::type_.
Referenced by blender::nodes::LazyFunctionForClosureZone::execute_impl(), blender::nodes::LazyFunctionForEvaluateClosureNode::initialize_execution_graph(), blender::nodes::LazyFunctionForForeachGeometryElementZone::initialize_execution_graph(), blender::nodes::LazyFunctionForEvaluateClosureNode::initialize_pass_through_graph(), and blender::fn::lazy_function::tests::TEST().
| 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::Span< T >::cast(), and blender::Span< T >::drop_front().
|
inline |
Definition at line 513 of file FN_lazy_function_graph.hh.
References blender::Span< T >::cast(), and blender::Span< T >::drop_front().
Referenced by ~Graph().
|
inline |
Definition at line 523 of file FN_lazy_function_graph.hh.
Referenced by blender::nodes::LazyFunctionForClosureZone::execute_impl(), blender::nodes::LazyFunctionForEvaluateClosureNode::initialize_execution_graph(), and blender::nodes::LazyFunctionForEvaluateClosureNode::initialize_pass_through_graph().
|
inline |
Definition at line 533 of file FN_lazy_function_graph.hh.
|
inline |
Definition at line 528 of file FN_lazy_function_graph.hh.
Referenced by blender::nodes::LazyFunctionForClosureZone::execute_impl(), blender::nodes::LazyFunctionForEvaluateClosureNode::initialize_execution_graph(), and blender::nodes::LazyFunctionForEvaluateClosureNode::initialize_pass_through_graph().
|
inline |
Definition at line 538 of file FN_lazy_function_graph.hh.
|
inline |
Definition at line 498 of file FN_lazy_function_graph.hh.
Referenced by add_input(), add_output(), Graph(), and blender::fn::lazy_function::GraphExecutor::GraphExecutor().
| 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.
References i.
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.
|
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_export::NodeWithSockets::add_input(), blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add_new(), blender::dot_export::NodeWithSockets::add_output(), blender::dot_export::Node::attributes, blender::dot_export::Ellipse, blender::dot_export::NodeWithSockets::Socket::fontcolor, blender::dot_export::NodeWithSocketsRef::input(), blender::CPPType::is_printable(), blender::dot_export::LeftToRight, blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::lookup(), blender::CPPType::name(), blender::dot_export::DirectedGraph::new_edge(), blender::dot_export::Graph::new_node(), blender::dot_export::NodeWithSockets::node_name, options, blender::dot_export::NodeWithSocketsRef::output(), blender::dot_export::Attributes::set(), blender::dot_export::Node::set_background_color(), blender::dot_export::Graph::set_rankdir(), blender::dot_export::Node::set_shape(), blender::dot_export::DirectedGraph::to_dot_string(), and blender::CPPType::to_string().
| 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.
References i.
Referenced by blender::nodes::LazyFunctionForClosureZone::execute_impl(), blender::nodes::LazyFunctionForEvaluateClosureNode::initialize_execution_graph(), blender::nodes::LazyFunctionForForeachGeometryElementZone::initialize_execution_graph(), blender::nodes::LazyFunctionForEvaluateClosureNode::initialize_pass_through_graph(), blender::fn::lazy_function::tests::TEST(), and blender::fn::lazy_function::tests::TEST().
| 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.