Blender
V3.3
|
#include <BKE_attribute.hh>
Public Attributes | |
CustomData | data |
A basic container around DNA CustomData so that its users don't have to implement special copy and move constructors.
Definition at line 696 of file BKE_attribute.hh.
blender::bke::CustomDataAttributes::CustomDataAttributes | ( | ) |
Definition at line 643 of file attribute_access.cc.
References CustomData_reset(), and data.
blender::bke::CustomDataAttributes::~CustomDataAttributes | ( | ) |
Definition at line 649 of file attribute_access.cc.
References CustomData_free(), and data.
blender::bke::CustomDataAttributes::CustomDataAttributes | ( | const CustomDataAttributes & | other | ) |
Definition at line 654 of file attribute_access.cc.
References CD_DUPLICATE, CD_MASK_ALL, CustomData_copy(), and data.
blender::bke::CustomDataAttributes::CustomDataAttributes | ( | CustomDataAttributes && | other | ) |
Definition at line 660 of file attribute_access.cc.
References CustomData_reset(), and data.
void blender::bke::CustomDataAttributes::clear | ( | ) |
Definition at line 757 of file attribute_access.cc.
References CustomData_free(), and data.
Referenced by InstancesComponent::clear().
bool blender::bke::CustomDataAttributes::create | ( | const AttributeIDRef & | attribute_id, |
eCustomDataType | data_type | ||
) |
Definition at line 722 of file attribute_access.cc.
References blender::bke::add_generic_custom_data_layer(), CD_DEFAULT, data, and result.
Referenced by InstancesComponent::remove_instances(), blender::nodes::node_geo_curve_trim_cc::to_single_point_nurbs(), and blender::nodes::node_geo_curve_trim_cc::trim_nurbs_spline().
bool blender::bke::CustomDataAttributes::create_by_move | ( | const AttributeIDRef & | attribute_id, |
eCustomDataType | data_type, | ||
void * | buffer | ||
) |
Definition at line 730 of file attribute_access.cc.
References blender::bke::add_generic_custom_data_layer(), buffer, CD_ASSIGN, data, and result.
bool blender::bke::CustomDataAttributes::foreach_attribute | ( | const AttributeForeachCallback | callback, |
eAttrDomain | domain | ||
) | const |
Definition at line 763 of file attribute_access.cc.
References blender::bke::attribute_id_from_custom_data_layer(), callback, data, CustomData::layers, and CustomData::totlayer.
Referenced by blender::geometry::prepare_attribute_fallbacks(), InstancesComponent::remove_instances(), Spline::reverse(), blender::nodes::node_geo_curve_trim_cc::to_single_point_bezier(), blender::nodes::node_geo_curve_trim_cc::to_single_point_nurbs(), blender::nodes::node_geo_curve_trim_cc::to_single_point_poly(), blender::nodes::node_geo_curve_trim_cc::trim_bezier_spline(), blender::nodes::node_geo_curve_trim_cc::trim_nurbs_spline(), and blender::nodes::node_geo_curve_trim_cc::trim_poly_spline().
std::optional< GSpan > blender::bke::CustomDataAttributes::get_for_read | ( | const AttributeIDRef & | attribute_id | ) | const |
Definition at line 677 of file attribute_access.cc.
References BLI_assert, blender::bke::custom_data_layer_matches_attribute_id(), blender::bke::custom_data_type_to_cpp_type(), data, CustomData::layers, and CustomData::totlayer.
Referenced by blender::bke::create_attribute_providers_for_curve(), blender::geometry::gather_realize_tasks_for_instances(), get_for_read(), blender::geometry::prepare_attribute_fallbacks(), InstancesComponent::remove_instances(), blender::nodes::node_geo_curve_trim_cc::to_single_point_nurbs(), and blender::nodes::node_geo_curve_trim_cc::trim_nurbs_spline().
|
inline |
Definition at line 729 of file BKE_attribute.hh.
References blender::bke::cpp_type_to_custom_data_type(), get_for_read(), T, type, and blender::GVArray::typed().
GVArray blender::bke::CustomDataAttributes::get_for_read | ( | const AttributeIDRef & | attribute_id, |
eCustomDataType | data_type, | ||
const void * | default_value | ||
) | const |
Return a virtual array for a stored attribute, or a single value virtual array with the default value if the attribute doesn't exist. If no default value is provided, the default value for the type will be used.
Definition at line 689 of file attribute_access.cc.
References attribute, blender::bke::custom_data_type_to_cpp_type(), blender::bke::domain_num(), blender::GVArray::ForSingle(), blender::GVArray::ForSpan(), get_for_read(), blender::bke::get_implicit_type_conversions(), blender::bke::DataTypeConversions::try_convert(), and type.
std::optional< GMutableSpan > blender::bke::CustomDataAttributes::get_for_write | ( | const AttributeIDRef & | attribute_id | ) |
Definition at line 710 of file attribute_access.cc.
References BLI_assert, blender::bke::custom_data_layer_matches_attribute_id(), blender::bke::custom_data_type_to_cpp_type(), data, CustomData::layers, and CustomData::totlayer.
Referenced by blender::bke::create_attribute_providers_for_curve(), InstancesComponent::remove_instances(), Spline::reverse(), blender::nodes::node_geo_curve_trim_cc::to_single_point_bezier(), blender::nodes::node_geo_curve_trim_cc::to_single_point_nurbs(), blender::nodes::node_geo_curve_trim_cc::to_single_point_poly(), blender::nodes::node_geo_curve_trim_cc::trim_bezier_spline(), blender::nodes::node_geo_curve_trim_cc::trim_nurbs_spline(), and blender::nodes::node_geo_curve_trim_cc::trim_poly_spline().
CustomDataAttributes & blender::bke::CustomDataAttributes::operator= | ( | const CustomDataAttributes & | other | ) |
Definition at line 667 of file attribute_access.cc.
References CD_DUPLICATE, CD_MASK_ALL, CustomData_copy(), and data.
void blender::bke::CustomDataAttributes::reallocate | ( | int | size | ) |
Definition at line 751 of file attribute_access.cc.
References CustomData_realloc(), data, and size().
Referenced by InstancesComponent::add_instance(), InstancesComponent::remove_instances(), InstancesComponent::reserve(), InstancesComponent::resize(), CurveEval::resize(), BezierSpline::resize(), NURBSpline::resize(), and PolySpline::resize().
bool blender::bke::CustomDataAttributes::remove | ( | const AttributeIDRef & | attribute_id | ) |
Definition at line 739 of file attribute_access.cc.
References blender::bke::custom_data_layer_matches_attribute_id(), CustomData_free_layer(), data, CustomData::layers, CustomData::totlayer, and CustomDataLayer::type.
void blender::bke::CustomDataAttributes::reorder | ( | Span< AttributeIDRef > | new_order | ) |
Change the order of the attributes to match the order of IDs in the argument.
Definition at line 776 of file attribute_access.cc.
References blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add_new(), blender::bke::attribute_id_from_custom_data_layer(), BLI_assert, CustomData_update_typemap(), data, blender::Array< T, InlineBufferCapacity, Allocator >::index_range(), blender::MutableSpan< T >::index_range(), CustomData::layers, blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::lookup(), blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::reserve(), blender::Span< T >::size(), and CustomData::totlayer.
CustomData blender::bke::CustomDataAttributes::data |
Definition at line 705 of file BKE_attribute.hh.
Referenced by clear(), create(), blender::bke::create_attribute_providers_for_instances(), create_by_move(), CustomDataAttributes(), foreach_attribute(), get_for_read(), get_for_write(), operator=(), reallocate(), remove(), reorder(), and ~CustomDataAttributes().