Blender V4.3
blender::bke::AttributeIter Class Reference

#include <BKE_attribute.hh>

Public Member Functions

 AttributeIter (const StringRefNull name, const AttrDomain domain, const eCustomDataType data_type, const FunctionRef< GAttributeReader()> get_fn)
 
void stop () const
 
bool is_stopped () const
 
GAttributeReader get () const
 
GAttributeReader get (const AttrDomain domain) const
 
GAttributeReader get (const eCustomDataType data_type) const
 
template<typename T >
AttributeReader< Tget (const std::optional< AttrDomain > domain=std::nullopt) const
 
Attribute API
GAttributeReader get (std::optional< AttrDomain > domain, std::optional< eCustomDataType > data_type) const
 

Public Attributes

StringRefNull name
 
AttrDomain domain
 
eCustomDataType data_type
 
bool is_builtin = false
 
const AttributeAccessoraccessor = nullptr
 

Detailed Description

This is used when iterating over attributes, e.g. with #foreach_attribute. It contains meta-data for the current attribute and provides easy access to the actual attribute data.

Definition at line 394 of file BKE_attribute.hh.

Constructor & Destructor Documentation

◆ AttributeIter()

blender::bke::AttributeIter::AttributeIter ( const StringRefNull name,
const AttrDomain domain,
const eCustomDataType data_type,
const FunctionRef< GAttributeReader()> get_fn )
inline

Definition at line 407 of file BKE_attribute.hh.

Member Function Documentation

◆ get() [1/5]

GAttributeReader blender::bke::AttributeIter::get ( ) const
inline

◆ get() [2/5]

GAttributeReader blender::bke::AttributeIter::get ( const AttrDomain domain) const
inline

Definition at line 436 of file BKE_attribute.hh.

References get().

◆ get() [3/5]

GAttributeReader blender::bke::AttributeIter::get ( const eCustomDataType data_type) const
inline

Definition at line 441 of file BKE_attribute.hh.

References data_type, and get().

◆ get() [4/5]

template<typename T >
AttributeReader< T > blender::bke::AttributeIter::get ( const std::optional< AttrDomain > domain = std::nullopt) const
inline

◆ get() [5/5]

GAttributeReader blender::bke::AttributeIter::get ( std::optional< AttrDomain > domain,
std::optional< eCustomDataType > data_type ) const

Same as above, but may perform type and domain interpolation. This may return none.

Definition at line 627 of file attribute_access.cc.

References accessor, blender::bke::adapt_domain_and_type_if_necessary(), data_type, and get().

◆ is_stopped()

bool blender::bke::AttributeIter::is_stopped ( ) const
inline

Definition at line 421 of file BKE_attribute.hh.

◆ stop()

void blender::bke::AttributeIter::stop ( ) const
inline

Stops the iteration. Remaining attributes will be skipped.

Definition at line 416 of file BKE_attribute.hh.

Referenced by blender::nodes::node_geo_extrude_mesh_cc::is_empty_domain(), and blender::bke::AttributeAccessor::lookup_meta_data().

Member Data Documentation

◆ accessor

const AttributeAccessor* blender::bke::AttributeIter::accessor = nullptr
mutable

◆ data_type

eCustomDataType blender::bke::AttributeIter::data_type

Definition at line 398 of file BKE_attribute.hh.

Referenced by blender::ed::object::apply_eval_grease_pencil_data(), attr_create_generic(), attr_create_generic(), blender::nodes::node_geo_extrude_mesh_cc::attribute_ids_by_domain(), blender::geometry::clean_unused_attributes(), blender::bke::copy_attributes_group_to_group(), blender::nodes::node_geo_curve_to_points_cc::copy_curve_domain_attributes(), blender::geometry::create_curve_from_vert_indices(), blender::nodes::node_geo_curves_to_grease_pencil_cc::curve_instances_to_grease_pencil_layers(), blender::bke::curve_to_mesh_sweep(), blender::geometry::extract_mesh_edges(), blender::geometry::extract_mesh_faces(), blender::geometry::extract_mesh_vertices(), blender::bke::fill_attribute_range_default(), blender::bke::gather_attributes(), blender::bke::gather_attributes(), blender::bke::gather_attributes_group_to_group(), blender::bke::gather_attributes_to_groups(), blender::geometry::gather_attributes_to_propagate(), blender::geometry::gather_point_attributes_to_interpolate(), get(), get(), get(), get_blender_uv_names(), blender::geometry::get_final_attribute_info(), blender::nodes::LazyFunctionForReduceForeachGeometryElement::handle_generation_items_group(), blender::nodes::node_geo_interpolate_curves_cc::interpolate_curve_attributes(), blender::nodes::node_geo_extrude_mesh_cc::is_empty_domain(), blender::io::ply::load_custom_attributes(), blender::geometry::merge_layers(), blender::bke::mesh_flip_faces(), blender::nodes::node_geo_grease_pencil_to_curves_cc::node_geo_exec(), blender::geometry::prepare_attribute_fallbacks(), blender::bke::GeometrySet::propagate_attributes_from_layer_to_instances(), blender::geometry::reorder_and_flip_attributes_group_to_group(), blender::geometry::reorder_attributes_group_to_group(), blender::ed::curves::resize_curves(), blender::bke::retrieve_attributes_for_transfer(), blender::bke::CurvesGeometry::reverse_curves(), and blender::bke::bake::serialize_attributes().

