diff --git a/source/blender/blenkernel/BKE_geometry_fields.hh b/source/blender/blenkernel/BKE_geometry_fields.hh index 094e5bab524..a640cadc878 100644 --- a/source/blender/blenkernel/BKE_geometry_fields.hh +++ b/source/blender/blenkernel/BKE_geometry_fields.hh @@ -438,6 +438,6 @@ bool try_capture_field_on_geometry(GeometryComponent &component, * which domain is correct, none is returned. */ std::optional try_detect_field_domain(const GeometryComponent &component, - const fn::GField &field); + const fn::GField &field); } // namespace blender::bke diff --git a/source/blender/blenkernel/intern/attribute.cc b/source/blender/blenkernel/intern/attribute.cc index 9b6e2a92e60..603668211a7 100644 --- a/source/blender/blenkernel/intern/attribute.cc +++ b/source/blender/blenkernel/intern/attribute.cc @@ -26,7 +26,6 @@ #include "BLT_translation.h" -#include "BKE_attribute.hh" #include "BKE_attribute.hh" #include "BKE_curves.hh" #include "BKE_customdata.hh" diff --git a/source/blender/blenkernel/intern/curve_to_mesh_convert.cc b/source/blender/blenkernel/intern/curve_to_mesh_convert.cc index b2ddffc5605..2ba1bf19df1 100644 --- a/source/blender/blenkernel/intern/curve_to_mesh_convert.cc +++ b/source/blender/blenkernel/intern/curve_to_mesh_convert.cc @@ -335,7 +335,7 @@ static ResultOffsets calculate_result_offsets(const CurvesInfo &info, const bool } static AttrDomain get_attribute_domain_for_mesh(const AttributeAccessor &mesh_attributes, - const AttributeIDRef &attribute_id) + const AttributeIDRef &attribute_id) { /* Only use a different domain if it is builtin and must only exist on one domain. */ if (!mesh_attributes.is_builtin(attribute_id)) { diff --git a/source/blender/blenkernel/intern/data_transfer.cc b/source/blender/blenkernel/intern/data_transfer.cc index 1459be0200b..05cade8734a 100644 --- a/source/blender/blenkernel/intern/data_transfer.cc +++ b/source/blender/blenkernel/intern/data_transfer.cc @@ -18,7 +18,6 @@ #include "BLI_math_matrix.h" #include "BLI_utildefines.h" -#include "BKE_attribute.hh" #include "BKE_attribute.hh" #include "BKE_customdata.hh" #include "BKE_data_transfer.h" diff --git a/source/blender/blenkernel/intern/geometry_fields.cc b/source/blender/blenkernel/intern/geometry_fields.cc index 60052df4d84..ac99ad7a31f 100644 --- a/source/blender/blenkernel/intern/geometry_fields.cc +++ b/source/blender/blenkernel/intern/geometry_fields.cc @@ -800,7 +800,7 @@ bool try_capture_field_on_geometry(GeometryComponent &component, } std::optional try_detect_field_domain(const GeometryComponent &component, - const fn::GField &field) + const fn::GField &field) { const GeometryComponent::Type component_type = component.type(); if (component_type == GeometryComponent::Type::PointCloud) { diff --git a/source/blender/blenkernel/intern/mesh_remesh_voxel.cc b/source/blender/blenkernel/intern/mesh_remesh_voxel.cc index cb28c149486..0d41576c8a3 100644 --- a/source/blender/blenkernel/intern/mesh_remesh_voxel.cc +++ b/source/blender/blenkernel/intern/mesh_remesh_voxel.cc @@ -26,7 +26,6 @@ #include "DNA_mesh_types.h" #include "DNA_meshdata_types.h" -#include "BKE_attribute.hh" #include "BKE_attribute.hh" #include "BKE_attribute_math.hh" #include "BKE_bvhutils.hh" diff --git a/source/blender/blenkernel/intern/paint.cc b/source/blender/blenkernel/intern/paint.cc index 29ec7f6d90e..e5e73e71141 100644 --- a/source/blender/blenkernel/intern/paint.cc +++ b/source/blender/blenkernel/intern/paint.cc @@ -37,7 +37,6 @@ #include "BLT_translation.h" -#include "BKE_attribute.hh" #include "BKE_attribute.hh" #include "BKE_brush.hh" #include "BKE_ccg.h" diff --git a/source/blender/editors/mesh/mesh_data.cc b/source/blender/editors/mesh/mesh_data.cc index a0816e10ffc..db667ddacac 100644 --- a/source/blender/editors/mesh/mesh_data.cc +++ b/source/blender/editors/mesh/mesh_data.cc @@ -17,7 +17,6 @@ #include "BLI_array.hh" #include "BLI_utildefines.h" -#include "BKE_attribute.hh" #include "BKE_attribute.hh" #include "BKE_context.hh" #include "BKE_customdata.hh" diff --git a/source/blender/editors/sculpt_paint/paint_vertex.cc b/source/blender/editors/sculpt_paint/paint_vertex.cc index 0661aaf263a..f1011c6a141 100644 --- a/source/blender/editors/sculpt_paint/paint_vertex.cc +++ b/source/blender/editors/sculpt_paint/paint_vertex.cc @@ -35,7 +35,6 @@ #include "RNA_access.hh" #include "RNA_define.hh" -#include "BKE_attribute.hh" #include "BKE_attribute.hh" #include "BKE_brush.hh" #include "BKE_colortools.h" diff --git a/source/blender/editors/sculpt_paint/paint_weight.cc b/source/blender/editors/sculpt_paint/paint_weight.cc index e99fd9947a8..e25b312597b 100644 --- a/source/blender/editors/sculpt_paint/paint_weight.cc +++ b/source/blender/editors/sculpt_paint/paint_weight.cc @@ -31,7 +31,6 @@ #include "RNA_access.hh" -#include "BKE_attribute.hh" #include "BKE_attribute.hh" #include "BKE_brush.hh" #include "BKE_colortools.h" diff --git a/source/blender/editors/sculpt_paint/sculpt.cc b/source/blender/editors/sculpt_paint/sculpt.cc index 7440b84107b..43b18a7ca26 100644 --- a/source/blender/editors/sculpt_paint/sculpt.cc +++ b/source/blender/editors/sculpt_paint/sculpt.cc @@ -37,7 +37,6 @@ #include "DNA_object_types.h" #include "DNA_scene_types.h" -#include "BKE_attribute.hh" #include "BKE_attribute.hh" #include "BKE_brush.hh" #include "BKE_ccg.h" diff --git a/source/blender/io/alembic/exporter/abc_writer_mesh.cc b/source/blender/io/alembic/exporter/abc_writer_mesh.cc index ad7a5097f1a..367b400244a 100644 --- a/source/blender/io/alembic/exporter/abc_writer_mesh.cc +++ b/source/blender/io/alembic/exporter/abc_writer_mesh.cc @@ -14,7 +14,6 @@ #include "BLI_assert.h" #include "BLI_math_vector.h" -#include "BKE_attribute.hh" #include "BKE_attribute.hh" #include "BKE_customdata.hh" #include "BKE_lib_id.h" diff --git a/source/blender/io/ply/importer/ply_import_mesh.cc b/source/blender/io/ply/importer/ply_import_mesh.cc index a6cbc20d561..58992cb57cd 100644 --- a/source/blender/io/ply/importer/ply_import_mesh.cc +++ b/source/blender/io/ply/importer/ply_import_mesh.cc @@ -6,7 +6,6 @@ * \ingroup ply */ -#include "BKE_attribute.hh" #include "BKE_attribute.hh" #include "BKE_customdata.hh" #include "BKE_lib_id.h" diff --git a/source/blender/io/usd/hydra/mesh.cc b/source/blender/io/usd/hydra/mesh.cc index bf366c21e87..eb7099e54e8 100644 --- a/source/blender/io/usd/hydra/mesh.cc +++ b/source/blender/io/usd/hydra/mesh.cc @@ -377,7 +377,8 @@ void MeshData::write_submeshes(const Mesh *mesh) const bke::AttributeAccessor attributes = mesh->attributes(); const StringRef active_uv = CustomData_get_active_layer_name(&mesh->corner_data, CD_PROP_FLOAT2); const VArraySpan uv_map = *attributes.lookup(active_uv, bke::AttrDomain::Corner); - const VArraySpan material_indices = *attributes.lookup("material_index", bke::AttrDomain::Face); + const VArraySpan material_indices = *attributes.lookup("material_index", + bke::AttrDomain::Face); if (material_indices.is_empty()) { copy_submesh(*mesh, diff --git a/source/blender/io/usd/intern/usd_writer_mesh.cc b/source/blender/io/usd/intern/usd_writer_mesh.cc index 28d680ae45d..5701f5b3132 100644 --- a/source/blender/io/usd/intern/usd_writer_mesh.cc +++ b/source/blender/io/usd/intern/usd_writer_mesh.cc @@ -642,7 +642,8 @@ static void get_loops_polys(const Mesh *mesh, USDMeshData &usd_mesh_data) static void get_edge_creases(const Mesh *mesh, USDMeshData &usd_mesh_data) { const bke::AttributeAccessor attributes = mesh->attributes(); - const bke::AttributeReader attribute = attributes.lookup("crease_edge", bke::AttrDomain::Edge); + const bke::AttributeReader attribute = attributes.lookup("crease_edge", + bke::AttrDomain::Edge); if (!attribute) { return; } diff --git a/source/blender/nodes/NOD_geometry_exec.hh b/source/blender/nodes/NOD_geometry_exec.hh index d4e59c2a82b..aba0a653437 100644 --- a/source/blender/nodes/NOD_geometry_exec.hh +++ b/source/blender/nodes/NOD_geometry_exec.hh @@ -27,11 +27,11 @@ using bke::AnonymousAttributeFieldInput; using bke::AnonymousAttributeID; using bke::AnonymousAttributeIDPtr; using bke::AnonymousAttributePropagationInfo; +using bke::AttrDomain; using bke::AttributeAccessor; using bke::AttributeFieldInput; using bke::AttributeIDRef; using bke::AttributeKind; -using bke::AttrDomain; using bke::AttributeMetaData; using bke::AttributeReader; using bke::AttributeWriter; diff --git a/source/blender/nodes/geometry/node_geometry_util.cc b/source/blender/nodes/geometry/node_geometry_util.cc index f1e190674bd..75ddc31ada1 100644 --- a/source/blender/nodes/geometry/node_geometry_util.cc +++ b/source/blender/nodes/geometry/node_geometry_util.cc @@ -73,22 +73,24 @@ const EnumPropertyItem *domain_experimental_grease_pencil_version3_fn(bContext * bool *r_free) { *r_free = true; - return enum_items_filter( - rna_enum_attribute_domain_items, [](const EnumPropertyItem &item) -> bool { - return (bke::AttrDomain(item.value) == bke::AttrDomain::Layer) ? U.experimental.use_grease_pencil_version3 : - true; - }); + return enum_items_filter(rna_enum_attribute_domain_items, + [](const EnumPropertyItem &item) -> bool { + return (bke::AttrDomain(item.value) == bke::AttrDomain::Layer) ? + U.experimental.use_grease_pencil_version3 : + true; + }); } const EnumPropertyItem *domain_without_corner_experimental_grease_pencil_version3_fn( bContext * /*C*/, PointerRNA * /*ptr*/, PropertyRNA * /*prop*/, bool *r_free) { *r_free = true; - return enum_items_filter( - rna_enum_attribute_domain_without_corner_items, [](const EnumPropertyItem &item) -> bool { - return (bke::AttrDomain(item.value) == bke::AttrDomain::Layer) ? U.experimental.use_grease_pencil_version3 : - true; - }); + return enum_items_filter(rna_enum_attribute_domain_without_corner_items, + [](const EnumPropertyItem &item) -> bool { + return (bke::AttrDomain(item.value) == bke::AttrDomain::Layer) ? + U.experimental.use_grease_pencil_version3 : + true; + }); } } // namespace enums diff --git a/source/blender/nodes/geometry/nodes/node_geo_blur_attribute.cc b/source/blender/nodes/geometry/nodes/node_geo_blur_attribute.cc index 882001fecac..b807728a3b2 100644 --- a/source/blender/nodes/geometry/nodes/node_geo_blur_attribute.cc +++ b/source/blender/nodes/geometry/nodes/node_geo_blur_attribute.cc @@ -447,8 +447,7 @@ class BlurAttributeFieldInput final : public bke::GeometryFieldInput { std::optional preferred_domain(const GeometryComponent &component) const override { - const std::optional domain = bke::try_detect_field_domain(component, - value_field_); + const std::optional domain = bke::try_detect_field_domain(component, value_field_); if (domain.has_value() && *domain == AttrDomain::Corner) { return AttrDomain::Point; } diff --git a/source/blender/nodes/geometry/nodes/node_geo_set_id.cc b/source/blender/nodes/geometry/nodes/node_geo_set_id.cc index bf2346b4ea8..5ed1a046eac 100644 --- a/source/blender/nodes/geometry/nodes/node_geo_set_id.cc +++ b/source/blender/nodes/geometry/nodes/node_geo_set_id.cc @@ -19,8 +19,8 @@ static void set_id_in_component(GeometryComponent &component, const Field &id_field) { const AttrDomain domain = (component.type() == GeometryComponent::Type::Instance) ? - AttrDomain::Instance : - AttrDomain::Point; + AttrDomain::Instance : + AttrDomain::Point; const int domain_size = component.attribute_domain_size(domain); if (domain_size == 0) { return; diff --git a/source/blender/nodes/geometry/nodes/node_geo_set_position.cc b/source/blender/nodes/geometry/nodes/node_geo_set_position.cc index 647fe756715..97f9385a0f7 100644 --- a/source/blender/nodes/geometry/nodes/node_geo_set_position.cc +++ b/source/blender/nodes/geometry/nodes/node_geo_set_position.cc @@ -152,8 +152,8 @@ static void set_position_in_component(GeometrySet &geometry, { const GeometryComponent &component = *geometry.get_component(component_type); const AttrDomain domain = component.type() == GeometryComponent::Type::Instance ? - AttrDomain::Instance : - AttrDomain::Point; + AttrDomain::Instance : + AttrDomain::Point; const int domain_size = component.attribute_domain_size(domain); if (domain_size == 0) { return; diff --git a/source/blender/nodes/intern/geometry_nodes_lazy_function.cc b/source/blender/nodes/intern/geometry_nodes_lazy_function.cc index c4194464af9..bbc803e8c84 100644 --- a/source/blender/nodes/intern/geometry_nodes_lazy_function.cc +++ b/source/blender/nodes/intern/geometry_nodes_lazy_function.cc @@ -819,8 +819,8 @@ class LazyFunctionForViewerNode : public LazyFunction { GeometryComponent &component = geometry.get_component_for_write(type); AttrDomain used_domain = domain; if (used_domain == AttrDomain::Auto) { - if (const std::optional detected_domain = - bke::try_detect_field_domain(component, field)) + if (const std::optional detected_domain = bke::try_detect_field_domain( + component, field)) { used_domain = *detected_domain; }