From 3db523ab3e88962678e5dcb54ddf7d18b33e0a72 Mon Sep 17 00:00:00 2001 From: Hans Goudey Date: Mon, 28 Aug 2023 15:01:05 +0200 Subject: [PATCH] Cleanup: Move BLO headers to C++ Except for BLO_readfile.h, which is still included by C files. Pull Request: https://projects.blender.org/blender/blender/pulls/111610 --- source/blender/blenkernel/intern/action.cc | 2 +- source/blender/blenkernel/intern/anim_data.cc | 2 +- source/blender/blenkernel/intern/anim_sys.cc | 2 +- .../blenkernel/intern/anim_visualization.cc | 2 +- source/blender/blenkernel/intern/armature.cc | 2 +- source/blender/blenkernel/intern/asset.cc | 2 +- .../blenkernel/intern/asset_weak_reference.cc | 2 +- .../blenkernel/intern/blender_copybuffer.cc | 2 +- .../blender/blenkernel/intern/blender_undo.cc | 4 +- source/blender/blenkernel/intern/blendfile.cc | 2 +- .../intern/blendfile_link_append.cc | 2 +- source/blender/blenkernel/intern/brush.cc | 2 +- source/blender/blenkernel/intern/cachefile.cc | 2 +- source/blender/blenkernel/intern/camera.cc | 2 +- .../blender/blenkernel/intern/collection.cc | 2 +- .../blender/blenkernel/intern/colortools.cc | 2 +- .../blender/blenkernel/intern/constraint.cc | 2 +- source/blender/blenkernel/intern/curve.cc | 2 +- .../blender/blenkernel/intern/curveprofile.cc | 2 +- source/blender/blenkernel/intern/curves.cc | 2 +- .../blenkernel/intern/curves_geometry.cc | 2 +- .../blender/blenkernel/intern/customdata.cc | 2 +- source/blender/blenkernel/intern/deform.cc | 2 +- source/blender/blenkernel/intern/fcurve.cc | 2 +- .../blenkernel/intern/gpencil_legacy.cc | 2 +- .../intern/gpencil_modifier_legacy.cc | 2 +- .../blenkernel/intern/grease_pencil.cc | 2 +- source/blender/blenkernel/intern/icons.cc | 2 +- source/blender/blenkernel/intern/idprop.cc | 2 +- source/blender/blenkernel/intern/image.cc | 2 +- source/blender/blenkernel/intern/ipo.cc | 2 +- source/blender/blenkernel/intern/key.cc | 2 +- source/blender/blenkernel/intern/lattice.cc | 2 +- source/blender/blenkernel/intern/layer.cc | 2 +- source/blender/blenkernel/intern/lib_id.cc | 2 +- source/blender/blenkernel/intern/light.cc | 2 +- .../blender/blenkernel/intern/lightprobe.cc | 2 +- source/blender/blenkernel/intern/linestyle.cc | 2 +- source/blender/blenkernel/intern/mask.cc | 2 +- source/blender/blenkernel/intern/material.cc | 2 +- source/blender/blenkernel/intern/mball.cc | 2 +- source/blender/blenkernel/intern/mesh.cc | 2 +- source/blender/blenkernel/intern/modifier.cc | 2 +- source/blender/blenkernel/intern/movieclip.cc | 2 +- source/blender/blenkernel/intern/nla.cc | 2 +- source/blender/blenkernel/intern/node.cc | 2 +- .../blenkernel/intern/node_tree_interface.cc | 2 +- source/blender/blenkernel/intern/object.cc | 2 +- .../blender/blenkernel/intern/packedFile.cc | 2 +- source/blender/blenkernel/intern/paint.cc | 2 +- source/blender/blenkernel/intern/particle.cc | 2 +- .../blender/blenkernel/intern/pointcache.cc | 2 +- .../blender/blenkernel/intern/pointcloud.cc | 2 +- source/blender/blenkernel/intern/scene.cc | 2 +- source/blender/blenkernel/intern/screen.cc | 2 +- source/blender/blenkernel/intern/shader_fx.cc | 2 +- source/blender/blenkernel/intern/sound.cc | 2 +- source/blender/blenkernel/intern/speaker.cc | 2 +- source/blender/blenkernel/intern/text.cc | 2 +- source/blender/blenkernel/intern/texture.cc | 2 +- source/blender/blenkernel/intern/vfont.cc | 2 +- .../blender/blenkernel/intern/viewer_path.cc | 2 +- source/blender/blenkernel/intern/volume.cc | 2 +- source/blender/blenkernel/intern/workspace.cc | 2 +- source/blender/blenkernel/intern/world.cc | 2 +- source/blender/blenlib/intern/BLI_mempool.c | 2 +- .../{BLO_blend_defs.h => BLO_blend_defs.hh} | 0 ...blend_validate.h => BLO_blend_validate.hh} | 12 +- .../{BLO_read_write.h => BLO_read_write.hh} | 62 +++----- .../{BLO_undofile.h => BLO_undofile.hh} | 34 ++--- .../{BLO_writefile.h => BLO_writefile.hh} | 0 source/blender/blenloader/CMakeLists.txt | 14 +- .../blenloader/intern/blend_validate.cc | 4 +- .../blenloader/intern/readblenentry.cc | 6 +- source/blender/blenloader/intern/readfile.cc | 10 +- .../intern/{readfile.h => readfile.hh} | 134 ++++++++---------- source/blender/blenloader/intern/undofile.cc | 2 +- .../blenloader/intern/versioning_250.cc | 4 +- .../blenloader/intern/versioning_260.cc | 2 +- .../blenloader/intern/versioning_270.cc | 2 +- .../blenloader/intern/versioning_280.cc | 6 +- .../blenloader/intern/versioning_290.cc | 4 +- .../blenloader/intern/versioning_300.cc | 4 +- .../blenloader/intern/versioning_400.cc | 6 +- .../blenloader/intern/versioning_common.cc | 11 +- ...rsioning_common.h => versioning_common.hh} | 76 ++++------ .../blenloader/intern/versioning_defaults.cc | 2 +- .../blenloader/intern/versioning_dna.cc | 2 +- .../blenloader/intern/versioning_legacy.cc | 2 +- .../blenloader/intern/versioning_userdef.cc | 2 +- source/blender/blenloader/intern/writefile.cc | 14 +- .../draw/engines/eevee/eevee_lightcache.cc | 2 +- .../asset/intern/asset_shelf_regiondata.cc | 2 +- .../asset/intern/asset_shelf_settings.cc | 2 +- .../editors/space_action/space_action.cc | 2 +- .../editors/space_buttons/space_buttons.cc | 2 +- .../blender/editors/space_clip/space_clip.cc | 2 +- .../editors/space_console/space_console.cc | 2 +- .../blender/editors/space_file/space_file.cc | 2 +- .../editors/space_graph/space_graph.cc | 2 +- .../editors/space_image/space_image.cc | 2 +- .../blender/editors/space_info/space_info.cc | 2 +- source/blender/editors/space_nla/space_nla.cc | 2 +- .../blender/editors/space_node/space_node.cc | 2 +- .../editors/space_outliner/space_outliner.cc | 2 +- .../editors/space_script/space_script.cc | 2 +- .../space_sequencer/space_sequencer.cc | 2 +- .../space_spreadsheet/space_spreadsheet.cc | 2 +- .../space_statusbar/space_statusbar.cc | 2 +- .../blender/editors/space_text/space_text.cc | 2 +- .../editors/space_topbar/space_topbar.cc | 2 +- .../editors/space_userpref/space_userpref.cc | 2 +- .../editors/space_view3d/space_view3d.cc | 2 +- source/blender/editors/undo/ed_undo.cc | 2 +- source/blender/editors/undo/memfile_undo.cc | 2 +- source/blender/imbuf/intern/thumbs_blend.cc | 2 +- .../blender/modifiers/intern/MOD_armature.cc | 2 +- source/blender/modifiers/intern/MOD_bevel.cc | 2 +- .../blender/modifiers/intern/MOD_collision.cc | 2 +- .../modifiers/intern/MOD_correctivesmooth.cc | 2 +- .../blender/modifiers/intern/MOD_explode.cc | 2 +- source/blender/modifiers/intern/MOD_hook.cc | 2 +- .../modifiers/intern/MOD_laplaciandeform.cc | 2 +- .../modifiers/intern/MOD_mesh_to_volume.cc | 2 +- .../modifiers/intern/MOD_meshdeform.cc | 2 +- .../modifiers/intern/MOD_meshsequencecache.cc | 2 +- source/blender/modifiers/intern/MOD_nodes.cc | 2 +- source/blender/modifiers/intern/MOD_ocean.cc | 2 +- .../modifiers/intern/MOD_particlesystem.cc | 2 +- .../blender/modifiers/intern/MOD_subsurf.cc | 2 +- .../blender/modifiers/intern/MOD_surface.cc | 2 +- .../modifiers/intern/MOD_surfacedeform.cc | 2 +- .../modifiers/intern/MOD_volume_displace.cc | 2 +- source/blender/modifiers/intern/MOD_warp.cc | 2 +- .../modifiers/intern/MOD_weightvgedit.cc | 2 +- .../modifiers/intern/MOD_weightvgproximity.cc | 2 +- .../python/intern/bpy_library_write.cc | 2 +- source/blender/sequencer/intern/modifier.cc | 2 +- source/blender/sequencer/intern/sequencer.cc | 2 +- source/blender/windowmanager/intern/wm.cc | 2 +- .../blender/windowmanager/intern/wm_files.cc | 4 +- .../windowmanager/intern/wm_init_exit.cc | 4 +- source/creator/creator_signals.cc | 2 +- 143 files changed, 301 insertions(+), 356 deletions(-) rename source/blender/blenloader/{BLO_blend_defs.h => BLO_blend_defs.hh} (100%) rename source/blender/blenloader/{BLO_blend_validate.h => BLO_blend_validate.hh} (69%) rename source/blender/blenloader/{BLO_read_write.h => BLO_read_write.hh} (86%) rename source/blender/blenloader/{BLO_undofile.h => BLO_undofile.hh} (81%) rename source/blender/blenloader/{BLO_writefile.h => BLO_writefile.hh} (100%) rename source/blender/blenloader/intern/{readfile.h => readfile.hh} (57%) rename source/blender/blenloader/intern/{versioning_common.h => versioning_common.hh} (62%) diff --git a/source/blender/blenkernel/intern/action.cc b/source/blender/blenkernel/intern/action.cc index 4bfb5ca52e2..4b17370b5c8 100644 --- a/source/blender/blenkernel/intern/action.cc +++ b/source/blender/blenkernel/intern/action.cc @@ -60,7 +60,7 @@ #include "RNA_path.hh" #include "RNA_prototypes.h" -#include "BLO_read_write.h" +#include "BLO_read_write.hh" #include "CLG_log.h" diff --git a/source/blender/blenkernel/intern/anim_data.cc b/source/blender/blenkernel/intern/anim_data.cc index 8acd4843f1e..30c5d324f9a 100644 --- a/source/blender/blenkernel/intern/anim_data.cc +++ b/source/blender/blenkernel/intern/anim_data.cc @@ -41,7 +41,7 @@ #include "DEG_depsgraph.h" -#include "BLO_read_write.h" +#include "BLO_read_write.hh" #include "RNA_access.hh" #include "RNA_path.hh" diff --git a/source/blender/blenkernel/intern/anim_sys.cc b/source/blender/blenkernel/intern/anim_sys.cc index faa30623b4e..354b62c814f 100644 --- a/source/blender/blenkernel/intern/anim_sys.cc +++ b/source/blender/blenkernel/intern/anim_sys.cc @@ -57,7 +57,7 @@ #include "RNA_path.hh" #include "RNA_prototypes.h" -#include "BLO_read_write.h" +#include "BLO_read_write.hh" #include "nla_private.h" diff --git a/source/blender/blenkernel/intern/anim_visualization.cc b/source/blender/blenkernel/intern/anim_visualization.cc index 647e82e324f..d91c266e242 100644 --- a/source/blender/blenkernel/intern/anim_visualization.cc +++ b/source/blender/blenkernel/intern/anim_visualization.cc @@ -19,7 +19,7 @@ #include "GPU_batch.h" -#include "BLO_read_write.h" +#include "BLO_read_write.hh" /* ******************************************************************** */ /* Animation Visualization */ diff --git a/source/blender/blenkernel/intern/armature.cc b/source/blender/blenkernel/intern/armature.cc index 60d1b1886a1..e0b4cc4ffa8 100644 --- a/source/blender/blenkernel/intern/armature.cc +++ b/source/blender/blenkernel/intern/armature.cc @@ -53,7 +53,7 @@ #include "BIK_api.h" -#include "BLO_read_write.h" +#include "BLO_read_write.hh" #include "CLG_log.h" diff --git a/source/blender/blenkernel/intern/asset.cc b/source/blender/blenkernel/intern/asset.cc index 6dbb94d69df..3aaa30f1bef 100644 --- a/source/blender/blenkernel/intern/asset.cc +++ b/source/blender/blenkernel/intern/asset.cc @@ -21,7 +21,7 @@ #include "BKE_icons.h" #include "BKE_idprop.h" -#include "BLO_read_write.h" +#include "BLO_read_write.hh" #include "MEM_guardedalloc.h" diff --git a/source/blender/blenkernel/intern/asset_weak_reference.cc b/source/blender/blenkernel/intern/asset_weak_reference.cc index ee2b8a631ba..b351e84b804 100644 --- a/source/blender/blenkernel/intern/asset_weak_reference.cc +++ b/source/blender/blenkernel/intern/asset_weak_reference.cc @@ -13,7 +13,7 @@ #include "BKE_asset.h" -#include "BLO_read_write.h" +#include "BLO_read_write.hh" #include "DNA_asset_types.h" diff --git a/source/blender/blenkernel/intern/blender_copybuffer.cc b/source/blender/blenkernel/intern/blender_copybuffer.cc index 8d3a2872c4b..40315e75957 100644 --- a/source/blender/blenkernel/intern/blender_copybuffer.cc +++ b/source/blender/blenkernel/intern/blender_copybuffer.cc @@ -38,7 +38,7 @@ #include "DEG_depsgraph_build.h" #include "BLO_readfile.h" -#include "BLO_writefile.h" +#include "BLO_writefile.hh" #include "IMB_colormanagement.h" diff --git a/source/blender/blenkernel/intern/blender_undo.cc b/source/blender/blenkernel/intern/blender_undo.cc index ab4e50f0445..1768c3c90f5 100644 --- a/source/blender/blenkernel/intern/blender_undo.cc +++ b/source/blender/blenkernel/intern/blender_undo.cc @@ -39,8 +39,8 @@ #include "BKE_undo_system.h" #include "BLO_readfile.h" -#include "BLO_undofile.h" -#include "BLO_writefile.h" +#include "BLO_undofile.hh" +#include "BLO_writefile.hh" #include "DEG_depsgraph.h" diff --git a/source/blender/blenkernel/intern/blendfile.cc b/source/blender/blenkernel/intern/blendfile.cc index 640ac5c89a2..11ca3cda8a7 100644 --- a/source/blender/blenkernel/intern/blendfile.cc +++ b/source/blender/blenkernel/intern/blendfile.cc @@ -59,7 +59,7 @@ #include "BKE_workspace.h" #include "BLO_readfile.h" -#include "BLO_writefile.h" +#include "BLO_writefile.hh" #include "RNA_access.hh" diff --git a/source/blender/blenkernel/intern/blendfile_link_append.cc b/source/blender/blenkernel/intern/blendfile_link_append.cc index a34d0fa4610..6f859551b6a 100644 --- a/source/blender/blenkernel/intern/blendfile_link_append.cc +++ b/source/blender/blenkernel/intern/blendfile_link_append.cc @@ -53,7 +53,7 @@ #include "BKE_blendfile_link_append.h" #include "BLO_readfile.h" -#include "BLO_writefile.h" +#include "BLO_writefile.hh" static CLG_LogRef LOG = {"bke.blendfile_link_append"}; diff --git a/source/blender/blenkernel/intern/brush.cc b/source/blender/blenkernel/intern/brush.cc index 26546d3abc3..478fc4fb2d1 100644 --- a/source/blender/blenkernel/intern/brush.cc +++ b/source/blender/blenkernel/intern/brush.cc @@ -42,7 +42,7 @@ #include "RE_texture.h" /* RE_texture_evaluate */ -#include "BLO_read_write.h" +#include "BLO_read_write.hh" static void brush_init_data(ID *id) { diff --git a/source/blender/blenkernel/intern/cachefile.cc b/source/blender/blenkernel/intern/cachefile.cc index 71f56912a1e..f673b454f8c 100644 --- a/source/blender/blenkernel/intern/cachefile.cc +++ b/source/blender/blenkernel/intern/cachefile.cc @@ -37,7 +37,7 @@ #include "RE_engine.h" -#include "BLO_read_write.h" +#include "BLO_read_write.hh" #include "MEM_guardedalloc.h" diff --git a/source/blender/blenkernel/intern/camera.cc b/source/blender/blenkernel/intern/camera.cc index 97b1a0bbfb3..c82d6616912 100644 --- a/source/blender/blenkernel/intern/camera.cc +++ b/source/blender/blenkernel/intern/camera.cc @@ -47,7 +47,7 @@ #include "MEM_guardedalloc.h" -#include "BLO_read_write.h" +#include "BLO_read_write.hh" /* -------------------------------------------------------------------- */ /** \name Camera Data-Block diff --git a/source/blender/blenkernel/intern/collection.cc b/source/blender/blenkernel/intern/collection.cc index 4bb5329d9e1..71b66a57c27 100644 --- a/source/blender/blenkernel/intern/collection.cc +++ b/source/blender/blenkernel/intern/collection.cc @@ -48,7 +48,7 @@ #include "MEM_guardedalloc.h" -#include "BLO_read_write.h" +#include "BLO_read_write.hh" static CLG_LogRef LOG = {"bke.collection"}; diff --git a/source/blender/blenkernel/intern/colortools.cc b/source/blender/blenkernel/intern/colortools.cc index a626c32c446..01ad4778777 100644 --- a/source/blender/blenkernel/intern/colortools.cc +++ b/source/blender/blenkernel/intern/colortools.cc @@ -28,7 +28,7 @@ #include "IMB_colormanagement.h" #include "IMB_imbuf_types.h" -#include "BLO_read_write.h" +#include "BLO_read_write.hh" /* ********************************* color curve ********************* */ diff --git a/source/blender/blenkernel/intern/constraint.cc b/source/blender/blenkernel/intern/constraint.cc index 0eb5767c69a..d200c571b98 100644 --- a/source/blender/blenkernel/intern/constraint.cc +++ b/source/blender/blenkernel/intern/constraint.cc @@ -73,7 +73,7 @@ #include "DEG_depsgraph.h" #include "DEG_depsgraph_query.h" -#include "BLO_read_write.h" +#include "BLO_read_write.hh" #include "CLG_log.h" diff --git a/source/blender/blenkernel/intern/curve.cc b/source/blender/blenkernel/intern/curve.cc index a068c17d281..8baca37873e 100644 --- a/source/blender/blenkernel/intern/curve.cc +++ b/source/blender/blenkernel/intern/curve.cc @@ -56,7 +56,7 @@ #include "CLG_log.h" -#include "BLO_read_write.h" +#include "BLO_read_write.hh" using blender::float3; using blender::IndexRange; diff --git a/source/blender/blenkernel/intern/curveprofile.cc b/source/blender/blenkernel/intern/curveprofile.cc index 062853d5cb2..153e28a1c2d 100644 --- a/source/blender/blenkernel/intern/curveprofile.cc +++ b/source/blender/blenkernel/intern/curveprofile.cc @@ -21,7 +21,7 @@ #include "BKE_curve.h" #include "BKE_curveprofile.h" -#include "BLO_read_write.h" +#include "BLO_read_write.hh" /** Number of points in high resolution table is dynamic up to a maximum. */ #define PROF_TABLE_MAX 512 diff --git a/source/blender/blenkernel/intern/curves.cc b/source/blender/blenkernel/intern/curves.cc index 3588f281d81..21d20a65e74 100644 --- a/source/blender/blenkernel/intern/curves.cc +++ b/source/blender/blenkernel/intern/curves.cc @@ -43,7 +43,7 @@ #include "DEG_depsgraph_query.h" -#include "BLO_read_write.h" +#include "BLO_read_write.hh" using blender::float3; using blender::IndexRange; diff --git a/source/blender/blenkernel/intern/curves_geometry.cc b/source/blender/blenkernel/intern/curves_geometry.cc index f2601bbc6d4..d473e1e77f4 100644 --- a/source/blender/blenkernel/intern/curves_geometry.cc +++ b/source/blender/blenkernel/intern/curves_geometry.cc @@ -20,7 +20,7 @@ #include "BLI_multi_value_map.hh" #include "BLI_task.hh" -#include "BLO_read_write.h" +#include "BLO_read_write.hh" #include "DNA_curves_types.h" diff --git a/source/blender/blenkernel/intern/customdata.cc b/source/blender/blenkernel/intern/customdata.cc index 6551ea01583..52128a2a124 100644 --- a/source/blender/blenkernel/intern/customdata.cc +++ b/source/blender/blenkernel/intern/customdata.cc @@ -52,7 +52,7 @@ #include "BKE_multires.hh" #include "BKE_subsurf.hh" -#include "BLO_read_write.h" +#include "BLO_read_write.hh" #include "bmesh.h" diff --git a/source/blender/blenkernel/intern/deform.cc b/source/blender/blenkernel/intern/deform.cc index 2502c665cfe..b9c435fe468 100644 --- a/source/blender/blenkernel/intern/deform.cc +++ b/source/blender/blenkernel/intern/deform.cc @@ -38,7 +38,7 @@ #include "BKE_object.h" #include "BKE_object_deform.h" -#include "BLO_read_write.h" +#include "BLO_read_write.hh" #include "data_transfer_intern.h" diff --git a/source/blender/blenkernel/intern/fcurve.cc b/source/blender/blenkernel/intern/fcurve.cc index c9fe4d36efd..94a79f3cfed 100644 --- a/source/blender/blenkernel/intern/fcurve.cc +++ b/source/blender/blenkernel/intern/fcurve.cc @@ -36,7 +36,7 @@ #include "BKE_lib_query.h" #include "BKE_nla.h" -#include "BLO_read_write.h" +#include "BLO_read_write.hh" #include "RNA_access.hh" #include "RNA_path.hh" diff --git a/source/blender/blenkernel/intern/gpencil_legacy.cc b/source/blender/blenkernel/intern/gpencil_legacy.cc index 3e561bd80c2..9f46c0efc1b 100644 --- a/source/blender/blenkernel/intern/gpencil_legacy.cc +++ b/source/blender/blenkernel/intern/gpencil_legacy.cc @@ -55,7 +55,7 @@ #include "DEG_depsgraph_query.h" -#include "BLO_read_write.h" +#include "BLO_read_write.hh" static CLG_LogRef LOG = {"bke.gpencil"}; diff --git a/source/blender/blenkernel/intern/gpencil_modifier_legacy.cc b/source/blender/blenkernel/intern/gpencil_modifier_legacy.cc index 0819d2d90dc..3afeb86923d 100644 --- a/source/blender/blenkernel/intern/gpencil_modifier_legacy.cc +++ b/source/blender/blenkernel/intern/gpencil_modifier_legacy.cc @@ -49,7 +49,7 @@ #include "MOD_gpencil_legacy_lineart.h" #include "MOD_gpencil_legacy_modifiertypes.h" -#include "BLO_read_write.h" +#include "BLO_read_write.hh" #include "CLG_log.h" diff --git a/source/blender/blenkernel/intern/grease_pencil.cc b/source/blender/blenkernel/intern/grease_pencil.cc index 9eab1056352..4a9f5fef251 100644 --- a/source/blender/blenkernel/intern/grease_pencil.cc +++ b/source/blender/blenkernel/intern/grease_pencil.cc @@ -35,7 +35,7 @@ #include "BLI_vector_set.hh" #include "BLI_virtual_array.hh" -#include "BLO_read_write.h" +#include "BLO_read_write.hh" #include "BLT_translation.h" diff --git a/source/blender/blenkernel/intern/icons.cc b/source/blender/blenkernel/intern/icons.cc index dffe95480c7..19efb4831d2 100644 --- a/source/blender/blenkernel/intern/icons.cc +++ b/source/blender/blenkernel/intern/icons.cc @@ -47,7 +47,7 @@ #include "IMB_imbuf_types.h" #include "IMB_thumbs.h" -#include "BLO_read_write.h" +#include "BLO_read_write.hh" #include "atomic_ops.h" diff --git a/source/blender/blenkernel/intern/idprop.cc b/source/blender/blenkernel/intern/idprop.cc index 87cc76aa00e..d9f8b1ef45b 100644 --- a/source/blender/blenkernel/intern/idprop.cc +++ b/source/blender/blenkernel/intern/idprop.cc @@ -27,7 +27,7 @@ #include "MEM_guardedalloc.h" -#include "BLO_read_write.h" +#include "BLO_read_write.hh" #include "BLI_strict_flags.h" diff --git a/source/blender/blenkernel/intern/image.cc b/source/blender/blenkernel/intern/image.cc index 6e9a7bcdcfc..824637332cd 100644 --- a/source/blender/blenkernel/intern/image.cc +++ b/source/blender/blenkernel/intern/image.cc @@ -95,7 +95,7 @@ #include "DEG_depsgraph.h" #include "DEG_depsgraph_query.h" -#include "BLO_read_write.h" +#include "BLO_read_write.hh" /* for image user iteration */ #include "DNA_node_types.h" diff --git a/source/blender/blenkernel/intern/ipo.cc b/source/blender/blenkernel/intern/ipo.cc index 4642dbbe693..9703c3a6f4b 100644 --- a/source/blender/blenkernel/intern/ipo.cc +++ b/source/blender/blenkernel/intern/ipo.cc @@ -62,7 +62,7 @@ #include "SEQ_iterator.h" -#include "BLO_read_write.h" +#include "BLO_read_write.hh" #ifdef WIN32 # include "BLI_math_base.h" /* M_PI */ diff --git a/source/blender/blenkernel/intern/key.cc b/source/blender/blenkernel/intern/key.cc index d0c598ff2e9..2dcd8588c37 100644 --- a/source/blender/blenkernel/intern/key.cc +++ b/source/blender/blenkernel/intern/key.cc @@ -51,7 +51,7 @@ #include "RNA_path.hh" #include "RNA_prototypes.h" -#include "BLO_read_write.h" +#include "BLO_read_write.hh" static void shapekey_copy_data(Main * /*bmain*/, ID *id_dst, const ID *id_src, const int /*flag*/) { diff --git a/source/blender/blenkernel/intern/lattice.cc b/source/blender/blenkernel/intern/lattice.cc index 0043dc61598..329807fcefe 100644 --- a/source/blender/blenkernel/intern/lattice.cc +++ b/source/blender/blenkernel/intern/lattice.cc @@ -46,7 +46,7 @@ #include "DEG_depsgraph_query.h" -#include "BLO_read_write.h" +#include "BLO_read_write.hh" static void lattice_init_data(ID *id) { diff --git a/source/blender/blenkernel/intern/layer.cc b/source/blender/blenkernel/intern/layer.cc index 0cbb1b8182a..20c71eed736 100644 --- a/source/blender/blenkernel/intern/layer.cc +++ b/source/blender/blenkernel/intern/layer.cc @@ -53,7 +53,7 @@ #include "MEM_guardedalloc.h" -#include "BLO_read_write.h" +#include "BLO_read_write.hh" static CLG_LogRef LOG = {"bke.layercollection"}; diff --git a/source/blender/blenkernel/intern/lib_id.cc b/source/blender/blenkernel/intern/lib_id.cc index 842f197780e..697e8d9f025 100644 --- a/source/blender/blenkernel/intern/lib_id.cc +++ b/source/blender/blenkernel/intern/lib_id.cc @@ -64,7 +64,7 @@ #include "RNA_access.hh" -#include "BLO_read_write.h" +#include "BLO_read_write.hh" #include "atomic_ops.h" diff --git a/source/blender/blenkernel/intern/light.cc b/source/blender/blenkernel/intern/light.cc index c20dc021862..efdf30a8062 100644 --- a/source/blender/blenkernel/intern/light.cc +++ b/source/blender/blenkernel/intern/light.cc @@ -38,7 +38,7 @@ #include "DEG_depsgraph.h" -#include "BLO_read_write.h" +#include "BLO_read_write.hh" static void light_init_data(ID *id) { diff --git a/source/blender/blenkernel/intern/lightprobe.cc b/source/blender/blenkernel/intern/lightprobe.cc index 3f7f6ed0fe0..e587686e8c1 100644 --- a/source/blender/blenkernel/intern/lightprobe.cc +++ b/source/blender/blenkernel/intern/lightprobe.cc @@ -26,7 +26,7 @@ #include "BLT_translation.h" -#include "BLO_read_write.h" +#include "BLO_read_write.hh" static void lightprobe_init_data(ID *id) { diff --git a/source/blender/blenkernel/intern/linestyle.cc b/source/blender/blenkernel/intern/linestyle.cc index cdf26ded649..241f6a0bc9c 100644 --- a/source/blender/blenkernel/intern/linestyle.cc +++ b/source/blender/blenkernel/intern/linestyle.cc @@ -38,7 +38,7 @@ #include "BKE_node_tree_update.h" #include "BKE_texture.h" -#include "BLO_read_write.h" +#include "BLO_read_write.hh" static void linestyle_init_data(ID *id) { diff --git a/source/blender/blenkernel/intern/mask.cc b/source/blender/blenkernel/intern/mask.cc index 284f8e84b99..3db89f9bf7b 100644 --- a/source/blender/blenkernel/intern/mask.cc +++ b/source/blender/blenkernel/intern/mask.cc @@ -45,7 +45,7 @@ #include "DRW_engine.h" -#include "BLO_read_write.h" +#include "BLO_read_write.hh" static CLG_LogRef LOG = {"bke.mask"}; diff --git a/source/blender/blenkernel/intern/material.cc b/source/blender/blenkernel/intern/material.cc index 8f8a350ffad..b4217da9aa2 100644 --- a/source/blender/blenkernel/intern/material.cc +++ b/source/blender/blenkernel/intern/material.cc @@ -74,7 +74,7 @@ #include "NOD_shader.h" -#include "BLO_read_write.h" +#include "BLO_read_write.hh" static CLG_LogRef LOG = {"bke.material"}; diff --git a/source/blender/blenkernel/intern/mball.cc b/source/blender/blenkernel/intern/mball.cc index a3bdd5b8c78..7c8b2ebf321 100644 --- a/source/blender/blenkernel/intern/mball.cc +++ b/source/blender/blenkernel/intern/mball.cc @@ -57,7 +57,7 @@ #include "DEG_depsgraph.h" -#include "BLO_read_write.h" +#include "BLO_read_write.hh" static void metaball_init_data(ID *id) { diff --git a/source/blender/blenkernel/intern/mesh.cc b/source/blender/blenkernel/intern/mesh.cc index 9ceeb94f771..414425eb034 100644 --- a/source/blender/blenkernel/intern/mesh.cc +++ b/source/blender/blenkernel/intern/mesh.cc @@ -65,7 +65,7 @@ #include "DEG_depsgraph.h" #include "DEG_depsgraph_query.h" -#include "BLO_read_write.h" +#include "BLO_read_write.hh" using blender::float3; using blender::MutableSpan; diff --git a/source/blender/blenkernel/intern/modifier.cc b/source/blender/blenkernel/intern/modifier.cc index 399796d37a4..18436ac683d 100644 --- a/source/blender/blenkernel/intern/modifier.cc +++ b/source/blender/blenkernel/intern/modifier.cc @@ -72,7 +72,7 @@ #include "MOD_modifiertypes.hh" -#include "BLO_read_write.h" +#include "BLO_read_write.hh" #include "CLG_log.h" diff --git a/source/blender/blenkernel/intern/movieclip.cc b/source/blender/blenkernel/intern/movieclip.cc index 67211a7590c..af1ee322637 100644 --- a/source/blender/blenkernel/intern/movieclip.cc +++ b/source/blender/blenkernel/intern/movieclip.cc @@ -68,7 +68,7 @@ #include "GPU_texture.h" -#include "BLO_read_write.h" +#include "BLO_read_write.hh" #include "tracking_private.h" diff --git a/source/blender/blenkernel/intern/nla.cc b/source/blender/blenkernel/intern/nla.cc index 3a7f6f3fb46..c15219e87e9 100644 --- a/source/blender/blenkernel/intern/nla.cc +++ b/source/blender/blenkernel/intern/nla.cc @@ -39,7 +39,7 @@ #include "BKE_nla.h" #include "BKE_sound.h" -#include "BLO_read_write.h" +#include "BLO_read_write.hh" #include "RNA_access.hh" #include "RNA_prototypes.h" diff --git a/source/blender/blenkernel/intern/node.cc b/source/blender/blenkernel/intern/node.cc index 0acb9760b58..38c225232d7 100644 --- a/source/blender/blenkernel/intern/node.cc +++ b/source/blender/blenkernel/intern/node.cc @@ -90,7 +90,7 @@ #include "DEG_depsgraph.h" #include "DEG_depsgraph_build.h" -#include "BLO_read_write.h" +#include "BLO_read_write.hh" #include "PIL_time.h" diff --git a/source/blender/blenkernel/intern/node_tree_interface.cc b/source/blender/blenkernel/intern/node_tree_interface.cc index 1ca66498c27..335c7c3c3e7 100644 --- a/source/blender/blenkernel/intern/node_tree_interface.cc +++ b/source/blender/blenkernel/intern/node_tree_interface.cc @@ -14,7 +14,7 @@ #include "BLI_string.h" #include "BLI_vector.hh" -#include "BLO_read_write.h" +#include "BLO_read_write.hh" #include "DNA_collection_types.h" #include "DNA_material_types.h" diff --git a/source/blender/blenkernel/intern/object.cc b/source/blender/blenkernel/intern/object.cc index 6d363b60521..d3ae0acd4a6 100644 --- a/source/blender/blenkernel/intern/object.cc +++ b/source/blender/blenkernel/intern/object.cc @@ -136,7 +136,7 @@ #include "DRW_engine.h" -#include "BLO_read_write.h" +#include "BLO_read_write.hh" #include "BLO_readfile.h" #include "SEQ_sequencer.h" diff --git a/source/blender/blenkernel/intern/packedFile.cc b/source/blender/blenkernel/intern/packedFile.cc index 6b99f265f01..96b434f8888 100644 --- a/source/blender/blenkernel/intern/packedFile.cc +++ b/source/blender/blenkernel/intern/packedFile.cc @@ -40,7 +40,7 @@ #include "IMB_imbuf.h" #include "IMB_imbuf_types.h" -#include "BLO_read_write.h" +#include "BLO_read_write.hh" int BKE_packedfile_seek(PackedFile *pf, int offset, int whence) { diff --git a/source/blender/blenkernel/intern/paint.cc b/source/blender/blenkernel/intern/paint.cc index 254e1ae3abf..7e024b19b42 100644 --- a/source/blender/blenkernel/intern/paint.cc +++ b/source/blender/blenkernel/intern/paint.cc @@ -68,7 +68,7 @@ #include "RNA_enum_types.hh" -#include "BLO_read_write.h" +#include "BLO_read_write.hh" #include "bmesh.h" diff --git a/source/blender/blenkernel/intern/particle.cc b/source/blender/blenkernel/intern/particle.cc index 815a1844a9c..e18c161e521 100644 --- a/source/blender/blenkernel/intern/particle.cc +++ b/source/blender/blenkernel/intern/particle.cc @@ -78,7 +78,7 @@ #include "RE_texture.h" -#include "BLO_read_write.h" +#include "BLO_read_write.hh" #include "particle_private.h" diff --git a/source/blender/blenkernel/intern/pointcache.cc b/source/blender/blenkernel/intern/pointcache.cc index 6e2e1de40a5..ccaee4e8002 100644 --- a/source/blender/blenkernel/intern/pointcache.cc +++ b/source/blender/blenkernel/intern/pointcache.cc @@ -53,7 +53,7 @@ #include "BKE_scene.h" #include "BKE_softbody.h" -#include "BLO_read_write.h" +#include "BLO_read_write.hh" #include "BIK_api.h" diff --git a/source/blender/blenkernel/intern/pointcloud.cc b/source/blender/blenkernel/intern/pointcloud.cc index 940bb01c09a..9b7a7fd678c 100644 --- a/source/blender/blenkernel/intern/pointcloud.cc +++ b/source/blender/blenkernel/intern/pointcloud.cc @@ -42,7 +42,7 @@ #include "DEG_depsgraph_query.h" -#include "BLO_read_write.h" +#include "BLO_read_write.hh" using blender::float3; using blender::IndexRange; diff --git a/source/blender/blenkernel/intern/scene.cc b/source/blender/blenkernel/intern/scene.cc index 45b1ef379a3..47ce4a1c2e1 100644 --- a/source/blender/blenkernel/intern/scene.cc +++ b/source/blender/blenkernel/intern/scene.cc @@ -105,7 +105,7 @@ #include "SEQ_iterator.h" #include "SEQ_sequencer.h" -#include "BLO_read_write.h" +#include "BLO_read_write.hh" #include "engines/eevee/eevee_lightcache.h" diff --git a/source/blender/blenkernel/intern/screen.cc b/source/blender/blenkernel/intern/screen.cc index 7b2663f8f1a..409a366882b 100644 --- a/source/blender/blenkernel/intern/screen.cc +++ b/source/blender/blenkernel/intern/screen.cc @@ -51,7 +51,7 @@ #include "BKE_viewer_path.h" #include "BKE_workspace.h" -#include "BLO_read_write.h" +#include "BLO_read_write.hh" /* TODO(@JulianEisel): For asset shelf region reading/writing. Region read/write should be done via * a #ARegionType callback. */ diff --git a/source/blender/blenkernel/intern/shader_fx.cc b/source/blender/blenkernel/intern/shader_fx.cc index 4ab1b01b642..e50e7da41b8 100644 --- a/source/blender/blenkernel/intern/shader_fx.cc +++ b/source/blender/blenkernel/intern/shader_fx.cc @@ -36,7 +36,7 @@ #include "FX_shader_types.h" -#include "BLO_read_write.h" +#include "BLO_read_write.hh" static ShaderFxTypeInfo *shader_fx_types[NUM_SHADER_FX_TYPES] = {nullptr}; diff --git a/source/blender/blenkernel/intern/sound.cc b/source/blender/blenkernel/intern/sound.cc index c454348cba4..fb5cddd3a10 100644 --- a/source/blender/blenkernel/intern/sound.cc +++ b/source/blender/blenkernel/intern/sound.cc @@ -53,7 +53,7 @@ #include "DEG_depsgraph.h" #include "DEG_depsgraph_query.h" -#include "BLO_read_write.h" +#include "BLO_read_write.hh" #include "SEQ_sequencer.h" #include "SEQ_sound.h" diff --git a/source/blender/blenkernel/intern/speaker.cc b/source/blender/blenkernel/intern/speaker.cc index 1350ed2dffa..20030d1d593 100644 --- a/source/blender/blenkernel/intern/speaker.cc +++ b/source/blender/blenkernel/intern/speaker.cc @@ -22,7 +22,7 @@ #include "BKE_main.h" #include "BKE_speaker.h" -#include "BLO_read_write.h" +#include "BLO_read_write.hh" #include diff --git a/source/blender/blenkernel/intern/text.cc b/source/blender/blenkernel/intern/text.cc index 80f84f6a601..2a95bd21f01 100644 --- a/source/blender/blenkernel/intern/text.cc +++ b/source/blender/blenkernel/intern/text.cc @@ -41,7 +41,7 @@ #include "BKE_node.h" #include "BKE_text.h" -#include "BLO_read_write.h" +#include "BLO_read_write.hh" #ifdef WITH_PYTHON # include "BPY_extern.h" diff --git a/source/blender/blenkernel/intern/texture.cc b/source/blender/blenkernel/intern/texture.cc index 0353b439019..45d8eec71b7 100644 --- a/source/blender/blenkernel/intern/texture.cc +++ b/source/blender/blenkernel/intern/texture.cc @@ -61,7 +61,7 @@ #include "DRW_engine.h" -#include "BLO_read_write.h" +#include "BLO_read_write.hh" static void texture_init_data(ID *id) { diff --git a/source/blender/blenkernel/intern/vfont.cc b/source/blender/blenkernel/intern/vfont.cc index 0a0e33e5b8c..2100e437bed 100644 --- a/source/blender/blenkernel/intern/vfont.cc +++ b/source/blender/blenkernel/intern/vfont.cc @@ -46,7 +46,7 @@ #include "BKE_vfont.h" #include "BKE_vfontdata.h" -#include "BLO_read_write.h" +#include "BLO_read_write.hh" static CLG_LogRef LOG = {"bke.data_transfer"}; static ThreadRWMutex vfont_rwlock = BLI_RWLOCK_INITIALIZER; diff --git a/source/blender/blenkernel/intern/viewer_path.cc b/source/blender/blenkernel/intern/viewer_path.cc index 035b31e473a..2c3783631ad 100644 --- a/source/blender/blenkernel/intern/viewer_path.cc +++ b/source/blender/blenkernel/intern/viewer_path.cc @@ -13,7 +13,7 @@ #include "MEM_guardedalloc.h" -#include "BLO_read_write.h" +#include "BLO_read_write.hh" using blender::IndexRange; using blender::StringRef; diff --git a/source/blender/blenkernel/intern/volume.cc b/source/blender/blenkernel/intern/volume.cc index 203eac8611a..be68e2dec9c 100644 --- a/source/blender/blenkernel/intern/volume.cc +++ b/source/blender/blenkernel/intern/volume.cc @@ -49,7 +49,7 @@ #include "DEG_depsgraph_query.h" -#include "BLO_read_write.h" +#include "BLO_read_write.hh" #include "CLG_log.h" diff --git a/source/blender/blenkernel/intern/workspace.cc b/source/blender/blenkernel/intern/workspace.cc index fdb0b32c3f7..65ab8774339 100644 --- a/source/blender/blenkernel/intern/workspace.cc +++ b/source/blender/blenkernel/intern/workspace.cc @@ -39,7 +39,7 @@ #include "MEM_guardedalloc.h" -#include "BLO_read_write.h" +#include "BLO_read_write.hh" /* -------------------------------------------------------------------- */ diff --git a/source/blender/blenkernel/intern/world.cc b/source/blender/blenkernel/intern/world.cc index 5016465e74e..29ad4864a45 100644 --- a/source/blender/blenkernel/intern/world.cc +++ b/source/blender/blenkernel/intern/world.cc @@ -40,7 +40,7 @@ #include "GPU_material.h" -#include "BLO_read_write.h" +#include "BLO_read_write.hh" /** Free (or release) any data used by this world (does not free the world itself). */ static void world_free_data(ID *id) diff --git a/source/blender/blenlib/intern/BLI_mempool.c b/source/blender/blenlib/intern/BLI_mempool.c index 669019eed1b..f673ade25a9 100644 --- a/source/blender/blenlib/intern/BLI_mempool.c +++ b/source/blender/blenlib/intern/BLI_mempool.c @@ -43,7 +43,7 @@ # define POISON_REDZONE_SIZE 0 #endif -/* NOTE: copied from BLO_blend_defs.h, don't use here because we're in BLI. */ +/* NOTE: copied from BLO_blend_defs.hh, don't use here because we're in BLI. */ #ifdef __BIG_ENDIAN__ /* Big Endian */ # define MAKE_ID(a, b, c, d) ((int)(a) << 24 | (int)(b) << 16 | (c) << 8 | (d)) diff --git a/source/blender/blenloader/BLO_blend_defs.h b/source/blender/blenloader/BLO_blend_defs.hh similarity index 100% rename from source/blender/blenloader/BLO_blend_defs.h rename to source/blender/blenloader/BLO_blend_defs.hh diff --git a/source/blender/blenloader/BLO_blend_validate.h b/source/blender/blenloader/BLO_blend_validate.hh similarity index 69% rename from source/blender/blenloader/BLO_blend_validate.h rename to source/blender/blenloader/BLO_blend_validate.hh index 962f5f1ea09..6fe25a9f22d 100644 --- a/source/blender/blenloader/BLO_blend_validate.h +++ b/source/blender/blenloader/BLO_blend_validate.hh @@ -13,20 +13,12 @@ struct Main; struct ReportList; -#ifdef __cplusplus -extern "C" { -#endif - /** * Check (but do *not* fix) that all linked data-blocks are still valid * (i.e. pointing to the right library). */ -bool BLO_main_validate_libraries(struct Main *bmain, struct ReportList *reports); +bool BLO_main_validate_libraries(Main *bmain, ReportList *reports); /** * * Check (and fix if needed) that shape key's 'from' pointer is valid. */ -bool BLO_main_validate_shapekeys(struct Main *bmain, struct ReportList *reports); - -#ifdef __cplusplus -} -#endif +bool BLO_main_validate_shapekeys(Main *bmain, ReportList *reports); diff --git a/source/blender/blenloader/BLO_read_write.h b/source/blender/blenloader/BLO_read_write.hh similarity index 86% rename from source/blender/blenloader/BLO_read_write.h rename to source/blender/blenloader/BLO_read_write.hh index d4191e6e579..bf7f05a14fe 100644 --- a/source/blender/blenloader/BLO_read_write.h +++ b/source/blender/blenloader/BLO_read_write.hh @@ -33,15 +33,10 @@ #include "DNA_windowmanager_types.h" /* for eReportType */ -#ifdef __cplusplus -extern "C" { -#endif - -typedef struct BlendDataReader BlendDataReader; -typedef struct BlendLibReader BlendLibReader; -typedef struct BlendWriter BlendWriter; - +struct BlendDataReader; struct BlendFileReadReport; +struct BlendLibReader; +struct BlendWriter; struct LibraryIDLinkCallbackData; struct Main; @@ -142,20 +137,15 @@ void BLO_write_struct_array_at_address_by_id( /** * Write struct list. */ -void BLO_write_struct_list_by_name(BlendWriter *writer, - const char *struct_name, - struct ListBase *list); -void BLO_write_struct_list_by_id(BlendWriter *writer, int struct_id, struct ListBase *list); +void BLO_write_struct_list_by_name(BlendWriter *writer, const char *struct_name, ListBase *list); +void BLO_write_struct_list_by_id(BlendWriter *writer, int struct_id, ListBase *list); #define BLO_write_struct_list(writer, struct_name, list_ptr) \ BLO_write_struct_list_by_id(writer, BLO_get_struct_id(writer, struct_name), list_ptr) /** * Write id struct. */ -void blo_write_id_struct(BlendWriter *writer, - int struct_id, - const void *id_address, - const struct ID *id); +void blo_write_id_struct(BlendWriter *writer, int struct_id, const void *id_address, const ID *id); #define BLO_write_id_struct(writer, struct_name, id_address, id) \ blo_write_id_struct(writer, BLO_get_struct_id(writer, struct_name), id_address, id) @@ -167,13 +157,11 @@ void blo_write_id_struct(BlendWriter *writer, * \note Once there is a better generic handling of embedded IDs, * this may go back to private code in `writefile.cc`. */ -typedef struct BLO_Write_IDBuffer BLO_Write_IDBuffer; +struct BLO_Write_IDBuffer; BLO_Write_IDBuffer *BLO_write_allocate_id_buffer(void); -void BLO_write_init_id_buffer_from_id(BLO_Write_IDBuffer *id_buffer, - struct ID *id, - const bool is_undo); -struct ID *BLO_write_get_id_buffer_temp_id(BLO_Write_IDBuffer *id_buffer); +void BLO_write_init_id_buffer_from_id(BLO_Write_IDBuffer *id_buffer, ID *id, const bool is_undo); +ID *BLO_write_get_id_buffer_temp_id(BLO_Write_IDBuffer *id_buffer); void BLO_write_destroy_id_buffer(BLO_Write_IDBuffer **id_buffer); /** @@ -242,8 +230,8 @@ typedef void (*BlendReadListFn)(BlendDataReader *reader, void *data); * Updates the `list->first` and `list->last` pointers. * When not NULL, calls the callback on every element. */ -void BLO_read_list_cb(BlendDataReader *reader, struct ListBase *list, BlendReadListFn callback); -void BLO_read_list(BlendDataReader *reader, struct ListBase *list); +void BLO_read_list_cb(BlendDataReader *reader, ListBase *list, BlendReadListFn callback); +void BLO_read_list(BlendDataReader *reader, ListBase *list); /* Update data pointers and correct byte-order if necessary. */ @@ -261,8 +249,8 @@ int BLO_read_fileversion_get(BlendDataReader *reader); bool BLO_read_requires_endian_switch(BlendDataReader *reader); bool BLO_read_data_is_undo(BlendDataReader *reader); void BLO_read_data_globmap_add(BlendDataReader *reader, void *oldaddr, void *newaddr); -void BLO_read_glob_list(BlendDataReader *reader, struct ListBase *list); -struct BlendFileReadReport *BLO_read_data_reports(BlendDataReader *reader); +void BLO_read_glob_list(BlendDataReader *reader, ListBase *list); +BlendFileReadReport *BLO_read_data_reports(BlendDataReader *reader); struct Library *BLO_read_data_current_library(BlendDataReader *reader); /** \} */ @@ -283,10 +271,10 @@ struct Library *BLO_read_data_current_library(BlendDataReader *reader); * prevent linked data to point to local IDs. * \return the new address of the given ID pointer, or null if not found. */ -struct ID *BLO_read_get_new_id_address(BlendLibReader *reader, - struct ID *self_id, - const bool do_linked_only, - struct ID *id) ATTR_NONNULL(2); +ID *BLO_read_get_new_id_address(BlendLibReader *reader, + ID *self_id, + const bool do_linked_only, + ID *id) ATTR_NONNULL(2); /** * Search for the new address of the ID for the given `session_uuid`. @@ -299,14 +287,14 @@ struct ID *BLO_read_get_new_id_address(BlendLibReader *reader, * coming from the previous, existing Main data, when it is preserved in newly read Main. * See e.g. the #scene_undo_preserve code-path. */ -struct ID *BLO_read_get_new_id_address_from_session_uuid(BlendLibReader *reader, uint session_uuid) +ID *BLO_read_get_new_id_address_from_session_uuid(BlendLibReader *reader, uint session_uuid) ATTR_NONNULL(1); /* Misc. */ bool BLO_read_lib_is_undo(BlendLibReader *reader); -struct Main *BLO_read_lib_get_main(BlendLibReader *reader); -struct BlendFileReadReport *BLO_read_lib_reports(BlendLibReader *reader); +Main *BLO_read_lib_get_main(BlendLibReader *reader); +BlendFileReadReport *BLO_read_lib_reports(BlendLibReader *reader); /** \} */ @@ -321,13 +309,7 @@ struct BlendFileReadReport *BLO_read_lib_reports(BlendLibReader *reader); * NOTE(@ideasman42) a kludge but better than doubling up on prints, * we could alternatively have a versions of a report function which forces printing. */ -void BLO_reportf_wrap(struct BlendFileReadReport *reports, - eReportType type, - const char *format, - ...) ATTR_PRINTF_FORMAT(3, 4); +void BLO_reportf_wrap(BlendFileReadReport *reports, eReportType type, const char *format, ...) + ATTR_PRINTF_FORMAT(3, 4); /** \} */ - -#ifdef __cplusplus -} -#endif diff --git a/source/blender/blenloader/BLO_undofile.h b/source/blender/blenloader/BLO_undofile.hh similarity index 81% rename from source/blender/blenloader/BLO_undofile.h rename to source/blender/blenloader/BLO_undofile.hh index c832c6e5461..d4b4bf66257 100644 --- a/source/blender/blenloader/BLO_undofile.h +++ b/source/blender/blenloader/BLO_undofile.hh @@ -10,11 +10,13 @@ */ #include "BLI_filereader.h" +#include "BLI_listbase.h" struct GHash; +struct Main; struct Scene; -typedef struct { +struct MemFileChunk { void *next, *prev; const char *buf; /** Size in bytes. */ @@ -28,14 +30,14 @@ typedef struct { /** Session UUID of the ID being currently written (MAIN_ID_SESSION_UUID_UNSET when not writing * ID-related data). Used to find matching chunks in previous memundo step. */ uint id_session_uuid; -} MemFileChunk; +}; -typedef struct MemFile { +struct MemFile { ListBase chunks; size_t size; -} MemFile; +}; -typedef struct MemFileWriteData { +struct MemFileWriteData { MemFile *written_memfile; MemFile *reference_memfile; @@ -43,14 +45,14 @@ typedef struct MemFileWriteData { MemFileChunk *reference_current_chunk; /** Maps an ID session uuid to its first reference MemFileChunk, if existing. */ - struct GHash *id_session_uuid_mapping; -} MemFileWriteData; + GHash *id_session_uuid_mapping; +}; -typedef struct MemFileUndoData { +struct MemFileUndoData { char filepath[1024]; /* FILE_MAX */ MemFile memfile; size_t undo_size; -} MemFileUndoData; +}; /* FileReader-compatible wrapper for reading MemFiles */ typedef struct { @@ -62,10 +64,6 @@ typedef struct { bool memchunk_identical; } UndoReader; -#ifdef __cplusplus -extern "C" { -#endif - /* Actually only used `writefile.cc`. */ void BLO_memfile_write_init(MemFileWriteData *mem_data, @@ -95,18 +93,12 @@ extern void BLO_memfile_clear_future(MemFile *memfile); /* Utilities. */ -extern struct Main *BLO_memfile_main_get(struct MemFile *memfile, - struct Main *bmain, - struct Scene **r_scene); +extern Main *BLO_memfile_main_get(MemFile *memfile, Main *bmain, Scene **r_scene); /** * Saves .blend using undo buffer. * * \return success. */ -extern bool BLO_memfile_write_file(struct MemFile *memfile, const char *filepath); +extern bool BLO_memfile_write_file(MemFile *memfile, const char *filepath); FileReader *BLO_memfile_new_filereader(MemFile *memfile, int undo_direction); - -#ifdef __cplusplus -} -#endif diff --git a/source/blender/blenloader/BLO_writefile.h b/source/blender/blenloader/BLO_writefile.hh similarity index 100% rename from source/blender/blenloader/BLO_writefile.h rename to source/blender/blenloader/BLO_writefile.hh diff --git a/source/blender/blenloader/CMakeLists.txt b/source/blender/blenloader/CMakeLists.txt index 1ddc5c038a2..2cbedf42926 100644 --- a/source/blender/blenloader/CMakeLists.txt +++ b/source/blender/blenloader/CMakeLists.txt @@ -49,14 +49,14 @@ set(SRC intern/versioning_userdef.cc intern/writefile.cc - BLO_blend_defs.h - BLO_blend_validate.h - BLO_read_write.h + BLO_blend_defs.hh + BLO_blend_validate.hh + BLO_read_write.hh BLO_readfile.h - BLO_undofile.h - BLO_writefile.h - intern/readfile.h - intern/versioning_common.h + BLO_undofile.hh + BLO_writefile.hh + intern/readfile.hh + intern/versioning_common.hh ) set(LIB diff --git a/source/blender/blenloader/intern/blend_validate.cc b/source/blender/blenloader/intern/blend_validate.cc index 29f88c963cc..fe1a7e7b6b9 100644 --- a/source/blender/blenloader/intern/blend_validate.cc +++ b/source/blender/blenloader/intern/blend_validate.cc @@ -31,10 +31,10 @@ #include "BKE_main.h" #include "BKE_report.h" -#include "BLO_blend_validate.h" +#include "BLO_blend_validate.hh" #include "BLO_readfile.h" -#include "readfile.h" +#include "readfile.hh" bool BLO_main_validate_libraries(Main *bmain, ReportList *reports) { diff --git a/source/blender/blenloader/intern/readblenentry.cc b/source/blender/blenloader/intern/readblenentry.cc index caa9ad41418..0593647be71 100644 --- a/source/blender/blenloader/intern/readblenentry.cc +++ b/source/blender/blenloader/intern/readblenentry.cc @@ -30,11 +30,11 @@ #include "BKE_idtype.h" #include "BKE_main.h" -#include "BLO_blend_defs.h" +#include "BLO_blend_defs.hh" #include "BLO_readfile.h" -#include "BLO_undofile.h" +#include "BLO_undofile.hh" -#include "readfile.h" +#include "readfile.hh" #include "BLI_sys_types.h" /* Needed for `intptr_t`. */ diff --git a/source/blender/blenloader/intern/readfile.cc b/source/blender/blenloader/intern/readfile.cc index 4dfb04ea992..85776aa6a09 100644 --- a/source/blender/blenloader/intern/readfile.cc +++ b/source/blender/blenloader/intern/readfile.cc @@ -93,11 +93,11 @@ #include "DEG_depsgraph.h" -#include "BLO_blend_defs.h" -#include "BLO_blend_validate.h" -#include "BLO_read_write.h" +#include "BLO_blend_defs.hh" +#include "BLO_blend_validate.hh" +#include "BLO_read_write.hh" #include "BLO_readfile.h" -#include "BLO_undofile.h" +#include "BLO_undofile.hh" #include "SEQ_clipboard.h" #include "SEQ_iterator.h" @@ -105,7 +105,7 @@ #include "SEQ_sequencer.h" #include "SEQ_utils.h" -#include "readfile.h" +#include "readfile.hh" /* Make preferences read-only. */ #define U (*((const UserDef *)&U)) diff --git a/source/blender/blenloader/intern/readfile.h b/source/blender/blenloader/intern/readfile.hh similarity index 57% rename from source/blender/blenloader/intern/readfile.h rename to source/blender/blenloader/intern/readfile.hh index 48ad45c317a..b761d0812d3 100644 --- a/source/blender/blenloader/intern/readfile.h +++ b/source/blender/blenloader/intern/readfile.hh @@ -9,7 +9,7 @@ #pragma once -#include /* Include header using off_t before poisoning it below. */ +#include /* Include header using off_t before poisoning it below. */ #ifdef WIN32 # include "BLI_winstuff.h" @@ -20,21 +20,23 @@ #include "DNA_space_types.h" #include "DNA_windowmanager_types.h" /* for eReportType */ -#ifdef __cplusplus -extern "C" { -#endif +#include "BLO_readfile.h" +struct BlendFileData; +struct BlendFileReadParams; +struct BlendFileReadReport; struct BLOCacheStorage; +struct BHeadSort; +struct DNA_ReconstructInfo; struct IDNameLib_Map; struct Key; +struct Main; struct MemFile; struct Object; struct OldNewMap; struct ReportList; struct UserDef; -typedef struct IDNameLib_Map IDNameLib_Map; - enum eFileDataFlag { FD_FLAGS_SWITCH_ENDIAN = 1 << 0, FD_FLAGS_FILE_POINTSIZE_IS_4 = 1 << 1, @@ -51,7 +53,7 @@ ENUM_OPERATORS(eFileDataFlag, FD_FLAGS_NOT_MY_LIBMAP) # pragma GCC poison off_t #endif -typedef struct FileData { +struct FileData { /** Linked list of BHeadN's. */ ListBase bhead_list; enum eFileDataFlag flags; @@ -67,11 +69,11 @@ typedef struct FileData { char relabase[FILE_MAX]; /** General reading variables. */ - struct SDNA *filesdna; - const struct SDNA *memsdna; + SDNA *filesdna; + const SDNA *memsdna; /** Array of #eSDNA_StructCompare. */ const char *compflags; - struct DNA_ReconstructInfo *reconstruct_info; + DNA_ReconstructInfo *reconstruct_info; int fileversion; /** Used to retrieve ID names from (bhead+1). */ @@ -93,24 +95,24 @@ typedef struct FileData { */ int id_tag_extra; - struct OldNewMap *datamap; - struct OldNewMap *globmap; + OldNewMap *datamap; + OldNewMap *globmap; /** * Store mapping from old ID pointers (the values they have in the .blend file) to new ones, * typically from value in `bhead->old` to address in memory where the ID was read. * Used during library-linking process (see #lib_link_all). */ - struct OldNewMap *libmap; + OldNewMap *libmap; - struct OldNewMap *packedmap; - struct BLOCacheStorage *cache_storage; + OldNewMap *packedmap; + BLOCacheStorage *cache_storage; - struct BHeadSort *bheadmap; + BHeadSort *bheadmap; int tot_bheadmap; /** See: #USE_GHASH_BHEAD. */ - struct GHash *bhead_idname_hash; + GHash *bhead_idname_hash; ListBase *mainlist; /** Used for undo. */ @@ -118,7 +120,7 @@ typedef struct FileData { /** * IDMap using UUID's as keys of all the old IDs in the old bmain. Used during undo to find a * matching old data when reading a new ID. */ - struct IDNameLib_Map *old_idmap_uuid; + IDNameLib_Map *old_idmap_uuid; /** * IDMap using uuids as keys of the IDs read (or moved) in the new main(s). * @@ -128,49 +130,46 @@ typedef struct FileData { * * Also used to find current valid pointers (or none) of these 'no undo' IDs existing in * read memfile. */ - struct IDNameLib_Map *new_idmap_uuid; + IDNameLib_Map *new_idmap_uuid; - struct BlendFileReadReport *reports; -} FileData; + BlendFileReadReport *reports; +}; #define SIZEOFBLENDERHEADER 12 /***/ -struct Main; void blo_join_main(ListBase *mainlist); -void blo_split_main(ListBase *mainlist, struct Main *main); +void blo_split_main(ListBase *mainlist, Main *main); -struct BlendFileData *blo_read_file_internal(FileData *fd, const char *filepath); +BlendFileData *blo_read_file_internal(FileData *fd, const char *filepath); /** * On each new library added, it now checks for the current #FileData and expands relativeness * * cannot be called with relative paths anymore! */ -FileData *blo_filedata_from_file(const char *filepath, struct BlendFileReadReport *reports); -FileData *blo_filedata_from_memory(const void *mem, - int memsize, - struct BlendFileReadReport *reports); -FileData *blo_filedata_from_memfile(struct MemFile *memfile, - const struct BlendFileReadParams *params, - struct BlendFileReadReport *reports); +FileData *blo_filedata_from_file(const char *filepath, BlendFileReadReport *reports); +FileData *blo_filedata_from_memory(const void *mem, int memsize, BlendFileReadReport *reports); +FileData *blo_filedata_from_memfile(MemFile *memfile, + const BlendFileReadParams *params, + BlendFileReadReport *reports); -void blo_make_packed_pointer_map(FileData *fd, struct Main *oldmain); +void blo_make_packed_pointer_map(FileData *fd, Main *oldmain); /** * Set old main packed data to zero if it has been restored * this works because freeing old main only happens after this call. */ -void blo_end_packed_pointer_map(FileData *fd, struct Main *oldmain); +void blo_end_packed_pointer_map(FileData *fd, Main *oldmain); /** * Build a #GSet of old main (we only care about local data here, * so we can do that after #blo_split_main() call. */ -void blo_make_old_idmap_from_main(FileData *fd, struct Main *bmain); +void blo_make_old_idmap_from_main(FileData *fd, Main *bmain); -BHead *blo_read_asset_data_block(FileData *fd, BHead *bhead, struct AssetMetaData **r_asset_data); +BHead *blo_read_asset_data_block(FileData *fd, BHead *bhead, AssetMetaData **r_asset_data); -void blo_cache_storage_init(FileData *fd, struct Main *bmain); -void blo_cache_storage_old_bmain_clear(FileData *fd, struct Main *bmain_old); +void blo_cache_storage_init(FileData *fd, Main *bmain); +void blo_cache_storage_old_bmain_clear(FileData *fd, Main *bmain_old); void blo_cache_storage_end(FileData *fd); void blo_filedata_free(FileData *fd); @@ -186,7 +185,7 @@ const char *blo_bhead_id_name(const FileData *fd, const BHead *bhead); /** * Warning! Caller's responsibility to ensure given bhead **is** an ID one! */ -struct AssetMetaData *blo_bhead_id_asset_data_address(const FileData *fd, const BHead *bhead); +AssetMetaData *blo_bhead_id_asset_data_address(const FileData *fd, const BHead *bhead); /* do versions stuff */ @@ -199,16 +198,13 @@ struct AssetMetaData *blo_bhead_id_asset_data_address(const FileData *fd, const * * \attention ONLY USE THIS KIND OF VERSIONING WHEN `dna_rename_defs.h` ISN'T SUFFICIENT. */ -void blo_do_versions_dna(struct SDNA *sdna, int versionfile, int subversionfile); +void blo_do_versions_dna(SDNA *sdna, int versionfile, int subversionfile); -void blo_do_versions_oldnewmap_insert(struct OldNewMap *onm, - const void *oldaddr, - void *newaddr, - int nr); +void blo_do_versions_oldnewmap_insert(OldNewMap *onm, const void *oldaddr, void *newaddr, int nr); /** * Only library data. */ -void *blo_do_versions_newlibadr(struct FileData *fd, +void *blo_do_versions_newlibadr(FileData *fd, ID *self_id, const bool is_linked_only, const void *adr); @@ -217,34 +213,34 @@ void *blo_do_versions_newlibadr(struct FileData *fd, * \note this version patch is intended for versions < 2.52.2, * but was initially introduced in 2.27 already. */ -void blo_do_version_old_trackto_to_constraints(struct Object *ob); -void blo_do_versions_key_uidgen(struct Key *key); +void blo_do_version_old_trackto_to_constraints(Object *ob); +void blo_do_versions_key_uidgen(Key *key); /** * Patching #UserDef struct and Themes. */ -void blo_do_versions_userdef(struct UserDef *userdef); +void blo_do_versions_userdef(UserDef *userdef); -void blo_do_versions_pre250(struct FileData *fd, struct Library *lib, struct Main *bmain); -void blo_do_versions_250(struct FileData *fd, struct Library *lib, struct Main *bmain); -void blo_do_versions_260(struct FileData *fd, struct Library *lib, struct Main *bmain); -void blo_do_versions_270(struct FileData *fd, struct Library *lib, struct Main *bmain); -void blo_do_versions_280(struct FileData *fd, struct Library *lib, struct Main *bmain); -void blo_do_versions_290(struct FileData *fd, struct Library *lib, struct Main *bmain); -void blo_do_versions_300(struct FileData *fd, struct Library *lib, struct Main *bmain); -void blo_do_versions_400(struct FileData *fd, struct Library *lib, struct Main *bmain); -void blo_do_versions_cycles(struct FileData *fd, struct Library *lib, struct Main *bmain); +void blo_do_versions_pre250(FileData *fd, Library *lib, Main *bmain); +void blo_do_versions_250(FileData *fd, Library *lib, Main *bmain); +void blo_do_versions_260(FileData *fd, Library *lib, Main *bmain); +void blo_do_versions_270(FileData *fd, Library *lib, Main *bmain); +void blo_do_versions_280(FileData *fd, Library *lib, Main *bmain); +void blo_do_versions_290(FileData *fd, Library *lib, Main *bmain); +void blo_do_versions_300(FileData *fd, Library *lib, Main *bmain); +void blo_do_versions_400(FileData *fd, Library *lib, Main *bmain); +void blo_do_versions_cycles(FileData *fd, Library *lib, Main *bmain); -void do_versions_after_linking_250(struct Main *bmain); -void do_versions_after_linking_260(struct Main *bmain); -void do_versions_after_linking_270(struct Main *bmain); -void do_versions_after_linking_280(struct FileData *fd, struct Main *bmain); -void do_versions_after_linking_290(struct FileData *fd, struct Main *bmain); -void do_versions_after_linking_300(struct FileData *fd, struct Main *bmain); -void do_versions_after_linking_400(struct FileData *fd, struct Main *bmain); -void do_versions_after_linking_cycles(struct Main *bmain); +void do_versions_after_linking_250(Main *bmain); +void do_versions_after_linking_260(Main *bmain); +void do_versions_after_linking_270(Main *bmain); +void do_versions_after_linking_280(FileData *fd, Main *bmain); +void do_versions_after_linking_290(FileData *fd, Main *bmain); +void do_versions_after_linking_300(FileData *fd, Main *bmain); +void do_versions_after_linking_400(FileData *fd, Main *bmain); +void do_versions_after_linking_cycles(Main *bmain); -void do_versions_after_setup(struct Main *new_bmain, struct BlendFileReadReport *reports); +void do_versions_after_setup(Main *new_bmain, BlendFileReadReport *reports); /** * Direct data-blocks with global linking. @@ -252,12 +248,8 @@ void do_versions_after_setup(struct Main *new_bmain, struct BlendFileReadReport * \note This is rather unfortunate to have to expose this here, * but better use that nasty hack in do_version than readfile itself. */ -void *blo_read_get_new_globaldata_address(struct FileData *fd, const void *adr); +void *blo_read_get_new_globaldata_address(FileData *fd, const void *adr); /* Mark the Main data as invalid (.blend file reading should be aborted ASAP, and the already read * data should be discarded). Also add an error report to `fd` including given `message`. */ -void blo_readfile_invalidate(struct FileData *fd, struct Main *bmain, const char *message); - -#ifdef __cplusplus -} -#endif +void blo_readfile_invalidate(FileData *fd, Main *bmain, const char *message); diff --git a/source/blender/blenloader/intern/undofile.cc b/source/blender/blenloader/intern/undofile.cc index 218a120f94d..940b48f0519 100644 --- a/source/blender/blenloader/intern/undofile.cc +++ b/source/blender/blenloader/intern/undofile.cc @@ -28,7 +28,7 @@ #include "BLI_ghash.h" #include "BLO_readfile.h" -#include "BLO_undofile.h" +#include "BLO_undofile.hh" #include "BKE_lib_id.h" #include "BKE_main.h" diff --git a/source/blender/blenloader/intern/versioning_250.cc b/source/blender/blenloader/intern/versioning_250.cc index d7b168e1bfb..6969f3d99ba 100644 --- a/source/blender/blenloader/intern/versioning_250.cc +++ b/source/blender/blenloader/intern/versioning_250.cc @@ -73,9 +73,9 @@ #include "BLO_readfile.h" -#include "readfile.h" +#include "readfile.hh" -#include "versioning_common.h" +#include "versioning_common.hh" #include diff --git a/source/blender/blenloader/intern/versioning_260.cc b/source/blender/blenloader/intern/versioning_260.cc index 03391812cfe..f2c15cdd081 100644 --- a/source/blender/blenloader/intern/versioning_260.cc +++ b/source/blender/blenloader/intern/versioning_260.cc @@ -76,7 +76,7 @@ #include "BLO_readfile.h" -#include "readfile.h" +#include "readfile.hh" /** Without empty statements, clang-format fails (tested with v12 & v15). */ #define CLANG_FORMAT_NOP_WORKAROUND ((void)0) diff --git a/source/blender/blenloader/intern/versioning_270.cc b/source/blender/blenloader/intern/versioning_270.cc index 4cc2de770e1..07296992500 100644 --- a/source/blender/blenloader/intern/versioning_270.cc +++ b/source/blender/blenloader/intern/versioning_270.cc @@ -72,7 +72,7 @@ #include "NOD_composite.h" #include "NOD_socket.hh" -#include "readfile.h" +#include "readfile.hh" #include "MEM_guardedalloc.h" diff --git a/source/blender/blenloader/intern/versioning_280.cc b/source/blender/blenloader/intern/versioning_280.cc index 4238f430fd3..7ff1d692848 100644 --- a/source/blender/blenloader/intern/versioning_280.cc +++ b/source/blender/blenloader/intern/versioning_280.cc @@ -101,11 +101,11 @@ #include "BLT_translation.h" -#include "BLO_read_write.h" +#include "BLO_read_write.hh" #include "BLO_readfile.h" -#include "readfile.h" +#include "readfile.hh" -#include "versioning_common.h" +#include "versioning_common.hh" #include "MEM_guardedalloc.h" diff --git a/source/blender/blenloader/intern/versioning_290.cc b/source/blender/blenloader/intern/versioning_290.cc index 865452d62b0..f97901b642e 100644 --- a/source/blender/blenloader/intern/versioning_290.cc +++ b/source/blender/blenloader/intern/versioning_290.cc @@ -68,8 +68,8 @@ #include "SEQ_transform.h" #include "BLO_readfile.h" -#include "readfile.h" -#include "versioning_common.h" +#include "readfile.hh" +#include "versioning_common.hh" /* Make preferences read-only, use `versioning_userdef.cc`. */ #define U (*((const UserDef *)&U)) diff --git a/source/blender/blenloader/intern/versioning_300.cc b/source/blender/blenloader/intern/versioning_300.cc index 0e6a56ff6f4..e2d10af72ce 100644 --- a/source/blender/blenloader/intern/versioning_300.cc +++ b/source/blender/blenloader/intern/versioning_300.cc @@ -80,7 +80,7 @@ #include "BLO_readfile.h" -#include "readfile.h" +#include "readfile.hh" #include "SEQ_channels.h" #include "SEQ_effects.h" @@ -89,7 +89,7 @@ #include "SEQ_sequencer.h" #include "SEQ_time.h" -#include "versioning_common.h" +#include "versioning_common.hh" static CLG_LogRef LOG = {"blo.readfile.doversion"}; diff --git a/source/blender/blenloader/intern/versioning_400.cc b/source/blender/blenloader/intern/versioning_400.cc index e619f5a3df6..2e5aaf6a018 100644 --- a/source/blender/blenloader/intern/versioning_400.cc +++ b/source/blender/blenloader/intern/versioning_400.cc @@ -43,12 +43,12 @@ #include "BLT_translation.h" -#include "BLO_read_write.h" +#include "BLO_read_write.hh" #include "BLO_readfile.h" -#include "readfile.h" +#include "readfile.hh" -#include "versioning_common.h" +#include "versioning_common.hh" // static CLG_LogRef LOG = {"blo.readfile.doversion"}; diff --git a/source/blender/blenloader/intern/versioning_common.cc b/source/blender/blenloader/intern/versioning_common.cc index 05d85be73db..3c614ff2f4f 100644 --- a/source/blender/blenloader/intern/versioning_common.cc +++ b/source/blender/blenloader/intern/versioning_common.cc @@ -33,8 +33,8 @@ #include "MEM_guardedalloc.h" #include "BLO_readfile.h" -#include "readfile.h" -#include "versioning_common.h" +#include "readfile.hh" +#include "versioning_common.hh" using blender::Map; using blender::StringRef; @@ -185,17 +185,18 @@ void version_node_output_socket_name(bNodeTree *ntree, bNodeSocket *version_node_add_socket_if_not_exist(bNodeTree *ntree, bNode *node, - eNodeSocketInOut in_out, + int in_out, int type, int subtype, const char *identifier, const char *name) { - bNodeSocket *sock = nodeFindSocket(node, in_out, identifier); + bNodeSocket *sock = nodeFindSocket(node, eNodeSocketInOut(in_out), identifier); if (sock != nullptr) { return sock; } - return nodeAddStaticSocket(ntree, node, in_out, type, subtype, identifier, name); + return nodeAddStaticSocket( + ntree, node, eNodeSocketInOut(in_out), type, subtype, identifier, name); } void version_node_id(bNodeTree *ntree, const int node_type, const char *new_name) diff --git a/source/blender/blenloader/intern/versioning_common.h b/source/blender/blenloader/intern/versioning_common.hh similarity index 62% rename from source/blender/blenloader/intern/versioning_common.h rename to source/blender/blenloader/intern/versioning_common.hh index 19a8d40c96d..88a1b823911 100644 --- a/source/blender/blenloader/intern/versioning_common.h +++ b/source/blender/blenloader/intern/versioning_common.hh @@ -8,13 +8,11 @@ #pragma once -#ifdef __cplusplus -# include "BLI_function_ref.hh" -# include "BLI_map.hh" -using blender::FunctionRef; -#endif +#include "BLI_function_ref.hh" +#include "BLI_map.hh" struct ARegion; +struct bNode; struct bNodeSocket; struct bNodeTree; struct ID; @@ -23,19 +21,17 @@ struct ListBase; struct Main; struct ViewLayer; -#ifdef __cplusplus -extern "C" { -#endif +using blender::FunctionRef; /** * Check if a region of type \a region_type exists in \a regionbase. Otherwise add it after the * first region of type \a link_after_region_type. * \returns null if a region of the given type already existed, otherwise the newly added region. */ -struct ARegion *do_versions_add_region_if_not_found(struct ListBase *regionbase, - int region_type, - const char *allocname, - int link_after_region_type); +ARegion *do_versions_add_region_if_not_found(ListBase *regionbase, + int region_type, + const char *allocname, + int link_after_region_type); /** * Check if a region of type \a region_type exists in \a regionbase. Otherwise add it after the * first region of type \a link_after_region_type. @@ -53,17 +49,17 @@ ARegion *do_versions_ensure_region(ListBase *regionbase, */ ID *do_versions_rename_id(Main *bmain, short id_type, const char *name_src, const char *name_dst); -bool version_node_socket_is_used(struct bNodeSocket *sock); +bool version_node_socket_is_used(bNodeSocket *sock); -void version_node_socket_name(struct bNodeTree *ntree, +void version_node_socket_name(bNodeTree *ntree, int node_type, const char *old_name, const char *new_name); -void version_node_input_socket_name(struct bNodeTree *ntree, +void version_node_input_socket_name(bNodeTree *ntree, int node_type, const char *old_name, const char *new_name); -void version_node_output_socket_name(struct bNodeTree *ntree, +void version_node_output_socket_name(bNodeTree *ntree, int node_type, const char *old_name, const char *new_name); @@ -96,20 +92,20 @@ void version_node_socket_index_animdata( /** * Replace the ID name of all nodes in the tree with the given type with the new name. */ -void version_node_id(struct bNodeTree *ntree, int node_type, const char *new_name); +void version_node_id(bNodeTree *ntree, int node_type, const char *new_name); /** * Convert `SocketName.001` unique name format to `SocketName_001`. Previously both were used. */ void version_node_socket_id_delim(bNodeSocket *socket); -struct bNodeSocket *version_node_add_socket_if_not_exist(struct bNodeTree *ntree, - struct bNode *node, - eNodeSocketInOut in_out, - int type, - int subtype, - const char *identifier, - const char *name); +bNodeSocket *version_node_add_socket_if_not_exist(bNodeTree *ntree, + bNode *node, + int in_out, + int type, + int subtype, + const char *identifier, + const char *name); /** * The versioning code generally expects `SOCK_IS_LINKED` to be set correctly. This function @@ -124,29 +120,20 @@ void add_realize_instances_before_socket(bNodeTree *ntree, bNode *node, bNodeSocket *geometry_socket); -float *version_cycles_node_socket_float_value(struct bNodeSocket *socket); -float *version_cycles_node_socket_rgba_value(struct bNodeSocket *socket); -float *version_cycles_node_socket_vector_value(struct bNodeSocket *socket); +float *version_cycles_node_socket_float_value(bNodeSocket *socket); +float *version_cycles_node_socket_rgba_value(bNodeSocket *socket); +float *version_cycles_node_socket_vector_value(bNodeSocket *socket); -struct IDProperty *version_cycles_properties_from_ID(struct ID *id); -struct IDProperty *version_cycles_properties_from_view_layer(struct ViewLayer *view_layer); -struct IDProperty *version_cycles_visibility_properties_from_ID(ID *id); +IDProperty *version_cycles_properties_from_ID(ID *id); +IDProperty *version_cycles_properties_from_view_layer(ViewLayer *view_layer); +IDProperty *version_cycles_visibility_properties_from_ID(ID *id); -float version_cycles_property_float(struct IDProperty *idprop, - const char *name, - float default_value); -int version_cycles_property_int(struct IDProperty *idprop, const char *name, int default_value); -void version_cycles_property_int_set(struct IDProperty *idprop, const char *name, int value); -bool version_cycles_property_boolean(struct IDProperty *idprop, - const char *name, - bool default_value); -void version_cycles_property_boolean_set(struct IDProperty *idprop, const char *name, bool value); +float version_cycles_property_float(IDProperty *idprop, const char *name, float default_value); +int version_cycles_property_int(IDProperty *idprop, const char *name, int default_value); +void version_cycles_property_int_set(IDProperty *idprop, const char *name, int value); +bool version_cycles_property_boolean(IDProperty *idprop, const char *name, bool default_value); +void version_cycles_property_boolean_set(IDProperty *idprop, const char *name, bool value); -#ifdef __cplusplus -} -#endif - -#ifdef __cplusplus void node_tree_relink_with_socket_id_map(bNodeTree &ntree, bNode &old_node, bNode &new_node, @@ -157,4 +144,3 @@ void version_update_node_input( const char *socket_identifier, FunctionRef update_input, FunctionRef update_input_link); -#endif diff --git a/source/blender/blenloader/intern/versioning_defaults.cc b/source/blender/blenloader/intern/versioning_defaults.cc index 609aaa49a64..8bf2fbe14e1 100644 --- a/source/blender/blenloader/intern/versioning_defaults.cc +++ b/source/blender/blenloader/intern/versioning_defaults.cc @@ -65,7 +65,7 @@ #include "BLT_translation.h" -#include "versioning_common.h" +#include "versioning_common.hh" /* Make preferences read-only, use `versioning_userdef.cc`. */ #define U (*((const UserDef *)&U)) diff --git a/source/blender/blenloader/intern/versioning_dna.cc b/source/blender/blenloader/intern/versioning_dna.cc index ff814d212f8..f34bd384439 100644 --- a/source/blender/blenloader/intern/versioning_dna.cc +++ b/source/blender/blenloader/intern/versioning_dna.cc @@ -15,7 +15,7 @@ #include "DNA_listBase.h" #include "BLO_readfile.h" -#include "readfile.h" +#include "readfile.hh" void blo_do_versions_dna(SDNA *sdna, const int versionfile, const int subversionfile) { diff --git a/source/blender/blenloader/intern/versioning_legacy.cc b/source/blender/blenloader/intern/versioning_legacy.cc index 709a304feef..701437a0795 100644 --- a/source/blender/blenloader/intern/versioning_legacy.cc +++ b/source/blender/blenloader/intern/versioning_legacy.cc @@ -72,7 +72,7 @@ #include "BLO_readfile.h" -#include "readfile.h" +#include "readfile.hh" #include "PIL_time.h" diff --git a/source/blender/blenloader/intern/versioning_userdef.cc b/source/blender/blenloader/intern/versioning_userdef.cc index 873db26bb65..01b8c976672 100644 --- a/source/blender/blenloader/intern/versioning_userdef.cc +++ b/source/blender/blenloader/intern/versioning_userdef.cc @@ -42,7 +42,7 @@ #include "MEM_guardedalloc.h" -#include "readfile.h" /* Own include. */ +#include "readfile.hh" /* Own include. */ #include "WM_types.hh" #include "wm_event_types.hh" diff --git a/source/blender/blenloader/intern/writefile.cc b/source/blender/blenloader/intern/writefile.cc index a7d7209d85f..b617aac8a19 100644 --- a/source/blender/blenloader/intern/writefile.cc +++ b/source/blender/blenloader/intern/writefile.cc @@ -21,7 +21,7 @@ * * data-blocks: (also see struct #BHead). *
- * `bh.code`       `char[4]` see `BLO_blend_defs.h` for a list of known types.
+ * `bh.code`       `char[4]` see `BLO_blend_defs.hh` for a list of known types.
  * `bh.len`        `int32` length data after #BHead in bytes.
  * `bh.old`        `void *` old pointer (the address at the time of writing the file).
  * `bh.SDNAnr`     `int32` struct index of structs stored in #DNA1 data.
