Blender  V3.3
Public Member Functions | Static Public Attributes | List of all members
blender::nodes::GeoNodeExecParams Class Reference

#include <NOD_geometry_exec.hh>

Public Member Functions

 GeoNodeExecParams (GeoNodeExecParamsProvider &provider)
 
GMutablePointer extract_input (StringRef identifier)
 
template<typename T >
T extract_input (StringRef identifier)
 
void check_input_geometry_set (StringRef identifier, const GeometrySet &geometry_set) const
 
void check_output_geometry_set (const GeometrySet &geometry_set) const
 
template<typename T >
Vector< Textract_multi_input (StringRef identifier)
 
template<typename T >
T get_input (StringRef identifier) const
 
template<typename T >
void set_output (StringRef identifier, T &&value)
 
void set_input_unused (StringRef identifier)
 
bool output_is_required (StringRef identifier) const
 
bool lazy_require_input (StringRef identifier)
 
bool lazy_output_is_required (StringRef identifier)
 
const bNodenode () const
 
const Objectself_object () const
 
Depsgraphdepsgraph () const
 
void error_message_add (const NodeWarningType type, std::string message) const
 
std::string attribute_producer_name () const
 
void set_default_remaining_outputs ()
 
void used_named_attribute (std::string attribute_name, eNamedAttrUsage usage)
 

Static Public Attributes

template<typename T >
static constexpr bool is_field_base_type_v
 

Detailed Description

Definition at line 108 of file NOD_geometry_exec.hh.

Constructor & Destructor Documentation

◆ GeoNodeExecParams()

blender::nodes::GeoNodeExecParams::GeoNodeExecParams ( GeoNodeExecParamsProvider provider)
inline

Definition at line 113 of file NOD_geometry_exec.hh.

Member Function Documentation

◆ attribute_producer_name()

std::string blender::nodes::GeoNodeExecParams::attribute_producer_name ( ) const

◆ check_input_geometry_set()

void blender::nodes::GeoNodeExecParams::check_input_geometry_set ( StringRef  identifier,
const GeometrySet geometry_set 
) const

◆ check_output_geometry_set()

void blender::nodes::GeoNodeExecParams::check_output_geometry_set ( const GeometrySet geometry_set) const

◆ depsgraph()

Depsgraph* blender::nodes::GeoNodeExecParams::depsgraph ( ) const
inline

◆ error_message_add()

void blender::nodes::GeoNodeExecParams::error_message_add ( const NodeWarningType  type,
std::string  message 
) const

Add an error message displayed at the top of the node when displaying the node tree, and potentially elsewhere in Blender.

Definition at line 18 of file intern/node_geometry_exec.cc.

References blender::nodes::GeoNodeExecParamsProvider::dnode, blender::nodes::geometry_nodes_eval_log::GeoLogger::local(), blender::nodes::geometry_nodes_eval_log::LocalGeoLogger::log_node_warning(), blender::nodes::GeoNodeExecParamsProvider::logger, and type.

Referenced by check_input_geometry_set().

◆ extract_input() [1/2]

GMutablePointer blender::nodes::GeoNodeExecParams::extract_input ( StringRef  identifier)
inline

Get the input value for the input socket with the given identifier.

The node calling becomes responsible for destructing the value before it is done executing. This method can only be called once for each identifier.

Definition at line 127 of file NOD_geometry_exec.hh.

References blender::nodes::GeoNodeExecParamsProvider::extract_input().

Referenced by extract_input().

◆ extract_input() [2/2]

template<typename T >
T blender::nodes::GeoNodeExecParams::extract_input ( StringRef  identifier)
inline

Get the input value for the input socket with the given identifier.

This method can only be called once for each identifier.

Definition at line 140 of file NOD_geometry_exec.hh.

References blender::fn::ValueOrField< T >::as_field(), blender::fn::ValueOrField< T >::as_value(), check_input_geometry_set(), extract_input(), blender::GMutablePointer::relocate_out(), and T.

◆ extract_multi_input()

template<typename T >
Vector<T> blender::nodes::GeoNodeExecParams::extract_multi_input ( StringRef  identifier)
inline

Get input as vector for multi input socket with the given identifier.

This method can only be called once for each identifier.

Definition at line 173 of file NOD_geometry_exec.hh.

References blender::Vector< T, InlineBufferCapacity, Allocator >::append(), blender::fn::ValueOrField< T >::as_value(), blender::nodes::GeoNodeExecParamsProvider::extract_multi_input(), and T.

◆ get_input()

template<typename T >
T blender::nodes::GeoNodeExecParams::get_input ( StringRef  identifier) const
inline

◆ lazy_output_is_required()

bool blender::nodes::GeoNodeExecParams::lazy_output_is_required ( StringRef  identifier)
inline

Asks the evaluator if a specific output is required right now. If this returns false, the value might still need to be computed later. This can only be used when the node supports laziness.

Definition at line 278 of file NOD_geometry_exec.hh.

References blender::nodes::GeoNodeExecParamsProvider::lazy_output_is_required().

◆ lazy_require_input()

bool blender::nodes::GeoNodeExecParams::lazy_require_input ( StringRef  identifier)
inline

Tell the evaluator that a specific input is required. This returns true when the input will only be available in the next execution. False is returned if the input is available already. This can only be used when the node supports laziness.

Definition at line 268 of file NOD_geometry_exec.hh.

References blender::nodes::GeoNodeExecParamsProvider::lazy_require_input().

◆ node()

const bNode& blender::nodes::GeoNodeExecParams::node ( ) const
inline

Get the node that is currently being executed.

Definition at line 286 of file NOD_geometry_exec.hh.

References blender::nodes::NodeRef::bnode(), and blender::nodes::GeoNodeExecParamsProvider::dnode.

◆ output_is_required()

bool blender::nodes::GeoNodeExecParams::output_is_required ( StringRef  identifier) const
inline

Returns true when the output has to be computed. Nodes that support laziness could use the lazy_output_is_required variant to possibly avoid some computations.

Definition at line 257 of file NOD_geometry_exec.hh.

References blender::nodes::GeoNodeExecParamsProvider::output_is_required().

◆ self_object()

const Object* blender::nodes::GeoNodeExecParams::self_object ( ) const
inline

◆ set_default_remaining_outputs()

void blender::nodes::GeoNodeExecParams::set_default_remaining_outputs ( )

◆ set_input_unused()

void blender::nodes::GeoNodeExecParams::set_input_unused ( StringRef  identifier)
inline

Tell the evaluator that a specific input won't be used anymore.

Definition at line 247 of file NOD_geometry_exec.hh.

References blender::nodes::GeoNodeExecParamsProvider::set_input_unused().

◆ set_output()

template<typename T >
void blender::nodes::GeoNodeExecParams::set_output ( StringRef  identifier,
T &&  value 
)
inline

◆ used_named_attribute()

void blender::nodes::GeoNodeExecParams::used_named_attribute ( std::string  attribute_name,
eNamedAttrUsage  usage 
)

Member Data Documentation

◆ is_field_base_type_v

template<typename T >
constexpr bool blender::nodes::GeoNodeExecParams::is_field_base_type_v
inlinestaticconstexpr
Initial value:
=
is_same_any_v<T, float, int, bool, ColorGeometry4f, float3, std::string>

Definition at line 118 of file NOD_geometry_exec.hh.


The documentation for this class was generated from the following files: