From 5ad9f9dc90efb7c96265a47243d4d2b535b7fe7b Mon Sep 17 00:00:00 2001 From: Jesse Yurkovich Date: Sun, 10 Mar 2024 04:28:00 +0100 Subject: [PATCH] Cleanup: unused includes in source/blender/io Reduce dependence on Blender headers as much as possible and move closer to an include-what-you-use setup. - Removes unnecessary includes - Replaces some includes with more appropriate, narrower, substitutes Pull Request: https://projects.blender.org/blender/blender/pulls/119234 --- .../blender/io/alembic/exporter/abc_archive.cc | 14 +++++++++----- .../io/alembic/exporter/abc_custom_props.cc | 4 ---- .../io/alembic/exporter/abc_custom_props.h | 2 +- .../io/alembic/exporter/abc_export_capi.cc | 3 --- .../alembic/exporter/abc_hierarchy_iterator.cc | 3 --- .../io/alembic/exporter/abc_hierarchy_iterator.h | 1 - .../io/alembic/exporter/abc_writer_abstract.cc | 6 ------ .../io/alembic/exporter/abc_writer_abstract.h | 4 +--- .../io/alembic/exporter/abc_writer_camera.cc | 3 +-- .../io/alembic/exporter/abc_writer_hair.cc | 5 ----- .../io/alembic/exporter/abc_writer_mball.cc | 6 ++---- .../io/alembic/exporter/abc_writer_mesh.cc | 11 ++--------- .../io/alembic/exporter/abc_writer_nurbs.h | 3 +++ .../io/alembic/exporter/abc_writer_points.cc | 1 - .../io/alembic/exporter/abc_writer_transform.cc | 2 -- .../io/alembic/exporter/abc_writer_transform.h | 2 -- .../io/alembic/intern/abc_axis_conversion.cc | 1 - .../blender/io/alembic/intern/abc_customdata.cc | 14 ++++++++++---- .../blender/io/alembic/intern/abc_customdata.h | 14 ++++++++++---- .../io/alembic/intern/abc_reader_archive.cc | 2 ++ .../io/alembic/intern/abc_reader_archive.h | 5 +++-- .../io/alembic/intern/abc_reader_camera.cc | 1 - .../io/alembic/intern/abc_reader_camera.h | 2 ++ .../io/alembic/intern/abc_reader_curves.cc | 1 - .../io/alembic/intern/abc_reader_curves.h | 3 ++- .../blender/io/alembic/intern/abc_reader_mesh.cc | 15 +++++---------- .../blender/io/alembic/intern/abc_reader_mesh.h | 4 +++- .../io/alembic/intern/abc_reader_nurbs.cc | 2 -- .../blender/io/alembic/intern/abc_reader_nurbs.h | 2 ++ .../io/alembic/intern/abc_reader_object.cc | 4 +--- .../io/alembic/intern/abc_reader_object.h | 10 +++++++--- .../io/alembic/intern/abc_reader_points.cc | 6 ------ .../io/alembic/intern/abc_reader_points.h | 3 ++- .../io/alembic/intern/abc_reader_transform.cc | 2 -- .../io/alembic/intern/abc_reader_transform.h | 7 ++++++- source/blender/io/alembic/intern/abc_util.cc | 8 ++++---- source/blender/io/alembic/intern/abc_util.h | 15 +++++++++++++-- source/blender/io/alembic/intern/alembic_capi.cc | 8 +------- .../io/common/intern/object_identifier.cc | 6 ------ source/blender/io/ply/IO_ply.hh | 6 +++--- source/blender/io/ply/exporter/ply_export.cc | 7 +------ .../io/ply/exporter/ply_export_load_plydata.cc | 10 ++++++---- .../blender/io/ply/exporter/ply_file_buffer.cc | 3 +++ .../blender/io/ply/exporter/ply_file_buffer.hh | 2 -- source/blender/io/ply/importer/ply_import.cc | 3 +-- source/blender/io/ply/importer/ply_import.hh | 5 +++++ .../blender/io/ply/importer/ply_import_buffer.cc | 1 + .../blender/io/ply/importer/ply_import_buffer.hh | 3 +-- .../blender/io/ply/importer/ply_import_data.cc | 1 - .../blender/io/ply/importer/ply_import_mesh.cc | 4 ++-- .../blender/io/ply/importer/ply_import_mesh.hh | 2 ++ source/blender/io/ply/intern/ply_data.hh | 3 +++ .../blender/io/ply/tests/io_ply_exporter_test.cc | 1 + source/blender/io/stl/IO_stl.hh | 4 +++- source/blender/io/stl/exporter/stl_export.cc | 3 +-- source/blender/io/stl/exporter/stl_export.hh | 3 +++ source/blender/io/stl/importer/stl_import.cc | 1 - source/blender/io/stl/importer/stl_import.hh | 5 +++++ .../io/stl/importer/stl_import_ascii_reader.cc | 6 +----- .../io/stl/importer/stl_import_ascii_reader.hh | 6 +----- .../io/stl/importer/stl_import_binary_reader.cc | 2 -- .../io/stl/importer/stl_import_binary_reader.hh | 16 ++++++++-------- .../blender/io/stl/importer/stl_import_mesh.cc | 8 +------- .../blender/io/stl/importer/stl_import_mesh.hh | 1 - .../blender/io/wavefront_obj/IO_wavefront_obj.hh | 5 +++-- .../importer/importer_mesh_utils.cc | 3 ++- .../importer/obj_import_file_reader.cc | 3 ++- .../importer/obj_import_file_reader.hh | 8 ++++++-- .../io/wavefront_obj/importer/obj_import_mesh.cc | 4 ++-- .../io/wavefront_obj/importer/obj_import_mesh.hh | 4 ++-- .../io/wavefront_obj/importer/obj_import_mtl.cc | 2 -- .../io/wavefront_obj/importer/obj_import_mtl.hh | 3 +-- .../wavefront_obj/importer/obj_import_objects.hh | 2 -- .../io/wavefront_obj/importer/obj_importer.cc | 2 -- .../wavefront_obj/tests/obj_mtl_parser_tests.cc | 2 ++ 75 files changed, 164 insertions(+), 185 deletions(-) diff --git a/source/blender/io/alembic/exporter/abc_archive.cc b/source/blender/io/alembic/exporter/abc_archive.cc index 4cdb58fd1a9..72704eda818 100644 --- a/source/blender/io/alembic/exporter/abc_archive.cc +++ b/source/blender/io/alembic/exporter/abc_archive.cc @@ -6,14 +6,18 @@ #include "BKE_blender_version.h" #include "BKE_main.hh" -#include "BKE_scene.hh" - -#include "DEG_depsgraph_query.hh" #include "DNA_scene_types.h" -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #ifdef WIN32 # include "BLI_path_util.h" diff --git a/source/blender/io/alembic/exporter/abc_custom_props.cc b/source/blender/io/alembic/exporter/abc_custom_props.cc index 4654df9b0d7..c3b804465c5 100644 --- a/source/blender/io/alembic/exporter/abc_custom_props.cc +++ b/source/blender/io/alembic/exporter/abc_custom_props.cc @@ -10,13 +10,9 @@ #include "abc_writer_abstract.h" -#include -#include -#include #include #include -#include #include "BLI_listbase.h" diff --git a/source/blender/io/alembic/exporter/abc_custom_props.h b/source/blender/io/alembic/exporter/abc_custom_props.h index 6b882943634..5e11b85bf89 100644 --- a/source/blender/io/alembic/exporter/abc_custom_props.h +++ b/source/blender/io/alembic/exporter/abc_custom_props.h @@ -13,7 +13,7 @@ #include "BLI_map.hh" -#include +#include struct IDProperty; diff --git a/source/blender/io/alembic/exporter/abc_export_capi.cc b/source/blender/io/alembic/exporter/abc_export_capi.cc index 5390415c6ad..1489fcca294 100644 --- a/source/blender/io/alembic/exporter/abc_export_capi.cc +++ b/source/blender/io/alembic/exporter/abc_export_capi.cc @@ -13,10 +13,8 @@ #include "DEG_depsgraph_build.hh" #include "DEG_depsgraph_query.hh" -#include "DNA_modifier_types.h" #include "DNA_scene_types.h" -#include "BKE_blender_version.h" #include "BKE_context.hh" #include "BKE_global.hh" #include "BKE_main.hh" @@ -33,7 +31,6 @@ #include "CLG_log.h" static CLG_LogRef LOG = {"io.alembic"}; -#include #include struct ExportJobData { diff --git a/source/blender/io/alembic/exporter/abc_hierarchy_iterator.cc b/source/blender/io/alembic/exporter/abc_hierarchy_iterator.cc index bcdc66a8239..a86dc473bfd 100644 --- a/source/blender/io/alembic/exporter/abc_hierarchy_iterator.cc +++ b/source/blender/io/alembic/exporter/abc_hierarchy_iterator.cc @@ -19,9 +19,6 @@ #include "BLI_assert.h" -#include "DEG_depsgraph_query.hh" - -#include "DNA_ID.h" #include "DNA_layer_types.h" #include "DNA_object_types.h" diff --git a/source/blender/io/alembic/exporter/abc_hierarchy_iterator.h b/source/blender/io/alembic/exporter/abc_hierarchy_iterator.h index 209d7ffe1c1..46fa8875e4c 100644 --- a/source/blender/io/alembic/exporter/abc_hierarchy_iterator.h +++ b/source/blender/io/alembic/exporter/abc_hierarchy_iterator.h @@ -10,7 +10,6 @@ #include -#include #include struct Depsgraph; diff --git a/source/blender/io/alembic/exporter/abc_writer_abstract.cc b/source/blender/io/alembic/exporter/abc_writer_abstract.cc index a4d000bf385..1bc0d9940e0 100644 --- a/source/blender/io/alembic/exporter/abc_writer_abstract.cc +++ b/source/blender/io/alembic/exporter/abc_writer_abstract.cc @@ -4,14 +4,8 @@ #include "abc_writer_abstract.h" #include "abc_hierarchy_iterator.h" -#include "BKE_animsys.h" -#include "BKE_key.hh" #include "BKE_object.hh" -#include "DNA_modifier_types.h" - -#include "DEG_depsgraph.hh" - #include #include "CLG_log.h" diff --git a/source/blender/io/alembic/exporter/abc_writer_abstract.h b/source/blender/io/alembic/exporter/abc_writer_abstract.h index 30487257654..202f5c63ef9 100644 --- a/source/blender/io/alembic/exporter/abc_writer_abstract.h +++ b/source/blender/io/alembic/exporter/abc_writer_abstract.h @@ -8,10 +8,8 @@ #include "abc_hierarchy_iterator.h" #include -#include -#include "DEG_depsgraph_query.hh" -#include "DNA_material_types.h" +#include struct IDProperty; struct Object; diff --git a/source/blender/io/alembic/exporter/abc_writer_camera.cc b/source/blender/io/alembic/exporter/abc_writer_camera.cc index 441c1cde65b..097f65b1148 100644 --- a/source/blender/io/alembic/exporter/abc_writer_camera.cc +++ b/source/blender/io/alembic/exporter/abc_writer_camera.cc @@ -9,10 +9,9 @@ #include "abc_writer_camera.h" #include "abc_hierarchy_iterator.h" -#include "BKE_camera.h" #include "BKE_scene.hh" -#include "BLI_assert.h" +#include "DEG_depsgraph_query.hh" #include "DNA_camera_types.h" #include "DNA_scene_types.h" diff --git a/source/blender/io/alembic/exporter/abc_writer_hair.cc b/source/blender/io/alembic/exporter/abc_writer_hair.cc index 12219898277..79ed02b9d49 100644 --- a/source/blender/io/alembic/exporter/abc_writer_hair.cc +++ b/source/blender/io/alembic/exporter/abc_writer_hair.cc @@ -9,19 +9,14 @@ #include "abc_writer_hair.h" #include "intern/abc_axis_conversion.h" -#include - #include "DNA_mesh_types.h" #include "DNA_meshdata_types.h" -#include "DNA_modifier_types.h" #include "DNA_object_types.h" -#include "BLI_math_geom.h" #include "BLI_math_matrix.h" #include "BLI_math_vector.h" #include "BKE_customdata.hh" -#include "BKE_mesh.hh" #include "BKE_mesh_legacy_convert.hh" #include "BKE_mesh_runtime.hh" #include "BKE_object.hh" diff --git a/source/blender/io/alembic/exporter/abc_writer_mball.cc b/source/blender/io/alembic/exporter/abc_writer_mball.cc index 9fdda2dd066..611d018f55a 100644 --- a/source/blender/io/alembic/exporter/abc_writer_mball.cc +++ b/source/blender/io/alembic/exporter/abc_writer_mball.cc @@ -9,16 +9,14 @@ #include "abc_writer_mball.h" #include "abc_hierarchy_iterator.h" -#include "BLI_assert.h" - -#include "BKE_displist.h" #include "BKE_lib_id.hh" #include "BKE_mball.hh" #include "BKE_mesh.hh" #include "BKE_object.hh" +#include "DEG_depsgraph_query.hh" + #include "DNA_mesh_types.h" -#include "DNA_meta_types.h" namespace blender::io::alembic { diff --git a/source/blender/io/alembic/exporter/abc_writer_mesh.cc b/source/blender/io/alembic/exporter/abc_writer_mesh.cc index 0eb3cdcfe46..281079a45b7 100644 --- a/source/blender/io/alembic/exporter/abc_writer_mesh.cc +++ b/source/blender/io/alembic/exporter/abc_writer_mesh.cc @@ -10,28 +10,21 @@ #include "abc_hierarchy_iterator.h" #include "intern/abc_axis_conversion.h" -#include "BLI_array_utils.hh" -#include "BLI_assert.h" #include "BLI_math_vector.h" #include "BKE_attribute.hh" -#include "BKE_customdata.hh" #include "BKE_lib_id.hh" #include "BKE_material.h" #include "BKE_mesh.hh" -#include "BKE_modifier.hh" #include "BKE_object.hh" #include "bmesh.hh" #include "bmesh_tools.hh" -#include "DEG_depsgraph.hh" - -#include "DNA_layer_types.h" +#include "DNA_customdata_types.h" +#include "DNA_material_types.h" #include "DNA_mesh_types.h" #include "DNA_modifier_types.h" -#include "DNA_object_fluidsim_types.h" -#include "DNA_particle_types.h" #include "CLG_log.h" static CLG_LogRef LOG = {"io.alembic"}; diff --git a/source/blender/io/alembic/exporter/abc_writer_nurbs.h b/source/blender/io/alembic/exporter/abc_writer_nurbs.h index e7c697b1912..b16bf2f8156 100644 --- a/source/blender/io/alembic/exporter/abc_writer_nurbs.h +++ b/source/blender/io/alembic/exporter/abc_writer_nurbs.h @@ -9,6 +9,9 @@ #include "abc_writer_abstract.h" #include "abc_writer_mesh.h" + +#include + #include namespace blender::io::alembic { diff --git a/source/blender/io/alembic/exporter/abc_writer_points.cc b/source/blender/io/alembic/exporter/abc_writer_points.cc index fca1bd78274..8e8224ec5ea 100644 --- a/source/blender/io/alembic/exporter/abc_writer_points.cc +++ b/source/blender/io/alembic/exporter/abc_writer_points.cc @@ -14,7 +14,6 @@ #include "BLI_math_matrix.h" #include "BLI_math_vector.h" -#include "BKE_lattice.hh" #include "BKE_particle.h" #include "DEG_depsgraph_query.hh" diff --git a/source/blender/io/alembic/exporter/abc_writer_transform.cc b/source/blender/io/alembic/exporter/abc_writer_transform.cc index 835ec8d6655..674024cbaee 100644 --- a/source/blender/io/alembic/exporter/abc_writer_transform.cc +++ b/source/blender/io/alembic/exporter/abc_writer_transform.cc @@ -16,8 +16,6 @@ #include "BLI_math_matrix.h" #include "BLI_math_rotation.h" -#include "DNA_layer_types.h" - #include "CLG_log.h" static CLG_LogRef LOG = {"io.alembic"}; diff --git a/source/blender/io/alembic/exporter/abc_writer_transform.h b/source/blender/io/alembic/exporter/abc_writer_transform.h index 61f1becfc91..8d03299fc78 100644 --- a/source/blender/io/alembic/exporter/abc_writer_transform.h +++ b/source/blender/io/alembic/exporter/abc_writer_transform.h @@ -9,8 +9,6 @@ #include "abc_writer_abstract.h" -#include - #include namespace blender::io::alembic { diff --git a/source/blender/io/alembic/intern/abc_axis_conversion.cc b/source/blender/io/alembic/intern/abc_axis_conversion.cc index 3970f14f27b..41e61a2c32b 100644 --- a/source/blender/io/alembic/intern/abc_axis_conversion.cc +++ b/source/blender/io/alembic/intern/abc_axis_conversion.cc @@ -9,7 +9,6 @@ #include "abc_axis_conversion.h" #include "BLI_assert.h" -#include "BLI_math_geom.h" #include "BLI_math_matrix.h" #include "BLI_math_rotation.h" #include "BLI_math_vector.h" diff --git a/source/blender/io/alembic/intern/abc_customdata.cc b/source/blender/io/alembic/intern/abc_customdata.cc index 9cea1fd54cf..d7acd2bdb88 100644 --- a/source/blender/io/alembic/intern/abc_customdata.cc +++ b/source/blender/io/alembic/intern/abc_customdata.cc @@ -9,16 +9,22 @@ #include "abc_customdata.h" #include "abc_axis_conversion.h" -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include #include "DNA_customdata_types.h" #include "DNA_mesh_types.h" #include "DNA_meshdata_types.h" #include "BLI_math_base.h" -#include "BLI_math_geom.h" +#include "BLI_math_vector.h" +#include "BLI_math_vector_types.hh" #include "BLI_utildefines.h" #include "BKE_attribute.hh" diff --git a/source/blender/io/alembic/intern/abc_customdata.h b/source/blender/io/alembic/intern/abc_customdata.h index 8a158032464..65b78c7f8cf 100644 --- a/source/blender/io/alembic/intern/abc_customdata.h +++ b/source/blender/io/alembic/intern/abc_customdata.h @@ -9,12 +9,18 @@ #include "BLI_math_vector_types.hh" -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include #include - -#include "BLI_math_vector_types.hh" +#include +#include struct CustomData; struct Mesh; diff --git a/source/blender/io/alembic/intern/abc_reader_archive.cc b/source/blender/io/alembic/intern/abc_reader_archive.cc index fd3c7db1fca..780c3721300 100644 --- a/source/blender/io/alembic/intern/abc_reader_archive.cc +++ b/source/blender/io/alembic/intern/abc_reader_archive.cc @@ -9,6 +9,7 @@ #include "abc_reader_archive.h" #include "Alembic/AbcCoreLayer/Read.h" +#include "Alembic/AbcCoreOgawa/ReadWrite.h" #include "BKE_main.hh" @@ -20,6 +21,7 @@ #endif #include +#include using Alembic::Abc::ErrorHandler; using Alembic::Abc::Exception; diff --git a/source/blender/io/alembic/intern/abc_reader_archive.h b/source/blender/io/alembic/intern/abc_reader_archive.h index 1fa8ca52a83..077654f2fca 100644 --- a/source/blender/io/alembic/intern/abc_reader_archive.h +++ b/source/blender/io/alembic/intern/abc_reader_archive.h @@ -7,10 +7,11 @@ * \ingroup balembic */ -#include -#include +#include +#include #include +#include struct Main; diff --git a/source/blender/io/alembic/intern/abc_reader_camera.cc b/source/blender/io/alembic/intern/abc_reader_camera.cc index 6fa16170ceb..2205bea7760 100644 --- a/source/blender/io/alembic/intern/abc_reader_camera.cc +++ b/source/blender/io/alembic/intern/abc_reader_camera.cc @@ -7,7 +7,6 @@ */ #include "abc_reader_camera.h" -#include "abc_reader_transform.h" #include "abc_util.h" #include "DNA_camera_types.h" diff --git a/source/blender/io/alembic/intern/abc_reader_camera.h b/source/blender/io/alembic/intern/abc_reader_camera.h index e91cae2afc6..2ad4e256aa7 100644 --- a/source/blender/io/alembic/intern/abc_reader_camera.h +++ b/source/blender/io/alembic/intern/abc_reader_camera.h @@ -9,6 +9,8 @@ #include "abc_reader_object.h" +#include + namespace blender::io::alembic { class AbcCameraReader final : public AbcObjectReader { diff --git a/source/blender/io/alembic/intern/abc_reader_curves.cc b/source/blender/io/alembic/intern/abc_reader_curves.cc index 7ecc8fcb99b..ae31f0f3ec4 100644 --- a/source/blender/io/alembic/intern/abc_reader_curves.cc +++ b/source/blender/io/alembic/intern/abc_reader_curves.cc @@ -16,7 +16,6 @@ #include "DNA_object_types.h" #include "BKE_attribute.hh" -#include "BKE_curve.hh" #include "BKE_curves.hh" #include "BKE_geometry_set.hh" #include "BKE_object.hh" diff --git a/source/blender/io/alembic/intern/abc_reader_curves.h b/source/blender/io/alembic/intern/abc_reader_curves.h index 9427fb548f9..cde6478e28e 100644 --- a/source/blender/io/alembic/intern/abc_reader_curves.h +++ b/source/blender/io/alembic/intern/abc_reader_curves.h @@ -7,9 +7,10 @@ * \ingroup balembic */ -#include "abc_reader_mesh.h" #include "abc_reader_object.h" +#include + struct Curves; #define ABC_CURVE_RESOLUTION_U_PROPNAME "blender:resolution" diff --git a/source/blender/io/alembic/intern/abc_reader_mesh.cc b/source/blender/io/alembic/intern/abc_reader_mesh.cc index 6515b85a197..5c617f38061 100644 --- a/source/blender/io/alembic/intern/abc_reader_mesh.cc +++ b/source/blender/io/alembic/intern/abc_reader_mesh.cc @@ -8,38 +8,33 @@ #include "abc_reader_mesh.h" #include "abc_axis_conversion.h" -#include "abc_reader_transform.h" +#include "abc_customdata.h" #include "abc_util.h" -#include - -#include "MEM_guardedalloc.h" - #include "DNA_customdata_types.h" #include "DNA_material_types.h" +#include "DNA_modifier_types.h" + #include "DNA_object_types.h" #include "BLI_compiler_compat.h" -#include "BLI_index_range.hh" #include "BLI_listbase.h" -#include "BLI_math_geom.h" +#include "BLI_map.hh" +#include "BLI_math_vector.h" #include "BLI_ordered_edge.hh" #include "BLT_translation.hh" -#include "BKE_attribute.hh" #include "BKE_customdata.hh" #include "BKE_geometry_set.hh" #include "BKE_lib_id.hh" #include "BKE_main.hh" #include "BKE_material.h" #include "BKE_mesh.hh" -#include "BKE_modifier.hh" #include "BKE_object.hh" using Alembic::Abc::FloatArraySamplePtr; using Alembic::Abc::Int32ArraySamplePtr; -using Alembic::Abc::IV3fArrayProperty; using Alembic::Abc::P3fArraySamplePtr; using Alembic::Abc::PropertyHeader; using Alembic::Abc::V3fArraySamplePtr; diff --git a/source/blender/io/alembic/intern/abc_reader_mesh.h b/source/blender/io/alembic/intern/abc_reader_mesh.h index 7e49e1d5616..14deb9022b6 100644 --- a/source/blender/io/alembic/intern/abc_reader_mesh.h +++ b/source/blender/io/alembic/intern/abc_reader_mesh.h @@ -9,9 +9,11 @@ #include "BLI_span.hh" -#include "abc_customdata.h" #include "abc_reader_object.h" +#include +#include + struct Mesh; namespace blender::io::alembic { diff --git a/source/blender/io/alembic/intern/abc_reader_nurbs.cc b/source/blender/io/alembic/intern/abc_reader_nurbs.cc index 5b703d11731..612bfcbf2cb 100644 --- a/source/blender/io/alembic/intern/abc_reader_nurbs.cc +++ b/source/blender/io/alembic/intern/abc_reader_nurbs.cc @@ -8,7 +8,6 @@ #include "abc_reader_nurbs.h" #include "abc_axis_conversion.h" -#include "abc_reader_transform.h" #include "abc_util.h" #include "MEM_guardedalloc.h" @@ -17,7 +16,6 @@ #include "DNA_object_types.h" #include "BLI_listbase.h" -#include "BLI_string.h" #include "BLT_translation.hh" diff --git a/source/blender/io/alembic/intern/abc_reader_nurbs.h b/source/blender/io/alembic/intern/abc_reader_nurbs.h index bda5ade7cd7..a82f9084f2d 100644 --- a/source/blender/io/alembic/intern/abc_reader_nurbs.h +++ b/source/blender/io/alembic/intern/abc_reader_nurbs.h @@ -9,6 +9,8 @@ #include "abc_reader_object.h" +#include + namespace blender::io::alembic { class AbcNurbsReader final : public AbcObjectReader { diff --git a/source/blender/io/alembic/intern/abc_reader_object.cc b/source/blender/io/alembic/intern/abc_reader_object.cc index 838dabf574f..929cb6522f0 100644 --- a/source/blender/io/alembic/intern/abc_reader_object.cc +++ b/source/blender/io/alembic/intern/abc_reader_object.cc @@ -13,7 +13,7 @@ #include "DNA_cachefile_types.h" #include "DNA_constraint_types.h" #include "DNA_modifier_types.h" -#include "DNA_space_types.h" /* for FILE_MAX */ +#include "DNA_object_types.h" #include "BKE_constraint.h" #include "BKE_lib_id.hh" @@ -22,12 +22,10 @@ #include "BKE_object_types.hh" #include "BLI_listbase.h" -#include "BLI_math_geom.h" #include "BLI_math_matrix.h" #include "BLI_math_rotation.h" #include "BLI_math_vector.h" #include "BLI_string.h" -#include "BLI_utildefines.h" using Alembic::AbcGeom::IObject; using Alembic::AbcGeom::IXform; diff --git a/source/blender/io/alembic/intern/abc_reader_object.h b/source/blender/io/alembic/intern/abc_reader_object.h index d35b0295b5b..abb1b502645 100644 --- a/source/blender/io/alembic/intern/abc_reader_object.h +++ b/source/blender/io/alembic/intern/abc_reader_object.h @@ -7,10 +7,14 @@ * \ingroup balembic */ -#include -#include +#include +#include +#include +#include +#include -#include "DNA_ID.h" +#include +#include struct CacheFile; struct Main; diff --git a/source/blender/io/alembic/intern/abc_reader_points.cc b/source/blender/io/alembic/intern/abc_reader_points.cc index a45de4048ad..90c3b41a864 100644 --- a/source/blender/io/alembic/intern/abc_reader_points.cc +++ b/source/blender/io/alembic/intern/abc_reader_points.cc @@ -8,20 +8,14 @@ #include "abc_reader_points.h" #include "abc_axis_conversion.h" -#include "abc_reader_mesh.h" -#include "abc_reader_transform.h" #include "abc_util.h" -#include "DNA_mesh_types.h" -#include "DNA_modifier_types.h" #include "DNA_object_types.h" #include "DNA_pointcloud_types.h" #include "BLT_translation.hh" -#include "BKE_customdata.hh" #include "BKE_geometry_set.hh" -#include "BKE_mesh.hh" #include "BKE_object.hh" #include "BKE_pointcloud.hh" diff --git a/source/blender/io/alembic/intern/abc_reader_points.h b/source/blender/io/alembic/intern/abc_reader_points.h index dd918b8ea63..533f365d32a 100644 --- a/source/blender/io/alembic/intern/abc_reader_points.h +++ b/source/blender/io/alembic/intern/abc_reader_points.h @@ -7,9 +7,10 @@ * \ingroup balembic */ -#include "abc_customdata.h" #include "abc_reader_object.h" +#include + namespace blender::io::alembic { class AbcPointsReader final : public AbcObjectReader { diff --git a/source/blender/io/alembic/intern/abc_reader_transform.cc b/source/blender/io/alembic/intern/abc_reader_transform.cc index 514bba955b9..4c66617ce98 100644 --- a/source/blender/io/alembic/intern/abc_reader_transform.cc +++ b/source/blender/io/alembic/intern/abc_reader_transform.cc @@ -11,8 +11,6 @@ #include "DNA_object_types.h" -#include "BLI_utildefines.h" - #include "BLT_translation.hh" #include "BKE_object.hh" diff --git a/source/blender/io/alembic/intern/abc_reader_transform.h b/source/blender/io/alembic/intern/abc_reader_transform.h index 17afc452977..82c963bef62 100644 --- a/source/blender/io/alembic/intern/abc_reader_transform.h +++ b/source/blender/io/alembic/intern/abc_reader_transform.h @@ -9,7 +9,12 @@ #include "abc_reader_object.h" -#include +#include +#include +#include +#include + +struct Object; namespace blender::io::alembic { diff --git a/source/blender/io/alembic/intern/abc_util.cc b/source/blender/io/alembic/intern/abc_util.cc index 32eef8246a5..ddda4213119 100644 --- a/source/blender/io/alembic/intern/abc_util.cc +++ b/source/blender/io/alembic/intern/abc_util.cc @@ -8,21 +8,20 @@ #include "abc_util.h" -#include "abc_axis_conversion.h" #include "abc_reader_camera.h" #include "abc_reader_curves.h" #include "abc_reader_mesh.h" -#include "abc_reader_nurbs.h" #include "abc_reader_points.h" #include "abc_reader_transform.h" +#include +#include #include #include #include "DNA_object_types.h" -#include "BLI_math_geom.h" #include "BLI_time.h" using Alembic::Abc::IV3fArrayProperty; @@ -125,7 +124,8 @@ V3fArraySamplePtr get_velocity_prop(const Alembic::Abc::ICompoundProperty &schem const PropertyHeader &header = schema.getPropertyHeader(i); if (header.isCompound()) { - const ICompoundProperty &prop = ICompoundProperty(schema, header.getName()); + const Alembic::Abc::ICompoundProperty &prop = Alembic::Abc::ICompoundProperty( + schema, header.getName()); if (has_property(prop, name)) { /* Header cannot be null here, as its presence is checked via has_property, so it is safe diff --git a/source/blender/io/alembic/intern/abc_util.h b/source/blender/io/alembic/intern/abc_util.h index 6446e7a3609..67e03e11f58 100644 --- a/source/blender/io/alembic/intern/abc_util.h +++ b/source/blender/io/alembic/intern/abc_util.h @@ -7,10 +7,21 @@ * \ingroup balembic */ -#include -#include +#include "abc_reader_object.h" +#include +#include +#include +#include +#include +#include +#include +#include + +#include #include +#include +#include using Alembic::Abc::chrono_t; using Alembic::Abc::V3fArraySamplePtr; diff --git a/source/blender/io/alembic/intern/alembic_capi.cc b/source/blender/io/alembic/intern/alembic_capi.cc index a539188f71f..512d3822290 100644 --- a/source/blender/io/alembic/intern/alembic_capi.cc +++ b/source/blender/io/alembic/intern/alembic_capi.cc @@ -9,6 +9,7 @@ #include "../ABC_alembic.h" #include "IO_types.hh" +#include #include #include "abc_axis_conversion.h" @@ -25,20 +26,15 @@ #include "DNA_cachefile_types.h" #include "DNA_collection_types.h" -#include "DNA_curve_types.h" -#include "DNA_modifier_types.h" #include "DNA_object_types.h" #include "DNA_scene_types.h" #include "BKE_cachefile.hh" #include "BKE_context.hh" -#include "BKE_curve.hh" #include "BKE_global.hh" #include "BKE_layer.hh" #include "BKE_lib_id.hh" #include "BKE_object.hh" -#include "BKE_scene.hh" -#include "BKE_screen.hh" #include "DEG_depsgraph.hh" #include "DEG_depsgraph_build.hh" @@ -46,8 +42,6 @@ #include "ED_undo.hh" #include "BLI_compiler_compat.h" -#include "BLI_fileops.h" -#include "BLI_ghash.h" #include "BLI_listbase.h" #include "BLI_math_matrix.h" #include "BLI_path_util.h" diff --git a/source/blender/io/common/intern/object_identifier.cc b/source/blender/io/common/intern/object_identifier.cc index cc81518e2ba..cb8275a8bcb 100644 --- a/source/blender/io/common/intern/object_identifier.cc +++ b/source/blender/io/common/intern/object_identifier.cc @@ -5,12 +5,6 @@ #include "BKE_duplilist.hh" -extern "C" { -#include /* For INT_MAX. */ -} -#include -#include - namespace blender::io { ObjectIdentifier::ObjectIdentifier(Object *object, diff --git a/source/blender/io/ply/IO_ply.hh b/source/blender/io/ply/IO_ply.hh index 5ed4225823a..f4c952fa94e 100644 --- a/source/blender/io/ply/IO_ply.hh +++ b/source/blender/io/ply/IO_ply.hh @@ -8,12 +8,12 @@ #pragma once -#include "BKE_context.hh" - #include "BLI_path_util.h" -#include "DNA_windowmanager_types.h" #include "IO_orientation.hh" +struct bContext; +struct ReportList; + enum ePLYVertexColorMode { PLY_VERTEX_COLOR_NONE = 0, PLY_VERTEX_COLOR_SRGB = 1, diff --git a/source/blender/io/ply/exporter/ply_export.cc b/source/blender/io/ply/exporter/ply_export.cc index e103b17ea8b..88461c4a25e 100644 --- a/source/blender/io/ply/exporter/ply_export.cc +++ b/source/blender/io/ply/exporter/ply_export.cc @@ -8,14 +8,9 @@ #include -#include "BKE_layer.hh" +#include "BKE_context.hh" #include "BKE_report.hh" -#include "DNA_collection_types.h" -#include "DNA_scene_types.h" - -#include "BKE_context.hh" -#include "BLI_memory_utils.hh" #include "IO_ply.hh" #include "ply_data.hh" diff --git a/source/blender/io/ply/exporter/ply_export_load_plydata.cc b/source/blender/io/ply/exporter/ply_export_load_plydata.cc index 10578fcd52c..ec4c7c0fa02 100644 --- a/source/blender/io/ply/exporter/ply_export_load_plydata.cc +++ b/source/blender/io/ply/exporter/ply_export_load_plydata.cc @@ -14,19 +14,21 @@ #include "BKE_lib_id.hh" #include "BKE_mesh.hh" #include "BKE_object.hh" +#include "BLI_color.hh" #include "BLI_hash.hh" -#include "BLI_math_color.hh" #include "BLI_math_matrix.h" -#include "BLI_math_quaternion.hh" +#include "BLI_math_quaternion_types.hh" #include "BLI_math_rotation.h" #include "BLI_math_vector.h" #include "BLI_vector.hh" + #include "DEG_depsgraph_query.hh" + +#include "DNA_customdata_types.h" #include "DNA_layer_types.h" #include "bmesh.hh" -#include "bmesh_tools.hh" -#include +#include "tools/bmesh_triangulate.hh" namespace blender::io::ply { diff --git a/source/blender/io/ply/exporter/ply_file_buffer.cc b/source/blender/io/ply/exporter/ply_file_buffer.cc index 3889f8a84cb..6a8500830d9 100644 --- a/source/blender/io/ply/exporter/ply_file_buffer.cc +++ b/source/blender/io/ply/exporter/ply_file_buffer.cc @@ -8,7 +8,10 @@ #include "ply_file_buffer.hh" +#include "BLI_fileops.hh" + #include +#include namespace blender::io::ply { diff --git a/source/blender/io/ply/exporter/ply_file_buffer.hh b/source/blender/io/ply/exporter/ply_file_buffer.hh index b1fc954bade..3f48a5095b8 100644 --- a/source/blender/io/ply/exporter/ply_file_buffer.hh +++ b/source/blender/io/ply/exporter/ply_file_buffer.hh @@ -10,8 +10,6 @@ #include -#include "BLI_compiler_attrs.h" -#include "BLI_fileops.h" #include "BLI_string_ref.hh" #include "BLI_utility_mixins.hh" #include "BLI_vector.hh" diff --git a/source/blender/io/ply/importer/ply_import.cc b/source/blender/io/ply/importer/ply_import.cc index bb739e284c2..fd399aa2251 100644 --- a/source/blender/io/ply/importer/ply_import.cc +++ b/source/blender/io/ply/importer/ply_import.cc @@ -8,7 +8,6 @@ #include "BKE_context.hh" #include "BKE_layer.hh" -#include "BKE_lib_id.hh" #include "BKE_mesh.hh" #include "BKE_object.hh" #include "BKE_report.hh" @@ -20,7 +19,7 @@ #include "BLI_math_matrix.h" #include "BLI_math_rotation.h" #include "BLI_math_vector.h" -#include "BLI_memory_utils.hh" +#include "BLI_span.hh" #include "BLI_string.h" #include "DEG_depsgraph.hh" diff --git a/source/blender/io/ply/importer/ply_import.hh b/source/blender/io/ply/importer/ply_import.hh index c7e01926170..60b32ed93f4 100644 --- a/source/blender/io/ply/importer/ply_import.hh +++ b/source/blender/io/ply/importer/ply_import.hh @@ -11,6 +11,11 @@ #include "IO_ply.hh" #include "ply_data.hh" +struct bContext; +struct Main; +struct Scene; +struct ViewLayer; + namespace blender::io::ply { class PlyReadBuffer; diff --git a/source/blender/io/ply/importer/ply_import_buffer.cc b/source/blender/io/ply/importer/ply_import_buffer.cc index 4e96b7dd04b..45ca35d9094 100644 --- a/source/blender/io/ply/importer/ply_import_buffer.cc +++ b/source/blender/io/ply/importer/ply_import_buffer.cc @@ -6,6 +6,7 @@ #include "BLI_fileops.h" +#include #include #include diff --git a/source/blender/io/ply/importer/ply_import_buffer.hh b/source/blender/io/ply/importer/ply_import_buffer.hh index 760276fcd94..24d4a6feb3b 100644 --- a/source/blender/io/ply/importer/ply_import_buffer.hh +++ b/source/blender/io/ply/importer/ply_import_buffer.hh @@ -8,8 +8,7 @@ #pragma once -#include -#include +#include #include "BLI_array.hh" #include "BLI_span.hh" diff --git a/source/blender/io/ply/importer/ply_import_data.cc b/source/blender/io/ply/importer/ply_import_data.cc index 9b7a0ff54a5..4b364e8e599 100644 --- a/source/blender/io/ply/importer/ply_import_data.cc +++ b/source/blender/io/ply/importer/ply_import_data.cc @@ -15,7 +15,6 @@ #include "fast_float.h" -#include #include static bool is_whitespace(char c) diff --git a/source/blender/io/ply/importer/ply_import_mesh.cc b/source/blender/io/ply/importer/ply_import_mesh.cc index 77f8ab542f7..e63f8a208b6 100644 --- a/source/blender/io/ply/importer/ply_import_mesh.cc +++ b/source/blender/io/ply/importer/ply_import_mesh.cc @@ -7,15 +7,15 @@ */ #include "BKE_attribute.hh" -#include "BKE_customdata.hh" #include "BKE_lib_id.hh" #include "BKE_mesh.hh" #include "BKE_mesh_runtime.hh" #include "GEO_mesh_merge_by_distance.hh" -#include "BLI_math_color.hh" +#include "BLI_color.hh" #include "BLI_math_vector.h" +#include "BLI_span.hh" #include "ply_import_mesh.hh" diff --git a/source/blender/io/ply/importer/ply_import_mesh.hh b/source/blender/io/ply/importer/ply_import_mesh.hh index fc75040f595..c50f0a79214 100644 --- a/source/blender/io/ply/importer/ply_import_mesh.hh +++ b/source/blender/io/ply/importer/ply_import_mesh.hh @@ -11,6 +11,8 @@ #include "IO_ply.hh" #include "ply_data.hh" +struct Mesh; + namespace blender::io::ply { /** diff --git a/source/blender/io/ply/intern/ply_data.hh b/source/blender/io/ply/intern/ply_data.hh index 7555f9bc0d6..83fe9f47479 100644 --- a/source/blender/io/ply/intern/ply_data.hh +++ b/source/blender/io/ply/intern/ply_data.hh @@ -8,6 +8,9 @@ #pragma once +#include +#include + #include "BLI_math_vector_types.hh" #include "BLI_string_ref.hh" #include "BLI_vector.hh" diff --git a/source/blender/io/ply/tests/io_ply_exporter_test.cc b/source/blender/io/ply/tests/io_ply_exporter_test.cc index 590e0fb0670..61a6a66ac8b 100644 --- a/source/blender/io/ply/tests/io_ply_exporter_test.cc +++ b/source/blender/io/ply/tests/io_ply_exporter_test.cc @@ -5,6 +5,7 @@ #include "testing/testing.h" #include "tests/blendfile_loading_base_test.h" +#include "BLI_fileops.h" #include "BLI_string.h" #include "BKE_appdir.hh" diff --git a/source/blender/io/stl/IO_stl.hh b/source/blender/io/stl/IO_stl.hh index 2542a465a89..c0b741080a3 100644 --- a/source/blender/io/stl/IO_stl.hh +++ b/source/blender/io/stl/IO_stl.hh @@ -8,10 +8,12 @@ #pragma once -#include "BKE_context.hh" #include "BLI_path_util.h" #include "IO_orientation.hh" +struct bContext; +struct ReportList; + struct STLImportParams { /** Full path to the source STL file to import. */ char filepath[FILE_MAX]; diff --git a/source/blender/io/stl/exporter/stl_export.cc b/source/blender/io/stl/exporter/stl_export.cc index f166aca43b2..c089c77456b 100644 --- a/source/blender/io/stl/exporter/stl_export.cc +++ b/source/blender/io/stl/exporter/stl_export.cc @@ -11,7 +11,6 @@ #include #include "BKE_context.hh" -#include "BKE_mesh.hh" #include "BKE_object.hh" #include "BKE_report.hh" @@ -19,11 +18,11 @@ #include "DEG_depsgraph_query.hh" +#include "DNA_mesh_types.h" #include "DNA_scene_types.h" #include "BLI_math_matrix.h" #include "BLI_math_rotation.h" -#include "BLI_math_vector.h" #include "BLI_math_vector.hh" #include "BLI_math_vector_types.hh" diff --git a/source/blender/io/stl/exporter/stl_export.hh b/source/blender/io/stl/exporter/stl_export.hh index 62d91700403..17ddc0aa75d 100644 --- a/source/blender/io/stl/exporter/stl_export.hh +++ b/source/blender/io/stl/exporter/stl_export.hh @@ -10,6 +10,9 @@ #include "IO_stl.hh" +struct bContext; +struct Depsgraph; + namespace blender::io::stl { void exporter_main(bContext *C, const STLExportParams &export_params); diff --git a/source/blender/io/stl/importer/stl_import.cc b/source/blender/io/stl/importer/stl_import.cc index 53f775f8f31..64e58a243e3 100644 --- a/source/blender/io/stl/importer/stl_import.cc +++ b/source/blender/io/stl/importer/stl_import.cc @@ -21,7 +21,6 @@ #include "BLI_fileops.hh" #include "BLI_math_matrix.h" #include "BLI_math_rotation.h" -#include "BLI_math_vector.h" #include "BLI_memory_utils.hh" #include "BLI_string.h" diff --git a/source/blender/io/stl/importer/stl_import.hh b/source/blender/io/stl/importer/stl_import.hh index a375cea908d..c074d96b7a1 100644 --- a/source/blender/io/stl/importer/stl_import.hh +++ b/source/blender/io/stl/importer/stl_import.hh @@ -10,6 +10,11 @@ #include "IO_stl.hh" +struct bContext; +struct Main; +struct Scene; +struct ViewLayer; + namespace blender::io::stl { void stl_import_report_error(FILE *file); diff --git a/source/blender/io/stl/importer/stl_import_ascii_reader.cc b/source/blender/io/stl/importer/stl_import_ascii_reader.cc index a3af244ce3d..c829f5c92d9 100644 --- a/source/blender/io/stl/importer/stl_import_ascii_reader.cc +++ b/source/blender/io/stl/importer/stl_import_ascii_reader.cc @@ -6,14 +6,11 @@ * \ingroup stl */ -#include #include - -#include "BKE_mesh.hh" +#include #include "BLI_fileops.hh" #include "BLI_memory_utils.hh" -#include "BLI_string_ref.hh" #include "DNA_mesh_types.h" @@ -25,7 +22,6 @@ * the minimum spec, use an external library. */ #include "fast_float.h" -#include "stl_import.hh" #include "stl_import_ascii_reader.hh" #include "stl_import_mesh.hh" diff --git a/source/blender/io/stl/importer/stl_import_ascii_reader.hh b/source/blender/io/stl/importer/stl_import_ascii_reader.hh index 44affa36be9..5b4b8e97b37 100644 --- a/source/blender/io/stl/importer/stl_import_ascii_reader.hh +++ b/source/blender/io/stl/importer/stl_import_ascii_reader.hh @@ -8,11 +8,7 @@ #pragma once -#include - -#include "BKE_mesh.h" - -#include "stl_import.hh" +struct Mesh; /** * ASCII STL spec: diff --git a/source/blender/io/stl/importer/stl_import_binary_reader.cc b/source/blender/io/stl/importer/stl_import_binary_reader.cc index a72d6aa4d20..01231ce4cf9 100644 --- a/source/blender/io/stl/importer/stl_import_binary_reader.cc +++ b/source/blender/io/stl/importer/stl_import_binary_reader.cc @@ -9,11 +9,9 @@ #include #include -#include "BKE_main.hh" #include "BKE_mesh.hh" #include "BLI_array.hh" -#include "BLI_memory_utils.hh" #include "DNA_mesh_types.h" diff --git a/source/blender/io/stl/importer/stl_import_binary_reader.hh b/source/blender/io/stl/importer/stl_import_binary_reader.hh index a946267094c..81f56aee4f7 100644 --- a/source/blender/io/stl/importer/stl_import_binary_reader.hh +++ b/source/blender/io/stl/importer/stl_import_binary_reader.hh @@ -10,17 +10,17 @@ #include -#include "BKE_mesh.h" +struct Mesh; /* Binary STL spec.: - * UINT8[80] – Header - 80 bytes - * UINT32 – Number of triangles - 4 bytes + * UINT8[80] - Header - 80 bytes + * UINT32 - Number of triangles - 4 bytes * For each triangle - 50 bytes: - * REAL32[3] – Normal vector - 12 bytes - * REAL32[3] – Vertex 1 - 12 bytes - * REAL32[3] – Vertex 2 - 12 bytes - * REAL32[3] – Vertex 3 - 12 bytes - * UINT16 – Attribute byte count - 2 bytes + * REAL32[3] - Normal vector - 12 bytes + * REAL32[3] - Vertex 1 - 12 bytes + * REAL32[3] - Vertex 2 - 12 bytes + * REAL32[3] - Vertex 3 - 12 bytes + * UINT16 - Attribute byte count - 2 bytes */ namespace blender::io::stl { diff --git a/source/blender/io/stl/importer/stl_import_mesh.cc b/source/blender/io/stl/importer/stl_import_mesh.cc index b0ebb50c773..8d067693909 100644 --- a/source/blender/io/stl/importer/stl_import_mesh.cc +++ b/source/blender/io/stl/importer/stl_import_mesh.cc @@ -8,16 +8,10 @@ #include -#include "BKE_customdata.hh" -#include "BKE_lib_id.hh" -#include "BKE_main.hh" #include "BKE_mesh.hh" -#include "BLI_array.hh" #include "BLI_array_utils.hh" -#include "BLI_math_vector.h" -#include "BLI_math_vector.hh" -#include "BLI_task.hh" +#include "BLI_math_vector_types.hh" #include "stl_import_mesh.hh" diff --git a/source/blender/io/stl/importer/stl_import_mesh.hh b/source/blender/io/stl/importer/stl_import_mesh.hh index c72f241f8e8..50676711dfd 100644 --- a/source/blender/io/stl/importer/stl_import_mesh.hh +++ b/source/blender/io/stl/importer/stl_import_mesh.hh @@ -11,7 +11,6 @@ #include #include "BLI_math_vector_types.hh" -#include "BLI_set.hh" #include "BLI_vector.hh" #include "BLI_vector_set.hh" diff --git a/source/blender/io/wavefront_obj/IO_wavefront_obj.hh b/source/blender/io/wavefront_obj/IO_wavefront_obj.hh index 0c2ffdb20f2..367e4513ee2 100644 --- a/source/blender/io/wavefront_obj/IO_wavefront_obj.hh +++ b/source/blender/io/wavefront_obj/IO_wavefront_obj.hh @@ -10,13 +10,14 @@ #include "BLI_path_util.h" -#include "BKE_context.hh" - #include "DEG_depsgraph.hh" #include "IO_orientation.hh" #include "IO_path_util_types.hh" +struct bContext; +struct ReportList; + struct OBJExportParams { /** Full path to the destination .OBJ file. */ char filepath[FILE_MAX]; diff --git a/source/blender/io/wavefront_obj/importer/importer_mesh_utils.cc b/source/blender/io/wavefront_obj/importer/importer_mesh_utils.cc index 9391d130c72..7e1191c8725 100644 --- a/source/blender/io/wavefront_obj/importer/importer_mesh_utils.cc +++ b/source/blender/io/wavefront_obj/importer/importer_mesh_utils.cc @@ -14,7 +14,6 @@ #include "BLI_math_matrix.h" #include "BLI_math_rotation.h" #include "BLI_math_vector.h" -#include "BLI_set.hh" #include "DNA_object_types.h" @@ -22,6 +21,8 @@ #include "importer_mesh_utils.hh" +#include + namespace blender::io::obj { Vector> fixup_invalid_face(Span vert_positions, Span face_verts) diff --git a/source/blender/io/wavefront_obj/importer/obj_import_file_reader.cc b/source/blender/io/wavefront_obj/importer/obj_import_file_reader.cc index 99bf1fcdf26..75b16432f38 100644 --- a/source/blender/io/wavefront_obj/importer/obj_import_file_reader.cc +++ b/source/blender/io/wavefront_obj/importer/obj_import_file_reader.cc @@ -8,9 +8,10 @@ #include "BKE_report.hh" +#include "BLI_fileops.hh" #include "BLI_map.hh" -#include "BLI_math_color.h" #include "BLI_math_vector.h" +#include "BLI_math_vector_types.hh" #include "BLI_string.h" #include "BLI_string_ref.hh" #include "BLI_vector.hh" diff --git a/source/blender/io/wavefront_obj/importer/obj_import_file_reader.hh b/source/blender/io/wavefront_obj/importer/obj_import_file_reader.hh index d130fed6a7d..025c7c6fedc 100644 --- a/source/blender/io/wavefront_obj/importer/obj_import_file_reader.hh +++ b/source/blender/io/wavefront_obj/importer/obj_import_file_reader.hh @@ -8,13 +8,17 @@ #pragma once -#include "BLI_fileops.hh" #include "IO_wavefront_obj.hh" -#include "obj_import_mtl.hh" + +#include "BLI_map.hh" +#include "BLI_vector.hh" + #include "obj_import_objects.hh" namespace blender::io::obj { +struct MTLMaterial; + /* NOTE: the OBJ parser implementation is planned to get fairly large changes "soon", * so don't read too much into current implementation... */ class OBJParser { diff --git a/source/blender/io/wavefront_obj/importer/obj_import_mesh.cc b/source/blender/io/wavefront_obj/importer/obj_import_mesh.cc index dbcac39e4e2..60557a101bb 100644 --- a/source/blender/io/wavefront_obj/importer/obj_import_mesh.cc +++ b/source/blender/io/wavefront_obj/importer/obj_import_mesh.cc @@ -8,13 +8,13 @@ #include +#include "DNA_customdata_types.h" #include "DNA_material_types.h" #include "DNA_meshdata_types.h" -#include "DNA_scene_types.h" #include "BKE_attribute.hh" -#include "BKE_customdata.hh" #include "BKE_deform.hh" +#include "BKE_lib_id.hh" #include "BKE_material.h" #include "BKE_mesh.hh" #include "BKE_node_tree_update.hh" diff --git a/source/blender/io/wavefront_obj/importer/obj_import_mesh.hh b/source/blender/io/wavefront_obj/importer/obj_import_mesh.hh index d05caca162d..7a1cc1f8525 100644 --- a/source/blender/io/wavefront_obj/importer/obj_import_mesh.hh +++ b/source/blender/io/wavefront_obj/importer/obj_import_mesh.hh @@ -8,14 +8,14 @@ #pragma once -#include "BKE_lib_id.hh" - #include "BLI_utility_mixins.hh" #include "obj_import_mtl.hh" #include "obj_import_objects.hh" +struct Main; struct Material; +struct Object; namespace blender::io::obj { diff --git a/source/blender/io/wavefront_obj/importer/obj_import_mtl.cc b/source/blender/io/wavefront_obj/importer/obj_import_mtl.cc index aea744ca21d..2c397d991df 100644 --- a/source/blender/io/wavefront_obj/importer/obj_import_mtl.cc +++ b/source/blender/io/wavefront_obj/importer/obj_import_mtl.cc @@ -10,7 +10,6 @@ #include "BKE_main.hh" #include "BKE_node.hh" -#include "BLI_map.hh" #include "BLI_math_vector.h" #include "BLI_path_util.h" #include "BLI_string.h" @@ -22,7 +21,6 @@ #include "obj_export_mtl.hh" #include "obj_import_mtl.hh" -#include "obj_import_string_utils.hh" #include diff --git a/source/blender/io/wavefront_obj/importer/obj_import_mtl.hh b/source/blender/io/wavefront_obj/importer/obj_import_mtl.hh index b5bbbe7ff2b..fb4dff6e15b 100644 --- a/source/blender/io/wavefront_obj/importer/obj_import_mtl.hh +++ b/source/blender/io/wavefront_obj/importer/obj_import_mtl.hh @@ -4,8 +4,7 @@ #pragma once -#include "DNA_node_types.h" - +struct bNodeTree; struct Main; struct Material; diff --git a/source/blender/io/wavefront_obj/importer/obj_import_objects.hh b/source/blender/io/wavefront_obj/importer/obj_import_objects.hh index d1a0a64472a..31a21d3cd58 100644 --- a/source/blender/io/wavefront_obj/importer/obj_import_objects.hh +++ b/source/blender/io/wavefront_obj/importer/obj_import_objects.hh @@ -8,8 +8,6 @@ #pragma once -#include "BKE_lib_id.hh" - #include "BLI_map.hh" #include "BLI_math_base.hh" #include "BLI_math_vector_types.hh" diff --git a/source/blender/io/wavefront_obj/importer/obj_importer.cc b/source/blender/io/wavefront_obj/importer/obj_importer.cc index 98bcd2ea5b1..e68918b4ab5 100644 --- a/source/blender/io/wavefront_obj/importer/obj_importer.cc +++ b/source/blender/io/wavefront_obj/importer/obj_importer.cc @@ -9,7 +9,6 @@ #include #include "BLI_map.hh" -#include "BLI_math_vector_types.hh" #include "BLI_set.hh" #include "BLI_sort.hh" #include "BLI_string.h" @@ -17,7 +16,6 @@ #include "BKE_context.hh" #include "BKE_layer.hh" -#include "BKE_scene.hh" #include "DEG_depsgraph_build.hh" diff --git a/source/blender/io/wavefront_obj/tests/obj_mtl_parser_tests.cc b/source/blender/io/wavefront_obj/tests/obj_mtl_parser_tests.cc index 746dcdac5cd..5d3da4b53eb 100644 --- a/source/blender/io/wavefront_obj/tests/obj_mtl_parser_tests.cc +++ b/source/blender/io/wavefront_obj/tests/obj_mtl_parser_tests.cc @@ -4,6 +4,8 @@ #include +#include "BLI_fileops.h" + #include "BKE_appdir.hh" #include "testing/testing.h"