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

#include <BKE_attribute.hh>

Public Member Functions

 AttributeIter (const StringRefNull name, const AttrDomain domain, const AttrType 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 AttrType data_type) const
template<typename T>
AttributeReader< T > get (const std::optional< AttrDomain > domain=std::nullopt) const
Attribute API
GAttributeReader get (std::optional< AttrDomain > domain, std::optional< AttrType > data_type) const

Public Attributes

StringRefNull name
AttrDomain domain
AttrType data_type
std::optional< AttrStorageType > storage_type
bool is_builtin = false
const AttributeAccessor * accessor = 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 387 of file BKE_attribute.hh.

Constructor & Destructor Documentation

◆ AttributeIter()

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

Definition at line 405 of file BKE_attribute.hh.

References data_type, domain, and name.

Member Function Documentation

◆ get() [1/5]

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

Get read-only access to the current attribute. This method always succeeds.

Definition at line 425 of file BKE_attribute.hh.

Referenced by blender::nodes::node_geo_instance_on_points_cc::add_instances_from_component(), blender::ed::greasepencil::apply_eval_grease_pencil_data(), attr_create_generic(), attr_create_generic(), blender::geometry::construct::build_output_mesh(), blender::nodes::node_geo_instances_to_points_cc::convert_instances_to_points(), blender::geometry::copy_and_mix_attributes(), copy_attributes(), blender::nodes::node_geo_duplicate_elements_cc::copy_attributes_from_other_domains(), blender::bke::copy_attributes_group_to_group(), blender::nodes::node_geo_curve_to_points_cc::copy_curve_domain_attributes(), blender::bke::subdiv::create_attrs_and_retrieve_interp_spans(), blender::geometry::create_curve_from_vert_indices(), blender::io::alembic::create_geom_param_for_attribute(), blender::nodes::node_geo_curves_to_grease_pencil_cc::curve_instances_to_grease_pencil_layers(), blender::bke::curve_to_mesh_sweep(), blender::ed::pointcloud::duplicate_points(), 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::nodes::node_geo_mesh_to_points_cc::geometry_set_mesh_to_points(), blender::nodes::node_geo_points_to_vertices_cc::geometry_set_points_to_vertices(), get(), get(), get(), get(), blender::geometry::uv::UVMapInfo::init(), blender::nodes::node_geo_interpolate_curves_cc::interpolate_curve_attributes(), blender::io::ply::load_custom_attributes(), blender::geometry::merge_layers(), blender::geometry::merge_points(), blender::geometry::mesh_faces_to_curves_convert(), blender::bke::mesh_remesh_reproject_attributes(), blender::ed::geometry::MeshState::MeshState(), blender::nodes::node_geo_grease_pencil_to_curves_cc::node_geo_exec(), blender::geometry::prepare_attribute_fallbacks(), blender::nodes::node_geo_distribute_points_on_faces_cc::propagate_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::bake::serialize_attributes(), blender::ed::sculpt_paint::store_mesh_from_eval(), blender::bke::validate_bool_attribute(), and blender::bke::validate_float_attribute().

◆ get() [2/5]

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

Definition at line 433 of file BKE_attribute.hh.

References domain, and get().

◆ get() [3/5]

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

Definition at line 438 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< AttrType > data_type ) const

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

Definition at line 408 of file attribute_access.cc.

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

◆ is_stopped()

◆ stop()

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

Member Data Documentation

◆ accessor

◆ data_type

AttrType blender::bke::AttributeIter::data_type

Definition at line 391 of file BKE_attribute.hh.

