|
Blender V5.3
|
#include <BKE_attribute.hh>
Inherits blender::bke::AttributeAccessor.
Additional Inherited Members | |
| static std::optional< AttributeAccessor > | from_id (const ID &id) |
| Protected Attributes inherited from blender::bke::AttributeAccessor | |
| void * | owner_ |
| const AttributeAccessorFunctions * | fn_ |
Extends AttributeAccessor with methods that allow modifying individual attributes as well as the set of attributes.
Definition at line 707 of file BKE_attribute.hh.
|
inline |
Definition at line 709 of file BKE_attribute.hh.
References blender::bke::AttributeAccessor::AttributeAccessor().
Referenced by blender::bke::CurveComponent::attributes_for_write(), blender::bke::CurvesGeometry::attributes_for_write(), blender::bke::GreasePencilComponent::attributes_for_write(), blender::bke::Instances::attributes_for_write(), blender::bke::InstancesComponent::attributes_for_write(), blender::bke::MeshComponent::attributes_for_write(), and blender::bke::PointCloudComponent::attributes_for_write().
|
inline |
Definition at line 786 of file BKE_attribute.hh.
References add(), blender::bke::cpp_type_to_attribute_type(), and blender::CPPType::get().
|
inline |
Create a new attribute.
Definition at line 769 of file BKE_attribute.hh.
References blender::bke::AttributeAccessorFunctions::add, blender::bke::AttributeAccessor::contains(), blender::bke::AttributeAccessor::domain_supported(), blender::bke::AttributeAccessor::fn_, blender::blender::StringRefBase::is_empty(), and blender::bke::AttributeAccessor::owner_.
Referenced by add(), blender::nodes::node_geo_transfer_attributes_cc::add_attribute_with_array(), blender::add_bm_cd_to_mesh(), blender::geometry::add_instance_attributes_to_single_geometry(), blender::nodes::node_geo_instance_on_points_cc::add_instances_from_component(), add_override(), blender::ed::geometry::add_shape_keys_as_attributes(), blender::nodes::node_geo_set_material_cc::assign_material_to_id_geometry(), blender::BKE_mesh_ensure_skin_customdata(), blender::BKE_mesh_new_nomain_from_template_ex(), blender::BKE_mesh_to_pointcloud(), blender::BKE_pointcloud_to_mesh(), blender::BKE_sculpt_mask_layers_ensure(), blender::ed::geometry::convert_attribute(), blender::ed::object::convert_curves_legacy_to_grease_pencil(), blender::ed::object::convert_curves_to_grease_pencil(), blender::ed::object::convert_font_to_grease_pencil(), blender::io::ply::convert_gsplat_ply_to_point_cloud(), blender::nodes::node_geo_instances_to_points_cc::convert_instances_to_points(), convert_or_add_for_write(), convert_or_add_for_write_only(), blender::io::ply::convert_ply_to_mesh(), blender::geometry::copy_and_mix_attributes(), blender::geometry::copy_and_reorder_mesh_edges(), blender::geometry::copy_and_reorder_mesh_verts(), blender::nodes::node_geo_duplicate_elements_cc::copy_attributes_from_other_domains(), 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::geometry::create_curves_for_faces(), blender::ed::sculpt_paint::face_set::create_face_sets_mesh(), blender::ed::object::create_grease_pencil_fills(), blender::nodes::node_geo_distribute_points_on_faces_cc::create_points_poisson_disk(), blender::nodes::node_geo_distribute_points_on_faces_cc::create_points_random(), 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(), blender::ed::curves::set_selection_domain::curves_set_selection_domain_exec(), blender::bke::CurvesGeometry::CurvesGeometry(), blender::data_transfer_layersmapping_cdlayers(), blender::data_transfer_layersmapping_cdlayers_multisrc_to_dst(), blender::ed::pointcloud::duplicate_points(), blender::ED_mesh_color_add(), blender::ED_mesh_uv_add(), blender::ed::sculpt_paint::face_set::ensure_face_sets_mesh(), blender::ed::curves::ensure_selection_attribute(), blender::ed::pointcloud::ensure_selection_attribute(), blender::ed::greasepencil::ensure_selection_domain(), blender::ensure_weight_attribute_meta_data(), blender::ed::sculpt_paint::float_selection_ensure(), blender::bke::gather_attributes(), blender::ed::geometry::geometry_color_attribute_add_exec(), blender::ed::geometry::geometry_color_attribute_duplicate_exec(), 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(), blender::ed::sculpt_paint::grease_pencil_apply_fill(), blender::ed::greasepencil::grease_pencil_set_stroke_type_exec(), blender::nodes::node_geo_interpolate_curves_cc::interpolate_curve_attributes(), blender::geometry::join_mesh_material_indices(), blender::bke::bake::load_attributes(), lookup_or_add_for_write(), blender::geometry::merge_points(), blender::mesh_add_edges(), blender::mesh_add_loops(), blender::mesh_add_verts(), blender::mesh_bm_to_me_compact(), blender::bke::mesh_calc_edges(), blender::geometry::mesh_copy_selection(), blender::geometry::mesh_copy_selection_keep_edges(), blender::geometry::mesh_copy_selection_keep_verts(), blender::mesh_customdata_custom_splitnormals_add_exec(), blender::ed::object::mesh_data_to_grease_pencil(), blender::bke::mesh_ensure_required_data_layers(), blender::bke::mesh_remesh_reproject_attributes(), blender::bke::mesh_smooth_set(), blender::geometry::mesh_triangulate(), 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_grid_to_points_cc::node_geo_exec(), blender::nodes::node_geo_points_cc::node_geo_exec(), blender::nodes::node_geo_set_mesh_normal_cc::node_geo_exec(), blender::pointcloud_resize(), blender::proj_paint_color_attribute_create(), blender::nodes::node_geo_distribute_points_on_faces_cc::propagate_attributes(), blender::io::alembic::AbcCurveReader::read_curves_sample(), blender::io::alembic::AbcPointsReader::read_geometry(), blender::geometry::reorder_and_flip_attributes_group_to_group(), blender::geometry::reorder_attributes_group_to_group(), blender::ed::sculpt_paint::replace_attribute(), blender::ed::curves::resize_curves(), blender::geometry::retrieve_attribute_spans(), blender::bke::retrieve_attributes_for_transfer(), blender::bke::sample_corner_attributes(), blender::ed::sculpt_paint::select_grow::select_grow_modal(), blender::ed::sculpt_paint::set_fill_attributes(), blender::nodes::node_geo_set_grease_pencil_color_cc::set_grease_pencil_color(), blender::ed::sculpt_paint::set_persistent_base_exec(), blender::bke::set_rest_position(), blender::io::usd::set_single_value(), blender::io::grease_pencil::shape_attributes_to_curves(), blender::nodes::store_computed_output_attributes(), blender::nodes::node_geo_dual_mesh_cc::transfer_attributes(), blender::bke::transform_custom_normal_attribute(), blender::bke::try_add_single_value_attribute(), blender::bke::try_capture_fields_on_geometry(), blender::geometry::try_join_single_value_attribute(), blender::geometry::construct::try_propagate_single_value(), blender::bke::try_sharing_point_data(), and blender::ed::sculpt_paint::expand::write_mask_data().
|
inline |
Definition at line 793 of file BKE_attribute.hh.
References add(), assign_data(), blender::bke::AttributeAccessor::domain_supported(), blender::blender::StringRefBase::is_empty(), blender::bke::AttributeAccessor::lookup_meta_data(), and remove().
Referenced by blender::nodes::node_geo_transfer_attributes_cc::add_attribute_with_array(), convert_or_add_for_write(), convert_or_add_for_write_only(), blender::nodes::node_geo_transfer_attributes_cc::transfer_attributes(), and blender::bke::try_add_shared_field_attribute().
|
inline |
Definition at line 816 of file BKE_attribute.hh.
References blender::bke::AttributeAccessorFunctions::assign_data, blender::BLI_assert(), blender::bke::AttributeAccessor::contains(), blender::bke::AttributeAccessor::fn_, and blender::bke::AttributeAccessor::owner_.
Referenced by add_override(), blender::bke::bake::load_attributes(), blender::ed::curves::set_attribute_exec(), blender::ed::pointcloud::set_attribute_exec(), blender::io::usd::set_single_value(), and blender::bke::try_assign_single_value().
|
inline |
Same as above, but should be used when the type is known at compile time. Also see the note on built-in attributes above.
Definition at line 945 of file BKE_attribute.hh.
References convert_or_add_for_write(), blender::bke::cpp_type_to_attribute_type(), blender::CPPType::get(), T, and blender::bke::GAttributeWriter::typed().
| GAttributeWriter blender::bke::MutableAttributeAccessor::convert_or_add_for_write | ( | StringRef | name, |
| AttrDomain | domain, | ||
| AttrType | data_type, | ||
| const AttributeInit & | initializer = AttributeInitDefaultValue() ) |
Find an attribute with the given id->name, domain and data type. If it does not exist, create a new attribute. If the attribute with the same name but a different type or domain already exists the attribute will be converted to match the type and domain and then returned. This can only fail for certain built-in attributes, so when you are sure you are not handling one of those you don't need to check if the accessor is valid.
Definition at line 557 of file attribute_access.cc.
References add(), add_override(), blender::bke::AttributeInitShared::AttributeInitShared(), BLI_assert_unreachable, blender::bke::AttributeAccessor::lookup(), lookup_for_write(), blender::bke::AttributeAccessor::lookup_meta_data(), blender::GVArrayCommon::materialize_to_uninitialized(), blender::GVArrayCommon::size(), and blender::GVArrayCommon::type().
Referenced by convert_or_add_for_write(), convert_or_add_for_write_only_span(), convert_or_add_for_write_span(), and convert_or_add_for_write_span().
| GAttributeWriter blender::bke::MutableAttributeAccessor::convert_or_add_for_write_only | ( | StringRef | name, |
| AttrDomain | domain, | ||
| AttrType | data_type ) |
Find an attribute with the given id, domain and data type. If it does not exist, create a new attribute. If the attribute with the same name but a different type or domain already exists the attribute will be converted to match the type and domain and then returned. The existing data will not be converted, as the write_only indicates the attribute will be rewritten. Also see the note on built-in attributes above.
Definition at line 592 of file attribute_access.cc.
References add(), add_override(), blender::bke::AttributeInitConstruct::AttributeInitConstruct(), lookup_for_write(), and blender::bke::AttributeAccessor::lookup_meta_data().
Referenced by convert_or_add_for_write_only_span().
|
inline |
Same as above, but should be used when the type is known at compile time.
Definition at line 990 of file BKE_attribute.hh.
References attribute, blender::bke::AttributeInitConstruct::AttributeInitConstruct(), and convert_or_add_for_write().
| GSpanAttributeWriter blender::bke::MutableAttributeAccessor::convert_or_add_for_write_only_span | ( | StringRef | name, |
| AttrDomain | domain, | ||
| AttrType | data_type ) |
Find an attribute with the given id, domain and data type. If it does not exist, create a new attribute. If an attribute with the same name but a differing domain/type already exists the attribute will be converted to the new domain/type.
The "only" in the name indicates that the caller should not read existing values from the span. If the attribute is not stored as span internally, the existing values won't be copied over to the span.
For trivial types, the values in a newly created attribute will not be initialized. Also see the note on built-in attributes above.
Definition at line 624 of file attribute_access.cc.
References attribute, blender::BLI_assert(), and convert_or_add_for_write_only().
Referenced by blender::bke::mesh_hide_face_flush(), blender::bke::mesh_hide_vert_flush(), blender::bke::mesh_select_edge_flush(), blender::bke::mesh_select_face_flush(), blender::bke::mesh_select_vert_flush(), and blender::ed::sculpt_paint::greasepencil::PaintOperation::on_stroke_done().
|
inline |
Same as above, but should be used when the type is known at compile time. Also see the note on built-in attributes above.
Definition at line 960 of file BKE_attribute.hh.
References attribute, blender::BLI_assert(), and convert_or_add_for_write().
| GSpanAttributeWriter blender::bke::MutableAttributeAccessor::convert_or_add_for_write_span | ( | StringRef | name, |
| AttrDomain | domain, | ||
| AttrType | data_type, | ||
| const AttributeInit & | initializer = AttributeInitDefaultValue() ) |
Same as above, but returns a type that makes it easier to work with the attribute as a span. If the caller newly initializes the attribute, it's better to use convert_or_add_for_write_only_span. Also see the note on built-in attributes above.
Definition at line 612 of file attribute_access.cc.
References attribute, blender::BLI_assert(), and convert_or_add_for_write().
Referenced by blender::modify_fill_color(), blender::modify_softness(), blender::ed::sculpt_paint::greasepencil::PaintOperationExecutor::process_extension_sample(), blender::ed::sculpt_paint::greasepencil::PaintOperationExecutor::process_start_sample(), and blender::subdivide_base().
|
inline |
Get a writable attribute or non if it does not exist. Make sure to call #finish after changes are done.
Definition at line 729 of file BKE_attribute.hh.
References attribute, lookup_for_write(), and T.
| GAttributeWriter blender::bke::MutableAttributeAccessor::lookup_for_write | ( | StringRef | name | ) |
Get a writable attribute or none if it does not exist. Make sure to call #finish after changes are done.
Definition at line 485 of file attribute_access.cc.
References attribute, blender::bke::AttributeAccessor::fn_, blender::bke::AttributeAccessorFunctions::lookup_for_write, and blender::bke::AttributeAccessor::owner_.
Referenced by blender::BKE_mesh_ensure_skin_customdata(), blender::BKE_mesh_material_index_remove(), blender::BKE_mesh_mirror_apply_mirror_on_axis_for_modifier(), convert_or_add_for_write(), convert_or_add_for_write_only(), lookup_for_write(), lookup_for_write_span(), lookup_for_write_span(), lookup_or_add_for_write(), blender::transform_active_color_data(), and blender::vertex_paint_from_weight().
|
inline |
Same as above, but returns a type that makes it easier to work with the attribute as a span.
Definition at line 744 of file BKE_attribute.hh.
References attribute, and lookup_for_write().
| GSpanAttributeWriter blender::bke::MutableAttributeAccessor::lookup_for_write_span | ( | StringRef | name | ) |
Same as above, but returns a type that makes it easier to work with the attribute as a span.
Definition at line 505 of file attribute_access.cc.
References attribute, and lookup_for_write().
Referenced by blender::ed::sculpt_paint::color::active_color_attribute_for_write(), blender::geometry::add_curves_on_mesh(), blender::ed::greasepencil::add_single_curve(), blender::arrayModifier_doArray(), blender::ed::object::bake_targets_output_vertex_colors(), blender::BKE_grease_pencil_material_index_remove(), blender::BKE_grease_pencil_material_remap(), blender::BKE_material_attr_indices_remap(), blender::BKE_mesh_merge_customdata_for_apply_modifier(), blender::BKE_mesh_mirror_apply_mirror_on_axis_for_modifier(), blender::build_concurrent(), blender::geometry::construct::build_output_mesh(), blender::build_sequential(), blender::geometry::calc_radius_with_interpolation(), blender::nodes::node_geo_curves_to_grease_pencil_cc::curve_instances_to_grease_pencil_layers(), blender::data_transfer_layersmapping_add_item_attr(), blender::data_transfer_layersmapping_cdlayers(), blender::data_transfer_layersmapping_cdlayers_multisrc_to_dst(), blender::ed::curves::duplicate_curves(), blender::ed::curves::duplicate_points(), blender::dynamicPaint_Modifier_apply(), blender::ED_mesh_color_add(), blender::ed::curves::ensure_selection_attribute(), blender::ed::pointcloud::ensure_selection_attribute(), blender::ed::sculpt_paint::AddOperationExecutor::execute(), blender::nodes::node_geo_extrude_mesh_cc::extrude_individual_mesh_faces(), blender::nodes::node_geo_extrude_mesh_cc::extrude_mesh_edges(), blender::nodes::node_geo_extrude_mesh_cc::extrude_mesh_face_regions(), blender::nodes::node_geo_extrude_mesh_cc::extrude_mesh_vertices(), blender::face_corner_color_equalize_verts(), blender::bke::fill_attribute_range_default(), blender::nodes::node_geo_extrude_mesh_cc::gather_attributes(), blender::nodes::node_geo_extrude_mesh_cc::gather_attributes(), blender::nodes::node_geo_extrude_mesh_cc::gather_vert_attributes(), blender::nodes::node_geo_extrude_mesh_cc::gather_vert_attributes(), blender::ed::greasepencil::grease_pencil_join_fills_exec(), blender::geometry::grease_pencil_remove_points_and_split(), blender::ed::greasepencil::grease_pencil_reset_uvs_exec(), blender::ed::greasepencil::grease_pencil_separate_fills_exec(), blender::ed::greasepencil::grease_pencil_stroke_smooth_exec(), blender::ed::sculpt_paint::face_set::initialize_none_to_id(), blender::bke::mesh_apply_spatial_organization(), blender::bke::mesh_flip_faces(), blender::modify_mesh(), blender::nodes::node_geo_grease_pencil_to_curves_cc::node_geo_exec(), blender::ed::sculpt_paint::greasepencil::PaintOperation::on_stroke_done(), blender::geometry::propagate_edge_attributes(), blender::geometry::propagate_vert_attributes(), blender::ed::greasepencil::remove_stroke_or_fill_based_on_mode(), blender::reset_uv_map(), blender::ed::greasepencil::resize_single_curve(), blender::bke::CurvesGeometry::reverse_curves(), blender::ed::sculpt_paint::mask::sculpt_mask_filter_exec(), blender::bke::greasepencil::separate_fill_ids(), blender::ed::greasepencil::boolean::separate_fill_islands(), blender::ed::curves::set_attribute_exec(), blender::ed::pointcloud::set_attribute_exec(), blender::io::grease_pencil::shape_attributes_to_curves(), blender::ed::greasepencil::GreasePencilPenToolOperation::single_point_attributes(), blender::geometry::smooth_curve_positions(), blender::ed::sculpt_paint::smooth_fill_strokes(), blender::ed::sculpt_paint::greasepencil::smooth_stroke(), blender::bke::subdiv::subdiv_to_mesh(), blender::nodes::node_geo_transfer_attributes_cc::transfer_attributes(), blender::bke::transform_custom_normal_attribute(), blender::geometry::trim_curves(), blender::ed::sculpt_paint::greasepencil::trim_end_points(), blender::bke::try_capture_fields_on_geometry(), blender::bke::validate_bool_attribute(), blender::bke::validate_float_attribute(), blender::bke::validate_material_indices(), and blender::write_weights_for_drawing().
|
inline |
Same as above, but should be used when the type is known at compile time.
Definition at line 848 of file BKE_attribute.hh.
References blender::bke::cpp_type_to_attribute_type(), blender::CPPType::get(), lookup_or_add_for_write(), T, and blender::bke::GAttributeWriter::typed().
| GAttributeWriter blender::bke::MutableAttributeAccessor::lookup_or_add_for_write | ( | StringRef | name, |
| AttrDomain | domain, | ||
| AttrType | data_type, | ||
| const AttributeInit & | initializer = AttributeInitDefaultValue() ) |
Find an attribute with the given id, domain and data type. If it does not exist, create a new attribute. If the attribute does not exist and can't be created (e.g. because it already exists on a different domain or with a different type), none is returned.
Definition at line 514 of file attribute_access.cc.
References add(), lookup_for_write(), and blender::bke::AttributeAccessor::lookup_meta_data().
Referenced by blender::ed::greasepencil::copy_layer_and_frames_to_target_object(), blender::ed::curves::curves_draw_exec(), blender::ed_wpaint_vertex_select_pick(), blender::ensure_corner_boolean_attribute(), lookup_or_add_for_write(), lookup_or_add_for_write_only_span(), lookup_or_add_for_write_only_span(), lookup_or_add_for_write_span(), lookup_or_add_for_write_span(), blender::nodes::node_geo_points_cc::node_geo_exec(), blender::paintface_mouse_select(), and blender::nodes::store_computed_output_attributes().
|
inline |
Same as above, but should be used when the type is known at compile time.
Definition at line 892 of file BKE_attribute.hh.
References attribute, blender::bke::AttributeInitConstruct::AttributeInitConstruct(), and lookup_or_add_for_write().
| GSpanAttributeWriter blender::bke::MutableAttributeAccessor::lookup_or_add_for_write_only_span | ( | StringRef | name, |
| AttrDomain | domain, | ||
| AttrType | data_type ) |
Find an attribute with the given id, domain and data type. If it does not exist, create a new attribute. If the attribute does not exist and can't be created, none is returned.
The "only" in the name indicates that the caller should not read existing values from the span. If the attribute is not stored as span internally, the existing values won't be copied over to the span.
For trivial types, the values in a newly created attribute will not be initialized.
Definition at line 546 of file attribute_access.cc.
References attribute, blender::bke::AttributeInitConstruct::AttributeInitConstruct(), and lookup_or_add_for_write().
Referenced by blender::nodes::node_geo_instance_on_points_cc::add_instances_from_component(), blender::BKE_mesh_legacy_convert_flags_to_hide_layers(), blender::BKE_mesh_legacy_convert_flags_to_selection_layers(), blender::BKE_mesh_legacy_convert_mpoly_to_material_indices(), blender::BKE_mesh_legacy_sharp_edges_from_flags(), blender::BKE_mesh_legacy_sharp_faces_from_flags(), blender::BKE_mesh_legacy_uv_seam_from_flags(), blender::geometry::construct::build_output_mesh(), blender::geometry::calculate_cone_uvs(), blender::geometry::calculate_sphere_uvs(), blender::geometry::calculate_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::io::ply::convert_ply_to_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::bke::copy_main_point_domain_attribute_to_mesh(), blender::nodes::node_geo_duplicate_elements_cc::copy_stable_id_curves(), blender::nodes::node_geo_duplicate_elements_cc::copy_stable_id_edges(), blender::nodes::node_geo_duplicate_elements_cc::copy_stable_id_faces(), blender::nodes::node_geo_duplicate_elements_cc::copy_stable_id_point(), blender::nodes::node_geo_string_to_curves_cc::create_attributes(), blender::bke::subdiv::create_attrs_and_retrieve_interp_spans(), blender::ed::curves::create_Bezier(), blender::geometry::create_curve_from_vert_indices(), blender::ed::greasepencil::create_drawing_data(), blender::nodes::node_geo_duplicate_elements_cc::create_duplicate_index_attribute(), blender::ed::object::create_grease_pencil_fills(), blender::nodes::node_geo_mesh_primitive_ico_sphere_cc::create_ico_sphere_mesh(), blender::ed::curves::create_NURBS(), blender::bke::curve_legacy_to_curves(), blender::bke::curve_to_mesh_sweep(), blender::ed::curves::curves_draw_exec(), blender::nodes::node_geo_curve_to_points_cc::curves_to_points(), blender::ed::pointcloud::duplicate_points(), blender::geometry::execute_instances_tasks(), blender::geometry::execute_realize_curve_tasks(), blender::geometry::execute_realize_grease_pencil_tasks(), blender::geometry::execute_realize_mesh_tasks(), blender::geometry::execute_realize_pointcloud_tasks(), blender::geometry::extract_mesh_edges(), blender::geometry::extract_mesh_faces(), blender::geometry::extract_mesh_vertices(), blender::ed::sculpt_paint::hide::flush_edge_changes(), blender::bke::gather_attributes(), blender::bke::gather_attributes(), blender::bke::gather_attributes(), blender::bke::gather_attributes_group_to_group(), blender::bke::gather_attributes_to_groups(), 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(), blender::nodes::LazyFunctionForReduceForeachGeometryElement::handle_generation_items_group(), blender::nodes::LazyFunctionForReduceForeachGeometryElement::handle_main_items_and_geometry(), blender::io::fbx::import_colors(), blender::io::fbx::import_edges(), blender::io::fbx::import_face_material_indices(), blender::io::fbx::import_face_smoothing(), blender::io::fbx::import_normals_into_temp_attribute(), blender::io::fbx::import_uvs(), blender::nodes::node_geo_interpolate_curves_cc::interpolate_curve_attributes(), blender::geometry::join_attributes(), blender::ed::mesh::join_materials(), blender::geometry::join_mesh_material_indices(), blender::ed::mesh::join_normals(), blender::bke::bake::load_attributes(), blender::geometry::merge_layers(), blender::geometry::merge_points(), blender::mesh_bm_to_me_compact(), blender::ed::object::mesh_data_to_grease_pencil(), blender::geometry::mesh_faces_to_curves_convert(), blender::mesh_nurbs_displist_to_mesh(), blender::MOD_lineart_gpencil_generate_v3(), blender::multires_unsubdivide_add_original_index_datalayers(), blender::nodes::node_geo_boolean_cc::node_geo_exec(), blender::nodes::node_geo_grease_pencil_to_curves_cc::node_geo_exec(), blender::nodes::node_geo_set_mesh_normal_cc::node_geo_exec(), blender::object_duplilist_legacy_instances(), blender::ed::object::object_pointcloud_add_exec(), blender::paintface_flush_flags(), blender::paintvert_flush_flags(), blender::ed::curves::primitive_random_sphere(), blender::nodes::node_geo_distribute_points_on_faces_cc::propagate_attributes(), blender::io::usd::USDNurbsReader::read_curve_sample(), blender::io::usd::read_face_display_color(), blender::io::usd::USDPointInstancerReader::read_geometry(), blender::io::usd::USDPointsReader::read_ids(), blender::io::usd::USDCurvesReader::read_velocities(), blender::io::usd::USDPointsReader::read_velocities(), blender::io::alembic::read_vertex_creases(), blender::geometry::reorder_and_flip_attributes_group_to_group(), blender::geometry::reorder_attributes_group_to_group(), blender::ed::curves::resize_curves(), blender::geometry::retrieve_attribute_spans(), blender::bke::retrieve_attributes_for_transfer(), blender::bke::sample_vertex_attributes(), blender::nodes::node_geo_interpolate_curves_cc::store_output_attributes(), blender::bke::subdiv::subdiv_mesh_ctx_cache_uv_layers(), blender::nodes::node_geo_dual_mesh_cc::transfer_attributes(), blender::nodes::node_geo_transfer_attributes_cc::transfer_attributes(), and blender::ed::object::vgroup_select_verts().
|
inline |
Same as above, but should be used when the type is known at compile time.
Definition at line 862 of file BKE_attribute.hh.
References attribute, and lookup_or_add_for_write().
| GSpanAttributeWriter blender::bke::MutableAttributeAccessor::lookup_or_add_for_write_span | ( | StringRef | name, |
| AttrDomain | domain, | ||
| AttrType | data_type, | ||
| const AttributeInit & | initializer = AttributeInitDefaultValue() ) |
Same as above, but returns a type that makes it easier to work with the attribute as a span. If the caller newly initializes the attribute, it's better to use lookup_or_add_for_write_only_span.
Definition at line 533 of file attribute_access.cc.
References attribute, and lookup_or_add_for_write().
Referenced by blender::ed::curves::pen_tool::add_single_point_and_curve(), blender::ed::greasepencil::apply_eval_grease_pencil_data(), blender::ed::sculpt_paint::mask::apply_mask_from_settings(), blender::nodes::node_geo_set_material_cc::assign_material_to_id_geometry(), blender::BKE_mesh_material_remap(), blender::BKE_pbvh_sync_visibility_from_verts(), blender::geometry::construct::build_output_mesh(), blender::geometry::calculate_selection_outputs(), blender::ed::greasepencil::clipboard_paste_strokes_ex(), blender::io::ply::convert_ply_to_mesh(), blender::ed::object::convert_psys_to_mesh(), blender::io::usd::copy_primvar_to_blender_buffer(), blender::create_array_copies(), blender::create_dashes(), blender::ed::greasepencil::create_drawing_data(), blender::create_envelope_strokes(), blender::ed::greasepencil::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_to_mesh_sweep(), blender::ed::greasepencil::segment::cut_caps(), blender::data_transfer_dtdata_type_postprocess(), blender::data_transfer_layersmapping_add_item_attr(), blender::deform_drawing(), blender::do_lasso_select_paintvert(), blender::ed::sculpt_paint::brushes::do_layer_brush(), blender::ed::sculpt_paint::brushes::do_mask_brush(), blender::do_paintvert_box_select(), blender::ed::curves::duplicate_curves(), blender::ed::curves::duplicate_points(), blender::dynamicPaint_Modifier_apply(), blender::edbm_backbuf_check_and_select_faces_obmode(), blender::edbm_backbuf_check_and_select_verts_obmode(), blender::ed::sculpt_paint::face_set::ensure_face_sets_mesh(), blender::ed::curves::cyclic_toggle::exec(), blender::geometry::execute_realize_grease_pencil_task(), blender::ed::sculpt_paint::face_set::face_hide_update(), blender::ed::sculpt_paint::mask::fill_mask_mesh(), blender::ed::sculpt_paint::hide::flush_face_changes(), blender::ed::sculpt_paint::hide::flush_face_changes_node(), blender::generate_curves(), Freestyle::BlenderStrokeRenderer::GenerateStrokeMesh(), blender::get_uv_attribute(), blender::ed::sculpt_paint::grease_pencil_apply_fill(), blender::ed::greasepencil::grease_pencil_caps_set_exec(), blender::ed::greasepencil::grease_pencil_join_fills_exec(), blender::ed::greasepencil::grease_pencil_primitive_init_curves(), blender::ed::greasepencil::grease_pencil_set_corner_type_exec(), blender::ed::greasepencil::grease_pencil_set_stroke_type_exec(), blender::ed::greasepencil::grease_pencil_set_uniform_opacity_exec(), blender::ed::greasepencil::grease_pencil_stroke_material_set_exec(), blender::ed::sculpt_paint::hide::grow_shrink_visibility_mesh(), blender::handle_curves_aspect_ratio(), blender::handle_curves_end_cap(), blender::handle_curves_fill_opacity(), blender::handle_curves_softness(), blender::handle_curves_start_cap(), blender::handle_curves_u_scale(), blender::init_facesets(), blender::ed::sculpt_paint::hide::invert_visibility_mesh(), blender::ed::mesh::join_face_sets(), blender::ed::mesh::join_generic_attributes(), blender::bke::greasepencil::convert::legacy_gpencil_frame_to_grease_pencil_drawing(), blender::bke::greasepencil::convert::legacy_gpencil_to_grease_pencil(), blender::mesh_add_edges(), blender::mesh_add_faces(), blender::mesh_add_verts(), blender::bke::mesh_calc_edges(), blender::mesh_merge_transform(), blender::mesh_nurbs_displist_to_mesh(), blender::bke::mesh::mesh_set_custom_normals(), blender::bke::mesh_sharp_edges_set_from_angle(), blender::MOD_lineart_gpencil_generate_v3(), blender::MOD_solidify_extrude_modifyMesh(), blender::MOD_solidify_nonmanifold_modifyMesh(), blender::modify_mesh(), blender::modify_mesh(), blender::modify_opacity(), blender::modify_stroke_by_index(), blender::modify_stroke_by_layer(), blender::modify_stroke_by_material(), blender::modify_stroke_color(), blender::modify_stroke_random(), blender::move_face_map_data_to_attributes(), blender::normalEditModifier_do(), blender::ed::sculpt_paint::greasepencil::RandomizeOperation::on_stroke_extended(), blender::ed::sculpt_paint::greasepencil::SmoothOperation::on_stroke_extended(), blender::paint_vertsel_circle_select(), blender::paintface_deselect_all_visible(), blender::paintface_hide(), blender::paintface_reveal(), blender::paintface_select_less(), blender::paintface_select_linked(), blender::paintface_select_linked_faces(), blender::paintface_select_loop(), blender::paintface_select_more(), blender::paintvert_deselect_all_visible(), blender::paintvert_hide(), blender::paintvert_reveal(), blender::paintvert_select_less(), blender::paintvert_select_linked(), blender::paintvert_select_loop(), blender::paintvert_select_more(), blender::paintvert_select_ungrouped(), blender::ed::sculpt_paint::greasepencil::PaintOperationExecutor::process_extension_sample(), blender::ed::sculpt_paint::greasepencil::PaintOperationExecutor::process_start_sample(), blender::io::alembic::AbcCurveReader::read_curves_sample(), blender::io::alembic::read_custom_data_mcols(), blender::io::alembic::read_custom_data_uvs(), blender::io::alembic::read_edge_creases(), blender::io::alembic::AbcPointsReader::read_geometry(), blender::io::alembic::AbcMeshReader::read_mesh(), blender::io::alembic::read_typed_property_sample(), blender::io::alembic::read_uvs_params(), blender::io::alembic::read_velocity(), blender::ed::greasepencil::remap_material_indices(), blender::ed::greasepencil::remove_stroke_or_fill_based_on_mode(), blender::ed::sculpt_paint::undo::restore_hidden_face(), blender::ed::sculpt_paint::undo::restore_mask_from_undo_step(), blender::ed::sculpt_paint::undo::restore_mask_mesh(), blender::ed::sculpt_paint::undo::restore_vert_visibility_mesh(), blender::geometry::retrieve_attribute_spans(), blender::nodes::node_geo_extrude_mesh_cc::save_selection_as_attribute(), blender::ed::sculpt_paint::set_fill_attributes(), blender::bke::greasepencil::Drawing::set_texture_matrices(), blender::io::grease_pencil::shape_attributes_to_curves(), blender::ed::sculpt_paint::greasepencil::EraseOperationExecutor::soft_eraser(), blender::nodes::node_geo_transfer_attributes_cc::transfer_attributes(), blender::geometry::transform_pointcloud(), blender::geometry::translate_pointcloud(), blender::ed::sculpt_paint::mask::update_mask_mesh(), blender::ed::transform::curves::update_vector_handle_types(), blender::ed::sculpt_paint::hide::vert_hide_update(), blender::ed::sculpt_paint::mask::write_mask_mesh(), blender::bke::write_sharp_bezier_edges(), and blender::write_stroke_transforms().
|
inline |
Remove an attribute.
Definition at line 1007 of file BKE_attribute.hh.
References blender::bke::AttributeAccessor::fn_, blender::bke::AttributeAccessor::owner_, and blender::bke::AttributeAccessorFunctions::remove.
Referenced by add_override(), blender::nodes::node_geo_set_material_cc::assign_material_to_id_geometry(), blender::BKE_mesh_material_index_clear(), blender::BKE_pbvh_sync_visibility_from_verts(), blender::ed::sculpt_paint::face_set::clear_face_sets(), blender::ed::object::convert_curves_legacy_to_grease_pencil(), blender::ed::object::convert_curves_to_grease_pencil(), blender::ed::object::convert_font_to_grease_pencil(), blender::nodes::node_geo_mesh_primitive_ico_sphere_cc::create_ico_sphere_mesh(), blender::ed::curves::set_selection_domain::curves_set_selection_domain_exec(), blender::data_transfer_layersmapping_add_item_attr(), blender::data_transfer_layersmapping_cdlayers_multisrc_to_dst(), blender::ed::curves::ensure_selection_attribute(), blender::ed::greasepencil::ensure_selection_domain(), blender::ed::curves::cyclic_toggle::exec(), blender::bke::CurvesGeometry::fill_curve_types(), blender::ed::sculpt_paint::float_selection_ensure(), blender::ed::greasepencil::grease_pencil_reset_uvs_exec(), blender::ed::greasepencil::grease_pencil_set_corner_type_exec(), blender::ed::greasepencil::grease_pencil_set_stroke_type_exec(), blender::bke::mesh_calc_edges(), blender::mesh_customdata_custom_splitnormals_clear_exec(), blender::bke::mesh_hide_face_flush(), blender::bke::mesh_hide_vert_flush(), blender::bke::mesh_select_edge_flush(), blender::bke::mesh_select_face_flush(), blender::bke::mesh_select_vert_flush(), blender::bke::mesh_sharp_edges_set_from_angle(), blender::ed::sculpt_paint::hide::mesh_show_all(), blender::bke::mesh_smooth_set(), blender::MOD_solidify_nonmanifold_modifyMesh(), blender::multires_unsubdivide_free_original_datalayers(), blender::nodes::node_geo_set_mesh_normal_cc::node_geo_exec(), blender::ed::sculpt_paint::greasepencil::EraseOperation::on_stroke_done(), blender::ed::sculpt_paint::greasepencil::PaintOperation::on_stroke_done(), blender::paintface_reveal(), blender::paintvert_reveal(), blender::io::alembic::AbcCurveReader::read_curves_sample(), blender::io::alembic::AbcPointsReader::read_geometry(), remove_anonymous(), blender::nodes::node_geo_remove_attribute_cc::remove_attributes(), blender::bke::CurvesGeometry::remove_attributes_based_on_types(), blender::geometry::remove_id_attribute_from_instances(), blender::nodes::node_geo_extrude_mesh_cc::remove_non_propagated_attributes(), blender::ed::curves::remove_selection_attributes(), blender::ed::geometry::remove_shape_key_attributes(), blender::nodes::node_geo_tool_set_selection_cc::remove_with_wrong_domain(), blender::ed::sculpt_paint::replace_attribute(), blender::ed::pointcloud::select_all(), blender::ed::sculpt_paint::select_grow::select_grow_modal(), blender::ed::sculpt_paint::set_persistent_base_exec(), blender::bke::set_rest_position(), blender::nodes::store_computed_output_attributes(), blender::bke::transform_custom_normal_attribute(), blender::geometry::trim_curves(), blender::bke::try_capture_fields_on_geometry(), and blender::ed::sculpt_paint::expand::write_mask_data().
| void blender::bke::MutableAttributeAccessor::remove_anonymous | ( | ) |
Remove all anonymous attributes.
Definition at line 452 of file attribute_access.cc.
References blender::bke::AttributeAccessor::all_names(), blender::Vector< T, InlineBufferCapacity, Allocator >::append(), blender::bke::attribute_name_is_anonymous(), blender::Vector< T, InlineBufferCapacity, Allocator >::is_empty(), blender::Vector< T, InlineBufferCapacity, Allocator >::pop_last(), and remove().
Referenced by blender::ed::greasepencil::apply_eval_grease_pencil_data().
| Set< StringRef > blender::bke::MutableAttributeAccessor::rename | ( | const Map< StringRef, StringRef > & | map, |
| bool | overwrite = false ) |
Replace the names of attributes, optionally replacing existing use of the new names.
Definition at line 641 of file attribute_access.cc.
References blender::bke::AttributeAccessor::fn_, blender::bke::AttributeAccessor::owner_, and blender::bke::AttributeAccessorFunctions::rename.
| bool blender::bke::MutableAttributeAccessor::rename | ( | StringRef | old_name, |
| StringRef | new_name, | ||
| bool | overwrite = false ) |
Replace the name of an attribute, optionally replacing existing use of the new name.
Definition at line 632 of file attribute_access.cc.
References blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add_new(), blender::bke::AttributeAccessor::fn_, blender::bke::AttributeAccessor::owner_, and blender::bke::AttributeAccessorFunctions::rename.
Referenced by blender::nodes::node_geo_rename_attribute_cc::node_geo_exec().