Blender V4.3
geometry_nodes_lazy_function.cc File Reference

Go to the source code of this file.

Classes

class  blender::nodes::LazyFunctionForGeometryNode
 
class  blender::nodes::LazyFunctionForMultiInput
 
class  blender::nodes::LazyFunctionForRerouteNode
 
class  blender::nodes::LazyFunctionForUndefinedNode
 
class  blender::nodes::LazyFunctionForMutedNode
 
class  blender::nodes::LazyFunctionForMultiFunctionConversion
 
class  blender::nodes::LazyFunctionForMultiFunctionNode
 
class  blender::nodes::LazyFunctionForImplicitInput
 
class  blender::nodes::LazyFunctionForViewerNode
 
class  blender::nodes::LazyFunctionForViewerInputUsage
 
class  blender::nodes::LazyFunctionForGizmoNode
 
class  blender::nodes::LazyFunctionForGizmoInputsUsage
 
class  blender::nodes::LazyFunctionForSimulationInputsUsage
 
class  blender::nodes::LazyFunctionForBakeInputsUsage
 
class  blender::nodes::LazyFunctionForGroupNode
 
class  blender::nodes::LazyFunctionForLogicalOr
 
class  blender::nodes::LazyFunctionForSwitchSocketUsage
 
class  blender::nodes::LazyFunctionForIndexSwitchSocketUsage
 
class  blender::nodes::LazyFunctionForAnonymousAttributeSetExtract
 
class  blender::nodes::LazyFunctionForAnonymousAttributeSetJoin
 
class  blender::nodes::LazyFunctionForSimulationZone
 
struct  blender::nodes::BuildGraphParams
 
struct  blender::nodes::ZoneFunctionIndices
 
struct  blender::nodes::ZoneBuildInfo
 
struct  blender::nodes::ZoneBodyFunction
 
class  blender::nodes::RepeatBodyNodeExecuteWrapper
 
class  blender::nodes::RepeatZoneSideEffectProvider
 
struct  blender::nodes::RepeatEvalStorage
 
class  blender::nodes::LazyFunctionForRepeatZone
 
struct  blender::nodes::ForeachElementComponentID
 
struct  blender::nodes::ForeachElementComponent
 
struct  blender::nodes::LazyFunctionForReduceForeachGeometryElement
 
class  blender::nodes::ForeachGeometryElementNodeExecuteWrapper
 
class  blender::nodes::ForeachGeometryElementZoneSideEffectProvider
 
struct  blender::nodes::ForeachGeometryElementEvalStorage
 
class  blender::nodes::LazyFunctionForForeachGeometryElementZone
 
class  blender::nodes::GeometryNodesLazyFunctionLogger
 
class  blender::nodes::GeometryNodesLazyFunctionSideEffectProvider
 
struct  blender::nodes::GeometryNodesLazyFunctionBuilder
 

Namespaces

namespace  blender
 
namespace  blender::nodes
 

Typedefs

using blender::nodes::JoinAttributeSetsCache = Map<Vector<lf::OutputSocket *>, lf::OutputSocket *>
 

Functions

static const CPPTypeblender::nodes::get_socket_cpp_type (const bke::bNodeSocketType &typeinfo)
 
static const CPPTypeblender::nodes::get_socket_cpp_type (const bNodeSocket &socket)
 
static const CPPTypeblender::nodes::get_vector_type (const CPPType &type)
 
static void blender::nodes::lazy_function_interface_from_node (const bNode &node, Vector< lf::Input > &r_inputs, Vector< lf::Output > &r_outputs, MutableSpan< int > r_lf_index_by_bsocket)
 
static void blender::nodes::set_default_value_for_output_socket (lf::Params &params, const int lf_index, const bNodeSocket &bsocket)
 
void blender::nodes::set_default_remaining_node_outputs (lf::Params &params, const bNode &node)
 
std::string blender::nodes::make_anonymous_attribute_socket_inspection_string (const bNodeSocket &socket)
 
std::string blender::nodes::make_anonymous_attribute_socket_inspection_string (StringRef node_name, StringRef socket_name)
 
static void blender::nodes::execute_multi_function_on_value_variant__single (const MultiFunction &fn, const Span< SocketValueVariant * > input_values, const Span< SocketValueVariant * > output_values)
 
static void blender::nodes::execute_multi_function_on_value_variant__field (const MultiFunction &fn, const std::shared_ptr< MultiFunction > &owned_fn, const Span< SocketValueVariant * > input_values, const Span< SocketValueVariant * > output_values)
 
static void blender::nodes::execute_multi_function_on_value_variant (const MultiFunction &fn, const std::shared_ptr< MultiFunction > &owned_fn, const Span< SocketValueVariant * > input_values, const Span< SocketValueVariant * > output_values)
 
static bool blender::nodes::gizmo_is_used (const GeoNodesLFUserData &user_data, const lf::FunctionNode &lf_gizmo_node)
 
static bool blender::nodes::should_log_socket_values_for_context (const GeoNodesLFUserData &user_data, const ComputeContextHash hash)
 
static GMutablePointer blender::nodes::get_socket_default_value (LinearAllocator<> &allocator, const bNodeSocket &bsocket)
 
static bool blender::nodes::ignore_zone_bsocket (const bNodeSocket &bsocket)
 
static void blender::nodes::initialize_zone_wrapper (const bNodeTreeZone &zone, ZoneBuildInfo &zone_info, const ZoneBodyFunction &body_fn, Vector< lf::Input > &r_inputs, Vector< lf::Output > &r_outputs)
 
static std::string blender::nodes::zone_wrapper_input_name (const ZoneBuildInfo &zone_info, const bNodeTreeZone &zone, const Span< lf::Input > inputs, const int lf_socket_i)
 
static std::string blender::nodes::zone_wrapper_output_name (const ZoneBuildInfo &zone_info, const bNodeTreeZone &zone, const Span< lf::Output > outputs, const int lf_socket_i)
 
static std::optional< AttrDomain > blender::nodes::get_foreach_attribute_propagation_target_domain (const GeometryComponent::Type component_type)
 
const GeometryNodesLazyFunctionGraphInfoblender::nodes::ensure_geometry_nodes_lazy_function_graph (const bNodeTree &btree)
 
std::optional< FoundNestedNodeIDblender::nodes::find_nested_node_id (const GeoNodesLFUserData &user_data, const int node_id)
 
static const IDblender::nodes::get_only_evaluated_id (const Depsgraph &depsgraph, const ID &id_orig)
 

Detailed Description

This file mainly converts a bNodeTree into a lazy-function graph, that can then be evaluated to execute geometry nodes. This generally works by creating a lazy-function for every node, which is then put into the lazy-function graph. Then the nodes in the new graph are linked based on links in the original bNodeTree. Some additional nodes are inserted for things like type conversions and multi-input sockets.

If the bNodeTree contains zones, those are turned into separate lazy-functions first. Essentially, a separate lazy-function graph is created for every zone that is than called by the parent zone or by the root graph.

Currently, lazy-functions are even created for nodes that don't strictly require it, like reroutes or muted nodes. In the future we could avoid that at the cost of additional code complexity. So far, this does not seem to be a performance issue.

Definition in file geometry_nodes_lazy_function.cc.