Referenced by blender::nodes::node_geo_instance_on_points_cc::add_instances_from_component(), blender::draw::all_uv_map_attributes(), blender::ed::greasepencil::apply_eval_grease_pencil_data(), attr_create_generic(), attr_create_generic(), AttributeIter(), blender::BKE_mesh_merge_customdata_for_apply_modifier(), blender::geometry::construct::build_output_mesh(), blender::nodes::node_geo_instances_to_points_cc::convert_instances_to_points(), blender::geometry::copy_and_mix_attributes(), blender::nodes::node_geo_duplicate_elements_cc::copy_attributes_from_other_domains(), blender::bke::copy_attributes_group_to_group(), blender::nodes::node_geo_curve_to_points_cc::copy_curve_domain_attributes(), blender::ed::greasepencil::copy_layer_and_frames_to_target_object(), blender::bke::subdiv::create_attrs_and_retrieve_interp_spans(), blender::geometry::create_curve_from_vert_indices(), blender::io::alembic::create_geom_param_for_attribute(), blender::nodes::node_geo_curves_to_grease_pencil_cc::curve_instances_to_grease_pencil_layers(), blender::bke::curve_to_mesh_sweep(), blender::data_transfer_layersmapping_cdlayers(), blender::ed::pointcloud::duplicate_points(), blender::ed::sculpt_paint::dyntopo::dyntopo_supports_layer(), 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(), blender::nodes::node_geo_mesh_to_points_cc::geometry_set_mesh_to_points(), blender::nodes::node_geo_points_to_vertices_cc::geometry_set_points_to_vertices(), get(), get(), get(), get_blender_uv_names(), blender::geometry::get_final_attribute_info(), blender::bke::get_first_uv_map_name(), blender::draw::get_first_uv_name(), blender::get_mloopcol_names(), blender::nodes::node_geo_extrude_mesh_cc::get_transfer_attribute_names(), blender::nodes::LazyFunctionForReduceForeachGeometryElement::handle_generation_items_group(), blender::geometry::uv::UVMapInfo::init(), 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::geometry::merge_points(), blender::geometry::mesh_faces_to_curves_convert(), blender::bke::mesh_flip_faces(), blender::bke::mesh_remesh_reproject_attributes(), blender::nodes::node_geo_get_attribute_names_cc::node_geo_exec(), blender::nodes::node_geo_grease_pencil_to_curves_cc::node_geo_exec(), blender::draw::particle_batch_cache_ensure_pos_and_seg(), blender::geometry::prepare_attribute_fallbacks(), blender::nodes::node_geo_distribute_points_on_faces_cc::propagate_attributes(), blender::geometry::propagate_edge_attributes(), blender::geometry::propagate_vert_attributes(), blender::io::alembic::read_active_and_default_color_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::BakeToRuntimeValue::scan(), blender::bke::bake::serialize_attributes(), blender::transfer_active_color_string(), blender::transfer_active_uv_map_string(), blender::nodes::node_geo_transfer_attributes_cc::transfer_attributes(), blender::transfer_default_color_string(), blender::transfer_default_uv_map_string(), blender::geometry::construct::try_propagate_single_value(), and blender::bke::validate_generic_attributes().

◆ domain

AttrDomain blender::bke::AttributeIter::domain

Definition at line 390 of file BKE_attribute.hh.

Referenced by blender::draw::all_uv_map_attributes(), blender::ed::greasepencil::apply_eval_grease_pencil_data(), attr_create_generic(), attr_create_generic(), AttributeIter(), blender::BKE_mesh_merge_customdata_for_apply_modifier(), blender::geometry::construct::build_output_mesh(), blender::geometry::copy_and_mix_attributes(), blender::nodes::node_geo_duplicate_elements_cc::copy_attributes_from_other_domains(), blender::bke::copy_attributes_group_to_group(), blender::nodes::node_geo_curve_to_points_cc::copy_curve_domain_attributes(), blender::ed::greasepencil::copy_layer_and_frames_to_target_object(), blender::bke::subdiv::create_attrs_and_retrieve_interp_spans(), blender::geometry::create_curve_from_vert_indices(), blender::io::alembic::create_geom_param_for_attribute(), blender::bke::curve_to_mesh_sweep(), blender::data_transfer_layersmapping_cdlayers(), blender::ed::curves::duplicate_curves(), blender::ed::curves::duplicate_points(), blender::ed::pointcloud::duplicate_points(), 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(), get(), get(), get_blender_uv_names(), blender::bke::get_first_uv_map_name(), blender::get_mloopcol_names(), blender::nodes::node_geo_extrude_mesh_cc::get_transfer_attribute_names(), blender::ed::greasepencil::grease_pencil_join_fills_exec(), blender::geometry::uv::UVMapInfo::init(), 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_apply_spatial_organization(), blender::geometry::mesh_faces_to_curves_convert(), blender::bke::mesh_flip_faces(), blender::bke::mesh_remesh_reproject_attributes(), blender::nodes::node_geo_get_attribute_names_cc::node_geo_exec(), blender::draw::particle_batch_cache_ensure_pos_and_seg(), blender::nodes::node_geo_distribute_points_on_faces_cc::propagate_attributes(), blender::geometry::propagate_edge_attributes(), blender::geometry::propagate_vert_attributes(), blender::io::alembic::read_active_and_default_color_attributes(), blender::geometry::reorder_and_flip_attributes_group_to_group(), blender::geometry::reorder_attributes_group_to_group(), blender::ed::curves::resize_curves(), blender::ed::greasepencil::resize_single_curve(), blender::bke::retrieve_attributes_for_transfer(), blender::bke::CurvesGeometry::reverse_curves(), blender::bke::bake::serialize_attributes(), blender::transfer_active_color_string(), blender::transfer_active_uv_map_string(), blender::nodes::node_geo_transfer_attributes_cc::transfer_attributes(), blender::transfer_default_color_string(), blender::transfer_default_uv_map_string(), blender::ed::sculpt_paint::greasepencil::trim_end_points(), and blender::geometry::construct::try_propagate_single_value().

◆ is_builtin

◆ name

StringRefNull blender::bke::AttributeIter::name

Definition at line 389 of file BKE_attribute.hh.