◆ domain

AttrDomain blender::bke::AttributeIter::domain

Definition at line 397 of file BKE_attribute.hh.

Referenced by attr_create_generic(), attr_create_generic(), blender::nodes::node_geo_extrude_mesh_cc::attribute_ids_by_domain(), blender::bke::copy_attributes_group_to_group(), blender::nodes::node_geo_curve_to_points_cc::copy_curve_domain_attributes(), blender::geometry::create_curve_from_vert_indices(), blender::bke::curve_to_mesh_sweep(), blender::ed::curves::duplicate_curves(), blender::ed::curves::duplicate_points(), blender::ed::sculpt_paint::greasepencil::extend_curve(), blender::bke::fill_attribute_range_default(), blender::ed::spreadsheet::GeometryDataSource::foreach_default_column_ids(), blender::bke::gather_attributes(), blender::bke::gather_attributes(), blender::bke::gather_attributes_group_to_group(), blender::bke::gather_attributes_to_groups(), blender::geometry::gather_attributes_to_propagate(), blender::geometry::gather_point_attributes_to_interpolate(), get_blender_uv_names(), blender::geometry::get_final_attribute_info(), blender::nodes::node_geo_interpolate_curves_cc::interpolate_curve_attributes(), blender::nodes::node_geo_extrude_mesh_cc::is_empty_domain(), blender::io::ply::load_custom_attributes(), blender::bke::mesh_flip_faces(), blender::bke::mesh_remesh_reproject_attributes(), blender::geometry::reorder_and_flip_attributes_group_to_group(), blender::geometry::reorder_attributes_group_to_group(), blender::ed::curves::resize_curves(), blender::bke::retrieve_attributes_for_transfer(), blender::bke::CurvesGeometry::reverse_curves(), blender::bke::bake::serialize_attributes(), and blender::ed::sculpt_paint::greasepencil::trim_end_points().

◆ is_builtin

◆ name

StringRefNull blender::bke::AttributeIter::name

Definition at line 396 of file BKE_attribute.hh.

Referenced by blender::bke::AttributeAccessor::all_ids(), blender::ed::object::apply_eval_grease_pencil_data(), attr_create_generic(), attr_create_generic(), blender::bke::GeometrySet::attribute_foreach(), blender::nodes::node_geo_extrude_mesh_cc::attribute_ids_by_domain(), blender::geometry::clean_unused_attributes(), blender::nodes::node_geo_attribute_capture_cc::clean_unused_attributes(), blender::bke::AttributeAccessor::contains(), copy_attributes(), blender::bke::copy_attributes_group_to_group(), blender::nodes::node_geo_curve_to_points_cc::copy_curve_domain_attributes(), blender::ed::sculpt_paint::greasepencil::create_blank_curve(), blender::geometry::create_curve_from_vert_indices(), blender::nodes::node_geo_curves_to_grease_pencil_cc::curve_instances_to_grease_pencil_layers(), blender::bke::curve_to_mesh_sweep(), blender::ed::curves::duplicate_curves(), blender::ed::curves::duplicate_points(), blender::ed::sculpt_paint::greasepencil::extend_curve(), blender::geometry::extract_mesh_edges(), blender::geometry::extract_mesh_faces(), blender::geometry::extract_mesh_vertices(), blender::bke::fill_attribute_range_default(), blender::bke::attribute_accessor_functions::foreach_attribute(), blender::bke::CurvesVertexGroupsAttributeProvider::foreach_attribute(), blender::bke::CustomDataAttributeProvider::foreach_attribute(), blender::bke::MeshVertexGroupsAttributeProvider::foreach_attribute(), blender::ed::spreadsheet::GeometryDataSource::foreach_default_column_ids(), blender::bke::gather_attributes(), blender::bke::gather_attributes(), blender::bke::gather_attributes_group_to_group(), blender::bke::gather_attributes_to_groups(), blender::geometry::gather_attributes_to_propagate(), blender::geometry::gather_point_attributes_to_interpolate(), blender::geometry::get_final_attribute_info(), blender::nodes::LazyFunctionForReduceForeachGeometryElement::handle_generation_items_group(), blender::nodes::node_geo_interpolate_curves_cc::interpolate_curve_attributes(), blender::nodes::node_geo_extrude_mesh_cc::is_empty_domain(), blender::io::ply::load_custom_attributes(), blender::bke::AttributeAccessor::lookup_meta_data(), blender::geometry::merge_layers(), blender::bke::mesh_flip_faces(), blender::bke::mesh_remesh_reproject_attributes(), blender::nodes::node_geo_grease_pencil_to_curves_cc::node_geo_exec(), blender::nodes::node_geo_remove_attribute_cc::node_geo_exec(), blender::geometry::prepare_attribute_fallbacks(), blender::bke::GeometrySet::propagate_attributes_from_layer_to_instances(), blender::geometry::reorder_and_flip_attributes_group_to_group(), blender::geometry::reorder_attributes_group_to_group(), blender::ed::curves::resize_curves(), blender::bke::retrieve_attributes_for_transfer(), blender::bke::CurvesGeometry::reverse_curves(), blender::bke::bake::serialize_attributes(), and blender::ed::sculpt_paint::greasepencil::trim_end_points().


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