Blender
V3.3
|
#include <BKE_attribute.hh>
Public Member Functions | |
SpanAttributeWriter ()=default | |
SpanAttributeWriter (AttributeWriter< T > &&other, const bool copy_values_to_span) | |
operator bool () const | |
void | finish () |
Public Attributes | |
MutableVArraySpan< T > | span |
eAttrDomain | domain |
std::function< void()> | tag_modified_fn |
A version of #AttributeWriter for the common case when the user of the attribute wants to write to a span instead of a virtual array. Since most attributes are spans internally, this can result in better performance and also simplifies code.
Definition at line 194 of file BKE_attribute.hh.
|
default |
|
inline |
Definition at line 210 of file BKE_attribute.hh.
|
inline |
Has to be called when done writing to the attribute. This makes sure that the data is copied to the underlying attribute if it was not stored as an array. Furthermore, this may invalidate other data depending on the modified attribute.
Definition at line 227 of file BKE_attribute.hh.
References blender::MutableVArraySpan< T >::save(), and blender::bke::SpanAttributeWriter< T >::tag_modified_fn.
Referenced by blender::nodes::calculate_cone_uvs(), blender::nodes::calculate_selection_outputs(), blender::nodes::node_geo_mesh_primitive_uv_sphere_cc::calculate_sphere_uvs(), blender::geometry::calculate_uvs(), blender::nodes::node_geo_distribute_points_on_faces_cc::compute_attribute_outputs(), blender::nodes::node_geo_instances_to_points_cc::convert_instances_to_points(), blender::nodes::node_geo_string_to_curves_cc::create_attributes(), blender::nodes::node_geo_duplicate_elements_cc::create_duplicate_index_attribute(), blender::nodes::node_geo_curve_primitive_star_cc::create_selection_output(), curve_eval_to_curves(), mesh_calc_modifiers(), blender::nodes::node_geo_boolean_cc::node_geo_exec(), blender::nodes::node_geo_distribute_points_on_faces_cc::point_distribution_calculate(), blender::nodes::transform_pointcloud(), and blender::nodes::translate_pointcloud().
|
inline |
Definition at line 217 of file BKE_attribute.hh.
References blender::bke::SpanAttributeWriter< T >::span.
eAttrDomain blender::bke::SpanAttributeWriter< T >::domain |
Domain of the attribute. Also determines the size of the span.
Definition at line 202 of file BKE_attribute.hh.
MutableVArraySpan<T> blender::bke::SpanAttributeWriter< T >::span |
A span based on the virtual array that contains the attribute data. This may be empty.
Definition at line 198 of file BKE_attribute.hh.
Referenced by blender::nodes::calculate_cone_uvs(), blender::nodes::calculate_selection_outputs(), blender::nodes::node_geo_mesh_primitive_uv_sphere_cc::calculate_sphere_uvs(), blender::geometry::calculate_uvs(), blender::nodes::node_geo_distribute_points_on_faces_cc::compute_attribute_outputs(), blender::nodes::node_geo_instances_to_points_cc::convert_instances_to_points(), blender::nodes::node_geo_string_to_curves_cc::create_attributes(), blender::nodes::node_geo_duplicate_elements_cc::create_duplicate_index_attribute(), blender::nodes::node_geo_curve_primitive_star_cc::create_selection_output(), curve_eval_to_curves(), blender::bke::curve_legacy_to_curves(), mesh_calc_modifiers(), blender::nodes::node_geo_boolean_cc::node_geo_exec(), blender::bke::SpanAttributeWriter< T >::operator bool(), blender::nodes::node_geo_distribute_points_on_faces_cc::point_distribution_calculate(), blender::nodes::transform_pointcloud(), and blender::nodes::translate_pointcloud().
std::function<void()> blender::bke::SpanAttributeWriter< T >::tag_modified_fn |
Has to be called after writing to the span.
Definition at line 206 of file BKE_attribute.hh.
Referenced by blender::bke::SpanAttributeWriter< T >::finish().