@@ -112,14 +112,14 @@
 #include "BKE_report.h"
 #include "BKE_workspace.h"
 
-#include "BLO_blend_defs.h"
-#include "BLO_blend_validate.h"
-#include "BLO_read_write.h"
+#include "BLO_blend_defs.hh"
+#include "BLO_blend_validate.hh"
+#include "BLO_read_write.hh"
 #include "BLO_readfile.h"
-#include "BLO_undofile.h"
-#include "BLO_writefile.h"
+#include "BLO_undofile.hh"
+#include "BLO_writefile.hh"
 
-#include "readfile.h"
+#include "readfile.hh"
 
 #include 
 
diff --git a/source/blender/draw/engines/eevee/eevee_lightcache.cc b/source/blender/draw/engines/eevee/eevee_lightcache.cc
index 580f2dce356..b49c0126099 100644
--- a/source/blender/draw/engines/eevee/eevee_lightcache.cc
+++ b/source/blender/draw/engines/eevee/eevee_lightcache.cc
@@ -34,7 +34,7 @@
 #include "WM_api.hh"
 #include "WM_types.hh"
 
-#include "BLO_read_write.h"
+#include "BLO_read_write.hh"
 
 #include "wm_window.hh"
 
diff --git a/source/blender/editors/asset/intern/asset_shelf_regiondata.cc b/source/blender/editors/asset/intern/asset_shelf_regiondata.cc
index c45ed1613e6..987971532da 100644
--- a/source/blender/editors/asset/intern/asset_shelf_regiondata.cc
+++ b/source/blender/editors/asset/intern/asset_shelf_regiondata.cc
@@ -8,7 +8,7 @@
 
 #include "BLI_listbase.h"
 
