From 06eda2a484b8ab4ac6685e652dd153a16a3735e3 Mon Sep 17 00:00:00 2001 From: Hans Goudey Date: Tue, 26 Dec 2023 23:21:19 -0500 Subject: [PATCH] Cleanup: Remove most indirect includes of BKE_customdata.hh Some common headers were including this. Separating the includes will ideally lead to better conceptual separation between CustomData and the attribute API too. Mostly the change is adding the file to places where it was included indirectly before. But some code is shuffled around to hopefully better places as well. --- intern/cycles/blender/mesh.cpp | 1 + source/blender/blenkernel/BKE_attribute.h | 2 +- source/blender/blenkernel/BKE_attribute.hh | 3 + .../blender/blenkernel/BKE_attribute_math.hh | 2 +- source/blender/blenkernel/BKE_curves.hh | 2 + source/blender/blenkernel/BKE_customdata.hh | 4 - source/blender/blenkernel/BKE_data_transfer.h | 1 - source/blender/blenkernel/BKE_displist.h | 2 - source/blender/blenkernel/BKE_modifier.hh | 3 +- source/blender/blenkernel/BKE_pointcloud.h | 15 ---- .../blenkernel/intern/attribute_access.cc | 73 ++++++++++++++++++- .../blenkernel/intern/bake_items_serialize.cc | 1 + source/blender/blenkernel/intern/cloth.cc | 1 + .../intern/curve_to_mesh_convert.cc | 1 + .../blender/blenkernel/intern/curves_utils.cc | 1 + .../blender/blenkernel/intern/customdata.cc | 68 ----------------- .../blenkernel/intern/grease_pencil_test.cc | 1 + source/blender/blenkernel/intern/instances.cc | 1 + .../blenkernel/intern/mesh_calc_edges.cc | 1 + .../blenkernel/intern/mesh_flip_faces.cc | 1 + source/blender/blenkernel/intern/particle.cc | 1 + .../blenkernel/intern/particle_system.cc | 1 + .../blender/blenkernel/intern/pointcloud.cc | 15 ++++ source/blender/blenkernel/intern/softbody.cc | 3 +- .../intern/subdiv_converter_mesh.cc | 1 + .../blender/blenkernel/intern/subsurf_ccg.cc | 1 + .../blenloader/intern/versioning_250.cc | 1 + .../blenloader/intern/versioning_260.cc | 1 + .../blenloader/intern/versioning_270.cc | 1 + .../blenloader/intern/versioning_290.cc | 1 + .../blenloader/intern/versioning_300.cc | 1 + .../blenloader/intern/versioning_legacy.cc | 1 + source/blender/draw/intern/draw_attributes.cc | 1 + .../draw/intern/draw_cache_impl_curves.cc | 1 + .../editors/armature/armature_skinning.cc | 6 +- .../blender/editors/armature/meshlaplacian.cc | 11 ++- .../editors/curves/intern/curves_ops.cc | 1 + .../editors/geometry/geometry_attributes.cc | 1 + .../editors/geometry/node_group_operator.cc | 1 + .../editors/mesh/editmesh_mask_extract.cc | 1 + source/blender/editors/object/object_add.cc | 1 + source/blender/editors/object/object_bake.cc | 1 + .../editors/object/object_data_transfer.cc | 1 + .../blender/editors/physics/particle_edit.cc | 1 + .../editors/physics/particle_object.cc | 1 + source/blender/editors/sculpt_paint/sculpt.cc | 1 + .../blender_interface/BlenderFileLoader.cpp | 1 + .../blender_interface/BlenderFileLoader.h | 1 - .../geometry/intern/mesh_copy_selection.cc | 1 + .../geometry/intern/mesh_split_edges.cc | 1 + .../io/alembic/intern/abc_reader_mesh.cc | 1 + source/blender/io/usd/hydra/mesh.cc | 1 + .../blender/makesdna/DNA_customdata_types.h | 4 + source/blender/makesrna/intern/rna_curves.cc | 10 ++- .../blender/makesrna/intern/rna_modifier.cc | 1 + .../blender/makesrna/intern/rna_particle.cc | 1 + source/blender/modifiers/intern/MOD_array.cc | 1 + source/blender/modifiers/intern/MOD_build.cc | 1 + source/blender/modifiers/intern/MOD_cloth.cc | 1 + .../blender/modifiers/intern/MOD_explode.cc | 1 + .../blender/modifiers/intern/MOD_multires.cc | 1 + .../modifiers/intern/MOD_normal_edit.cc | 1 + source/blender/modifiers/intern/MOD_ocean.cc | 1 + .../modifiers/intern/MOD_particleinstance.cc | 1 + source/blender/modifiers/intern/MOD_screw.cc | 1 + .../modifiers/intern/MOD_solidify_extrude.cc | 1 + .../intern/MOD_solidify_nonmanifold.cc | 1 + .../blender/modifiers/intern/MOD_uvproject.cc | 1 + source/blender/modifiers/intern/MOD_uvwarp.cc | 1 + .../modifiers/intern/MOD_weightvgedit.cc | 1 + source/blender/modifiers/intern/MOD_weld.cc | 1 + .../nodes/node_geo_curve_to_points.cc | 1 + .../geometry/nodes/node_geo_extrude_mesh.cc | 1 + .../geometry/nodes/node_geo_mesh_to_points.cc | 1 + .../nodes/node_geo_points_to_vertices.cc | 1 + source/blender/render/intern/multires_bake.cc | 1 + 76 files changed, 174 insertions(+), 109 deletions(-) diff --git a/intern/cycles/blender/mesh.cpp b/intern/cycles/blender/mesh.cpp index 307fc6549f9..268afce27ca 100644 --- a/intern/cycles/blender/mesh.cpp +++ b/intern/cycles/blender/mesh.cpp @@ -30,6 +30,7 @@ #include "BKE_attribute.hh" #include "BKE_attribute_math.hh" +#include "BKE_customdata.hh" #include "BKE_mesh.hh" CCL_NAMESPACE_BEGIN diff --git a/source/blender/blenkernel/BKE_attribute.h b/source/blender/blenkernel/BKE_attribute.h index 7bf93a09dd8..98503b5f4df 100644 --- a/source/blender/blenkernel/BKE_attribute.h +++ b/source/blender/blenkernel/BKE_attribute.h @@ -11,7 +11,7 @@ #include "BLI_sys_types.h" -#include "BKE_customdata.hh" +#include "DNA_customdata_types.h" namespace blender::bke { enum class AttrDomain : int8_t; diff --git a/source/blender/blenkernel/BKE_attribute.hh b/source/blender/blenkernel/BKE_attribute.hh index 85f85dc7db7..dc1e2236cbf 100644 --- a/source/blender/blenkernel/BKE_attribute.hh +++ b/source/blender/blenkernel/BKE_attribute.hh @@ -76,6 +76,9 @@ class AttributeIDRef { friend std::ostream &operator<<(std::ostream &stream, const AttributeIDRef &attribute_id); }; +const CPPType *custom_data_type_to_cpp_type(eCustomDataType type); +eCustomDataType cpp_type_to_custom_data_type(const CPPType &type); + /** * Contains information about an attribute in a geometry component. * More information can be added in the future. E.g. whether the attribute is builtin and how it is diff --git a/source/blender/blenkernel/BKE_attribute_math.hh b/source/blender/blenkernel/BKE_attribute_math.hh index e0b5d90f860..3395c6e6d31 100644 --- a/source/blender/blenkernel/BKE_attribute_math.hh +++ b/source/blender/blenkernel/BKE_attribute_math.hh @@ -16,7 +16,7 @@ #include "BLI_math_vector.hh" #include "BLI_offset_indices.hh" -#include "BKE_customdata.hh" +#include "BKE_attribute.hh" namespace blender::bke::attribute_math { diff --git a/source/blender/blenkernel/BKE_curves.hh b/source/blender/blenkernel/BKE_curves.hh index d247d4d003a..0e0f663284e 100644 --- a/source/blender/blenkernel/BKE_curves.hh +++ b/source/blender/blenkernel/BKE_curves.hh @@ -24,6 +24,8 @@ #include "BKE_attribute_math.hh" #include "BKE_curves.h" +struct BlendDataReader; +struct BlendWriter; struct MDeformVert; namespace blender::bke { class AnonymousAttributePropagationInfo; diff --git a/source/blender/blenkernel/BKE_customdata.hh b/source/blender/blenkernel/BKE_customdata.hh index bc02985ec84..88086c8ecd4 100644 --- a/source/blender/blenkernel/BKE_customdata.hh +++ b/source/blender/blenkernel/BKE_customdata.hh @@ -31,8 +31,6 @@ struct CustomDataTransferLayerMap; struct ID; struct MeshPairRemap; -using eCustomDataMask = uint64_t; - /* These names are used as prefixes for UV layer names to find the associated boolean * layers. They should never be longer than 2 chars, as #MAX_CUSTOMDATA_LAYER_NAME * has 4 extra bytes above what can be used for the base layer name, and these @@ -801,7 +799,5 @@ void CustomData_debug_info_from_layers(const CustomData *data, const char *inden #endif /* !NDEBUG */ namespace blender::bke { -const CPPType *custom_data_type_to_cpp_type(eCustomDataType type); -eCustomDataType cpp_type_to_custom_data_type(const CPPType &type); std::optional custom_data_type_to_volume_grid_type(eCustomDataType type); } // namespace blender::bke diff --git a/source/blender/blenkernel/BKE_data_transfer.h b/source/blender/blenkernel/BKE_data_transfer.h index 117274e3cb4..053e31a7c36 100644 --- a/source/blender/blenkernel/BKE_data_transfer.h +++ b/source/blender/blenkernel/BKE_data_transfer.h @@ -8,7 +8,6 @@ #pragma once -#include "BKE_customdata.hh" #include "BLI_compiler_compat.h" #ifdef __cplusplus diff --git a/source/blender/blenkernel/BKE_displist.h b/source/blender/blenkernel/BKE_displist.h index 7cd7c3852e4..67eea399f4c 100644 --- a/source/blender/blenkernel/BKE_displist.h +++ b/source/blender/blenkernel/BKE_displist.h @@ -8,8 +8,6 @@ * \ingroup bke * \brief display list (or rather multi purpose list) stuff. */ -#include "BKE_customdata.hh" -#include "DNA_customdata_types.h" #ifdef __cplusplus extern "C" { diff --git a/source/blender/blenkernel/BKE_modifier.hh b/source/blender/blenkernel/BKE_modifier.hh index 31549cabb84..87d4f09843c 100644 --- a/source/blender/blenkernel/BKE_modifier.hh +++ b/source/blender/blenkernel/BKE_modifier.hh @@ -8,10 +8,11 @@ */ #include "BLI_compiler_attrs.h" #include "BLI_math_matrix_types.hh" +#include "BLI_span.hh" #include "DNA_modifier_types.h" /* Needed for all enum type definitions. */ -#include "BKE_customdata.hh" +#include "DNA_customdata_types.h" namespace blender::bke { struct GeometrySet; diff --git a/source/blender/blenkernel/BKE_pointcloud.h b/source/blender/blenkernel/BKE_pointcloud.h index 44a98910dde..f2729ef7ffa 100644 --- a/source/blender/blenkernel/BKE_pointcloud.h +++ b/source/blender/blenkernel/BKE_pointcloud.h @@ -18,7 +18,6 @@ # include "DNA_pointcloud_types.h" -# include "BKE_customdata.hh" #endif #ifdef __cplusplus @@ -51,20 +50,6 @@ struct PointCloudRuntime { } // namespace blender::bke -inline blender::Span PointCloud::positions() const -{ - return {static_cast( - CustomData_get_layer_named(&this->pdata, CD_PROP_FLOAT3, "position")), - this->totpoint}; -} - -inline blender::MutableSpan PointCloud::positions_for_write() -{ - return {static_cast(CustomData_get_layer_named_for_write( - &this->pdata, CD_PROP_FLOAT3, "position", this->totpoint)), - this->totpoint}; -} - #endif void *BKE_pointcloud_add(struct Main *bmain, const char *name); diff --git a/source/blender/blenkernel/intern/attribute_access.cc b/source/blender/blenkernel/intern/attribute_access.cc index 1bee8d14486..628451b4ecc 100644 --- a/source/blender/blenkernel/intern/attribute_access.cc +++ b/source/blender/blenkernel/intern/attribute_access.cc @@ -8,12 +8,9 @@ #include "BKE_customdata.hh" #include "BKE_deform.h" #include "BKE_geometry_set.hh" -#include "BKE_mesh.hh" -#include "BKE_pointcloud.h" #include "BKE_type_conversions.hh" -#include "DNA_mesh_types.h" -#include "DNA_pointcloud_types.h" +#include "DNA_meshdata_types.h" #include "BLI_array_utils.hh" #include "BLI_color.hh" @@ -32,6 +29,74 @@ namespace blender::bke { +const blender::CPPType *custom_data_type_to_cpp_type(const eCustomDataType type) +{ + switch (type) { + case CD_PROP_FLOAT: + return &CPPType::get(); + case CD_PROP_FLOAT2: + return &CPPType::get(); + case CD_PROP_FLOAT3: + return &CPPType::get(); + case CD_PROP_INT32: + return &CPPType::get(); + case CD_PROP_INT32_2D: + return &CPPType::get(); + case CD_PROP_COLOR: + return &CPPType::get(); + case CD_PROP_BOOL: + return &CPPType::get(); + case CD_PROP_INT8: + return &CPPType::get(); + case CD_PROP_BYTE_COLOR: + return &CPPType::get(); + case CD_PROP_QUATERNION: + return &CPPType::get(); + case CD_PROP_STRING: + return &CPPType::get(); + default: + return nullptr; + } +} + +eCustomDataType cpp_type_to_custom_data_type(const blender::CPPType &type) +{ + if (type.is()) { + return CD_PROP_FLOAT; + } + if (type.is()) { + return CD_PROP_FLOAT2; + } + if (type.is()) { + return CD_PROP_FLOAT3; + } + if (type.is()) { + return CD_PROP_INT32; + } + if (type.is()) { + return CD_PROP_INT32_2D; + } + if (type.is()) { + return CD_PROP_COLOR; + } + if (type.is()) { + return CD_PROP_BOOL; + } + if (type.is()) { + return CD_PROP_INT8; + } + if (type.is()) { + return CD_PROP_BYTE_COLOR; + } + if (type.is()) { + return CD_PROP_QUATERNION; + } + if (type.is()) { + return CD_PROP_STRING; + } + return static_cast(-1); +} + std::ostream &operator<<(std::ostream &stream, const AttributeIDRef &attribute_id) { if (attribute_id) { diff --git a/source/blender/blenkernel/intern/bake_items_serialize.cc b/source/blender/blenkernel/intern/bake_items_serialize.cc index 524ab6181fe..0d6afec141d 100644 --- a/source/blender/blenkernel/intern/bake_items_serialize.cc +++ b/source/blender/blenkernel/intern/bake_items_serialize.cc @@ -5,6 +5,7 @@ #include "BKE_bake_items.hh" #include "BKE_bake_items_serialize.hh" #include "BKE_curves.hh" +#include "BKE_customdata.hh" #include "BKE_instances.hh" #include "BKE_lib_id.h" #include "BKE_mesh.hh" diff --git a/source/blender/blenkernel/intern/cloth.cc b/source/blender/blenkernel/intern/cloth.cc index 900a26913a4..20beed8c508 100644 --- a/source/blender/blenkernel/intern/cloth.cc +++ b/source/blender/blenkernel/intern/cloth.cc @@ -27,6 +27,7 @@ #include "BKE_bvhutils.hh" #include "BKE_cloth.hh" +#include "BKE_customdata.hh" #include "BKE_effect.h" #include "BKE_global.h" #include "BKE_lib_id.h" diff --git a/source/blender/blenkernel/intern/curve_to_mesh_convert.cc b/source/blender/blenkernel/intern/curve_to_mesh_convert.cc index 297412e5d25..a741f9a3c1d 100644 --- a/source/blender/blenkernel/intern/curve_to_mesh_convert.cc +++ b/source/blender/blenkernel/intern/curve_to_mesh_convert.cc @@ -11,6 +11,7 @@ #include "BKE_attribute_math.hh" #include "BKE_curves.hh" +#include "BKE_customdata.hh" #include "BKE_geometry_set.hh" #include "BKE_material.h" #include "BKE_mesh.hh" diff --git a/source/blender/blenkernel/intern/curves_utils.cc b/source/blender/blenkernel/intern/curves_utils.cc index 68ff6719cfd..43b38b77570 100644 --- a/source/blender/blenkernel/intern/curves_utils.cc +++ b/source/blender/blenkernel/intern/curves_utils.cc @@ -7,6 +7,7 @@ */ #include "BKE_curves_utils.hh" +#include "BKE_customdata.hh" namespace blender::bke::curves { diff --git a/source/blender/blenkernel/intern/customdata.cc b/source/blender/blenkernel/intern/customdata.cc index 5d51c689ae3..44e04fdf6f1 100644 --- a/source/blender/blenkernel/intern/customdata.cc +++ b/source/blender/blenkernel/intern/customdata.cc @@ -5294,36 +5294,6 @@ namespace blender::bke { /** \name Custom Data C++ API * \{ */ -const blender::CPPType *custom_data_type_to_cpp_type(const eCustomDataType type) -{ - switch (type) { - case CD_PROP_FLOAT: - return &CPPType::get(); - case CD_PROP_FLOAT2: - return &CPPType::get(); - case CD_PROP_FLOAT3: - return &CPPType::get(); - case CD_PROP_INT32: - return &CPPType::get(); - case CD_PROP_INT32_2D: - return &CPPType::get(); - case CD_PROP_COLOR: - return &CPPType::get(); - case CD_PROP_BOOL: - return &CPPType::get(); - case CD_PROP_INT8: - return &CPPType::get(); - case CD_PROP_BYTE_COLOR: - return &CPPType::get(); - case CD_PROP_QUATERNION: - return &CPPType::get(); - case CD_PROP_STRING: - return &CPPType::get(); - default: - return nullptr; - } -} - std::optional custom_data_type_to_volume_grid_type(const eCustomDataType type) { switch (type) { @@ -5340,44 +5310,6 @@ std::optional custom_data_type_to_volume_grid_type(const eCustom } } -eCustomDataType cpp_type_to_custom_data_type(const blender::CPPType &type) -{ - if (type.is()) { - return CD_PROP_FLOAT; - } - if (type.is()) { - return CD_PROP_FLOAT2; - } - if (type.is()) { - return CD_PROP_FLOAT3; - } - if (type.is()) { - return CD_PROP_INT32; - } - if (type.is()) { - return CD_PROP_INT32_2D; - } - if (type.is()) { - return CD_PROP_COLOR; - } - if (type.is()) { - return CD_PROP_BOOL; - } - if (type.is()) { - return CD_PROP_INT8; - } - if (type.is()) { - return CD_PROP_BYTE_COLOR; - } - if (type.is()) { - return CD_PROP_QUATERNION; - } - if (type.is()) { - return CD_PROP_STRING; - } - return static_cast(-1); -} - /** \} */ } // namespace blender::bke diff --git a/source/blender/blenkernel/intern/grease_pencil_test.cc b/source/blender/blenkernel/intern/grease_pencil_test.cc index f15077fb081..a66d66ca4ef 100644 --- a/source/blender/blenkernel/intern/grease_pencil_test.cc +++ b/source/blender/blenkernel/intern/grease_pencil_test.cc @@ -7,6 +7,7 @@ #include "BLI_string.h" #include "BKE_curves.hh" +#include "BKE_customdata.hh" #include "BKE_grease_pencil.hh" #include "BKE_idtype.h" #include "BKE_lib_id.h" diff --git a/source/blender/blenkernel/intern/instances.cc b/source/blender/blenkernel/intern/instances.cc index fb37e5fa6e8..2214bbe4da1 100644 --- a/source/blender/blenkernel/intern/instances.cc +++ b/source/blender/blenkernel/intern/instances.cc @@ -7,6 +7,7 @@ #include "BLI_task.hh" #include "BKE_attribute_math.hh" +#include "BKE_customdata.hh" #include "BKE_geometry_set.hh" #include "BKE_instances.hh" diff --git a/source/blender/blenkernel/intern/mesh_calc_edges.cc b/source/blender/blenkernel/intern/mesh_calc_edges.cc index f399bd796a7..33096b24247 100644 --- a/source/blender/blenkernel/intern/mesh_calc_edges.cc +++ b/source/blender/blenkernel/intern/mesh_calc_edges.cc @@ -12,6 +12,7 @@ #include "BLI_threads.h" #include "BKE_attribute.hh" +#include "BKE_customdata.hh" #include "BKE_mesh.hh" namespace blender::bke { diff --git a/source/blender/blenkernel/intern/mesh_flip_faces.cc b/source/blender/blenkernel/intern/mesh_flip_faces.cc index 95513443e3a..b1ebe1be188 100644 --- a/source/blender/blenkernel/intern/mesh_flip_faces.cc +++ b/source/blender/blenkernel/intern/mesh_flip_faces.cc @@ -9,6 +9,7 @@ #include "BKE_attribute.hh" #include "BKE_attribute_math.hh" +#include "BKE_customdata.hh" #include "BKE_mesh.hh" namespace blender::bke { diff --git a/source/blender/blenkernel/intern/particle.cc b/source/blender/blenkernel/intern/particle.cc index de4da20b701..0b7660cd14f 100644 --- a/source/blender/blenkernel/intern/particle.cc +++ b/source/blender/blenkernel/intern/particle.cc @@ -52,6 +52,7 @@ #include "BKE_cloth.hh" #include "BKE_collection.h" #include "BKE_colortools.hh" +#include "BKE_customdata.hh" #include "BKE_deform.h" #include "BKE_displist.h" #include "BKE_effect.h" diff --git a/source/blender/blenkernel/intern/particle_system.cc b/source/blender/blenkernel/intern/particle_system.cc index 113fa4e45dd..32d5c0c1b17 100644 --- a/source/blender/blenkernel/intern/particle_system.cc +++ b/source/blender/blenkernel/intern/particle_system.cc @@ -47,6 +47,7 @@ #include "BKE_boids.h" #include "BKE_collision.h" #include "BKE_colortools.hh" +#include "BKE_customdata.hh" #include "BKE_effect.h" #include "BKE_lib_id.h" #include "BKE_lib_query.h" diff --git a/source/blender/blenkernel/intern/pointcloud.cc b/source/blender/blenkernel/intern/pointcloud.cc index 4f47eec89f1..48f8f78fc17 100644 --- a/source/blender/blenkernel/intern/pointcloud.cc +++ b/source/blender/blenkernel/intern/pointcloud.cc @@ -47,6 +47,7 @@ using blender::float3; using blender::IndexRange; +using blender::MutableSpan; using blender::Span; using blender::Vector; @@ -197,6 +198,20 @@ static void pointcloud_random(PointCloud *pointcloud) BLI_rng_free(rng); } +Span PointCloud::positions() const +{ + return {static_cast( + CustomData_get_layer_named(&this->pdata, CD_PROP_FLOAT3, "position")), + this->totpoint}; +} + +MutableSpan PointCloud::positions_for_write() +{ + return {static_cast(CustomData_get_layer_named_for_write( + &this->pdata, CD_PROP_FLOAT3, "position", this->totpoint)), + this->totpoint}; +} + void *BKE_pointcloud_add(Main *bmain, const char *name) { PointCloud *pointcloud = static_cast(BKE_id_new(bmain, ID_PT, name)); diff --git a/source/blender/blenkernel/intern/softbody.cc b/source/blender/blenkernel/intern/softbody.cc index 74b1f3ba669..bec46553a11 100644 --- a/source/blender/blenkernel/intern/softbody.cc +++ b/source/blender/blenkernel/intern/softbody.cc @@ -52,6 +52,7 @@ #include "BKE_collection.h" #include "BKE_collision.h" #include "BKE_curve.hh" +#include "BKE_customdata.hh" #include "BKE_deform.h" #include "BKE_effect.h" #include "BKE_global.h" @@ -2678,7 +2679,7 @@ static void mesh_to_softbody(Object *ob) { SoftBody *sb; Mesh *mesh = static_cast(ob->data); - const vec2i *edge = static_cast( + const blender::int2 *edge = static_cast( CustomData_get_layer_named(&mesh->edge_data, CD_PROP_INT32_2D, ".edge_verts")); BodyPoint *bp; BodySpring *bs; diff --git a/source/blender/blenkernel/intern/subdiv_converter_mesh.cc b/source/blender/blenkernel/intern/subdiv_converter_mesh.cc index d1af7c30a58..45df57e8e9d 100644 --- a/source/blender/blenkernel/intern/subdiv_converter_mesh.cc +++ b/source/blender/blenkernel/intern/subdiv_converter_mesh.cc @@ -13,6 +13,7 @@ #include "BLI_utildefines.h" #include "BKE_attribute.hh" +#include "BKE_customdata.hh" #include "BKE_mesh.hh" #include "BKE_mesh_mapping.hh" #include "BKE_subdiv.hh" diff --git a/source/blender/blenkernel/intern/subsurf_ccg.cc b/source/blender/blenkernel/intern/subsurf_ccg.cc index c60b15a17c8..67c11e5cac9 100644 --- a/source/blender/blenkernel/intern/subsurf_ccg.cc +++ b/source/blender/blenkernel/intern/subsurf_ccg.cc @@ -34,6 +34,7 @@ #include "BKE_ccg.h" #include "BKE_cdderivedmesh.h" +#include "BKE_customdata.hh" #include "BKE_mesh.hh" #include "BKE_mesh_mapping.hh" #include "BKE_modifier.hh" diff --git a/source/blender/blenloader/intern/versioning_250.cc b/source/blender/blenloader/intern/versioning_250.cc index 28065f4c038..0776839fc58 100644 --- a/source/blender/blenloader/intern/versioning_250.cc +++ b/source/blender/blenloader/intern/versioning_250.cc @@ -55,6 +55,7 @@ #include "BKE_anim_visualization.h" #include "BKE_armature.hh" #include "BKE_colortools.hh" +#include "BKE_customdata.hh" #include "BKE_global.h" /* for G */ #include "BKE_lib_id.h" #include "BKE_main.hh" diff --git a/source/blender/blenloader/intern/versioning_260.cc b/source/blender/blenloader/intern/versioning_260.cc index 4b1345072e6..6b972535177 100644 --- a/source/blender/blenloader/intern/versioning_260.cc +++ b/source/blender/blenloader/intern/versioning_260.cc @@ -52,6 +52,7 @@ #include "BLT_translation.h" #include "BKE_anim_visualization.h" +#include "BKE_customdata.hh" #include "BKE_image.h" #include "BKE_main.hh" /* for Main */ #include "BKE_mesh.hh" /* for ME_ defines (patching) */ diff --git a/source/blender/blenloader/intern/versioning_270.cc b/source/blender/blenloader/intern/versioning_270.cc index 381edc62cf9..829c5528097 100644 --- a/source/blender/blenloader/intern/versioning_270.cc +++ b/source/blender/blenloader/intern/versioning_270.cc @@ -51,6 +51,7 @@ #include "BKE_anim_data.h" #include "BKE_animsys.h" #include "BKE_colortools.hh" +#include "BKE_customdata.hh" #include "BKE_fcurve_driver.h" #include "BKE_main.hh" #include "BKE_mask.h" diff --git a/source/blender/blenloader/intern/versioning_290.cc b/source/blender/blenloader/intern/versioning_290.cc index ac63c69151a..db9ff3f75bf 100644 --- a/source/blender/blenloader/intern/versioning_290.cc +++ b/source/blender/blenloader/intern/versioning_290.cc @@ -52,6 +52,7 @@ #include "BKE_colortools.hh" #include "BKE_cryptomatte.h" #include "BKE_curve.hh" +#include "BKE_customdata.hh" #include "BKE_fcurve.h" #include "BKE_gpencil_legacy.h" #include "BKE_lib_id.h" diff --git a/source/blender/blenloader/intern/versioning_300.cc b/source/blender/blenloader/intern/versioning_300.cc index 0159c6cf09d..de27a5292d8 100644 --- a/source/blender/blenloader/intern/versioning_300.cc +++ b/source/blender/blenloader/intern/versioning_300.cc @@ -63,6 +63,7 @@ #include "BKE_colortools.hh" #include "BKE_curve.hh" #include "BKE_curves.hh" +#include "BKE_customdata.hh" #include "BKE_data_transfer.h" #include "BKE_deform.h" #include "BKE_fcurve.h" diff --git a/source/blender/blenloader/intern/versioning_legacy.cc b/source/blender/blenloader/intern/versioning_legacy.cc index 5690dbde7a0..5a874ee9025 100644 --- a/source/blender/blenloader/intern/versioning_legacy.cc +++ b/source/blender/blenloader/intern/versioning_legacy.cc @@ -54,6 +54,7 @@ #include "BKE_action.h" #include "BKE_armature.hh" #include "BKE_constraint.h" +#include "BKE_customdata.hh" #include "BKE_deform.h" #include "BKE_fcurve.h" #include "BKE_lattice.hh" diff --git a/source/blender/draw/intern/draw_attributes.cc b/source/blender/draw/intern/draw_attributes.cc index a06b4b86ef2..aad7d654a3e 100644 --- a/source/blender/draw/intern/draw_attributes.cc +++ b/source/blender/draw/intern/draw_attributes.cc @@ -5,6 +5,7 @@ #include "BLI_string.h" #include "BKE_attribute.hh" +#include "BKE_customdata.hh" #include "draw_attributes.hh" diff --git a/source/blender/draw/intern/draw_cache_impl_curves.cc b/source/blender/draw/intern/draw_cache_impl_curves.cc index 90baa34bdda..a4a35fd1916 100644 --- a/source/blender/draw/intern/draw_cache_impl_curves.cc +++ b/source/blender/draw/intern/draw_cache_impl_curves.cc @@ -28,6 +28,7 @@ #include "BKE_crazyspace.hh" #include "BKE_curves.hh" +#include "BKE_customdata.hh" #include "BKE_geometry_set.hh" #include "GPU_batch.h" diff --git a/source/blender/editors/armature/armature_skinning.cc b/source/blender/editors/armature/armature_skinning.cc index 61f15f9793a..805edc29d17 100644 --- a/source/blender/editors/armature/armature_skinning.cc +++ b/source/blender/editors/armature/armature_skinning.cc @@ -22,6 +22,7 @@ #include "BKE_action.h" #include "BKE_armature.hh" +#include "BKE_attribute.hh" #include "BKE_deform.h" #include "BKE_mesh.hh" #include "BKE_mesh_iterators.hh" @@ -200,6 +201,7 @@ static void envelope_bone_weighting(Object *ob, const int *selected, float scale) { + using namespace blender; /* Create vertex group weights from envelopes */ bool use_topology = (mesh->editflag & ME_EDIT_MIRROR_TOPO) != 0; @@ -211,8 +213,8 @@ static void envelope_bone_weighting(Object *ob, use_mask = true; } - const bool *select_vert = (const bool *)CustomData_get_layer_named( - &mesh->vert_data, CD_PROP_BOOL, ".select_vert"); + const bke::AttributeAccessor attributes = mesh->attributes(); + const VArray select_vert = *attributes.lookup(".select_vert", bke::AttrDomain::Point); /* for each vertex in the mesh */ for (int i = 0; i < mesh->verts_num; i++) { diff --git a/source/blender/editors/armature/meshlaplacian.cc b/source/blender/editors/armature/meshlaplacian.cc index bae9acf3a8f..11368cff1ea 100644 --- a/source/blender/editors/armature/meshlaplacian.cc +++ b/source/blender/editors/armature/meshlaplacian.cc @@ -25,6 +25,7 @@ #include "BLT_translation.h" +#include "BKE_attribute.hh" #include "BKE_bvhutils.hh" #include "BKE_mesh.hh" #include "BKE_mesh_runtime.hh" @@ -641,6 +642,7 @@ void heat_bone_weighting(Object *ob, const int *selected, const char **error_str) { + using namespace blender; LaplacianSystem *sys; blender::int3 *corner_tris; float solution, weight; @@ -651,6 +653,7 @@ void heat_bone_weighting(Object *ob, const blender::Span vert_positions = mesh->vert_positions(); const blender::OffsetIndices faces = mesh->faces(); const blender::Span corner_verts = mesh->corner_verts(); + const bke::AttributeAccessor attributes = mesh->attributes(); bool use_vert_sel = (mesh->editflag & ME_EDIT_PAINT_VERT_SEL) != 0; bool use_face_sel = (mesh->editflag & ME_EDIT_PAINT_FACE_SEL) != 0; @@ -666,8 +669,8 @@ void heat_bone_weighting(Object *ob, /* (added selectedVerts content for vertex mask, they used to just equal 1) */ if (use_vert_sel) { - const bool *select_vert = (const bool *)CustomData_get_layer_named( - &mesh->vert_data, CD_PROP_BOOL, ".select_vert"); + const VArray select_vert = *attributes.lookup_or_default( + ".select_vert", bke::AttrDomain::Point, false); if (select_vert) { for (const int i : faces.index_range()) { for (const int vert : corner_verts.slice(faces[i])) { @@ -677,8 +680,8 @@ void heat_bone_weighting(Object *ob, } } else if (use_face_sel) { - const bool *select_poly = (const bool *)CustomData_get_layer_named( - &mesh->face_data, CD_PROP_BOOL, ".select_poly"); + const VArray select_poly = *attributes.lookup_or_default( + ".select_poly", bke::AttrDomain::Face, false); if (select_poly) { for (const int i : faces.index_range()) { if (select_poly[i]) { diff --git a/source/blender/editors/curves/intern/curves_ops.cc b/source/blender/editors/curves/intern/curves_ops.cc index 30ddd154cb1..21fce3bc477 100644 --- a/source/blender/editors/curves/intern/curves_ops.cc +++ b/source/blender/editors/curves/intern/curves_ops.cc @@ -32,6 +32,7 @@ #include "BKE_bvhutils.hh" #include "BKE_context.hh" #include "BKE_curves.hh" +#include "BKE_customdata.hh" #include "BKE_geometry_set.hh" #include "BKE_layer.h" #include "BKE_lib_id.h" diff --git a/source/blender/editors/geometry/geometry_attributes.cc b/source/blender/editors/geometry/geometry_attributes.cc index 90c76deff69..3d4631229a4 100644 --- a/source/blender/editors/geometry/geometry_attributes.cc +++ b/source/blender/editors/geometry/geometry_attributes.cc @@ -16,6 +16,7 @@ #include "BKE_attribute.hh" #include "BKE_context.hh" +#include "BKE_customdata.hh" #include "BKE_deform.h" #include "BKE_geometry_set.hh" #include "BKE_lib_id.h" diff --git a/source/blender/editors/geometry/node_group_operator.cc b/source/blender/editors/geometry/node_group_operator.cc index b262f8a17f8..abf882030b2 100644 --- a/source/blender/editors/geometry/node_group_operator.cc +++ b/source/blender/editors/geometry/node_group_operator.cc @@ -22,6 +22,7 @@ #include "BKE_compute_contexts.hh" #include "BKE_context.hh" #include "BKE_curves.hh" +#include "BKE_customdata.hh" #include "BKE_editmesh.hh" #include "BKE_geometry_set.hh" #include "BKE_layer.h" diff --git a/source/blender/editors/mesh/editmesh_mask_extract.cc b/source/blender/editors/mesh/editmesh_mask_extract.cc index 73179502f04..d124fb4012d 100644 --- a/source/blender/editors/mesh/editmesh_mask_extract.cc +++ b/source/blender/editors/mesh/editmesh_mask_extract.cc @@ -14,6 +14,7 @@ #include "BKE_attribute.hh" #include "BKE_context.hh" +#include "BKE_customdata.hh" #include "BKE_editmesh.hh" #include "BKE_layer.h" #include "BKE_lib_id.h" diff --git a/source/blender/editors/object/object_add.cc b/source/blender/editors/object/object_add.cc index 529f8d1f2ed..3f5b26429c0 100644 --- a/source/blender/editors/object/object_add.cc +++ b/source/blender/editors/object/object_add.cc @@ -54,6 +54,7 @@ #include "BKE_curve.hh" #include "BKE_curve_to_mesh.hh" #include "BKE_curves.h" +#include "BKE_customdata.hh" #include "BKE_displist.h" #include "BKE_duplilist.h" #include "BKE_effect.h" diff --git a/source/blender/editors/object/object_bake.cc b/source/blender/editors/object/object_bake.cc index 3b2623d235c..aa194d7990b 100644 --- a/source/blender/editors/object/object_bake.cc +++ b/source/blender/editors/object/object_bake.cc @@ -26,6 +26,7 @@ #include "BKE_blender.h" #include "BKE_cdderivedmesh.h" #include "BKE_context.hh" +#include "BKE_customdata.hh" #include "BKE_global.h" #include "BKE_image.h" #include "BKE_material.h" diff --git a/source/blender/editors/object/object_data_transfer.cc b/source/blender/editors/object/object_data_transfer.cc index 7595aa21f89..a83a49cdca4 100644 --- a/source/blender/editors/object/object_data_transfer.cc +++ b/source/blender/editors/object/object_data_transfer.cc @@ -17,6 +17,7 @@ #include "BLI_utildefines.h" #include "BKE_context.hh" +#include "BKE_customdata.hh" #include "BKE_data_transfer.h" #include "BKE_deform.h" #include "BKE_mesh_mapping.hh" diff --git a/source/blender/editors/physics/particle_edit.cc b/source/blender/editors/physics/particle_edit.cc index c1fb9e482d4..ead3d77c38e 100644 --- a/source/blender/editors/physics/particle_edit.cc +++ b/source/blender/editors/physics/particle_edit.cc @@ -30,6 +30,7 @@ #include "BKE_bvhutils.hh" #include "BKE_context.hh" +#include "BKE_customdata.hh" #include "BKE_global.h" #include "BKE_layer.h" #include "BKE_main.hh" diff --git a/source/blender/editors/physics/particle_object.cc b/source/blender/editors/physics/particle_object.cc index acf57a8cdae..4e534a9339c 100644 --- a/source/blender/editors/physics/particle_object.cc +++ b/source/blender/editors/physics/particle_object.cc @@ -25,6 +25,7 @@ #include "BKE_bvhutils.hh" #include "BKE_context.hh" +#include "BKE_customdata.hh" #include "BKE_global.h" #include "BKE_layer.h" #include "BKE_lib_id.h" diff --git a/source/blender/editors/sculpt_paint/sculpt.cc b/source/blender/editors/sculpt_paint/sculpt.cc index dc48d31ffc9..565f382f0d6 100644 --- a/source/blender/editors/sculpt_paint/sculpt.cc +++ b/source/blender/editors/sculpt_paint/sculpt.cc @@ -40,6 +40,7 @@ #include "BKE_ccg.h" #include "BKE_colortools.hh" #include "BKE_context.hh" +#include "BKE_customdata.hh" #include "BKE_image.h" #include "BKE_key.h" #include "BKE_lib_id.h" diff --git a/source/blender/freestyle/intern/blender_interface/BlenderFileLoader.cpp b/source/blender/freestyle/intern/blender_interface/BlenderFileLoader.cpp index 8442855bdc5..e156437f98a 100644 --- a/source/blender/freestyle/intern/blender_interface/BlenderFileLoader.cpp +++ b/source/blender/freestyle/intern/blender_interface/BlenderFileLoader.cpp @@ -16,6 +16,7 @@ #include "BLI_utildefines.h" #include "BKE_attribute.hh" +#include "BKE_customdata.hh" #include "BKE_global.h" #include "BKE_mesh.hh" #include "BKE_object.hh" diff --git a/source/blender/freestyle/intern/blender_interface/BlenderFileLoader.h b/source/blender/freestyle/intern/blender_interface/BlenderFileLoader.h index 7d86532f0e3..d989df5537b 100644 --- a/source/blender/freestyle/intern/blender_interface/BlenderFileLoader.h +++ b/source/blender/freestyle/intern/blender_interface/BlenderFileLoader.h @@ -32,7 +32,6 @@ #include "render_types.h" -#include "BKE_customdata.hh" #include "BKE_lib_id.h" #include "BKE_material.h" #include "BKE_mesh.h" diff --git a/source/blender/geometry/intern/mesh_copy_selection.cc b/source/blender/geometry/intern/mesh_copy_selection.cc index 8e3f7d698b7..bfaea06c7e4 100644 --- a/source/blender/geometry/intern/mesh_copy_selection.cc +++ b/source/blender/geometry/intern/mesh_copy_selection.cc @@ -10,6 +10,7 @@ #include "BLI_listbase.h" #include "BKE_attribute.hh" +#include "BKE_customdata.hh" #include "BKE_geometry_fields.hh" #include "BKE_mesh.hh" diff --git a/source/blender/geometry/intern/mesh_split_edges.cc b/source/blender/geometry/intern/mesh_split_edges.cc index b16a2847eb0..e1963258eaa 100644 --- a/source/blender/geometry/intern/mesh_split_edges.cc +++ b/source/blender/geometry/intern/mesh_split_edges.cc @@ -8,6 +8,7 @@ #include "BKE_attribute.hh" #include "BKE_attribute_math.hh" +#include "BKE_customdata.hh" #include "BKE_mesh.hh" #include "BKE_mesh_mapping.hh" diff --git a/source/blender/io/alembic/intern/abc_reader_mesh.cc b/source/blender/io/alembic/intern/abc_reader_mesh.cc index 984187015ab..6816c4df997 100644 --- a/source/blender/io/alembic/intern/abc_reader_mesh.cc +++ b/source/blender/io/alembic/intern/abc_reader_mesh.cc @@ -28,6 +28,7 @@ #include "BLT_translation.h" #include "BKE_attribute.hh" +#include "BKE_customdata.hh" #include "BKE_lib_id.h" #include "BKE_main.hh" #include "BKE_material.h" diff --git a/source/blender/io/usd/hydra/mesh.cc b/source/blender/io/usd/hydra/mesh.cc index dea255354a0..2559b099f3b 100644 --- a/source/blender/io/usd/hydra/mesh.cc +++ b/source/blender/io/usd/hydra/mesh.cc @@ -11,6 +11,7 @@ #include "BLI_vector_set.hh" #include "BKE_attribute.hh" +#include "BKE_customdata.hh" #include "BKE_material.h" #include "BKE_mesh.hh" #include "BKE_mesh_runtime.hh" diff --git a/source/blender/makesdna/DNA_customdata_types.h b/source/blender/makesdna/DNA_customdata_types.h index 18730b48d70..f1c47c5e951 100644 --- a/source/blender/makesdna/DNA_customdata_types.h +++ b/source/blender/makesdna/DNA_customdata_types.h @@ -190,6 +190,10 @@ typedef enum eCustomDataType { CD_NUMTYPES = 53, } eCustomDataType; +#ifdef __cplusplus +using eCustomDataMask = uint64_t; +#endif + /* Bits for eCustomDataMask */ #define CD_MASK_MDEFORMVERT (1 << CD_MDEFORMVERT) #define CD_MASK_MFACE (1 << CD_MFACE) diff --git a/source/blender/makesrna/intern/rna_curves.cc b/source/blender/makesrna/intern/rna_curves.cc index 55c91e07aa2..283ce49120a 100644 --- a/source/blender/makesrna/intern/rna_curves.cc +++ b/source/blender/makesrna/intern/rna_curves.cc @@ -198,13 +198,15 @@ static float rna_CurvePoint_radius_get(PointerRNA *ptr) static void rna_CurvePoint_radius_set(PointerRNA *ptr, float value) { + using namespace blender; Curves *curves = rna_curves(ptr); - float *radii = static_cast(CustomData_get_layer_named_for_write( - &curves->geometry.point_data, CD_PROP_FLOAT, "radius", curves->geometry.point_num)); - if (radii == nullptr) { + bke::MutableAttributeAccessor attributes = curves->geometry.wrap().attributes_for_write(); + bke::AttributeWriter radii = attributes.lookup_or_add_for_write("radius", + bke::AttrDomain::Point); + if (!radii) { return; } - radii[rna_CurvePoint_index_get_const(ptr)] = value; + radii.varray.set(rna_CurvePoint_index_get_const(ptr), value); } static char *rna_CurvePoint_path(const PointerRNA *ptr) diff --git a/source/blender/makesrna/intern/rna_modifier.cc b/source/blender/makesrna/intern/rna_modifier.cc index 719abcf550e..3dbc5db42bc 100644 --- a/source/blender/makesrna/intern/rna_modifier.cc +++ b/source/blender/makesrna/intern/rna_modifier.cc @@ -25,6 +25,7 @@ #include "BKE_animsys.h" #include "BKE_attribute.hh" #include "BKE_curveprofile.h" +#include "BKE_customdata.hh" #include "BKE_data_transfer.h" #include "BKE_dynamicpaint.h" #include "BKE_effect.h" diff --git a/source/blender/makesrna/intern/rna_particle.cc b/source/blender/makesrna/intern/rna_particle.cc index 938cf3fba41..98c17e7a5c1 100644 --- a/source/blender/makesrna/intern/rna_particle.cc +++ b/source/blender/makesrna/intern/rna_particle.cc @@ -141,6 +141,7 @@ static const EnumPropertyItem part_fluid_type_items[] = { # include "BKE_boids.h" # include "BKE_cloth.hh" # include "BKE_context.hh" +# include "BKE_customdata.hh" # include "BKE_deform.h" # include "BKE_effect.h" # include "BKE_material.h" diff --git a/source/blender/modifiers/intern/MOD_array.cc b/source/blender/modifiers/intern/MOD_array.cc index 5bf571b4a26..558287f129e 100644 --- a/source/blender/modifiers/intern/MOD_array.cc +++ b/source/blender/modifiers/intern/MOD_array.cc @@ -29,6 +29,7 @@ #include "BKE_attribute.hh" #include "BKE_context.hh" #include "BKE_curve.hh" +#include "BKE_customdata.hh" #include "BKE_displist.h" #include "BKE_lib_id.h" #include "BKE_lib_query.h" diff --git a/source/blender/modifiers/intern/MOD_build.cc b/source/blender/modifiers/intern/MOD_build.cc index fe98965b0bf..67dd6a89817 100644 --- a/source/blender/modifiers/intern/MOD_build.cc +++ b/source/blender/modifiers/intern/MOD_build.cc @@ -25,6 +25,7 @@ #include "DEG_depsgraph_query.hh" #include "BKE_context.hh" +#include "BKE_customdata.hh" #include "BKE_mesh.hh" #include "BKE_modifier.hh" #include "BKE_particle.h" diff --git a/source/blender/modifiers/intern/MOD_cloth.cc b/source/blender/modifiers/intern/MOD_cloth.cc index c3ba4bfaee3..c987805f305 100644 --- a/source/blender/modifiers/intern/MOD_cloth.cc +++ b/source/blender/modifiers/intern/MOD_cloth.cc @@ -27,6 +27,7 @@ #include "BKE_cloth.hh" #include "BKE_context.hh" +#include "BKE_customdata.hh" #include "BKE_effect.h" #include "BKE_global.h" #include "BKE_key.h" diff --git a/source/blender/modifiers/intern/MOD_explode.cc b/source/blender/modifiers/intern/MOD_explode.cc index a0f23db25f3..1ae1f8abb63 100644 --- a/source/blender/modifiers/intern/MOD_explode.cc +++ b/source/blender/modifiers/intern/MOD_explode.cc @@ -27,6 +27,7 @@ #include "DNA_screen_types.h" #include "BKE_context.hh" +#include "BKE_customdata.hh" #include "BKE_deform.h" #include "BKE_lattice.hh" #include "BKE_lib_id.h" diff --git a/source/blender/modifiers/intern/MOD_multires.cc b/source/blender/modifiers/intern/MOD_multires.cc index b98a37b3421..d440aab75bf 100644 --- a/source/blender/modifiers/intern/MOD_multires.cc +++ b/source/blender/modifiers/intern/MOD_multires.cc @@ -22,6 +22,7 @@ #include "BKE_cdderivedmesh.h" #include "BKE_context.hh" +#include "BKE_customdata.hh" #include "BKE_mesh.hh" #include "BKE_modifier.hh" #include "BKE_multires.hh" diff --git a/source/blender/modifiers/intern/MOD_normal_edit.cc b/source/blender/modifiers/intern/MOD_normal_edit.cc index b867d041cfe..abaac1c2e1c 100644 --- a/source/blender/modifiers/intern/MOD_normal_edit.cc +++ b/source/blender/modifiers/intern/MOD_normal_edit.cc @@ -26,6 +26,7 @@ #include "BKE_attribute.hh" #include "BKE_context.hh" +#include "BKE_customdata.hh" #include "BKE_deform.h" #include "BKE_lib_id.h" #include "BKE_lib_query.h" diff --git a/source/blender/modifiers/intern/MOD_ocean.cc b/source/blender/modifiers/intern/MOD_ocean.cc index a99be39725d..f6c02159ef8 100644 --- a/source/blender/modifiers/intern/MOD_ocean.cc +++ b/source/blender/modifiers/intern/MOD_ocean.cc @@ -22,6 +22,7 @@ #include "DNA_screen_types.h" #include "BKE_context.hh" +#include "BKE_customdata.hh" #include "BKE_lib_id.h" #include "BKE_mesh.hh" #include "BKE_modifier.hh" diff --git a/source/blender/modifiers/intern/MOD_particleinstance.cc b/source/blender/modifiers/intern/MOD_particleinstance.cc index 96d868db7e3..fcc6ddbd912 100644 --- a/source/blender/modifiers/intern/MOD_particleinstance.cc +++ b/source/blender/modifiers/intern/MOD_particleinstance.cc @@ -26,6 +26,7 @@ #include "DNA_screen_types.h" #include "BKE_context.hh" +#include "BKE_customdata.hh" #include "BKE_effect.h" #include "BKE_lattice.hh" #include "BKE_lib_query.h" diff --git a/source/blender/modifiers/intern/MOD_screw.cc b/source/blender/modifiers/intern/MOD_screw.cc index dffa213bd09..fd268f9c4d1 100644 --- a/source/blender/modifiers/intern/MOD_screw.cc +++ b/source/blender/modifiers/intern/MOD_screw.cc @@ -28,6 +28,7 @@ #include "BKE_attribute.hh" #include "BKE_context.hh" +#include "BKE_customdata.hh" #include "BKE_lib_id.h" #include "BKE_lib_query.h" #include "BKE_mesh.hh" diff --git a/source/blender/modifiers/intern/MOD_solidify_extrude.cc b/source/blender/modifiers/intern/MOD_solidify_extrude.cc index 204c7daad74..579448d57c2 100644 --- a/source/blender/modifiers/intern/MOD_solidify_extrude.cc +++ b/source/blender/modifiers/intern/MOD_solidify_extrude.cc @@ -20,6 +20,7 @@ #include "MEM_guardedalloc.h" #include "BKE_attribute.hh" +#include "BKE_customdata.hh" #include "BKE_deform.h" #include "BKE_mesh.hh" #include "BKE_particle.h" diff --git a/source/blender/modifiers/intern/MOD_solidify_nonmanifold.cc b/source/blender/modifiers/intern/MOD_solidify_nonmanifold.cc index 5310df95c62..1ced78688ed 100644 --- a/source/blender/modifiers/intern/MOD_solidify_nonmanifold.cc +++ b/source/blender/modifiers/intern/MOD_solidify_nonmanifold.cc @@ -17,6 +17,7 @@ #include "MEM_guardedalloc.h" #include "BKE_attribute.hh" +#include "BKE_customdata.hh" #include "BKE_deform.h" #include "BKE_mesh.hh" #include "BKE_particle.h" diff --git a/source/blender/modifiers/intern/MOD_uvproject.cc b/source/blender/modifiers/intern/MOD_uvproject.cc index 6962a9cfe45..26ade9cdbcb 100644 --- a/source/blender/modifiers/intern/MOD_uvproject.cc +++ b/source/blender/modifiers/intern/MOD_uvproject.cc @@ -26,6 +26,7 @@ #include "BKE_attribute.hh" #include "BKE_camera.h" #include "BKE_context.hh" +#include "BKE_customdata.hh" #include "BKE_lib_query.h" #include "BKE_material.h" #include "BKE_mesh.hh" diff --git a/source/blender/modifiers/intern/MOD_uvwarp.cc b/source/blender/modifiers/intern/MOD_uvwarp.cc index 3aae45a0761..d5cd4fb13b0 100644 --- a/source/blender/modifiers/intern/MOD_uvwarp.cc +++ b/source/blender/modifiers/intern/MOD_uvwarp.cc @@ -24,6 +24,7 @@ #include "BKE_action.h" /* BKE_pose_channel_find_name */ #include "BKE_context.hh" +#include "BKE_customdata.hh" #include "BKE_deform.h" #include "BKE_lib_query.h" #include "BKE_mesh.hh" diff --git a/source/blender/modifiers/intern/MOD_weightvgedit.cc b/source/blender/modifiers/intern/MOD_weightvgedit.cc index c11662d0c41..18b9b9dbf01 100644 --- a/source/blender/modifiers/intern/MOD_weightvgedit.cc +++ b/source/blender/modifiers/intern/MOD_weightvgedit.cc @@ -26,6 +26,7 @@ #include "BKE_colortools.hh" /* CurveMapping. */ #include "BKE_context.hh" +#include "BKE_customdata.hh" #include "BKE_deform.h" #include "BKE_lib_query.h" #include "BKE_mesh.hh" diff --git a/source/blender/modifiers/intern/MOD_weld.cc b/source/blender/modifiers/intern/MOD_weld.cc index de409e2eb4a..611be022488 100644 --- a/source/blender/modifiers/intern/MOD_weld.cc +++ b/source/blender/modifiers/intern/MOD_weld.cc @@ -30,6 +30,7 @@ #include "DNA_screen_types.h" #include "BKE_context.hh" +#include "BKE_customdata.hh" #include "BKE_deform.h" #include "BKE_modifier.hh" #include "BKE_screen.hh" diff --git a/source/blender/nodes/geometry/nodes/node_geo_curve_to_points.cc b/source/blender/nodes/geometry/nodes/node_geo_curve_to_points.cc index daf96c73702..f0407d305ef 100644 --- a/source/blender/nodes/geometry/nodes/node_geo_curve_to_points.cc +++ b/source/blender/nodes/geometry/nodes/node_geo_curve_to_points.cc @@ -9,6 +9,7 @@ #include "DNA_pointcloud_types.h" +#include "BKE_customdata.hh" #include "BKE_grease_pencil.hh" #include "BKE_instances.hh" #include "BKE_pointcloud.h" diff --git a/source/blender/nodes/geometry/nodes/node_geo_extrude_mesh.cc b/source/blender/nodes/geometry/nodes/node_geo_extrude_mesh.cc index 4ffce89bbb1..31e0fa02651 100644 --- a/source/blender/nodes/geometry/nodes/node_geo_extrude_mesh.cc +++ b/source/blender/nodes/geometry/nodes/node_geo_extrude_mesh.cc @@ -10,6 +10,7 @@ #include "DNA_mesh_types.h" #include "BKE_attribute_math.hh" +#include "BKE_customdata.hh" #include "BKE_mesh.hh" #include "BKE_mesh_mapping.hh" #include "BKE_mesh_runtime.hh" diff --git a/source/blender/nodes/geometry/nodes/node_geo_mesh_to_points.cc b/source/blender/nodes/geometry/nodes/node_geo_mesh_to_points.cc index 80070e298d8..78322105510 100644 --- a/source/blender/nodes/geometry/nodes/node_geo_mesh_to_points.cc +++ b/source/blender/nodes/geometry/nodes/node_geo_mesh_to_points.cc @@ -9,6 +9,7 @@ #include "DNA_pointcloud_types.h" #include "BKE_attribute_math.hh" +#include "BKE_customdata.hh" #include "BKE_mesh.hh" #include "BKE_pointcloud.h" diff --git a/source/blender/nodes/geometry/nodes/node_geo_points_to_vertices.cc b/source/blender/nodes/geometry/nodes/node_geo_points_to_vertices.cc index 3a215ec7519..c59db61737d 100644 --- a/source/blender/nodes/geometry/nodes/node_geo_points_to_vertices.cc +++ b/source/blender/nodes/geometry/nodes/node_geo_points_to_vertices.cc @@ -7,6 +7,7 @@ #include "DNA_pointcloud_types.h" #include "BKE_attribute_math.hh" +#include "BKE_customdata.hh" #include "BKE_mesh.hh" #include "node_geometry_util.hh" diff --git a/source/blender/render/intern/multires_bake.cc b/source/blender/render/intern/multires_bake.cc index 6a155128e4a..416a074af99 100644 --- a/source/blender/render/intern/multires_bake.cc +++ b/source/blender/render/intern/multires_bake.cc @@ -21,6 +21,7 @@ #include "BKE_DerivedMesh.hh" #include "BKE_ccg.h" +#include "BKE_customdata.hh" #include "BKE_global.h" #include "BKE_image.h" #include "BKE_lib_id.h"