Cleanup: Move IO headers to C++

See #103343
This commit is contained in:
Hans Goudey
2023-08-31 12:51:57 -04:00
parent eb3b55f2a7
commit 78dd7d91c4
36 changed files with 59 additions and 88 deletions

View File

@@ -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"

View File

@@ -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[] = {

View File

@@ -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)

View File

@@ -7,7 +7,7 @@
*/
#include "../ABC_alembic.h"
#include "IO_types.h"
#include "IO_types.hh"
#include <Alembic/AbcMaterial/IMaterial.h>

View File

@@ -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
)

View File

@@ -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);

View File

@@ -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 {

View File

@@ -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;
};

View File

@@ -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"},

View File

@@ -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
)

View File

@@ -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"

View File

@@ -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);

View File

@@ -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"

View File

@@ -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"

View File

@@ -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"

View File

@@ -8,7 +8,7 @@
#pragma once
#include "IO_ply.h"
#include "IO_ply.hh"
#include "ply_data.hh"
namespace blender::io::ply {

View File

@@ -8,7 +8,7 @@
#pragma once
#include "IO_ply.h"
#include "IO_ply.hh"
#include "ply_data.hh"
namespace blender::io::ply {

View File

@@ -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"

View File

@@ -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

View File

@@ -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)

View File

@@ -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);

View File

@@ -8,7 +8,7 @@
#pragma once
#include "IO_stl.h"
#include "IO_stl.hh"
namespace blender::io::stl {

View File

@@ -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"

View File

@@ -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

View File

@@ -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"

View File

@@ -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);

View File

@@ -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"

View File

@@ -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. */

View File

@@ -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 {

View File

@@ -12,7 +12,7 @@
#include "BLI_vector.hh"
#include "IO_wavefront_obj.h"
#include "IO_wavefront_obj.hh"
namespace blender::io::obj {

View File

@@ -18,7 +18,7 @@
#include "DNA_object_types.h"
#include "IO_wavefront_obj.h"
#include "IO_wavefront_obj.hh"
#include "importer_mesh_utils.hh"

View File

@@ -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"

View File

@@ -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"

View File

@@ -8,7 +8,7 @@
#pragma once
#include "IO_wavefront_obj.h"
#include "IO_wavefront_obj.hh"
namespace blender::io::obj {

View File

@@ -4,7 +4,7 @@
#pragma once
#include "IO_wavefront_obj.h"
#include "IO_wavefront_obj.hh"
namespace blender::io::obj {