-#include "BLO_read_write.h"
+#include "BLO_read_write.hh"
 
 #include "DNA_defs.h"
 #include "DNA_screen_types.h"
diff --git a/source/blender/editors/asset/intern/asset_shelf_settings.cc b/source/blender/editors/asset/intern/asset_shelf_settings.cc
index 10c90e98bb8..987385be374 100644
--- a/source/blender/editors/asset/intern/asset_shelf_settings.cc
+++ b/source/blender/editors/asset/intern/asset_shelf_settings.cc
@@ -14,7 +14,7 @@
 
 #include "DNA_screen_types.h"
 
-#include "BLO_read_write.h"
+#include "BLO_read_write.hh"
 
 #include "BLI_listbase.h"
 #include "BLI_string.h"
diff --git a/source/blender/editors/space_action/space_action.cc b/source/blender/editors/space_action/space_action.cc
index d57e3b2ff56..cb68bb451e8 100644
--- a/source/blender/editors/space_action/space_action.cc
+++ b/source/blender/editors/space_action/space_action.cc
@@ -44,7 +44,7 @@
 #include "ED_space_api.hh"
 #include "ED_time_scrub_ui.hh"
 
-#include "BLO_read_write.h"
+#include "BLO_read_write.hh"
 
 #include "GPU_matrix.h"
 
