Blender V4.5
blender::nodes::GeoNodeExecParams Class Reference

#include <NOD_geometry_exec.hh>

Public Member Functions

 GeoNodeExecParams (const bNode &node, lf::Params &params, const lf::Context &lf_context, const Span< int > lf_input_for_output_bsocket_usage, const Span< int > lf_input_for_attribute_propagation_to_output, const FunctionRef< std::string(int)> get_output_attribute_id)
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>
T get_input (StringRef identifier) const
lf::Paramslow_level_lazy_function_params ()
template<typename T>
void set_output (StringRef identifier, T &&value)
geo_eval_log::GeoTreeLoggerget_local_tree_logger () const
void set_input_unused (StringRef identifier)
bool output_is_required (StringRef identifier) const
const bNodenode () const
const Objectself_object () const
const Depsgraph * depsgraph () const
Mainbmain () const
GeoNodesUserDatauser_data () const
GeoNodesLocalUserDatalocal_user_data () const
void error_message_add (const NodeWarningType type, StringRef message) const
void set_default_remaining_outputs ()
void used_named_attribute (StringRef attribute_name, NamedAttributeUsage usage)
bool anonymous_attribute_output_is_required (const StringRef output_identifier)
std::optional< std::string > get_output_anonymous_attribute_id_if_needed (const StringRef output_identifier, const bool force_create=false)
NodeAttributeFilter get_attribute_filter (const StringRef output_identifier) const
std::optional< std::string > ensure_absolute_path (StringRefNull path) const

Static Public Attributes

template<typename T>
static constexpr bool is_field_base_type_v
template<typename T>
static constexpr bool stored_as_SocketValueVariant_v

Detailed Description

Definition at line 73 of file NOD_geometry_exec.hh.

Constructor & Destructor Documentation

◆ GeoNodeExecParams()

blender::nodes::GeoNodeExecParams::GeoNodeExecParams ( const bNode & node,
lf::Params & params,
const lf::Context & lf_context,
const Span< int > lf_input_for_output_bsocket_usage,
const Span< int > lf_input_for_attribute_propagation_to_output,
const FunctionRef< std::string(int)> get_output_attribute_id )
inline

Definition at line 83 of file NOD_geometry_exec.hh.

References node(), and params.

Member Function Documentation

◆ anonymous_attribute_output_is_required()

bool blender::nodes::GeoNodeExecParams::anonymous_attribute_output_is_required ( const StringRef output_identifier)
inline

Return true when the anonymous attribute referenced by the given output should be created.

Definition at line 286 of file NOD_geometry_exec.hh.

Referenced by get_output_anonymous_attribute_id_if_needed().

◆ bmain()

Main * blender::nodes::GeoNodeExecParams::bmain ( ) const

Definition at line 30 of file node_geometry_exec.cc.

References DEG_get_bmain(), and depsgraph().

Referenced by ensure_absolute_path().

◆ check_input_geometry_set()

◆ check_output_geometry_set()

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

◆ depsgraph()

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

Definition at line 248 of file NOD_geometry_exec.hh.

References data, and user_data().

Referenced by bmain().

◆ ensure_absolute_path()

std::optional< std::string > blender::nodes::GeoNodeExecParams::ensure_absolute_path ( StringRefNull path) const

If the path is relative, attempt to make it absolute. If the current node tree is linked, the path is relative to the linked file. Otherwise, the path is relative to the current file.

Definition at line 266 of file node_geometry_exec.cc.

References BLI_path_abs(), BLI_path_is_rel(), bmain(), blender::StringRefNull::c_str(), ensure_absolute_path(), FILE_MAX, ID_BLEND_PATH, blender::StringRefBase::is_empty(), STRNCPY(), and tree.

Referenced by ensure_absolute_path().

◆ error_message_add()

