Blender V5.3
blender::nodes::FieldInput Class Referenceabstract

#include <FN_field.hh>

Inherits blender::blender::ImplicitSharingMixin.

Inherited by blender::bke::CurvesFieldInput, blender::bke::GeometryFieldInput, blender::bke::InstancesFieldInput, blender::bke::MeshFieldInput, blender::bke::PointCloudFieldInput, blender::bke::bake::DeferredTypeAttributeFieldInput, blender::fn::IndexFieldInput, and blender::fn::tests::IndexFieldInput.

Public Member Functions

 FieldInput (const CPPType &type, std::string debug_name="")
 ~FieldInput () override
const FieldInputsPtr & field_inputs () const
uint64_t hash () const
virtual void hash_unique (UniqueHashBytes &hash, FieldHashDeep &deep_hash_cache) const
virtual void foreach_recursive_field (FunctionRef< void(const GField &)> fn) const
virtual GVArray get_varray_for_context (const FieldContext &context, const IndexMask &mask, ResourceScope &scope) const=0
void delete_self () override
Inline Methods
StringRefNull debug_name () const
virtual std::string socket_inspection_name () const
const CPPType & cpp_type () const
Public Member Functions inherited from blender::blender::ImplicitSharingInfo
virtual ~ImplicitSharingInfo ()
bool is_mutable () const
bool is_expired () const
void add_user () const
void add_weak_user () const
void tag_ensured_mutable () const
int64_t version () const
int strong_users () const
void remove_user_and_delete_if_last () const
void remove_weak_user_and_delete_if_last () const

Protected Attributes

const CPPType * type_
std::string debug_name_
CacheMutex field_inputs_mutex_
FieldInputsPtr field_inputs_

Detailed Description

This is an abstract class which concrete field inputs have to derive from. When a field is evaluated, this can provide values based on the provided context.

Since there is no better way yet, FieldInput is also often used to process the output of intermediate fields, in which case this is not technically an "input".

Definition at line 339 of file FN_field.hh.

Constructor & Destructor Documentation

◆ FieldInput()

blender::fn::FieldInput::FieldInput ( const CPPType & type,
std::string debug_name = "" )

Definition at line 19 of file field.cc.

◆ ~FieldInput()

Member Function Documentation

◆ cpp_type()

const CPPType & blender::fn::FieldInput::cpp_type ( ) const
inline

Definition at line 559 of file FN_field.hh.

◆ debug_name()

Definition at line 569 of file FN_field.hh.

◆ delete_self()

void blender::fn::FieldInput::delete_self ( )
overridevirtual

Implements blender::blender::ImplicitSharingMixin.

Definition at line 211 of file field.cc.

◆ field_inputs()

Definition at line 175 of file field.cc.

◆ foreach_recursive_field()

void blender::fn::FieldInput::foreach_recursive_field ( FunctionRef< void(const GField &)> fn) const
virtual

If this FieldInput depends on other fields, this function should be overridden.

Definition at line 195 of file field.cc.

◆ get_varray_for_context()

virtual GVArray blender::fn::FieldInput::get_varray_for_context ( const FieldContext & context,
const IndexMask & mask,
ResourceScope & scope ) const
pure virtual

Output a virtual array for the given index mask in the given context.

◆ hash()

Definition at line 185 of file field.cc.

◆ hash_unique()

void blender::fn::FieldInput::hash_unique ( UniqueHashBytes & hash,
FieldHashDeep & deep_hash_cache ) const
virtual

Definition at line 197 of file field.cc.

◆ socket_inspection_name()

std::string blender::fn::FieldInput::socket_inspection_name ( ) const
inlinevirtual

Definition at line 574 of file FN_field.hh.

Member Data Documentation

◆ debug_name_

std::string blender::fn::FieldInput::debug_name_
protected

Definition at line 342 of file FN_field.hh.

◆ field_inputs_

Definition at line 349 of file FN_field.hh.

◆ field_inputs_mutex_

Field inputs are initialized lazily because it can't be done in the constructor because the derived class constructor has not run yet.

Definition at line 348 of file FN_field.hh.

◆ type_

Definition at line 341 of file FN_field.hh.


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