diff --git a/source/blender/editors/space_buttons/space_buttons.cc b/source/blender/editors/space_buttons/space_buttons.cc
index 1304c113674..b3edadd4976 100644
--- a/source/blender/editors/space_buttons/space_buttons.cc
+++ b/source/blender/editors/space_buttons/space_buttons.cc
@@ -39,7 +39,7 @@
 #include "UI_interface.hh"
 #include "UI_resources.hh"
 
-#include "BLO_read_write.h"
+#include "BLO_read_write.hh"
 
 #include "buttons_intern.h" /* own include */
 
diff --git a/source/blender/editors/space_clip/space_clip.cc b/source/blender/editors/space_clip/space_clip.cc
index 88d64f1e9a9..7709546f88a 100644
--- a/source/blender/editors/space_clip/space_clip.cc
+++ b/source/blender/editors/space_clip/space_clip.cc
@@ -50,7 +50,7 @@
 #include "UI_resources.hh"
 #include "UI_view2d.hh"
 
-#include "BLO_read_write.h"
+#include "BLO_read_write.hh"
 
 #include "RNA_access.hh"
 
diff --git a/source/blender/editors/space_console/space_console.cc b/source/blender/editors/space_console/space_console.cc
index 65314d9811d..f07c92e580f 100644
--- a/source/blender/editors/space_console/space_console.cc
+++ b/source/blender/editors/space_console/space_console.cc
@@ -30,7 +30,7 @@
 #include "UI_resources.hh"
 #include "UI_view2d.hh"
 
