|
Blender V4.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 |
| AttrDomain | 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 253 of file BKE_attribute.hh.
|
default |
|
inline |
Definition at line 269 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 286 of file BKE_attribute.hh.
References blender::MutableVArraySpan< T >::save(), blender::bke::SpanAttributeWriter< T >::tag_modified_fn, and blender::MutableVArraySpan< T >::varray().
Referenced by blender::ed::greasepencil::bake_grease_pencil_animation_exec(), BKE_grease_pencil_material_index_remove(), BKE_grease_pencil_material_remap(), BKE_mesh_legacy_convert_flags_to_hide_layers(), BKE_mesh_legacy_convert_flags_to_selection_layers(), BKE_mesh_legacy_convert_mpoly_to_material_indices(), BKE_mesh_legacy_sharp_edges_from_flags(), BKE_mesh_legacy_sharp_faces_from_flags(), BKE_mesh_legacy_uv_seam_from_flags(), BKE_mesh_material_remap(), BKE_pbvh_sync_visibility_from_verts(), BM_mesh_bm_to_me_compact(), blender::ed::greasepencil::boundary_to_curves(), blender::build_concurrent(), blender::build_sequential(), blender::geometry::calc_radius_with_interpolation(), blender::geometry::calc_radius_without_interpolation(), blender::geometry::calculate_cone_uvs(), blender::geometry::calculate_sphere_uvs(), blender::geometry::calculate_uvs(), blender::ed::greasepencil::clipboard_paste_strokes(), blender::nodes::node_geo_instances_to_points_cc::convert_instances_to_points(), blender::io::ply::convert_ply_to_mesh(), blender::ed::object::convert_psys_to_mesh(), blender::create_array_copies(), blender::nodes::node_geo_string_to_curves_cc::create_attributes(), blender::create_dashes(), blender::ed::greasepencil::create_drawing_data(), blender::nodes::node_geo_duplicate_elements_cc::create_duplicate_index_attribute(), blender::create_envelope_strokes(), create_mesh(), blender::geometry::tests::create_test_curves(), blender::ed::transform::curves::createTransCurvesVerts(), blender::nodes::node_geo_curves_to_grease_pencil_cc::curve_instances_to_grease_pencil_layers(), blender::bke::curve_legacy_to_curves(), blender::bke::curve_to_mesh_sweep(), data_transfer_dtdata_type_postprocess(), blender::deform_drawing(), do_lasso_select_paintvert(), do_paintvert_box_select(), edbm_backbuf_check_and_select_faces_obmode(), edbm_backbuf_check_and_select_verts_obmode(), blender::ed::curves::cyclic_toggle::exec(), blender::ed::sculpt_paint::SelectionPaintOperationExecutor::execute(), blender::geometry::execute_realize_grease_pencil_task(), blender::ed::sculpt_paint::face_set::face_hide_update(), blender::ed::sculpt_paint::expand::face_sets_restore(), blender::ed::sculpt_paint::expand::face_sets_update(), blender::ed::sculpt_paint::face_set::face_sets_update(), blender::ed::sculpt_paint::hide::flush_edge_changes(), blender::ed::sculpt_paint::hide::flush_face_changes(), blender::ed::sculpt_paint::hide::flush_face_changes_node(), blender::ed::sculpt_paint::grease_pencil_apply_fill(), blender::ed::greasepencil::grease_pencil_caps_set_exec(), blender::ed::greasepencil::grease_pencil_primitive_init_curves(), blender::ed::greasepencil::grease_pencil_reset_uvs_exec(), blender::ed::sculpt_paint::hide::grow_shrink_visibility_mesh(), blender::ed::sculpt_paint::face_set::init_flood_fill(), blender::ed::sculpt_paint::face_set::init_op_exec(), blender::ed::sculpt_paint::face_set::initialize_none_to_id(), blender::ed::sculpt_paint::hide::invert_visibility_mesh(), blender::bke::greasepencil::convert::legacy_gpencil_to_grease_pencil(), mesh_add_edges(), mesh_add_faces(), mesh_add_verts(), blender::bke::mesh_calc_edges(), blender::bke::mesh_hide_vert_flush(), mesh_join_offset_face_sets_ID(), mesh_merge_transform(), mesh_nurbs_displist_to_mesh(), blender::bke::mesh_select_edge_flush(), blender::bke::mesh_select_face_flush(), blender::bke::mesh_select_vert_flush(), blender::bke::mesh::mesh_set_custom_normals(), blender::bke::mesh_sharp_edges_set_from_angle(), MOD_lineart_gpencil_generate_v3(), MOD_solidify_extrude_modifyMesh(), MOD_solidify_nonmanifold_modifyMesh(), blender::modify_fill_color(), modify_mesh(), modify_mesh(), blender::modify_opacity(), blender::modify_softness(), blender::modify_stroke_color(), blender::nodes::node_geo_distribute_points_in_volume_cc::node_geo_exec(), blender::nodes::node_geo_grease_pencil_to_curves_cc::node_geo_exec(), blender::nodes::node_geo_split_to_instances_cc::node_geo_exec(), normalEditModifier_do(), blender::ed::sculpt_paint::greasepencil::PaintOperation::on_stroke_done(), blender::ed::sculpt_paint::greasepencil::RandomizeOperation::on_stroke_extended(), blender::ed::sculpt_paint::greasepencil::SmoothOperation::on_stroke_extended(), paint_vertsel_circle_select(), paintface_hide(), paintface_select_linked(), paintface_select_loop(), paintvert_hide(), paintvert_select_less(), paintvert_select_linked(), paintvert_select_more(), blender::nodes::node_geo_distribute_points_on_faces_cc::point_distribution_calculate(), blender::ed::sculpt_paint::greasepencil::PaintOperationExecutor::process_extension_sample(), blender::ed::sculpt_paint::greasepencil::PaintOperationExecutor::process_start_sample(), blender::io::usd::read_face_display_color(), blender::io::alembic::AbcPointsReader::read_geometry(), blender::io::alembic::AbcMeshReader::read_mesh(), blender::io::usd::USDPointInstancerReader::read_object_data(), blender::io::usd::USDPointsReader::read_velocities(), blender::ed::sculpt_paint::expand::restore_face_set_data(), blender::ed::sculpt_paint::undo::restore_face_sets(), blender::ed::sculpt_paint::undo::restore_hidden_face(), blender::ed::sculpt_paint::undo::restore_vert_visibility_mesh(), blender::nodes::node_geo_extrude_mesh_cc::save_selection_as_attribute(), blender::ed::greasepencil::select_similar_by_value(), blender::bke::greasepencil::Drawing::set_texture_matrices(), blender::io::grease_pencil::shape_attributes_to_curves(), uvprojectModifier_do(), blender::ed::sculpt_paint::hide::vert_hide_update(), blender::write_stroke_transforms(), and blender::write_weights_for_drawing().
|
inline |
Definition at line 276 of file BKE_attribute.hh.
References blender::bke::SpanAttributeWriter< T >::span.
| AttrDomain blender::bke::SpanAttributeWriter< T >::domain |
Domain of the attribute. Also determines the size of the span.
Definition at line 261 of file BKE_attribute.hh.
Referenced by BKE_grease_pencil_material_index_remove(), BKE_grease_pencil_material_remap(), and blender::ed::sculpt_paint::SelectionPaintOperationExecutor::execute().
| 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 257 of file BKE_attribute.hh.
Referenced by blender::ed::greasepencil::bake_grease_pencil_animation_exec(), BKE_grease_pencil_material_index_remove(), BKE_grease_pencil_material_remap(), BKE_mesh_material_remap(), BKE_pbvh_sync_visibility_from_verts(), BM_mesh_bm_to_me_compact(), blender::ed::greasepencil::boundary_to_curves(), blender::build_concurrent(), blender::build_sequential(), blender::geometry::calc_radius_with_interpolation(), blender::geometry::calc_radius_without_interpolation(), blender::geometry::calculate_cone_uvs(), blender::geometry::calculate_selection_outputs(), blender::geometry::calculate_sphere_uvs(), blender::geometry::calculate_uvs(), blender::geometry::calculate_uvs(), blender::ed::greasepencil::clipboard_paste_strokes(), blender::nodes::node_geo_instances_to_points_cc::convert_instances_to_points(), blender::io::ply::convert_ply_to_mesh(), blender::ed::object::convert_psys_to_mesh(), blender::create_array_copies(), blender::nodes::node_geo_string_to_curves_cc::create_attributes(), blender::create_dashes(), blender::ed::greasepencil::create_drawing_data(), blender::nodes::node_geo_duplicate_elements_cc::create_duplicate_index_attribute(), blender::create_envelope_strokes(), create_mesh(), blender::geometry::tests::create_test_curves(), blender::ed::transform::curves::createTransCurvesVerts(), blender::nodes::node_geo_curves_to_grease_pencil_cc::curve_instances_to_grease_pencil_layers(), blender::bke::curve_legacy_to_curves(), blender::bke::curve_to_mesh_sweep(), data_transfer_dtdata_type_postprocess(), blender::deform_drawing(), do_lasso_select_paintvert(), do_paintvert_box_select(), blender::ed::curves::duplicate_curves(), blender::ed::curves::duplicate_points(), edbm_backbuf_check_and_select_faces_obmode(), edbm_backbuf_check_and_select_verts_obmode(), blender::ed::sculpt_paint::SelectionPaintOperationExecutor::execute(), blender::geometry::execute_realize_grease_pencil_task(), blender::ed::sculpt_paint::face_set::face_hide_update(), blender::ed::sculpt_paint::expand::face_sets_restore(), blender::ed::sculpt_paint::expand::face_sets_update(), blender::ed::sculpt_paint::face_set::face_sets_update(), blender::ed::sculpt_paint::hide::flush_edge_changes(), blender::ed::sculpt_paint::hide::flush_face_changes(), blender::ed::sculpt_paint::hide::flush_face_changes_node(), blender::ed::greasepencil::grease_pencil_caps_set_exec(), blender::ed::greasepencil::grease_pencil_primitive_init_curves(), blender::ed::greasepencil::grease_pencil_reset_uvs_exec(), blender::ed::sculpt_paint::hide::grow_shrink_visibility_mesh(), blender::ed::sculpt_paint::face_set::init_flood_fill(), blender::ed::sculpt_paint::face_set::init_op_exec(), blender::ed::sculpt_paint::face_set::initialize_none_to_id(), blender::ed::sculpt_paint::hide::invert_visibility_mesh(), blender::bke::greasepencil::convert::legacy_gpencil_frame_to_grease_pencil_drawing(), blender::bke::greasepencil::convert::legacy_gpencil_to_grease_pencil(), mesh_add_edges(), mesh_add_faces(), mesh_add_verts(), blender::bke::mesh_calc_edges(), blender::bke::mesh_hide_vert_flush(), mesh_join_offset_face_sets_ID(), mesh_merge_transform(), mesh_nurbs_displist_to_mesh(), blender::bke::mesh_select_edge_flush(), blender::bke::mesh_select_face_flush(), blender::bke::mesh_select_vert_flush(), blender::bke::mesh::mesh_set_custom_normals(), blender::bke::mesh_sharp_edges_set_from_angle(), MOD_lineart_gpencil_generate_v3(), MOD_solidify_extrude_modifyMesh(), MOD_solidify_nonmanifold_modifyMesh(), blender::modify_fill_color(), modify_mesh(), modify_mesh(), blender::modify_opacity(), blender::modify_softness(), blender::modify_stroke_color(), move_face_map_data_to_attributes(), blender::nodes::node_geo_boolean_cc::node_geo_exec(), blender::nodes::node_geo_distribute_points_in_volume_cc::node_geo_exec(), blender::nodes::node_geo_grease_pencil_to_curves_cc::node_geo_exec(), blender::nodes::node_geo_split_to_instances_cc::node_geo_exec(), normalEditModifier_do(), blender::ed::sculpt_paint::greasepencil::PaintOperation::on_stroke_done(), blender::ed::sculpt_paint::greasepencil::RandomizeOperation::on_stroke_extended(), blender::ed::sculpt_paint::greasepencil::SmoothOperation::on_stroke_extended(), blender::bke::SpanAttributeWriter< T >::operator bool(), paint_vertsel_circle_select(), paintface_deselect_all_visible(), paintface_hide(), paintface_reveal(), paintface_select_less(), paintface_select_linked(), paintface_select_loop(), paintface_select_more(), paintvert_deselect_all_visible(), paintvert_hide(), paintvert_reveal(), paintvert_select_less(), paintvert_select_linked(), paintvert_select_more(), paintvert_select_ungrouped(), blender::nodes::node_geo_distribute_points_on_faces_cc::point_distribution_calculate(), blender::ed::sculpt_paint::greasepencil::PaintOperationExecutor::process_extension_sample(), blender::ed::sculpt_paint::greasepencil::PaintOperationExecutor::process_start_sample(), blender::io::usd::USDCurvesReader::read_curve_sample(), blender::io::alembic::AbcCurveReader::read_curves_sample(), blender::io::usd::read_face_display_color(), blender::io::alembic::AbcPointsReader::read_geometry(), blender::io::alembic::AbcMeshReader::read_mesh(), blender::io::usd::USDPointInstancerReader::read_object_data(), blender::io::usd::USDPointsReader::read_velocities(), blender::ed::sculpt_paint::expand::restore_face_set_data(), blender::ed::sculpt_paint::undo::restore_face_sets(), blender::ed::sculpt_paint::undo::restore_hidden_face(), blender::ed::sculpt_paint::undo::restore_vert_visibility_mesh(), blender::ed::greasepencil::select_similar_by_value(), blender::bke::greasepencil::Drawing::set_texture_matrices(), blender::io::grease_pencil::shape_attributes_to_curves(), uvprojectModifier_do(), blender::ed::sculpt_paint::hide::vert_hide_update(), blender::ed::object::vgroup_select_verts(), blender::write_stroke_transforms(), and blender::write_weights_for_drawing().
| std::function<void()> blender::bke::SpanAttributeWriter< T >::tag_modified_fn |
Has to be called after writing to the span.
Definition at line 265 of file BKE_attribute.hh.
Referenced by blender::bke::SpanAttributeWriter< T >::finish().