Referenced by blender::nodes::node_geo_instance_on_points_cc::add_instances_from_component(), blender::ed::greasepencil::add_single_curve(), blender::bke::AttributeAccessor::all_names(), blender::draw::all_uv_map_attributes(), blender::ed::greasepencil::apply_eval_grease_pencil_data(), attr_create_generic(), attr_create_generic(), blender::bke::GeometrySet::attribute_foreach(), AttributeIter(), blender::BKE_mesh_merge_customdata_for_apply_modifier(), blender::geometry::construct::build_output_mesh(), blender::nodes::node_geo_attribute_capture_cc::clean_unused_attributes(), blender::nodes::node_geo_instances_to_points_cc::convert_instances_to_points(), blender::geometry::copy_and_mix_attributes(), copy_attributes(), blender::nodes::node_geo_duplicate_elements_cc::copy_attributes_from_other_domains(), blender::bke::copy_attributes_group_to_group(), blender::nodes::node_geo_curve_to_points_cc::copy_curve_domain_attributes(), blender::ed::greasepencil::copy_layer_and_frames_to_target_object(), blender::bke::subdiv::create_attrs_and_retrieve_interp_spans(), blender::geometry::create_curve_from_vert_indices(), blender::io::alembic::create_geom_param_for_attribute(), blender::nodes::node_geo_curves_to_grease_pencil_cc::curve_instances_to_grease_pencil_layers(), blender::bke::curve_to_mesh_sweep(), blender::data_transfer_layersmapping_cdlayers(), blender::io::usd::USDPointInstancerWriter::do_write(), blender::ed::curves::duplicate_curves(), blender::ed::curves::duplicate_points(), blender::ed::pointcloud::duplicate_points(), blender::ed::sculpt_paint::dyntopo::dyntopo_supports_layer(), blender::geometry::extract_mesh_edges(), blender::geometry::extract_mesh_faces(), blender::geometry::extract_mesh_vertices(), 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(), blender::nodes::node_geo_mesh_to_points_cc::geometry_set_mesh_to_points(), blender::nodes::node_geo_points_to_vertices_cc::geometry_set_points_to_vertices(), get_blender_uv_names(), blender::geometry::get_final_attribute_info(), blender::bke::get_first_uv_map_name(), blender::draw::get_first_uv_name(), blender::get_mloopcol_names(), blender::nodes::node_geo_extrude_mesh_cc::get_transfer_attribute_names(), blender::ed::greasepencil::grease_pencil_join_fills_exec(), blender::nodes::LazyFunctionForReduceForeachGeometryElement::handle_generation_items_group(), blender::bke::AttributeAccessor::has_anonymous(), blender::geometry::uv::UVMapInfo::init(), blender::nodes::node_geo_interpolate_curves_cc::interpolate_curve_attributes(), blender::nodes::node_geo_extrude_mesh_cc::is_empty_domain(), blender::ed::mesh::join_generic_attributes(), blender::io::ply::load_custom_attributes(), blender::ed::greasepencil::merge_attributes(), blender::geometry::merge_layers(), blender::geometry::merge_points(), blender::bke::mesh_apply_spatial_organization(), blender::geometry::mesh_faces_to_curves_convert(), blender::bke::mesh_flip_faces(), blender::bke::mesh_remesh_reproject_attributes(), blender::nodes::node_geo_get_attribute_names_cc::node_geo_exec(), blender::nodes::node_geo_grease_pencil_to_curves_cc::node_geo_exec(), blender::nodes::node_geo_rename_attribute_cc::node_geo_exec(), blender::draw::particle_batch_cache_ensure_pos_and_seg(), blender::geometry::prepare_attribute_fallbacks(), blender::nodes::node_geo_distribute_points_on_faces_cc::propagate_attributes(), blender::geometry::propagate_edge_attributes(), blender::geometry::propagate_vert_attributes(), blender::io::alembic::read_active_and_default_color_attributes(), blender::nodes::node_geo_remove_attribute_cc::remove_attributes(), blender::geometry::reorder_and_flip_attributes_group_to_group(), blender::geometry::reorder_attributes_group_to_group(), blender::ed::curves::resize_curves(), blender::ed::greasepencil::resize_single_curve(), blender::bke::retrieve_attributes_for_transfer(), blender::bke::CurvesGeometry::reverse_curves(), blender::bke::bake::BakeToRuntimeValue::scan(), blender::bke::bake::serialize_attributes(), blender::ed::sculpt_paint::store_mesh_from_eval(), blender::bke::socket_value_visitor::tests::TEST_F(), blender::transfer_active_color_string(), blender::transfer_active_uv_map_string(), blender::nodes::node_geo_transfer_attributes_cc::transfer_attributes(), blender::transfer_default_color_string(), blender::transfer_default_uv_map_string(), blender::ed::sculpt_paint::greasepencil::trim_end_points(), blender::geometry::construct::try_propagate_single_value(), blender::bke::validate_bool_attribute(), and blender::bke::validate_float_attribute().

◆ storage_type


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