-#include "BLO_read_write.h"
+#include "BLO_read_write.hh"
 
 #include "console_intern.hh" /* own include */
 
diff --git a/source/blender/editors/space_file/space_file.cc b/source/blender/editors/space_file/space_file.cc
index 9de9706fa0f..258f55d64e5 100644
--- a/source/blender/editors/space_file/space_file.cc
+++ b/source/blender/editors/space_file/space_file.cc
@@ -44,7 +44,7 @@
 #include "UI_resources.hh"
 #include "UI_view2d.hh"
 
-#include "BLO_read_write.h"
+#include "BLO_read_write.hh"
 
 #include "GPU_framebuffer.h"
 #include "file_indexer.hh"
diff --git a/source/blender/editors/space_graph/space_graph.cc b/source/blender/editors/space_graph/space_graph.cc
index 6e681f9aae3..c39f13c3f9f 100644
--- a/source/blender/editors/space_graph/space_graph.cc
+++ b/source/blender/editors/space_graph/space_graph.cc
@@ -47,7 +47,7 @@
 #include "UI_resources.hh"
 #include "UI_view2d.hh"
 
-#include "BLO_read_write.h"
+#include "BLO_read_write.hh"
 
 #include "graph_intern.h" /* own include */
 
diff --git a/source/blender/editors/space_image/space_image.cc b/source/blender/editors/space_image/space_image.cc
index a11e93a6efb..59982d06198 100644
--- a/source/blender/editors/space_image/space_image.cc
+++ b/source/blender/editors/space_image/space_image.cc
@@ -52,7 +52,7 @@
 #include "UI_resources.hh"
 #include "UI_view2d.hh"
 
