diff --git a/source/blender/editors/io/io_obj.cc b/source/blender/editors/io/io_obj.cc index 5a2ed5bb081..6e76e821b33 100644 --- a/source/blender/editors/io/io_obj.cc +++ b/source/blender/editors/io/io_obj.cc @@ -36,9 +36,9 @@ # include "DEG_depsgraph.h" -# include "IO_orientation.h" -# include "IO_path_util_types.h" -# include "IO_wavefront_obj.h" +# include "IO_orientation.hh" +# include "IO_path_util_types.hh" +# include "IO_wavefront_obj.hh" # include "io_obj.hh" diff --git a/source/blender/editors/io/io_ply_ops.cc b/source/blender/editors/io/io_ply_ops.cc index 7f9e914617e..34a023a69e2 100644 --- a/source/blender/editors/io/io_ply_ops.cc +++ b/source/blender/editors/io/io_ply_ops.cc @@ -32,10 +32,10 @@ # include "DEG_depsgraph.h" -# include "IO_orientation.h" -# include "IO_path_util_types.h" +# include "IO_orientation.hh" +# include "IO_path_util_types.hh" -# include "IO_ply.h" +# include "IO_ply.hh" # include "io_ply_ops.hh" static const EnumPropertyItem ply_vertex_colors_mode[] = { diff --git a/source/blender/editors/io/io_stl_ops.cc b/source/blender/editors/io/io_stl_ops.cc index 7406c2e9597..777dfc2631a 100644 --- a/source/blender/editors/io/io_stl_ops.cc +++ b/source/blender/editors/io/io_stl_ops.cc @@ -21,7 +21,7 @@ # include "RNA_access.hh" # include "RNA_define.hh" -# include "IO_stl.h" +# include "IO_stl.hh" # include "io_stl_ops.hh" static int wm_stl_import_invoke(bContext *C, wmOperator *op, const wmEvent *event) diff --git a/source/blender/io/alembic/intern/alembic_capi.cc b/source/blender/io/alembic/intern/alembic_capi.cc index 7f9e1c86f11..6e10dcf39fc 100644 --- a/source/blender/io/alembic/intern/alembic_capi.cc +++ b/source/blender/io/alembic/intern/alembic_capi.cc @@ -7,7 +7,7 @@ */ #include "../ABC_alembic.h" -#include "IO_types.h" +#include "IO_types.hh" #include diff --git a/source/blender/io/common/CMakeLists.txt b/source/blender/io/common/CMakeLists.txt index 199ba18583d..19df27fcb96 100644 --- a/source/blender/io/common/CMakeLists.txt +++ b/source/blender/io/common/CMakeLists.txt @@ -22,10 +22,10 @@ set(SRC IO_abstract_hierarchy_iterator.h IO_dupli_persistent_id.hh - IO_orientation.h + IO_orientation.hh IO_path_util.hh - IO_path_util_types.h - IO_types.h + IO_path_util_types.hh + IO_types.hh intern/dupli_parent_finder.hh ) diff --git a/source/blender/io/common/IO_orientation.h b/source/blender/io/common/IO_orientation.hh similarity index 51% rename from source/blender/io/common/IO_orientation.h rename to source/blender/io/common/IO_orientation.hh index 6c73c851ca4..4da659eaea1 100644 --- a/source/blender/io/common/IO_orientation.h +++ b/source/blender/io/common/IO_orientation.hh @@ -4,29 +4,21 @@ #pragma once -#include "RNA_types.hh" - +struct EnumPropertyItem; struct Main; +struct PointerRNA; struct Scene; -#ifdef __cplusplus -extern "C" { -#endif - -typedef enum { +enum eIOAxis { IO_AXIS_X = 0, IO_AXIS_Y = 1, IO_AXIS_Z = 2, IO_AXIS_NEGATIVE_X = 3, IO_AXIS_NEGATIVE_Y = 4, IO_AXIS_NEGATIVE_Z = 5, -} eIOAxis; +}; extern const EnumPropertyItem io_transform_axis[]; -void io_ui_forward_axis_update(struct Main *main, struct Scene *scene, struct PointerRNA *ptr); -void io_ui_up_axis_update(struct Main *main, struct Scene *scene, struct PointerRNA *ptr); - -#ifdef __cplusplus -} -#endif +void io_ui_forward_axis_update(Main *main, Scene *scene, PointerRNA *ptr); +void io_ui_up_axis_update(Main *main, Scene *scene, PointerRNA *ptr); diff --git a/source/blender/io/common/IO_path_util.hh b/source/blender/io/common/IO_path_util.hh index ca4b73cb0e7..22c5675b50a 100644 --- a/source/blender/io/common/IO_path_util.hh +++ b/source/blender/io/common/IO_path_util.hh @@ -6,7 +6,7 @@ #include "BLI_set.hh" #include "BLI_string_ref.hh" -#include "IO_path_util_types.h" +#include "IO_path_util_types.hh" namespace blender::io { diff --git a/source/blender/io/common/IO_path_util_types.h b/source/blender/io/common/IO_path_util_types.hh similarity index 94% rename from source/blender/io/common/IO_path_util_types.h rename to source/blender/io/common/IO_path_util_types.hh index 80bbdc123d0..3a709d3264a 100644 --- a/source/blender/io/common/IO_path_util_types.h +++ b/source/blender/io/common/IO_path_util_types.hh @@ -4,7 +4,7 @@ #pragma once /** Method used to reference paths. Equivalent of bpy_extras.io_utils.path_reference_mode. */ -typedef enum { +enum ePathReferenceMode { /** Use relative paths with subdirectories only. */ PATH_REFERENCE_AUTO = 0, /** Always write absolute paths. */ @@ -17,4 +17,4 @@ typedef enum { PATH_REFERENCE_STRIP = 4, /** Copy the file to the destination path. */ PATH_REFERENCE_COPY = 5, -} ePathReferenceMode; +}; diff --git a/source/blender/io/common/IO_types.h b/source/blender/io/common/IO_types.hh similarity index 100% rename from source/blender/io/common/IO_types.h rename to source/blender/io/common/IO_types.hh diff --git a/source/blender/io/common/intern/orientation.cc b/source/blender/io/common/intern/orientation.cc index fcd8e07a052..629b3789dea 100644 --- a/source/blender/io/common/intern/orientation.cc +++ b/source/blender/io/common/intern/orientation.cc @@ -7,7 +7,7 @@ #include "RNA_access.hh" #include "RNA_types.hh" -#include "IO_orientation.h" +#include "IO_orientation.hh" const EnumPropertyItem io_transform_axis[] = { {IO_AXIS_X, "X", 0, "X", "Positive X axis"}, diff --git a/source/blender/io/ply/CMakeLists.txt b/source/blender/io/ply/CMakeLists.txt index 5de46468f06..a80be008d46 100644 --- a/source/blender/io/ply/CMakeLists.txt +++ b/source/blender/io/ply/CMakeLists.txt @@ -46,7 +46,7 @@ set(SRC importer/ply_import_buffer.hh importer/ply_import_data.hh importer/ply_import_mesh.hh - IO_ply.h + IO_ply.hh intern/ply_data.hh ) diff --git a/source/blender/io/ply/IO_ply.cc b/source/blender/io/ply/IO_ply.cc index 189d291d512..872d0461722 100644 --- a/source/blender/io/ply/IO_ply.cc +++ b/source/blender/io/ply/IO_ply.cc @@ -9,7 +9,7 @@ #include "BLI_timeit.hh" #include "DNA_windowmanager_types.h" -#include "IO_ply.h" +#include "IO_ply.hh" #include "ply_export.hh" #include "ply_import.hh" diff --git a/source/blender/io/ply/IO_ply.h b/source/blender/io/ply/IO_ply.hh similarity index 81% rename from source/blender/io/ply/IO_ply.h rename to source/blender/io/ply/IO_ply.hh index e1c973f8a90..248e7bf75ec 100644 --- a/source/blender/io/ply/IO_ply.h +++ b/source/blender/io/ply/IO_ply.hh @@ -12,17 +12,13 @@ #include "BLI_path_util.h" #include "DNA_windowmanager_types.h" -#include "IO_orientation.h" +#include "IO_orientation.hh" -#ifdef __cplusplus -extern "C" { -#endif - -typedef enum { +enum ePLYVertexColorMode { PLY_VERTEX_COLOR_NONE = 0, PLY_VERTEX_COLOR_SRGB = 1, PLY_VERTEX_COLOR_LINEAR = 2, -} ePLYVertexColorMode; +}; struct PLYExportParams { /** Full path to the destination .PLY file. */ @@ -64,10 +60,6 @@ struct PLYImportParams { /** * C-interface for the importer and exporter. */ -void PLY_export(bContext *C, const struct PLYExportParams *export_params); +void PLY_export(bContext *C, const PLYExportParams *export_params); -void PLY_import(bContext *C, const struct PLYImportParams *import_params, wmOperator *op); - -#ifdef __cplusplus -} -#endif +void PLY_import(bContext *C, const PLYImportParams *import_params, wmOperator *op); diff --git a/source/blender/io/ply/exporter/ply_export.cc b/source/blender/io/ply/exporter/ply_export.cc index bc4047c43cf..d353af51eb2 100644 --- a/source/blender/io/ply/exporter/ply_export.cc +++ b/source/blender/io/ply/exporter/ply_export.cc @@ -13,7 +13,7 @@ #include "BKE_context.h" #include "BLI_memory_utils.hh" -#include "IO_ply.h" +#include "IO_ply.hh" #include "ply_data.hh" #include "ply_export.hh" diff --git a/source/blender/io/ply/exporter/ply_export_header.cc b/source/blender/io/ply/exporter/ply_export_header.cc index cfee43678d4..50eddbe550a 100644 --- a/source/blender/io/ply/exporter/ply_export_header.cc +++ b/source/blender/io/ply/exporter/ply_export_header.cc @@ -8,7 +8,7 @@ #include "BKE_blender_version.h" -#include "IO_ply.h" +#include "IO_ply.hh" #include "ply_data.hh" #include "ply_export_header.hh" #include "ply_file_buffer.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 a72d1fdf7f6..88bd818d32c 100644 --- a/source/blender/io/ply/exporter/ply_export_load_plydata.cc +++ b/source/blender/io/ply/exporter/ply_export_load_plydata.cc @@ -7,7 +7,7 @@ */ #include "ply_export_load_plydata.hh" -#include "IO_ply.h" +#include "IO_ply.hh" #include "ply_data.hh" #include "BKE_attribute.hh" diff --git a/source/blender/io/ply/importer/ply_import.hh b/source/blender/io/ply/importer/ply_import.hh index f461f41d410..adf80e0a6e1 100644 --- a/source/blender/io/ply/importer/ply_import.hh +++ b/source/blender/io/ply/importer/ply_import.hh @@ -8,7 +8,7 @@ #pragma once -#include "IO_ply.h" +#include "IO_ply.hh" #include "ply_data.hh" namespace blender::io::ply { diff --git a/source/blender/io/ply/importer/ply_import_mesh.hh b/source/blender/io/ply/importer/ply_import_mesh.hh index aa6f30fb413..fc75040f595 100644 --- a/source/blender/io/ply/importer/ply_import_mesh.hh +++ b/source/blender/io/ply/importer/ply_import_mesh.hh @@ -8,7 +8,7 @@ #pragma once -#include "IO_ply.h" +#include "IO_ply.hh" #include "ply_data.hh" namespace blender::io::ply { 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 be552dd31b5..de6bd2f6a02 100644 --- a/source/blender/io/ply/tests/io_ply_exporter_test.cc +++ b/source/blender/io/ply/tests/io_ply_exporter_test.cc @@ -12,7 +12,7 @@ #include "DEG_depsgraph.h" -#include "IO_ply.h" +#include "IO_ply.hh" #include "intern/ply_data.hh" #include "ply_export_data.hh" diff --git a/source/blender/io/stl/CMakeLists.txt b/source/blender/io/stl/CMakeLists.txt index 276640944dd..ad9ce3df02c 100644 --- a/source/blender/io/stl/CMakeLists.txt +++ b/source/blender/io/stl/CMakeLists.txt @@ -27,7 +27,7 @@ set(SRC importer/stl_import_binary_reader.cc importer/stl_import_mesh.cc - IO_stl.h + IO_stl.hh importer/stl_import.hh importer/stl_import_ascii_reader.hh importer/stl_import_binary_reader.hh diff --git a/source/blender/io/stl/IO_stl.cc b/source/blender/io/stl/IO_stl.cc index 205073be852..8a520c73575 100644 --- a/source/blender/io/stl/IO_stl.cc +++ b/source/blender/io/stl/IO_stl.cc @@ -8,7 +8,7 @@ #include "BLI_timeit.hh" -#include "IO_stl.h" +#include "IO_stl.hh" #include "stl_import.hh" void STL_import(bContext *C, const STLImportParams *import_params) diff --git a/source/blender/io/stl/IO_stl.h b/source/blender/io/stl/IO_stl.hh similarity index 73% rename from source/blender/io/stl/IO_stl.h rename to source/blender/io/stl/IO_stl.hh index 5957eba9a4a..ab8d62bd96b 100644 --- a/source/blender/io/stl/IO_stl.h +++ b/source/blender/io/stl/IO_stl.hh @@ -10,11 +10,7 @@ #include "BKE_context.h" #include "BLI_path_util.h" -#include "IO_orientation.h" - -#ifdef __cplusplus -extern "C" { -#endif +#include "IO_orientation.hh" struct STLImportParams { /** Full path to the source STL file to import. */ @@ -30,8 +26,4 @@ struct STLImportParams { /** * C-interface for the importer. */ -void STL_import(bContext *C, const struct STLImportParams *import_params); - -#ifdef __cplusplus -} -#endif +void STL_import(bContext *C, const STLImportParams *import_params); diff --git a/source/blender/io/stl/importer/stl_import.hh b/source/blender/io/stl/importer/stl_import.hh index 2ac1bdcc763..a375cea908d 100644 --- a/source/blender/io/stl/importer/stl_import.hh +++ b/source/blender/io/stl/importer/stl_import.hh @@ -8,7 +8,7 @@ #pragma once -#include "IO_stl.h" +#include "IO_stl.hh" namespace blender::io::stl { diff --git a/source/blender/io/usd/intern/usd_capi_import.cc b/source/blender/io/usd/intern/usd_capi_import.cc index 5e98c6b2365..a3852119e25 100644 --- a/source/blender/io/usd/intern/usd_capi_import.cc +++ b/source/blender/io/usd/intern/usd_capi_import.cc @@ -2,7 +2,7 @@ * * SPDX-License-Identifier: GPL-2.0-or-later */ -#include "IO_types.h" +#include "IO_types.hh" #include "usd.h" #include "usd_hierarchy_iterator.h" #include "usd_reader_geom.h" diff --git a/source/blender/io/wavefront_obj/CMakeLists.txt b/source/blender/io/wavefront_obj/CMakeLists.txt index 542dde6161b..90a390c3c73 100644 --- a/source/blender/io/wavefront_obj/CMakeLists.txt +++ b/source/blender/io/wavefront_obj/CMakeLists.txt @@ -37,7 +37,7 @@ set(SRC importer/obj_import_string_utils.cc importer/obj_importer.cc - IO_wavefront_obj.h + IO_wavefront_obj.hh exporter/obj_export_file_writer.hh exporter/obj_export_io.hh exporter/obj_export_mesh.hh diff --git a/source/blender/io/wavefront_obj/IO_wavefront_obj.cc b/source/blender/io/wavefront_obj/IO_wavefront_obj.cc index 4ee6137e923..7aacfacf988 100644 --- a/source/blender/io/wavefront_obj/IO_wavefront_obj.cc +++ b/source/blender/io/wavefront_obj/IO_wavefront_obj.cc @@ -9,7 +9,7 @@ #include "BLI_path_util.h" #include "BLI_timeit.hh" -#include "IO_wavefront_obj.h" +#include "IO_wavefront_obj.hh" #include "obj_exporter.hh" #include "obj_importer.hh" diff --git a/source/blender/io/wavefront_obj/IO_wavefront_obj.h b/source/blender/io/wavefront_obj/IO_wavefront_obj.hh similarity index 88% rename from source/blender/io/wavefront_obj/IO_wavefront_obj.h rename to source/blender/io/wavefront_obj/IO_wavefront_obj.hh index e533caa351a..0d28bcd95dc 100644 --- a/source/blender/io/wavefront_obj/IO_wavefront_obj.h +++ b/source/blender/io/wavefront_obj/IO_wavefront_obj.hh @@ -8,15 +8,14 @@ #pragma once -#include "BKE_context.h" #include "BLI_path_util.h" -#include "DEG_depsgraph.h" -#include "IO_orientation.h" -#include "IO_path_util_types.h" -#ifdef __cplusplus -extern "C" { -#endif +#include "BKE_context.h" + +#include "DEG_depsgraph.h" + +#include "IO_orientation.hh" +#include "IO_path_util_types.hh" struct OBJExportParams { /** Full path to the destination .OBJ file. */ @@ -83,13 +82,9 @@ struct OBJImportParams { * Import also changes the selection & the active object; callers * need to update the UI bits if needed. */ -void OBJ_import(bContext *C, const struct OBJImportParams *import_params); +void OBJ_import(bContext *C, const OBJImportParams *import_params); /** * Perform the full export process. */ -void OBJ_export(bContext *C, const struct OBJExportParams *export_params); - -#ifdef __cplusplus -} -#endif +void OBJ_export(bContext *C, const OBJExportParams *export_params); diff --git a/source/blender/io/wavefront_obj/exporter/obj_export_file_writer.hh b/source/blender/io/wavefront_obj/exporter/obj_export_file_writer.hh index 7ee1fd5a92f..5e5c9c73c8e 100644 --- a/source/blender/io/wavefront_obj/exporter/obj_export_file_writer.hh +++ b/source/blender/io/wavefront_obj/exporter/obj_export_file_writer.hh @@ -14,7 +14,7 @@ #include "BLI_set.hh" #include "BLI_vector.hh" -#include "IO_wavefront_obj.h" +#include "IO_wavefront_obj.hh" #include "obj_export_io.hh" #include "obj_export_mtl.hh" diff --git a/source/blender/io/wavefront_obj/exporter/obj_export_mesh.hh b/source/blender/io/wavefront_obj/exporter/obj_export_mesh.hh index 141bd17cbe6..a47b2679956 100644 --- a/source/blender/io/wavefront_obj/exporter/obj_export_mesh.hh +++ b/source/blender/io/wavefront_obj/exporter/obj_export_mesh.hh @@ -20,7 +20,7 @@ #include "DNA_meshdata_types.h" #include "DNA_object_types.h" -#include "IO_wavefront_obj.h" +#include "IO_wavefront_obj.hh" namespace blender::io::obj { /** Denote absence for usually non-negative numbers. */ diff --git a/source/blender/io/wavefront_obj/exporter/obj_export_nurbs.cc b/source/blender/io/wavefront_obj/exporter/obj_export_nurbs.cc index 32778d15de9..c2c908000f1 100644 --- a/source/blender/io/wavefront_obj/exporter/obj_export_nurbs.cc +++ b/source/blender/io/wavefront_obj/exporter/obj_export_nurbs.cc @@ -15,7 +15,7 @@ #include "DEG_depsgraph.h" #include "DEG_depsgraph_query.h" -#include "IO_wavefront_obj.h" +#include "IO_wavefront_obj.hh" #include "obj_export_nurbs.hh" namespace blender::io::obj { diff --git a/source/blender/io/wavefront_obj/exporter/obj_exporter.hh b/source/blender/io/wavefront_obj/exporter/obj_exporter.hh index 3acee2f181c..4180f29a254 100644 --- a/source/blender/io/wavefront_obj/exporter/obj_exporter.hh +++ b/source/blender/io/wavefront_obj/exporter/obj_exporter.hh @@ -12,7 +12,7 @@ #include "BLI_vector.hh" -#include "IO_wavefront_obj.h" +#include "IO_wavefront_obj.hh" namespace blender::io::obj { 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 f6e3f035e68..3963dfad3bf 100644 --- a/source/blender/io/wavefront_obj/importer/importer_mesh_utils.cc +++ b/source/blender/io/wavefront_obj/importer/importer_mesh_utils.cc @@ -18,7 +18,7 @@ #include "DNA_object_types.h" -#include "IO_wavefront_obj.h" +#include "IO_wavefront_obj.hh" #include "importer_mesh_utils.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 bcfdf985767..d130fed6a7d 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 @@ -9,7 +9,7 @@ #pragma once #include "BLI_fileops.hh" -#include "IO_wavefront_obj.h" +#include "IO_wavefront_obj.hh" #include "obj_import_mtl.hh" #include "obj_import_objects.hh" 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 6a940c9c0f4..737f5ba5b0c 100644 --- a/source/blender/io/wavefront_obj/importer/obj_import_mesh.cc +++ b/source/blender/io/wavefront_obj/importer/obj_import_mesh.cc @@ -22,7 +22,7 @@ #include "BLI_math_vector.h" #include "BLI_set.hh" -#include "IO_wavefront_obj.h" +#include "IO_wavefront_obj.hh" #include "importer_mesh_utils.hh" #include "obj_export_mtl.hh" #include "obj_import_mesh.hh" diff --git a/source/blender/io/wavefront_obj/importer/obj_importer.hh b/source/blender/io/wavefront_obj/importer/obj_importer.hh index 9e4bdb92a08..34e9e2896d3 100644 --- a/source/blender/io/wavefront_obj/importer/obj_importer.hh +++ b/source/blender/io/wavefront_obj/importer/obj_importer.hh @@ -8,7 +8,7 @@ #pragma once -#include "IO_wavefront_obj.h" +#include "IO_wavefront_obj.hh" namespace blender::io::obj { diff --git a/source/blender/io/wavefront_obj/tests/obj_exporter_tests.hh b/source/blender/io/wavefront_obj/tests/obj_exporter_tests.hh index 514b711d5fa..e0fb18ba860 100644 --- a/source/blender/io/wavefront_obj/tests/obj_exporter_tests.hh +++ b/source/blender/io/wavefront_obj/tests/obj_exporter_tests.hh @@ -4,7 +4,7 @@ #pragma once -#include "IO_wavefront_obj.h" +#include "IO_wavefront_obj.hh" namespace blender::io::obj {