void blender::nodes::GeoNodeExecParams::error_message_add ( const NodeWarningType type,
StringRef 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 35 of file node_geometry_exec.cc.

References get_local_tree_logger().

Referenced by check_input_geometry_set().

◆ extract_input()

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 120 of file NOD_geometry_exec.hh.

References BLI_assert, check_input_geometry_set(), blender::bke::SocketValueVariant::extract(), extract_input(), blender::CPPType::get(), stored_as_SocketValueVariant_v, and T.

Referenced by extract_input().

◆ get_attribute_filter()

NodeAttributeFilter blender::nodes::GeoNodeExecParams::get_attribute_filter ( const StringRef output_identifier) const
inline

Get information about which attributes should be propagated to the given output.

Definition at line 311 of file NOD_geometry_exec.hh.

◆ get_input()

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

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

Definition at line 149 of file NOD_geometry_exec.hh.

References BLI_assert, check_input_geometry_set(), blender::CPPType::get(), get_input(), stored_as_SocketValueVariant_v, and T.

Referenced by get_input().

◆ get_local_tree_logger()

geo_eval_log::GeoTreeLogger * blender::nodes::GeoNodeExecParams::get_local_tree_logger ( ) const
inline

◆ get_output_anonymous_attribute_id_if_needed()

std::optional< std::string > blender::nodes::GeoNodeExecParams::get_output_anonymous_attribute_id_if_needed ( const StringRef output_identifier,
const bool force_create = false )
inline

Return a new anonymous attribute id for the given output. None is returned if the anonymous attribute is not needed.

Definition at line 298 of file NOD_geometry_exec.hh.

References anonymous_attribute_output_is_required().

◆ local_user_data()

GeoNodesLocalUserData * blender::nodes::GeoNodeExecParams::local_user_data ( ) const
inline

Definition at line 268 of file NOD_geometry_exec.hh.

Referenced by get_local_tree_logger().

◆ low_level_lazy_function_params()

lf::Params & blender::nodes::GeoNodeExecParams::low_level_lazy_function_params ( )
inline

Low level access to the parameters. Usually, it's better to use get_input, extract_input and set_output instead because they are easier to use and more safe. Sometimes it can be beneficial to have more direct access to the raw values though and avoid the indirection.

Definition at line 177 of file NOD_geometry_exec.hh.

◆ node()

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

Get the node that is currently being executed.

Definition at line 235 of file NOD_geometry_exec.hh.

Referenced by GeoNodeExecParams().

◆ output_is_required()

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

Returns true when the output has to be computed.

Definition at line 226 of file NOD_geometry_exec.hh.

References blender::fn::lazy_function::Unused.

◆ self_object()

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

Definition at line 240 of file NOD_geometry_exec.hh.

References data, and user_data().

◆ 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 217 of file NOD_geometry_exec.hh.

◆ set_output()

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

Store the output value for the given socket identifier.

Definition at line 185 of file NOD_geometry_exec.hh.

References BLI_assert, check_output_geometry_set(), blender::CPPType::get(), set_output(), stored_as_SocketValueVariant_v, and T.

Referenced by set_output().

◆ used_named_attribute()

void blender::nodes::GeoNodeExecParams::used_named_attribute ( StringRef attribute_name,
NamedAttributeUsage usage )

Definition at line 45 of file node_geometry_exec.cc.

References get_local_tree_logger(), and used_named_attribute().

Referenced by used_named_attribute().

◆ user_data()

GeoNodesUserData * blender::nodes::GeoNodeExecParams::user_data ( ) const
inline

Definition at line 263 of file NOD_geometry_exec.hh.

Referenced by depsgraph(), get_local_tree_logger(), and self_object().

Member Data Documentation

◆ is_field_base_type_v

template<typename T>
bool blender::nodes::GeoNodeExecParams::is_field_base_type_v
staticconstexpr
Initial value:
float,
int,
bool,
std::string,
#define T
QuaternionBase< float > Quaternion
constexpr bool is_same_any_v
MatBase< float, 4, 4 > float4x4
ColorSceneLinear4f< eAlpha::Premultiplied > ColorGeometry4f
Definition BLI_color.hh:342
VecBase< float, 3 > float3

Definition at line 100 of file NOD_geometry_exec.hh.

◆ stored_as_SocketValueVariant_v

template<typename T>
bool blender::nodes::GeoNodeExecParams::stored_as_SocketValueVariant_v
staticconstexpr

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