-#include "BLO_read_write.h"
+#include "BLO_read_write.hh"
 
 #include "DRW_engine.h"
 
diff --git a/source/blender/editors/space_info/space_info.cc b/source/blender/editors/space_info/space_info.cc
index 3a5ed5d58da..c0955775885 100644
--- a/source/blender/editors/space_info/space_info.cc
+++ b/source/blender/editors/space_info/space_info.cc
@@ -29,7 +29,7 @@
 #include "UI_resources.hh"
 #include "UI_view2d.hh"
 
-#include "BLO_read_write.h"
+#include "BLO_read_write.hh"
 
 #include "info_intern.hh" /* own include */
 
diff --git a/source/blender/editors/space_nla/space_nla.cc b/source/blender/editors/space_nla/space_nla.cc
index efe0e712dff..cdaf635c9a3 100644
--- a/source/blender/editors/space_nla/space_nla.cc
+++ b/source/blender/editors/space_nla/space_nla.cc
@@ -38,7 +38,7 @@
 #include "UI_resources.hh"
 #include "UI_view2d.hh"
 
-#include "BLO_read_write.h"
+#include "BLO_read_write.hh"
 
 #include "nla_intern.hh" /* own include */
 
diff --git a/source/blender/editors/space_node/space_node.cc b/source/blender/editors/space_node/space_node.cc
index 2b64e8e0bfb..848b2bbdce9 100644
--- a/source/blender/editors/space_node/space_node.cc
+++ b/source/blender/editors/space_node/space_node.cc
@@ -35,7 +35,7 @@
 
 #include "DEG_depsgraph.h"
 
