|
Blender V5.3
|
#include <FN_field.hh>
Classes | |
| struct | Input |
| struct | MultiFn |
| struct | FieldRef |
| struct | ConstantRef |
| struct | TrivialInlineConstant |
| struct | OwnedConstant |
Public Types | |
| using | Variant |
Public Member Functions | |
| GField ()=delete | |
| GField (const GField &other) | |
| GField (GField &&other) noexcept | |
| GField & | operator= (const GField &other) |
| GField & | operator= (GField &&other) noexcept |
| ~GField () | |
| const FieldInputsPtr & | field_inputs () const |
| uint64_t | hash () const |
| FieldOperationPtr | try_extract_operation () |
Static Public Member Functions | |
| static GField | from_constant (const CPPType &type, const void *value) |
Static Public Attributes | |
| template<typename T> | |
| static constexpr bool | is_constant_value_v |
Friends | |
| bool | operator== (const GField &a, const GField &b) |
Inline Methods | |
| GField (const CPPType &type) noexcept | |
| GField (FieldInputPtr node) noexcept | |
| GField (FieldOperationPtr node, int output_i=0) noexcept | |
| GField (Variant variant) noexcept | |
| const CPPType & | cpp_type () const |
| const GField & | deref_field_ref () const |
| const Variant & | variant () const |
| bool | depends_on_input () const |
| template<typename InputT> | |
| const InputT * | get_input_if () const |
| const void * | get_if_constant () const |
| template<typename T> | |
| const Field< T > & | typed () const |
| template<typename T> | |
| Field< T > & | typed () |
| static GField | from_non_owning_ref (const GField &field) |
| static GField | from_non_owning_constant (const CPPType &type, const void *value) |
| template<typename InputT, typename... Args> | |
| static GField | from_input (Args &&...args) |
A field with a type that is only known at runtime which can be accessed through the cpp_type method. If the type is known at compile time, it is recommended to use Field<T> instead.
It is designed to support various internal storage representations to avoid unnecessary allocations or reference counting in many common cases.
Definition at line 55 of file FN_field.hh.
Definition at line 110 of file FN_field.hh.
|
delete |
GField is expected to always have a valid CPPType. Therefore, it can't be default constructed.
Referenced by blender::nodes::node_geo_menu_switch_cc::LazyFunctionForMenuSwitchNode::execute_field(), blender::nodes::node_geo_tool_set_selection_cc::invert_selection(), and blender::nodes::node_geo_sample_uv_surface_cc::node_geo_exec().
|
inlineexplicitnoexcept |
Construct a field that just outputs the default value of the given type.
Definition at line 450 of file FN_field.hh.
|
inlineexplicitnoexcept |
Construct a field owning a field input.
Definition at line 454 of file FN_field.hh.
|
inlineexplicitnoexcept |
Construct a field that owns a field operation and outputs one of its outputs.
Definition at line 456 of file FN_field.hh.
|
inlineexplicitnoexcept |
Construct directly from a Variant, mostly for internal use.
Definition at line 455 of file FN_field.hh.
| blender::fn::GField::GField | ( | const GField & | other | ) |
|
noexcept |
|
inline |
The value type the field outputs for each element, e.g. float.
Definition at line 518 of file FN_field.hh.
|
inline |
Returns true when the field depends on some input.
Definition at line 614 of file FN_field.hh.
|
inline |
This "normalizes" the field. Specifically, if this field is just a non-owning reference to some other field, the referenced field is returned.
Definition at line 541 of file FN_field.hh.
| const FieldInputsPtr & blender::fn::GField::field_inputs | ( | ) | const |
Root FieldInput nodes that this field depends on.
|
static |
|
inlinestatic |
Build a new FieldInput with the given arguments.
Definition at line 482 of file FN_field.hh.
Referenced by blender::nodes::node_geo_tool_selection_cc::get_selection_field(), blender::nodes::node_geo_accumulate_field_cc::node_geo_exec(), blender::nodes::node_geo_blur_attribute_cc::node_geo_exec(), blender::nodes::node_geo_evaluate_at_index_cc::node_geo_exec(), blender::nodes::node_geo_evaluate_on_domain_cc::node_geo_exec(), blender::nodes::node_geo_field_average_cc::node_geo_exec(), blender::nodes::node_geo_field_min_and_max_cc::node_geo_exec(), blender::nodes::node_geo_field_variance_cc::node_geo_exec(), blender::nodes::node_geo_tool_set_selection_cc::node_geo_exec(), and blender::nodes::LazyFunctionForGeometryNode::output_anonymous_attribute_field().
|
inlinestatic |
Construct a field that just outputs the given constant value without owning it.
Definition at line 472 of file FN_field.hh.
|
inlinestatic |
Wraps the given field in a new field. This is used to avoid reference counting for some field fields which have static lifetime.
Definition at line 461 of file FN_field.hh.
|
inline |
Definition at line 632 of file FN_field.hh.
|
inline |
Utility to access a specific input type if this field is just an input.
Definition at line 623 of file FN_field.hh.
| uint64_t blender::fn::GField::hash | ( | ) | const |
Attempts to take ownership of a FieldOperation stored in this field, leaving the field input. It's expected to be deleted shortly after. This is necessary to avoid deep recursion when destructing a field tree.
|
inline |
Definition at line 591 of file FN_field.hh.
|
inline |
Get a typed reference to this field. Note that Field<T> happens to be identical to GField on a bit-level. So this is just a cast.
Definition at line 584 of file FN_field.hh.
|
inline |
Get the underlying Variant.
Definition at line 598 of file FN_field.hh.
|
staticconstexpr |
Definition at line 107 of file FN_field.hh.