-#include "BLO_read_write.h"
+#include "BLO_read_write.hh"
 
 #include "RNA_access.hh"
 #include "RNA_define.hh"
diff --git a/source/blender/editors/space_outliner/space_outliner.cc b/source/blender/editors/space_outliner/space_outliner.cc
index 71a875758da..52cbcba093a 100644
--- a/source/blender/editors/space_outliner/space_outliner.cc
+++ b/source/blender/editors/space_outliner/space_outliner.cc
@@ -39,7 +39,7 @@
 #include "UI_resources.hh"
 #include "UI_view2d.hh"
 
-#include "BLO_read_write.h"
+#include "BLO_read_write.hh"
 
 #include "outliner_intern.hh"
 #include "tree/tree_display.hh"
diff --git a/source/blender/editors/space_script/space_script.cc b/source/blender/editors/space_script/space_script.cc
index ecd17cce627..9cd09347a68 100644
--- a/source/blender/editors/space_script/space_script.cc
+++ b/source/blender/editors/space_script/space_script.cc
@@ -26,7 +26,7 @@
 #include "UI_resources.hh"
 #include "UI_view2d.hh"
 
-#include "BLO_read_write.h"
+#include "BLO_read_write.hh"
 
 #ifdef WITH_PYTHON
 #endif
diff --git a/source/blender/editors/space_sequencer/space_sequencer.cc b/source/blender/editors/space_sequencer/space_sequencer.cc
index a12221e035d..04f9ba57739 100644
--- a/source/blender/editors/space_sequencer/space_sequencer.cc
+++ b/source/blender/editors/space_sequencer/space_sequencer.cc
@@ -47,7 +47,7 @@
 #include "UI_interface.hh"
 #include "UI_view2d.hh"
 
-#include "BLO_read_write.h"
+#include "BLO_read_write.hh"
 
 #include "IMB_imbuf.h"
 
diff --git a/source/blender/editors/space_spreadsheet/space_spreadsheet.cc b/source/blender/editors/space_spreadsheet/space_spreadsheet.cc
index 79f3685655a..42ebcd5edef 100644
--- a/source/blender/editors/space_spreadsheet/space_spreadsheet.cc
+++ b/source/blender/editors/space_spreadsheet/space_spreadsheet.cc
@@ -25,7 +25,7 @@
 #include "UI_resources.hh"
 #include "UI_view2d.hh"
 
-#include "BLO_read_write.h"
+#include "BLO_read_write.hh"
 
 #include "DEG_depsgraph_query.h"
 
diff --git a/source/blender/editors/space_statusbar/space_statusbar.cc b/source/blender/editors/space_statusbar/space_statusbar.cc
index 6216cc4cdf9..50a096e09b6 100644
--- a/source/blender/editors/space_statusbar/space_statusbar.cc
+++ b/source/blender/editors/space_statusbar/space_statusbar.cc
@@ -23,7 +23,7 @@
 
 #include "UI_interface.hh"
 
-#include "BLO_read_write.h"
+#include "BLO_read_write.hh"
 
 #include "WM_api.hh"
 #include "WM_message.hh"
diff --git a/source/blender/editors/space_text/space_text.cc b/source/blender/editors/space_text/space_text.cc
index 43380b48b13..184e27bb8e3 100644
--- a/source/blender/editors/space_text/space_text.cc
+++ b/source/blender/editors/space_text/space_text.cc
@@ -31,7 +31,7 @@
 #include "UI_resources.hh"
 #include "UI_view2d.hh"
 
-#include "BLO_read_write.h"
+#include "BLO_read_write.hh"
 
 #include "RNA_access.hh"
 #include "RNA_path.hh"
diff --git a/source/blender/editors/space_topbar/space_topbar.cc b/source/blender/editors/space_topbar/space_topbar.cc
index 1cc55594ac1..097e135c84c 100644
--- a/source/blender/editors/space_topbar/space_topbar.cc
+++ b/source/blender/editors/space_topbar/space_topbar.cc
@@ -29,7 +29,7 @@
 #include "UI_resources.hh"
 #include "UI_view2d.hh"
 
-#include "BLO_read_write.h"
+#include "BLO_read_write.hh"
 
 #include "RNA_access.hh"
 
diff --git a/source/blender/editors/space_userpref/space_userpref.cc b/source/blender/editors/space_userpref/space_userpref.cc
index 781a593026c..2d3884fc580 100644
--- a/source/blender/editors/space_userpref/space_userpref.cc
+++ b/source/blender/editors/space_userpref/space_userpref.cc
@@ -28,7 +28,7 @@
 
 #include "UI_interface.hh"
 
-#include "BLO_read_write.h"
+#include "BLO_read_write.hh"
 
 /* ******************** default callbacks for userpref space ***************** */
 
diff --git a/source/blender/editors/space_view3d/space_view3d.cc b/source/blender/editors/space_view3d/space_view3d.cc
index 1d99d77d5aa..6496d324736 100644
--- a/source/blender/editors/space_view3d/space_view3d.cc
+++ b/source/blender/editors/space_view3d/space_view3d.cc
@@ -81,7 +81,7 @@
 #include "UI_interface.hh"
 #include "UI_resources.hh"
 
-#include "BLO_read_write.h"
+#include "BLO_read_write.hh"
 
 #ifdef WITH_PYTHON
 #  include "BPY_extern.h"
diff --git a/source/blender/editors/undo/ed_undo.cc b/source/blender/editors/undo/ed_undo.cc
index dd3f2f7b13a..54f629ed0c2 100644
--- a/source/blender/editors/undo/ed_undo.cc
+++ b/source/blender/editors/undo/ed_undo.cc
@@ -33,7 +33,7 @@
 #include "BKE_undo_system.h"
 #include "BKE_workspace.h"
 
-#include "BLO_blend_validate.h"
+#include "BLO_blend_validate.hh"
 
 #include "ED_asset.hh"
 #include "ED_gpencil_legacy.hh"
diff --git a/source/blender/editors/undo/memfile_undo.cc b/source/blender/editors/undo/memfile_undo.cc
index 12f05f09f02..a7a8b9e5219 100644
--- a/source/blender/editors/undo/memfile_undo.cc
+++ b/source/blender/editors/undo/memfile_undo.cc
@@ -41,7 +41,7 @@
 #include "ED_undo.hh"
 #include "ED_util.hh"
 
-#include "../blenloader/BLO_undofile.h"
+#include "../blenloader/BLO_undofile.hh"
 
 #include "undo_intern.hh"
 
diff --git a/source/blender/imbuf/intern/thumbs_blend.cc b/source/blender/imbuf/intern/thumbs_blend.cc
index a0226b0b671..521f6750203 100644
--- a/source/blender/imbuf/intern/thumbs_blend.cc
+++ b/source/blender/imbuf/intern/thumbs_blend.cc
@@ -14,7 +14,7 @@
 #include "BLI_listbase.h" /* Needed due to import of BLO_readfile.h */
 #include "BLI_utildefines.h"
 
-#include "BLO_blend_defs.h"
+#include "BLO_blend_defs.hh"
 #include "BLO_readfile.h"
 
 #include "BKE_icons.h"
diff --git a/source/blender/modifiers/intern/MOD_armature.cc b/source/blender/modifiers/intern/MOD_armature.cc
index 29ae2b058c9..149060b4ef6 100644
--- a/source/blender/modifiers/intern/MOD_armature.cc
+++ b/source/blender/modifiers/intern/MOD_armature.cc
@@ -37,7 +37,7 @@
 #include "RNA_access.hh"
 #include "RNA_prototypes.h"
 
-#include "BLO_read_write.h"
+#include "BLO_read_write.hh"
 
 #include "DEG_depsgraph_query.h"
 
diff --git a/source/blender/modifiers/intern/MOD_bevel.cc b/source/blender/modifiers/intern/MOD_bevel.cc
index 0c60c5e3537..0cdebb486c3 100644
--- a/source/blender/modifiers/intern/MOD_bevel.cc
+++ b/source/blender/modifiers/intern/MOD_bevel.cc
@@ -37,7 +37,7 @@
 #include "MOD_ui_common.hh"
 #include "MOD_util.hh"
 
-#include "BLO_read_write.h"
+#include "BLO_read_write.hh"
 
 #include "bmesh.h"
 #include "bmesh_tools.h"
diff --git a/source/blender/modifiers/intern/MOD_collision.cc b/source/blender/modifiers/intern/MOD_collision.cc
index a8bd035c2db..d41c342759a 100644
--- a/source/blender/modifiers/intern/MOD_collision.cc
+++ b/source/blender/modifiers/intern/MOD_collision.cc
@@ -44,7 +44,7 @@
 #include "MOD_ui_common.hh"
 #include "MOD_util.hh"
 
-#include "BLO_read_write.h"
+#include "BLO_read_write.hh"
 
 #include "DEG_depsgraph_query.h"
 
diff --git a/source/blender/modifiers/intern/MOD_correctivesmooth.cc b/source/blender/modifiers/intern/MOD_correctivesmooth.cc
index 5cb091b6387..eba90578244 100644
--- a/source/blender/modifiers/intern/MOD_correctivesmooth.cc
+++ b/source/blender/modifiers/intern/MOD_correctivesmooth.cc
@@ -41,7 +41,7 @@
 #include "MOD_ui_common.hh"
 #include "MOD_util.hh"
 
-#include "BLO_read_write.h"
+#include "BLO_read_write.hh"
 
 #include "DEG_depsgraph_query.h"
 
diff --git a/source/blender/modifiers/intern/MOD_explode.cc b/source/blender/modifiers/intern/MOD_explode.cc
index 7754d06f5c3..483cc9c4a29 100644
--- a/source/blender/modifiers/intern/MOD_explode.cc
+++ b/source/blender/modifiers/intern/MOD_explode.cc
@@ -40,7 +40,7 @@
 #include "UI_interface.hh"
 #include "UI_resources.hh"
 
-#include "BLO_read_write.h"
+#include "BLO_read_write.hh"
 
 #include "RNA_access.hh"
 #include "RNA_prototypes.h"
diff --git a/source/blender/modifiers/intern/MOD_hook.cc b/source/blender/modifiers/intern/MOD_hook.cc
index 0e2f68658d0..db78eb8ee52 100644
--- a/source/blender/modifiers/intern/MOD_hook.cc
+++ b/source/blender/modifiers/intern/MOD_hook.cc
@@ -35,7 +35,7 @@
 #include "UI_interface.hh"
 #include "UI_resources.hh"
 
-#include "BLO_read_write.h"
+#include "BLO_read_write.hh"
 
 #include "RNA_access.hh"
 #include "RNA_prototypes.h"
diff --git a/source/blender/modifiers/intern/MOD_laplaciandeform.cc b/source/blender/modifiers/intern/MOD_laplaciandeform.cc
index 07778cdc33b..5f1c57f0c96 100644
--- a/source/blender/modifiers/intern/MOD_laplaciandeform.cc
+++ b/source/blender/modifiers/intern/MOD_laplaciandeform.cc
@@ -36,7 +36,7 @@
 #include "UI_interface.hh"
 #include "UI_resources.hh"
 
-#include "BLO_read_write.h"
+#include "BLO_read_write.hh"
 
 #include "RNA_access.hh"
 #include "RNA_prototypes.h"
diff --git a/source/blender/modifiers/intern/MOD_mesh_to_volume.cc b/source/blender/modifiers/intern/MOD_mesh_to_volume.cc
index 93054aa85d4..2cb40d3b61e 100644
--- a/source/blender/modifiers/intern/MOD_mesh_to_volume.cc
+++ b/source/blender/modifiers/intern/MOD_mesh_to_volume.cc
@@ -32,7 +32,7 @@
 #include "UI_interface.hh"
 #include "UI_resources.hh"
 
-#include "BLO_read_write.h"
+#include "BLO_read_write.hh"
 
 #include "MEM_guardedalloc.h"
 
diff --git a/source/blender/modifiers/intern/MOD_meshdeform.cc b/source/blender/modifiers/intern/MOD_meshdeform.cc
index f5b487340e8..95ebe63b74a 100644
--- a/source/blender/modifiers/intern/MOD_meshdeform.cc
+++ b/source/blender/modifiers/intern/MOD_meshdeform.cc
@@ -36,7 +36,7 @@
 #include "UI_interface.hh"
 #include "UI_resources.hh"
 
-#include "BLO_read_write.h"
+#include "BLO_read_write.hh"
 
 #include "RNA_access.hh"
 #include "RNA_prototypes.h"
diff --git a/source/blender/modifiers/intern/MOD_meshsequencecache.cc b/source/blender/modifiers/intern/MOD_meshsequencecache.cc
index 26265cb3a4f..b51de6e4bd9 100644
--- a/source/blender/modifiers/intern/MOD_meshsequencecache.cc
+++ b/source/blender/modifiers/intern/MOD_meshsequencecache.cc
@@ -39,7 +39,7 @@
 #include "RNA_access.hh"
 #include "RNA_prototypes.h"
 
-#include "BLO_read_write.h"
+#include "BLO_read_write.hh"
 
 #include "DEG_depsgraph_build.h"
 #include "DEG_depsgraph_query.h"
diff --git a/source/blender/modifiers/intern/MOD_nodes.cc b/source/blender/modifiers/intern/MOD_nodes.cc
index abca50e936a..7cfece53f52 100644
--- a/source/blender/modifiers/intern/MOD_nodes.cc
+++ b/source/blender/modifiers/intern/MOD_nodes.cc
@@ -60,7 +60,7 @@
 #include "BKE_simulation_state_serialize.hh"
 #include "BKE_workspace.h"
 
-#include "BLO_read_write.h"
+#include "BLO_read_write.hh"
 
 #include "UI_interface.hh"
 #include "UI_resources.hh"
diff --git a/source/blender/modifiers/intern/MOD_ocean.cc b/source/blender/modifiers/intern/MOD_ocean.cc
index 7d17db2ddb2..06caed5001c 100644
--- a/source/blender/modifiers/intern/MOD_ocean.cc
+++ b/source/blender/modifiers/intern/MOD_ocean.cc
@@ -34,7 +34,7 @@
 #include "RNA_access.hh"
 #include "RNA_prototypes.h"
 
-#include "BLO_read_write.h"
+#include "BLO_read_write.hh"
 
 #include "WM_types.hh" /* For UI free bake operator. */
 
diff --git a/source/blender/modifiers/intern/MOD_particlesystem.cc b/source/blender/modifiers/intern/MOD_particlesystem.cc
index 68a01420c14..2cd53fc78d6 100644
--- a/source/blender/modifiers/intern/MOD_particlesystem.cc
+++ b/source/blender/modifiers/intern/MOD_particlesystem.cc
@@ -35,7 +35,7 @@
 
 #include "DEG_depsgraph_query.h"
 
-#include "BLO_read_write.h"
+#include "BLO_read_write.hh"
 
 #include "MOD_ui_common.hh"
 #include "MOD_util.hh"
diff --git a/source/blender/modifiers/intern/MOD_subsurf.cc b/source/blender/modifiers/intern/MOD_subsurf.cc
index a8140a12beb..e06eba47d5e 100644
--- a/source/blender/modifiers/intern/MOD_subsurf.cc
+++ b/source/blender/modifiers/intern/MOD_subsurf.cc
@@ -49,7 +49,7 @@
 #include "MOD_modifiertypes.hh"
 #include "MOD_ui_common.hh"
 
-#include "BLO_read_write.h"
+#include "BLO_read_write.hh"
 
 #include "intern/CCGSubSurf.h"
 
diff --git a/source/blender/modifiers/intern/MOD_surface.cc b/source/blender/modifiers/intern/MOD_surface.cc
index 429546aaad8..92bb218fa23 100644
--- a/source/blender/modifiers/intern/MOD_surface.cc
+++ b/source/blender/modifiers/intern/MOD_surface.cc
@@ -38,7 +38,7 @@
 #include "MOD_ui_common.hh"
 #include "MOD_util.hh"
 
-#include "BLO_read_write.h"
+#include "BLO_read_write.hh"
 
 #include "MEM_guardedalloc.h"
 
diff --git a/source/blender/modifiers/intern/MOD_surfacedeform.cc b/source/blender/modifiers/intern/MOD_surfacedeform.cc
index 36d70508223..a6f9a19a9ca 100644
--- a/source/blender/modifiers/intern/MOD_surfacedeform.cc
+++ b/source/blender/modifiers/intern/MOD_surfacedeform.cc
@@ -34,7 +34,7 @@
 #include "UI_interface.hh"
 #include "UI_resources.hh"
 
-#include "BLO_read_write.h"
+#include "BLO_read_write.hh"
 
 #include "RNA_access.hh"
 #include "RNA_prototypes.h"
diff --git a/source/blender/modifiers/intern/MOD_volume_displace.cc b/source/blender/modifiers/intern/MOD_volume_displace.cc
index 62c2397407c..52c2e9a2b8c 100644
--- a/source/blender/modifiers/intern/MOD_volume_displace.cc
+++ b/source/blender/modifiers/intern/MOD_volume_displace.cc
@@ -30,7 +30,7 @@
 #include "UI_interface.hh"
 #include "UI_resources.hh"
 
-#include "BLO_read_write.h"
+#include "BLO_read_write.hh"
 
 #include "MEM_guardedalloc.h"
 
diff --git a/source/blender/modifiers/intern/MOD_warp.cc b/source/blender/modifiers/intern/MOD_warp.cc
index 7a7fb693201..25bdbce63b7 100644
--- a/source/blender/modifiers/intern/MOD_warp.cc
+++ b/source/blender/modifiers/intern/MOD_warp.cc
@@ -38,7 +38,7 @@
 #include "UI_interface.hh"
 #include "UI_resources.hh"
 
-#include "BLO_read_write.h"
+#include "BLO_read_write.hh"
 
 #include "RNA_access.hh"
 #include "RNA_prototypes.h"
diff --git a/source/blender/modifiers/intern/MOD_weightvgedit.cc b/source/blender/modifiers/intern/MOD_weightvgedit.cc
index 36245816ebd..eff81fb48c5 100644
--- a/source/blender/modifiers/intern/MOD_weightvgedit.cc
+++ b/source/blender/modifiers/intern/MOD_weightvgedit.cc
@@ -36,7 +36,7 @@
 #include "UI_interface.hh"
 #include "UI_resources.hh"
 
-#include "BLO_read_write.h"
+#include "BLO_read_write.hh"
 
 #include "RNA_access.hh"
 #include "RNA_prototypes.h"
diff --git a/source/blender/modifiers/intern/MOD_weightvgproximity.cc b/source/blender/modifiers/intern/MOD_weightvgproximity.cc
index 57ef90cb33b..35e7b02ac57 100644
--- a/source/blender/modifiers/intern/MOD_weightvgproximity.cc
+++ b/source/blender/modifiers/intern/MOD_weightvgproximity.cc
@@ -42,7 +42,7 @@
 #include "UI_interface.hh"
 #include "UI_resources.hh"
 
-#include "BLO_read_write.h"
+#include "BLO_read_write.hh"
 
 #include "RNA_access.hh"
 #include "RNA_prototypes.h"
diff --git a/source/blender/python/intern/bpy_library_write.cc b/source/blender/python/intern/bpy_library_write.cc
index e986df56efb..2eed757c716 100644
--- a/source/blender/python/intern/bpy_library_write.cc
+++ b/source/blender/python/intern/bpy_library_write.cc
@@ -23,7 +23,7 @@
 #include "BKE_main.h"
 #include "BKE_report.h"
 
-#include "BLO_writefile.h"
+#include "BLO_writefile.hh"
 
 #include "RNA_types.hh"
 
diff --git a/source/blender/sequencer/intern/modifier.cc b/source/blender/sequencer/intern/modifier.cc
index 100231af5d8..0122fdfb1de 100644
--- a/source/blender/sequencer/intern/modifier.cc
+++ b/source/blender/sequencer/intern/modifier.cc
@@ -31,7 +31,7 @@
 #include "SEQ_modifier.h"
 #include "SEQ_render.h"
 
-#include "BLO_read_write.h"
+#include "BLO_read_write.hh"
 
 #include "render.h"
 
diff --git a/source/blender/sequencer/intern/sequencer.cc b/source/blender/sequencer/intern/sequencer.cc
index d4403e37ff4..1664d7b21d0 100644
--- a/source/blender/sequencer/intern/sequencer.cc
+++ b/source/blender/sequencer/intern/sequencer.cc
@@ -45,7 +45,7 @@
 #include "SEQ_time.h"
 #include "SEQ_utils.h"
 
-#include "BLO_read_write.h"
+#include "BLO_read_write.hh"
 
 #include "image_cache.h"
 #include "prefetch.h"
diff --git a/source/blender/windowmanager/intern/wm.cc b/source/blender/windowmanager/intern/wm.cc
index ffa353581bd..558c576e756 100644
--- a/source/blender/windowmanager/intern/wm.cc
+++ b/source/blender/windowmanager/intern/wm.cc
@@ -58,7 +58,7 @@
 #  include "BPY_extern_run.h"
 #endif
 
-#include "BLO_read_write.h"
+#include "BLO_read_write.hh"
 
 /* ****************************************************** */
 
diff --git a/source/blender/windowmanager/intern/wm_files.cc b/source/blender/windowmanager/intern/wm_files.cc
index 4665924f943..8b6e70f8c10 100644
--- a/source/blender/windowmanager/intern/wm_files.cc
+++ b/source/blender/windowmanager/intern/wm_files.cc
@@ -84,8 +84,8 @@
 #include "BKE_undo_system.h"
 #include "BKE_workspace.h"
 
-#include "BLO_undofile.h" /* to save from an undo memfile */
-#include "BLO_writefile.h"
+#include "BLO_undofile.hh" /* to save from an undo memfile */
+#include "BLO_writefile.hh"
 
 #include "RNA_access.hh"
 #include "RNA_define.hh"
diff --git a/source/blender/windowmanager/intern/wm_init_exit.cc b/source/blender/windowmanager/intern/wm_init_exit.cc
index 9647b228028..542fba5c35f 100644
--- a/source/blender/windowmanager/intern/wm_init_exit.cc
+++ b/source/blender/windowmanager/intern/wm_init_exit.cc
@@ -35,8 +35,8 @@
 #include "BLI_timer.h"
 #include "BLI_utildefines.h"
 
-#include "BLO_undofile.h"
-#include "BLO_writefile.h"
+#include "BLO_undofile.hh"
+#include "BLO_writefile.hh"
 
 #include "BKE_blender.h"
 #include "BKE_blendfile.h"
diff --git a/source/creator/creator_signals.cc b/source/creator/creator_signals.cc
index 454abd6e8c6..3fcaa7ca60b 100644
--- a/source/creator/creator_signals.cc
+++ b/source/creator/creator_signals.cc
@@ -58,7 +58,7 @@
 // #define USE_WRITE_CRASH_BLEND
 #  ifdef USE_WRITE_CRASH_BLEND
 #    include "BKE_undo_system.h"
-#    include "BLO_undofile.h"
+#    include "BLO_undofile.hh"
 #  endif
 
 /* set breakpoints here when running in debug mode, useful to catch floating point errors */