From 6f985574b775882075f48f59835bc5a42b1374dd Mon Sep 17 00:00:00 2001 From: Jacques Lucke Date: Fri, 8 May 2020 18:16:39 +0200 Subject: Cleanup: take includes out of 'extern "C"' blocks Surrounding includes with an 'extern "C"' block is not necessary anymore. Also that made it harder to add any C++ code to some headers, or include headers that have "optional" C++ code like `MEM_guardedalloc.h`. I tested compilation on linux and windows (and got help from @LazyDodo). If this still breaks compilation due to some linker error, the header containing the symbol in question is probably missing an 'extern "C"' block. Differential Revision: https://developer.blender.org/D7653 --- source/blender/blenkernel/BKE_action.h | 4 ++-- source/blender/blenkernel/BKE_anim_data.h | 4 ++-- source/blender/blenkernel/BKE_animsys.h | 4 ++-- source/blender/blenkernel/BKE_armature.h | 3 +-- source/blender/blenkernel/BKE_blender_version.h | 8 ++++++++ source/blender/blenkernel/BKE_context.h | 3 +-- source/blender/blenkernel/BKE_curve.h | 4 ++-- source/blender/blenkernel/BKE_customdata.h | 8 ++++---- source/blender/blenkernel/BKE_data_transfer.h | 4 ++-- source/blender/blenkernel/BKE_dynamicpaint.h | 4 ++-- source/blender/blenkernel/BKE_fcurve.h | 4 ++-- source/blender/blenkernel/BKE_fcurve_driver.h | 4 ++-- source/blender/blenkernel/BKE_image.h | 4 ++-- source/blender/blenkernel/BKE_lib_id.h | 4 ++-- source/blender/blenkernel/BKE_lib_remap.h | 4 ++-- source/blender/blenkernel/BKE_library.h | 4 ++-- source/blender/blenkernel/BKE_light.h | 5 +++-- source/blender/blenkernel/BKE_object.h | 9 +++++---- source/blender/blenkernel/BKE_paint.h | 6 +++--- source/blender/blenkernel/BKE_report.h | 8 ++++---- source/blender/blenkernel/BKE_text_suggestions.h | 4 ++-- source/blender/blenlib/BLI_bitmap.h | 4 ++-- source/blender/blenlib/BLI_blenlib.h | 8 -------- source/blender/blenlib/BLI_fileops.h | 8 ++++---- source/blender/blenlib/BLI_hash.h | 4 ++-- source/blender/blenlib/BLI_heap.h | 4 ++-- source/blender/blenlib/BLI_math_base.h | 8 ++++++++ source/blender/blenlib/BLI_math_bits.h | 4 ++-- source/blender/blenlib/BLI_math_color.h | 4 ++-- source/blender/blenlib/BLI_math_color_blend.h | 4 ++-- source/blender/blenlib/BLI_math_geom.h | 8 ++++---- source/blender/blenlib/BLI_math_matrix.h | 6 +++--- source/blender/blenlib/BLI_math_solvers.h | 6 +++--- source/blender/blenlib/BLI_math_statistics.h | 6 +++--- source/blender/blenlib/BLI_math_vector.h | 8 ++++---- source/blender/blenlib/BLI_memarena.h | 4 ++-- source/blender/blenlib/BLI_memblock.h | 4 ++-- source/blender/blenlib/BLI_memiter.h | 8 ++++---- source/blender/blenlib/BLI_mempool.h | 6 +++--- source/blender/blenlib/BLI_path_util.h | 6 +++--- source/blender/blenlib/BLI_string.h | 6 +++--- source/blender/blenlib/BLI_string_utf8.h | 6 +++--- source/blender/blenlib/BLI_string_utils.h | 6 +++--- source/blender/blenlib/BLI_task.h | 6 +++--- source/blender/blenlib/BLI_threads.h | 7 ++++--- source/blender/blenlib/BLI_utildefines.h | 8 ++++---- source/blender/blenlib/intern/math_base_inline.c | 8 ++++++++ source/blender/bmesh/bmesh.h | 8 ++++---- source/blender/bmesh/intern/bmesh_operator_api.h | 8 ++++---- source/blender/bmesh/tools/bmesh_bevel.h | 1 + source/blender/compositor/COM_compositor.h | 6 +++--- source/blender/compositor/intern/COM_Converter.cpp | 2 -- source/blender/compositor/intern/COM_ExecutionSystem.cpp | 3 +-- source/blender/compositor/intern/COM_MemoryBuffer.h | 2 -- source/blender/compositor/intern/COM_Node.cpp | 2 -- source/blender/compositor/intern/COM_NodeConverter.cpp | 2 -- source/blender/compositor/intern/COM_NodeGraph.cpp | 2 -- source/blender/compositor/intern/COM_NodeGraph.h | 2 -- source/blender/compositor/intern/COM_NodeOperation.h | 2 -- source/blender/compositor/intern/COM_NodeOperationBuilder.cpp | 2 -- source/blender/compositor/intern/COM_WorkScheduler.h | 4 ++-- source/blender/compositor/intern/COM_compositor.cpp | 4 +--- source/blender/compositor/nodes/COM_CornerPinNode.h | 2 -- source/blender/compositor/nodes/COM_ImageNode.h | 3 +-- source/blender/compositor/nodes/COM_KeyingScreenNode.cpp | 2 -- source/blender/compositor/nodes/COM_MaskNode.cpp | 2 -- source/blender/compositor/nodes/COM_MovieClipNode.cpp | 4 ++-- source/blender/compositor/nodes/COM_PlaneTrackDeformNode.cpp | 2 -- source/blender/compositor/nodes/COM_PlaneTrackDeformNode.h | 2 -- source/blender/compositor/nodes/COM_Stabilize2dNode.cpp | 3 +-- source/blender/compositor/nodes/COM_TimeNode.cpp | 4 ++-- source/blender/compositor/nodes/COM_TrackPositionNode.cpp | 2 -- .../blender/compositor/operations/COM_AntiAliasOperation.cpp | 2 -- .../compositor/operations/COM_BilateralBlurOperation.cpp | 2 -- .../blender/compositor/operations/COM_BlurBaseOperation.cpp | 2 -- .../blender/compositor/operations/COM_BokehBlurOperation.cpp | 2 -- .../compositor/operations/COM_CalculateMeanOperation.cpp | 2 -- .../operations/COM_CalculateStandardDeviationOperation.cpp | 2 -- .../compositor/operations/COM_ColorCorrectionOperation.cpp | 2 -- .../blender/compositor/operations/COM_ColorCurveOperation.cpp | 9 ++------- .../blender/compositor/operations/COM_ColorRampOperation.cpp | 6 ------ .../blender/compositor/operations/COM_CompositorOperation.cpp | 5 +++-- .../operations/COM_ConvertColorProfileOperation.cpp | 3 +-- source/blender/compositor/operations/COM_ConvertOperation.cpp | 2 -- .../blender/compositor/operations/COM_CurveBaseOperation.cpp | 6 ------ .../compositor/operations/COM_DirectionalBlurOperation.cpp | 6 +++--- .../compositor/operations/COM_GaussianAlphaXBlurOperation.cpp | 2 -- .../compositor/operations/COM_GaussianAlphaYBlurOperation.cpp | 2 -- .../compositor/operations/COM_GaussianBokehBlurOperation.cpp | 3 +-- .../compositor/operations/COM_GaussianXBlurOperation.cpp | 2 -- .../compositor/operations/COM_GaussianYBlurOperation.cpp | 2 -- .../compositor/operations/COM_GlareThresholdOperation.cpp | 2 -- .../operations/COM_HueSaturationValueCorrectOperation.cpp | 6 ------ source/blender/compositor/operations/COM_ImageOperation.cpp | 2 -- source/blender/compositor/operations/COM_ImageOperation.h | 3 +-- .../compositor/operations/COM_KeyingScreenOperation.cpp | 2 -- .../blender/compositor/operations/COM_KeyingScreenOperation.h | 2 -- .../compositor/operations/COM_LuminanceMatteOperation.cpp | 2 -- source/blender/compositor/operations/COM_MaskOperation.cpp | 2 -- .../blender/compositor/operations/COM_MathBaseOperation.cpp | 3 +-- source/blender/compositor/operations/COM_MixOperation.cpp | 2 -- .../compositor/operations/COM_MovieClipAttributeOperation.cpp | 4 ++-- .../blender/compositor/operations/COM_MovieClipOperation.cpp | 6 +++--- .../compositor/operations/COM_MovieDistortionOperation.cpp | 3 +-- .../compositor/operations/COM_MovieDistortionOperation.h | 2 -- .../compositor/operations/COM_MultilayerImageOperation.cpp | 3 +-- .../operations/COM_OutputFileMultiViewOperation.cpp | 2 -- .../blender/compositor/operations/COM_OutputFileOperation.cpp | 2 -- .../compositor/operations/COM_PlaneCornerPinOperation.cpp | 2 -- .../compositor/operations/COM_PlaneDistortCommonOperation.cpp | 2 -- .../blender/compositor/operations/COM_PlaneTrackOperation.cpp | 2 -- source/blender/compositor/operations/COM_PreviewOperation.cpp | 3 +-- source/blender/compositor/operations/COM_RenderLayersProg.cpp | 2 -- source/blender/compositor/operations/COM_RenderLayersProg.h | 3 +-- .../operations/COM_ScreenLensDistortionOperation.cpp | 3 +-- source/blender/compositor/operations/COM_SplitOperation.cpp | 2 -- source/blender/compositor/operations/COM_TextureOperation.cpp | 6 ++---- source/blender/compositor/operations/COM_TextureOperation.h | 3 +-- source/blender/compositor/operations/COM_TonemapOperation.cpp | 2 -- .../compositor/operations/COM_TrackPositionOperation.cpp | 2 -- .../operations/COM_VariableSizeBokehBlurOperation.cpp | 2 -- .../blender/compositor/operations/COM_VectorBlurOperation.cpp | 9 +++++---- .../compositor/operations/COM_VectorCurveOperation.cpp | 6 ------ source/blender/compositor/operations/COM_ViewerOperation.cpp | 2 -- source/blender/depsgraph/DEG_depsgraph_build.h | 4 ++-- source/blender/depsgraph/intern/builder/deg_builder_cache.cc | 2 -- source/blender/depsgraph/intern/builder/deg_builder_nodes.cc | 2 -- .../blender/depsgraph/intern/builder/deg_builder_nodes_rig.cc | 2 -- .../depsgraph/intern/builder/deg_builder_nodes_view_layer.cc | 2 -- .../blender/depsgraph/intern/builder/deg_builder_relations.cc | 2 -- .../depsgraph/intern/builder/deg_builder_relations_impl.h | 2 -- .../depsgraph/intern/builder/deg_builder_relations_rig.cc | 2 -- .../intern/builder/deg_builder_relations_view_layer.cc | 2 -- source/blender/depsgraph/intern/builder/deg_builder_rna.cc | 2 -- .../depsgraph/intern/debug/deg_debug_relations_graphviz.cc | 2 -- .../blender/depsgraph/intern/debug/deg_debug_stats_gnuplot.cc | 2 -- source/blender/depsgraph/intern/depsgraph.cc | 2 -- source/blender/depsgraph/intern/depsgraph_build.cc | 2 -- source/blender/depsgraph/intern/depsgraph_debug.cc | 2 -- source/blender/depsgraph/intern/depsgraph_eval.cc | 2 -- source/blender/depsgraph/intern/depsgraph_physics.cc | 2 -- source/blender/depsgraph/intern/depsgraph_query.cc | 3 --- source/blender/depsgraph/intern/depsgraph_query_iter.cc | 3 +-- source/blender/depsgraph/intern/depsgraph_tag.cc | 2 -- .../blender/depsgraph/intern/eval/deg_eval_copy_on_write.cc | 2 -- source/blender/depsgraph/intern/eval/deg_eval_flush.cc | 2 -- source/blender/depsgraph/intern/node/deg_node_component.cc | 2 -- source/blender/depsgraph/intern/node/deg_node_id.cc | 2 -- source/blender/draw/DRW_engine.h | 11 ++++++----- source/blender/editors/include/ED_keyframes_edit.h | 4 ++-- source/blender/editors/include/ED_keyframing.h | 6 +++--- source/blender/editors/include/ED_object.h | 6 +++--- source/blender/editors/include/UI_resources.h | 8 ++++---- source/blender/editors/uvedit/uvedit_parametrizer.h | 4 ++-- .../intern/blender_interface/BlenderStrokeRenderer.cpp | 2 -- .../freestyle/intern/blender_interface/BlenderStyleModule.h | 2 -- source/blender/freestyle/intern/geometry/Grid.h | 2 -- source/blender/freestyle/intern/image/GaussianFilter.h | 2 -- source/blender/freestyle/intern/scene_graph/NodeViewLayer.h | 2 -- source/blender/freestyle/intern/stroke/Canvas.cpp | 2 -- source/blender/freestyle/intern/stroke/StrokeRep.h | 2 -- source/blender/freestyle/intern/view_map/SteerableViewMap.cpp | 2 -- source/blender/gpu/GPU_context.h | 8 ++++---- source/blender/gpu/GPU_draw.h | 6 +++--- source/blender/gpu/GPU_init_exit.h | 4 ++-- source/blender/gpu/intern/gpu_batch_private.h | 8 ++++---- source/blender/gpu/intern/gpu_context_private.h | 4 ++-- source/blender/ikplugin/intern/itasc_plugin.cpp | 2 -- source/blender/imbuf/intern/IMB_allocimbuf.h | 8 ++++++++ source/blender/imbuf/intern/IMB_colormanagement_intern.h | 8 ++++++++ source/blender/imbuf/intern/cineon/cineonlib.h | 4 ++-- source/blender/imbuf/intern/cineon/dpxlib.h | 4 ++-- source/blender/imbuf/intern/dds/dds_api.cpp | 6 ++---- source/blender/imbuf/intern/dds/dds_api.h | 4 ++-- source/blender/imbuf/intern/oiio/openimageio_api.cpp | 2 -- source/blender/imbuf/intern/oiio/openimageio_api.h | 4 ++-- source/blender/imbuf/intern/openexr/openexr_api.cpp | 10 +++------- source/blender/imbuf/intern/openexr/openexr_api.h | 4 ++-- source/blender/io/alembic/intern/abc_customdata.cc | 2 -- source/blender/io/alembic/intern/abc_exporter.cc | 2 -- source/blender/io/alembic/intern/abc_reader_archive.cc | 2 -- source/blender/io/alembic/intern/abc_reader_camera.cc | 2 -- source/blender/io/alembic/intern/abc_reader_curves.cc | 2 -- source/blender/io/alembic/intern/abc_reader_mesh.cc | 2 -- source/blender/io/alembic/intern/abc_reader_nurbs.cc | 2 -- source/blender/io/alembic/intern/abc_reader_object.cc | 2 -- source/blender/io/alembic/intern/abc_reader_object.h | 2 -- source/blender/io/alembic/intern/abc_reader_points.cc | 2 -- source/blender/io/alembic/intern/abc_reader_transform.cc | 2 -- source/blender/io/alembic/intern/abc_util.cc | 2 -- source/blender/io/alembic/intern/abc_writer_archive.cc | 3 +-- source/blender/io/alembic/intern/abc_writer_camera.cc | 2 -- source/blender/io/alembic/intern/abc_writer_curves.cc | 2 -- source/blender/io/alembic/intern/abc_writer_hair.cc | 2 -- source/blender/io/alembic/intern/abc_writer_mball.cc | 2 -- source/blender/io/alembic/intern/abc_writer_mesh.cc | 2 -- source/blender/io/alembic/intern/abc_writer_nurbs.cc | 2 -- source/blender/io/alembic/intern/abc_writer_object.cc | 2 -- source/blender/io/alembic/intern/abc_writer_object.h | 2 -- source/blender/io/alembic/intern/abc_writer_points.cc | 2 -- source/blender/io/alembic/intern/abc_writer_transform.cc | 2 -- source/blender/io/alembic/intern/alembic_capi.cc | 2 -- source/blender/io/collada/AnimationExporter.h | 2 -- source/blender/io/collada/AnimationImporter.h | 4 ++-- source/blender/io/collada/ArmatureExporter.cpp | 3 --- source/blender/io/collada/ArmatureImporter.cpp | 2 -- source/blender/io/collada/ArmatureImporter.h | 2 -- source/blender/io/collada/BCAnimationCurve.h | 3 +-- source/blender/io/collada/BCAnimationSampler.cpp | 5 +++-- source/blender/io/collada/BCAnimationSampler.h | 4 ++-- source/blender/io/collada/BCMath.h | 3 +-- source/blender/io/collada/BCSampleData.h | 4 ++-- source/blender/io/collada/BlenderContext.h | 9 ++++----- source/blender/io/collada/CameraExporter.cpp | 3 +-- source/blender/io/collada/CameraExporter.h | 2 -- source/blender/io/collada/ControllerExporter.cpp | 3 --- source/blender/io/collada/DocumentExporter.cpp | 8 +++----- source/blender/io/collada/DocumentExporter.h | 2 -- source/blender/io/collada/DocumentImporter.cpp | 2 -- source/blender/io/collada/EffectExporter.cpp | 2 -- source/blender/io/collada/ExportSettings.h | 6 +++--- source/blender/io/collada/GeometryExporter.cpp | 2 -- source/blender/io/collada/ImageExporter.cpp | 2 -- source/blender/io/collada/InstanceWriter.cpp | 3 +-- source/blender/io/collada/MaterialExporter.h | 3 +-- source/blender/io/collada/Materials.h | 2 -- source/blender/io/collada/MeshImporter.cpp | 2 -- source/blender/io/collada/MeshImporter.h | 3 +-- source/blender/io/collada/SceneExporter.cpp | 2 -- source/blender/io/collada/SceneExporter.h | 2 -- source/blender/io/collada/collada.cpp | 3 ++- source/blender/io/collada/collada.h | 8 ++++---- source/blender/io/collada/collada_utils.cpp | 2 -- source/blender/io/collada/collada_utils.h | 2 -- source/blender/io/usd/intern/abstract_hierarchy_iterator.cc | 2 -- source/blender/io/usd/intern/usd_capi.cc | 2 -- source/blender/io/usd/intern/usd_hierarchy_iterator.cc | 2 -- source/blender/io/usd/intern/usd_writer_abstract.h | 3 +-- source/blender/io/usd/intern/usd_writer_camera.cc | 2 -- source/blender/io/usd/intern/usd_writer_hair.cc | 2 -- source/blender/io/usd/intern/usd_writer_light.cc | 2 -- source/blender/io/usd/intern/usd_writer_mesh.cc | 2 -- source/blender/io/usd/intern/usd_writer_metaball.cc | 2 -- source/blender/io/usd/intern/usd_writer_transform.cc | 2 -- source/blender/io/usd/usd.h | 4 ++-- source/blender/makesdna/DNA_ID.h | 3 +-- source/blender/makesdna/DNA_action_types.h | 8 ++++---- source/blender/makesdna/DNA_anim_types.h | 8 ++++---- source/blender/makesdna/DNA_customdata_types.h | 4 ++-- source/blender/makesdna/DNA_defaults.h | 4 ++-- source/blender/makesdna/DNA_layer_types.h | 6 +++--- source/blender/makesdna/DNA_movieclip_types.h | 8 ++++---- source/blender/makesdna/DNA_object_force_types.h | 6 +++--- source/blender/makesdna/DNA_scene_types.h | 8 ++++---- source/blender/physics/intern/BPH_mass_spring.cpp | 2 -- source/blender/physics/intern/hair_volume.cpp | 2 -- source/blender/python/BPY_extern.h | 4 ++-- source/blender/render/extern/include/RE_pipeline.h | 8 ++++++++ source/blender/render/extern/include/RE_shader_ext.h | 8 ++++++++ source/blender/windowmanager/WM_types.h | 8 ++++---- 260 files changed, 343 insertions(+), 612 deletions(-) (limited to 'source/blender') diff --git a/source/blender/blenkernel/BKE_action.h b/source/blender/blenkernel/BKE_action.h index 5f4f3f35b82..104582be932 100644 --- a/source/blender/blenkernel/BKE_action.h +++ b/source/blender/blenkernel/BKE_action.h @@ -25,12 +25,12 @@ * \brief Blender kernel action and pose functionality. */ +#include "DNA_listBase.h" + #ifdef __cplusplus extern "C" { #endif -#include "DNA_listBase.h" - /* The following structures are defined in DNA_action_types.h, and DNA_anim_types.h */ struct FCurve; struct Main; diff --git a/source/blender/blenkernel/BKE_anim_data.h b/source/blender/blenkernel/BKE_anim_data.h index 071254be783..8809fadd55c 100644 --- a/source/blender/blenkernel/BKE_anim_data.h +++ b/source/blender/blenkernel/BKE_anim_data.h @@ -24,12 +24,12 @@ * \ingroup bke */ +#include "BLI_sys_types.h" /* for bool */ + #ifdef __cplusplus extern "C" { #endif -#include "BLI_sys_types.h" /* for bool */ - struct AnimData; struct ID; struct Main; diff --git a/source/blender/blenkernel/BKE_animsys.h b/source/blender/blenkernel/BKE_animsys.h index 4076bca3b19..4a2ad28f90f 100644 --- a/source/blender/blenkernel/BKE_animsys.h +++ b/source/blender/blenkernel/BKE_animsys.h @@ -24,12 +24,12 @@ * \ingroup bke */ +#include "BLI_sys_types.h" /* for bool */ + #ifdef __cplusplus extern "C" { #endif -#include "BLI_sys_types.h" /* for bool */ - struct AnimData; struct Depsgraph; struct FCurve; diff --git a/source/blender/blenkernel/BKE_armature.h b/source/blender/blenkernel/BKE_armature.h index e59d5728350..5238853a105 100644 --- a/source/blender/blenkernel/BKE_armature.h +++ b/source/blender/blenkernel/BKE_armature.h @@ -22,13 +22,12 @@ /** \file * \ingroup bke */ +#include "BLI_listbase.h" #ifdef __cplusplus extern "C" { #endif -#include "BLI_listbase.h" - struct Bone; struct Depsgraph; struct ListBase; diff --git a/source/blender/blenkernel/BKE_blender_version.h b/source/blender/blenkernel/BKE_blender_version.h index bc64f78ffae..4b917beee17 100644 --- a/source/blender/blenkernel/BKE_blender_version.h +++ b/source/blender/blenkernel/BKE_blender_version.h @@ -16,6 +16,10 @@ #ifndef __BKE_BLENDER_VERSION_H__ #define __BKE_BLENDER_VERSION_H__ +#ifdef __cplusplus +extern "C" { +#endif + /** \file * \ingroup bke */ @@ -43,4 +47,8 @@ /** Defined in from blender.c */ extern char versionstr[]; +#ifdef __cplusplus +} +#endif + #endif /* __BKE_BLENDER_VERSION_H__ */ diff --git a/source/blender/blenkernel/BKE_context.h b/source/blender/blenkernel/BKE_context.h index c4fb19ea355..70ca29d5795 100644 --- a/source/blender/blenkernel/BKE_context.h +++ b/source/blender/blenkernel/BKE_context.h @@ -25,6 +25,7 @@ */ #include "DNA_listBase.h" +#include "DNA_object_enums.h" #include "RNA_types.h" #ifdef __cplusplus @@ -66,8 +67,6 @@ struct bScreen; struct wmWindow; struct wmWindowManager; -#include "DNA_object_enums.h" - /* Structs */ struct bContext; diff --git a/source/blender/blenkernel/BKE_curve.h b/source/blender/blenkernel/BKE_curve.h index 3524be99d0a..2b17cb7a875 100644 --- a/source/blender/blenkernel/BKE_curve.h +++ b/source/blender/blenkernel/BKE_curve.h @@ -23,12 +23,12 @@ * \ingroup bke */ +#include "DNA_scene_types.h" + #ifdef __cplusplus extern "C" { #endif -#include "DNA_scene_types.h" - struct BezTriple; struct Curve; struct Depsgraph; diff --git a/source/blender/blenkernel/BKE_customdata.h b/source/blender/blenkernel/BKE_customdata.h index a4a36343ca3..1a919a33034 100644 --- a/source/blender/blenkernel/BKE_customdata.h +++ b/source/blender/blenkernel/BKE_customdata.h @@ -25,15 +25,15 @@ #ifndef __BKE_CUSTOMDATA_H__ #define __BKE_CUSTOMDATA_H__ -#ifdef __cplusplus -extern "C" { -#endif - #include "BLI_sys_types.h" #include "BLI_utildefines.h" #include "DNA_customdata_types.h" +#ifdef __cplusplus +extern "C" { +#endif + struct BMesh; struct CustomData; struct CustomData_MeshMasks; diff --git a/source/blender/blenkernel/BKE_data_transfer.h b/source/blender/blenkernel/BKE_data_transfer.h index 79ef512bc1f..463c672ca47 100644 --- a/source/blender/blenkernel/BKE_data_transfer.h +++ b/source/blender/blenkernel/BKE_data_transfer.h @@ -24,12 +24,12 @@ #ifndef __BKE_DATA_TRANSFER_H__ #define __BKE_DATA_TRANSFER_H__ +#include "BKE_customdata.h" + #ifdef __cplusplus extern "C" { #endif -#include "BKE_customdata.h" - struct Depsgraph; struct Object; struct ReportList; diff --git a/source/blender/blenkernel/BKE_dynamicpaint.h b/source/blender/blenkernel/BKE_dynamicpaint.h index 0dc133e34b3..5e3603a8339 100644 --- a/source/blender/blenkernel/BKE_dynamicpaint.h +++ b/source/blender/blenkernel/BKE_dynamicpaint.h @@ -21,12 +21,12 @@ * \ingroup bke */ +#include "BLI_utildefines.h" + #ifdef __cplusplus extern "C" { #endif -#include "BLI_utildefines.h" - struct Depsgraph; struct DynamicPaintCanvasSettings; struct DynamicPaintModifierData; diff --git a/source/blender/blenkernel/BKE_fcurve.h b/source/blender/blenkernel/BKE_fcurve.h index e620beb6ccc..21a9b7b8b04 100644 --- a/source/blender/blenkernel/BKE_fcurve.h +++ b/source/blender/blenkernel/BKE_fcurve.h @@ -24,6 +24,8 @@ * \ingroup bke */ +#include "DNA_curve_types.h" + #ifdef __cplusplus extern "C" { #endif @@ -42,8 +44,6 @@ struct StructRNA; struct bAction; struct bContext; -#include "DNA_curve_types.h" - /* ************** Keyframe Tools ***************** */ typedef struct CfraElem { diff --git a/source/blender/blenkernel/BKE_fcurve_driver.h b/source/blender/blenkernel/BKE_fcurve_driver.h index ee531abfb72..563ed408ed7 100644 --- a/source/blender/blenkernel/BKE_fcurve_driver.h +++ b/source/blender/blenkernel/BKE_fcurve_driver.h @@ -24,6 +24,8 @@ * \ingroup bke */ +#include "DNA_curve_types.h" + #ifdef __cplusplus extern "C" { #endif @@ -36,8 +38,6 @@ struct PathResolvedRNA; struct PointerRNA; struct PropertyRNA; -#include "DNA_curve_types.h" - /* ************** F-Curve Drivers ***************** */ /* With these iterators for convenience, the variables "tarIndex" and "dtar" can be diff --git a/source/blender/blenkernel/BKE_image.h b/source/blender/blenkernel/BKE_image.h index 37082947687..1e5573ab014 100644 --- a/source/blender/blenkernel/BKE_image.h +++ b/source/blender/blenkernel/BKE_image.h @@ -23,12 +23,12 @@ * \ingroup bke */ +#include "BLI_utildefines.h" + #ifdef __cplusplus extern "C" { #endif -#include "BLI_utildefines.h" - struct Depsgraph; struct ID; struct ImBuf; diff --git a/source/blender/blenkernel/BKE_lib_id.h b/source/blender/blenkernel/BKE_lib_id.h index 0c91ba6231b..1f89edf905a 100644 --- a/source/blender/blenkernel/BKE_lib_id.h +++ b/source/blender/blenkernel/BKE_lib_id.h @@ -46,12 +46,12 @@ * specific cases requiring advanced (and potentially dangerous) handling. */ +#include "BLI_compiler_attrs.h" + #ifdef __cplusplus extern "C" { #endif -#include "BLI_compiler_attrs.h" - struct GHash; struct ID; struct Library; diff --git a/source/blender/blenkernel/BKE_lib_remap.h b/source/blender/blenkernel/BKE_lib_remap.h index 72c5f1d1b0e..8129b9dbafb 100644 --- a/source/blender/blenkernel/BKE_lib_remap.h +++ b/source/blender/blenkernel/BKE_lib_remap.h @@ -33,12 +33,12 @@ * - `BKE_lib_remap_callback_` should be used for functions managing remapping callbacks. */ +#include "BLI_compiler_attrs.h" + #ifdef __cplusplus extern "C" { #endif -#include "BLI_compiler_attrs.h" - struct wmWindowManager; /* BKE_libblock_free, delete are declared in BKE_lib_id.h for convenience. */ diff --git a/source/blender/blenkernel/BKE_library.h b/source/blender/blenkernel/BKE_library.h index 5bc3d50bf8d..7883d740b0a 100644 --- a/source/blender/blenkernel/BKE_library.h +++ b/source/blender/blenkernel/BKE_library.h @@ -25,12 +25,12 @@ * API to manage `Library` data-blocks. */ +#include "BLI_compiler_attrs.h" + #ifdef __cplusplus extern "C" { #endif -#include "BLI_compiler_attrs.h" - struct Library; struct Main; diff --git a/source/blender/blenkernel/BKE_light.h b/source/blender/blenkernel/BKE_light.h index a6f0fdbc8a3..17f7a8596bf 100644 --- a/source/blender/blenkernel/BKE_light.h +++ b/source/blender/blenkernel/BKE_light.h @@ -24,12 +24,13 @@ * \ingroup bke * \brief General operations, lookup, etc. for blender lights. */ + +#include "BLI_compiler_attrs.h" + #ifdef __cplusplus extern "C" { #endif -#include "BLI_compiler_attrs.h" - struct Light; struct Main; diff --git a/source/blender/blenkernel/BKE_object.h b/source/blender/blenkernel/BKE_object.h index 70a44d6d8ce..3710ec810ce 100644 --- a/source/blender/blenkernel/BKE_object.h +++ b/source/blender/blenkernel/BKE_object.h @@ -21,12 +21,15 @@ * \ingroup bke * \brief General operations, lookup, etc. for blender objects. */ + +#include "BLI_compiler_attrs.h" + +#include "DNA_object_enums.h" + #ifdef __cplusplus extern "C" { #endif -#include "BLI_compiler_attrs.h" - struct Base; struct BoundBox; struct Depsgraph; @@ -46,8 +49,6 @@ struct ShaderFxData; struct View3D; struct ViewLayer; -#include "DNA_object_enums.h" - void BKE_object_workob_clear(struct Object *workob); void BKE_object_workob_calc_parent(struct Depsgraph *depsgraph, struct Scene *scene, diff --git a/source/blender/blenkernel/BKE_paint.h b/source/blender/blenkernel/BKE_paint.h index 7822f285c3b..5c126ed08d4 100644 --- a/source/blender/blenkernel/BKE_paint.h +++ b/source/blender/blenkernel/BKE_paint.h @@ -24,6 +24,9 @@ * \ingroup bke */ +#include "BLI_utildefines.h" +#include "DNA_object_enums.h" + #ifdef __cplusplus extern "C" { #endif @@ -65,9 +68,6 @@ struct tPaletteColorHSV; enum eOverlayFlags; -#include "BLI_utildefines.h" -#include "DNA_object_enums.h" - extern const char PAINT_CURSOR_SCULPT[3]; extern const char PAINT_CURSOR_VERTEX_PAINT[3]; extern const char PAINT_CURSOR_WEIGHT_PAINT[3]; diff --git a/source/blender/blenkernel/BKE_report.h b/source/blender/blenkernel/BKE_report.h index d7ce9625548..063c0831a0d 100644 --- a/source/blender/blenkernel/BKE_report.h +++ b/source/blender/blenkernel/BKE_report.h @@ -21,16 +21,16 @@ * \ingroup bke */ -#ifdef __cplusplus -extern "C" { -#endif - #include #include "BLI_compiler_attrs.h" #include "BLI_utildefines.h" #include "DNA_windowmanager_types.h" +#ifdef __cplusplus +extern "C" { +#endif + /* Reporting Information and Errors * * These functions also accept NULL in case no error reporting diff --git a/source/blender/blenkernel/BKE_text_suggestions.h b/source/blender/blenkernel/BKE_text_suggestions.h index dc908ee5232..d618fcd6d11 100644 --- a/source/blender/blenkernel/BKE_text_suggestions.h +++ b/source/blender/blenkernel/BKE_text_suggestions.h @@ -23,12 +23,12 @@ * \ingroup bke */ +#include "DNA_text_types.h" + #ifdef __cplusplus extern "C" { #endif -#include "DNA_text_types.h" - /* **************************************************************************** * Suggestions should be added in sorted order although a linear sorting method is * implemented. The list is then divided up based on the prefix provided by diff --git a/source/blender/blenlib/BLI_bitmap.h b/source/blender/blenlib/BLI_bitmap.h index d67fbabd11c..2b811e50efb 100644 --- a/source/blender/blenlib/BLI_bitmap.h +++ b/source/blender/blenlib/BLI_bitmap.h @@ -24,12 +24,12 @@ * \ingroup bli */ +#include "BLI_utildefines.h" + #ifdef __cplusplus extern "C" { #endif -#include "BLI_utildefines.h" - typedef unsigned int BLI_bitmap; /* warning: the bitmap does not keep track of its own size or check diff --git a/source/blender/blenlib/BLI_blenlib.h b/source/blender/blenlib/BLI_blenlib.h index 41603bb4f06..6dd1abacf78 100644 --- a/source/blender/blenlib/BLI_blenlib.h +++ b/source/blender/blenlib/BLI_blenlib.h @@ -52,10 +52,6 @@ #include -#ifdef __cplusplus -extern "C" { -#endif - #include "BLI_listbase.h" #include "BLI_string.h" @@ -68,8 +64,4 @@ extern "C" { #include "BLI_rect.h" -#ifdef __cplusplus -} -#endif - #endif diff --git a/source/blender/blenlib/BLI_fileops.h b/source/blender/blenlib/BLI_fileops.h index 4eb6f184a76..fe4600b9121 100644 --- a/source/blender/blenlib/BLI_fileops.h +++ b/source/blender/blenlib/BLI_fileops.h @@ -29,10 +29,6 @@ #include #include -#ifdef __cplusplus -extern "C" { -#endif - /* for size_t (needed on windows) */ #include @@ -41,6 +37,10 @@ extern "C" { #include "BLI_compiler_attrs.h" #include "BLI_utildefines.h" +#ifdef __cplusplus +extern "C" { +#endif + #ifndef PATH_MAX # define PATH_MAX 4096 #endif diff --git a/source/blender/blenlib/BLI_hash.h b/source/blender/blenlib/BLI_hash.h index 3871ddf956a..96111ffaf5a 100644 --- a/source/blender/blenlib/BLI_hash.h +++ b/source/blender/blenlib/BLI_hash.h @@ -21,12 +21,12 @@ * \ingroup bli */ +#include "BLI_utildefines.h" + #ifdef __cplusplus extern "C" { #endif -#include "BLI_utildefines.h" - BLI_INLINE unsigned int BLI_hash_int_2d(unsigned int kx, unsigned int ky) { #define rot(x, k) (((x) << (k)) | ((x) >> (32 - (k)))) diff --git a/source/blender/blenlib/BLI_heap.h b/source/blender/blenlib/BLI_heap.h index fa8e49ef376..ca5edcbead5 100644 --- a/source/blender/blenlib/BLI_heap.h +++ b/source/blender/blenlib/BLI_heap.h @@ -22,12 +22,12 @@ * \brief A min-heap / priority queue ADT */ +#include "BLI_math.h" + #ifdef __cplusplus extern "C" { #endif -#include "BLI_math.h" - struct Heap; struct HeapNode; typedef struct Heap Heap; diff --git a/source/blender/blenlib/BLI_math_base.h b/source/blender/blenlib/BLI_math_base.h index ae9617d2f16..3d91a9e98cf 100644 --- a/source/blender/blenlib/BLI_math_base.h +++ b/source/blender/blenlib/BLI_math_base.h @@ -92,6 +92,10 @@ static const int NAN_INT = 0x7FC00000; # pragma GCC diagnostic ignored "-Wredundant-decls" #endif +#ifdef __cplusplus +extern "C" { +#endif + /******************************* Float ******************************/ MINLINE float pow2f(float x); @@ -281,4 +285,8 @@ double double_round(double x, int ndigits); # define BLI_ASSERT_UNIT_M3(m) (void)(m) #endif +#ifdef __cplusplus +} +#endif + #endif /* __BLI_MATH_BASE_H__ */ diff --git a/source/blender/blenlib/BLI_math_bits.h b/source/blender/blenlib/BLI_math_bits.h index 71e2d2d9e2c..842fce22f91 100644 --- a/source/blender/blenlib/BLI_math_bits.h +++ b/source/blender/blenlib/BLI_math_bits.h @@ -22,12 +22,12 @@ * \ingroup bli */ +#include "BLI_math_inline.h" + #ifdef __cplusplus extern "C" { #endif -#include "BLI_math_inline.h" - /* Search the value from LSB to MSB for a set bit. Returns index of this bit. */ MINLINE int bitscan_forward_i(int a); MINLINE unsigned int bitscan_forward_uint(unsigned int a); diff --git a/source/blender/blenlib/BLI_math_color.h b/source/blender/blenlib/BLI_math_color.h index 97d0eb1ddda..f247e09a83b 100644 --- a/source/blender/blenlib/BLI_math_color.h +++ b/source/blender/blenlib/BLI_math_color.h @@ -27,12 +27,12 @@ * \ingroup bli */ +#include "BLI_math_inline.h" + #ifdef __cplusplus extern "C" { #endif -#include "BLI_math_inline.h" - /* YCbCr */ #define BLI_YCC_ITU_BT601 0 #define BLI_YCC_ITU_BT709 1 diff --git a/source/blender/blenlib/BLI_math_color_blend.h b/source/blender/blenlib/BLI_math_color_blend.h index 47bafff3a49..60ada1e4509 100644 --- a/source/blender/blenlib/BLI_math_color_blend.h +++ b/source/blender/blenlib/BLI_math_color_blend.h @@ -27,12 +27,12 @@ * \ingroup bli */ +#include "BLI_math_inline.h" + #ifdef __cplusplus extern "C" { #endif -#include "BLI_math_inline.h" - /******************** Blending Modes ********************** * - byte function assume straight alpha * - float functions assume premultiplied alpha diff --git a/source/blender/blenlib/BLI_math_geom.h b/source/blender/blenlib/BLI_math_geom.h index 2049f368578..563bcad5d14 100644 --- a/source/blender/blenlib/BLI_math_geom.h +++ b/source/blender/blenlib/BLI_math_geom.h @@ -27,10 +27,6 @@ * \ingroup bli */ -#ifdef __cplusplus -extern "C" { -#endif - #include "BLI_compiler_attrs.h" #include "BLI_math_inline.h" @@ -39,6 +35,10 @@ extern "C" { # pragma GCC diagnostic ignored "-Wredundant-decls" #endif +#ifdef __cplusplus +extern "C" { +#endif + /********************************** Polygons *********************************/ float normal_tri_v3(float r[3], const float a[3], const float b[3], const float c[3]); diff --git a/source/blender/blenlib/BLI_math_matrix.h b/source/blender/blenlib/BLI_math_matrix.h index 1221ecfb7b1..2d11797bc34 100644 --- a/source/blender/blenlib/BLI_math_matrix.h +++ b/source/blender/blenlib/BLI_math_matrix.h @@ -26,13 +26,13 @@ * \ingroup bli */ +#include "BLI_compiler_attrs.h" +#include "BLI_sys_types.h" + #ifdef __cplusplus extern "C" { #endif -#include "BLI_compiler_attrs.h" -#include "BLI_sys_types.h" - /********************************* Init **************************************/ void zero_m2(float R[2][2]); diff --git a/source/blender/blenlib/BLI_math_solvers.h b/source/blender/blenlib/BLI_math_solvers.h index 4bd1a46bb78..193bbdd4e8c 100644 --- a/source/blender/blenlib/BLI_math_solvers.h +++ b/source/blender/blenlib/BLI_math_solvers.h @@ -24,13 +24,13 @@ * \ingroup bli */ +#include "BLI_compiler_attrs.h" +#include "BLI_math_inline.h" + #ifdef __cplusplus extern "C" { #endif -#include "BLI_compiler_attrs.h" -#include "BLI_math_inline.h" - #ifdef BLI_MATH_GCC_WARN_PRAGMA # pragma GCC diagnostic push # pragma GCC diagnostic ignored "-Wredundant-decls" diff --git a/source/blender/blenlib/BLI_math_statistics.h b/source/blender/blenlib/BLI_math_statistics.h index b2cc6568abb..a9f9ae39506 100644 --- a/source/blender/blenlib/BLI_math_statistics.h +++ b/source/blender/blenlib/BLI_math_statistics.h @@ -24,13 +24,13 @@ * \ingroup bli */ +#include "BLI_compiler_attrs.h" +#include "BLI_math_inline.h" + #ifdef __cplusplus extern "C" { #endif -#include "BLI_compiler_attrs.h" -#include "BLI_math_inline.h" - #ifdef BLI_MATH_GCC_WARN_PRAGMA # pragma GCC diagnostic push # pragma GCC diagnostic ignored "-Wredundant-decls" diff --git a/source/blender/blenlib/BLI_math_vector.h b/source/blender/blenlib/BLI_math_vector.h index a171ff1bb1c..af28e826e84 100644 --- a/source/blender/blenlib/BLI_math_vector.h +++ b/source/blender/blenlib/BLI_math_vector.h @@ -27,14 +27,14 @@ * \ingroup bli */ -#ifdef __cplusplus -extern "C" { -#endif - #include "BLI_compiler_attrs.h" #include "BLI_math_inline.h" #include "BLI_utildefines.h" +#ifdef __cplusplus +extern "C" { +#endif + /************************************* Init ***********************************/ #ifdef BLI_MATH_GCC_WARN_PRAGMA diff --git a/source/blender/blenlib/BLI_memarena.h b/source/blender/blenlib/BLI_memarena.h index 5440bdfef60..e0aff82e874 100644 --- a/source/blender/blenlib/BLI_memarena.h +++ b/source/blender/blenlib/BLI_memarena.h @@ -24,12 +24,12 @@ #ifndef __BLI_MEMARENA_H__ #define __BLI_MEMARENA_H__ +#include "BLI_compiler_attrs.h" + #ifdef __cplusplus extern "C" { #endif -#include "BLI_compiler_attrs.h" - /* A reasonable standard buffer size, big * enough to not cause much internal fragmentation, * small enough not to waste resources diff --git a/source/blender/blenlib/BLI_memblock.h b/source/blender/blenlib/BLI_memblock.h index 8bd8642a4e8..8f66ee3b9cb 100644 --- a/source/blender/blenlib/BLI_memblock.h +++ b/source/blender/blenlib/BLI_memblock.h @@ -24,12 +24,12 @@ * \ingroup bli */ +#include "BLI_compiler_attrs.h" + #ifdef __cplusplus extern "C" { #endif -#include "BLI_compiler_attrs.h" - #define BLI_MEM_BLOCK_CHUNK_SIZE (1 << 15) /* 32KiB */ struct BLI_memblock; diff --git a/source/blender/blenlib/BLI_memiter.h b/source/blender/blenlib/BLI_memiter.h index fb4a79a491b..4aa9cdb6b6c 100644 --- a/source/blender/blenlib/BLI_memiter.h +++ b/source/blender/blenlib/BLI_memiter.h @@ -21,14 +21,14 @@ * \ingroup bli */ -#ifdef __cplusplus -extern "C" { -#endif - #include "BLI_compiler_attrs.h" #include "BLI_compiler_compat.h" #include "BLI_sys_types.h" +#ifdef __cplusplus +extern "C" { +#endif + /* 512kb, good default for small elems. */ #define BLI_MEMITER_DEFAULT_SIZE (1 << 19) diff --git a/source/blender/blenlib/BLI_mempool.h b/source/blender/blenlib/BLI_mempool.h index 6491180c2fd..3749f9e1b76 100644 --- a/source/blender/blenlib/BLI_mempool.h +++ b/source/blender/blenlib/BLI_mempool.h @@ -24,13 +24,13 @@ * \ingroup bli */ +#include "BLI_compiler_attrs.h" +#include "BLI_utildefines.h" + #ifdef __cplusplus extern "C" { #endif -#include "BLI_compiler_attrs.h" -#include "BLI_utildefines.h" - struct BLI_mempool; struct BLI_mempool_chunk; diff --git a/source/blender/blenlib/BLI_path_util.h b/source/blender/blenlib/BLI_path_util.h index 9a6a14547d2..30823773d6c 100644 --- a/source/blender/blenlib/BLI_path_util.h +++ b/source/blender/blenlib/BLI_path_util.h @@ -23,13 +23,13 @@ * \ingroup bli */ +#include "BLI_compiler_attrs.h" +#include "BLI_utildefines.h" + #ifdef __cplusplus extern "C" { #endif -#include "BLI_compiler_attrs.h" -#include "BLI_utildefines.h" - void BLI_setenv(const char *env, const char *val) ATTR_NONNULL(1); void BLI_setenv_if_new(const char *env, const char *val) ATTR_NONNULL(1); const char *BLI_getenv(const char *env) ATTR_NONNULL(1); diff --git a/source/blender/blenlib/BLI_string.h b/source/blender/blenlib/BLI_string.h index 6d3f38c7a52..00e4e3485d1 100644 --- a/source/blender/blenlib/BLI_string.h +++ b/source/blender/blenlib/BLI_string.h @@ -27,13 +27,13 @@ #include #include +#include "BLI_compiler_attrs.h" +#include "BLI_utildefines.h" + #ifdef __cplusplus extern "C" { #endif -#include "BLI_compiler_attrs.h" -#include "BLI_utildefines.h" - char *BLI_strdupn(const char *str, const size_t len) ATTR_MALLOC ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(); diff --git a/source/blender/blenlib/BLI_string_utf8.h b/source/blender/blenlib/BLI_string_utf8.h index 8d986d45a17..78e7113b6ef 100644 --- a/source/blender/blenlib/BLI_string_utf8.h +++ b/source/blender/blenlib/BLI_string_utf8.h @@ -21,13 +21,13 @@ * \ingroup bli */ +#include "BLI_compiler_attrs.h" +#include "BLI_sys_types.h" + #ifdef __cplusplus extern "C" { #endif -#include "BLI_compiler_attrs.h" -#include "BLI_sys_types.h" - char *BLI_strncpy_utf8(char *__restrict dst, const char *__restrict src, size_t maxncpy) ATTR_NONNULL(); size_t BLI_strncpy_utf8_rlen(char *__restrict dst, const char *__restrict src, size_t maxncpy) diff --git a/source/blender/blenlib/BLI_string_utils.h b/source/blender/blenlib/BLI_string_utils.h index 7b0dd13e0c7..857b22540e9 100644 --- a/source/blender/blenlib/BLI_string_utils.h +++ b/source/blender/blenlib/BLI_string_utils.h @@ -26,13 +26,13 @@ #include +#include "BLI_compiler_attrs.h" +#include "BLI_utildefines.h" + #ifdef __cplusplus extern "C" { #endif -#include "BLI_compiler_attrs.h" -#include "BLI_utildefines.h" - struct ListBase; typedef bool (*UniquenameCheckCallback)(void *arg, const char *name); diff --git a/source/blender/blenlib/BLI_task.h b/source/blender/blenlib/BLI_task.h index ee087600a31..ce18d5d765e 100644 --- a/source/blender/blenlib/BLI_task.h +++ b/source/blender/blenlib/BLI_task.h @@ -25,13 +25,13 @@ struct ListBase; * \ingroup bli */ +#include "BLI_threads.h" +#include "BLI_utildefines.h" + #ifdef __cplusplus extern "C" { #endif -#include "BLI_threads.h" -#include "BLI_utildefines.h" - struct BLI_mempool; /* Task Scheduler diff --git a/source/blender/blenlib/BLI_threads.h b/source/blender/blenlib/BLI_threads.h index 243efedebf9..c199417017b 100644 --- a/source/blender/blenlib/BLI_threads.h +++ b/source/blender/blenlib/BLI_threads.h @@ -23,9 +23,6 @@ /** \file * \ingroup bli */ -#ifdef __cplusplus -extern "C" { -#endif #include @@ -35,6 +32,10 @@ extern "C" { # include #endif +#ifdef __cplusplus +extern "C" { +#endif + /* for tables, button in UI, etc */ #define BLENDER_MAX_THREADS 1024 diff --git a/source/blender/blenlib/BLI_utildefines.h b/source/blender/blenlib/BLI_utildefines.h index fb5dbf66819..1f28f7e80c5 100644 --- a/source/blender/blenlib/BLI_utildefines.h +++ b/source/blender/blenlib/BLI_utildefines.h @@ -24,10 +24,6 @@ * \ingroup bli */ -#ifdef __cplusplus -extern "C" { -#endif - /* avoid many includes for now */ #include "BLI_compiler_compat.h" #include "BLI_sys_types.h" @@ -39,6 +35,10 @@ extern "C" { /* include after _VA_NARGS macro */ #include "BLI_compiler_typecheck.h" +#ifdef __cplusplus +extern "C" { +#endif + /* -------------------------------------------------------------------- */ /** \name Min/Max Macros * \{ */ diff --git a/source/blender/blenlib/intern/math_base_inline.c b/source/blender/blenlib/intern/math_base_inline.c index e0cac508d28..d5105a7cefc 100644 --- a/source/blender/blenlib/intern/math_base_inline.c +++ b/source/blender/blenlib/intern/math_base_inline.c @@ -38,6 +38,10 @@ #include "BLI_math_base.h" +#ifdef __cplusplus +extern "C" { +#endif + /* copied from BLI_utildefines.h */ #ifdef __GNUC__ # define UNLIKELY(x) __builtin_expect(!!(x), 0) @@ -793,4 +797,8 @@ MINLINE unsigned char unit_ushort_to_uchar(unsigned short val) } \ ((void)0) +#ifdef __cplusplus +} +#endif + #endif /* __MATH_BASE_INLINE_C__ */ diff --git a/source/blender/bmesh/bmesh.h b/source/blender/bmesh/bmesh.h index 7d2100c0f65..9b5072e8e16 100644 --- a/source/blender/bmesh/bmesh.h +++ b/source/blender/bmesh/bmesh.h @@ -188,10 +188,6 @@ * - Use two different iterator types for BMO map/buffer types. */ -#ifdef __cplusplus -extern "C" { -#endif - #include "DNA_customdata_types.h" /* BMesh struct in bmesh_class.h uses */ #include "DNA_listBase.h" /* selection history uses */ @@ -199,6 +195,10 @@ extern "C" { #include #include +#ifdef __cplusplus +extern "C" { +#endif + #include "bmesh_class.h" /* include the rest of the API */ diff --git a/source/blender/bmesh/intern/bmesh_operator_api.h b/source/blender/bmesh/intern/bmesh_operator_api.h index dbd2bf076c6..5af812d1b1d 100644 --- a/source/blender/bmesh/intern/bmesh_operator_api.h +++ b/source/blender/bmesh/intern/bmesh_operator_api.h @@ -21,14 +21,14 @@ * \ingroup bmesh */ -#ifdef __cplusplus -extern "C" { -#endif - #include "BLI_ghash.h" #include +#ifdef __cplusplus +extern "C" { +#endif + /** * operators represent logical, executable mesh modules. all topological * operations involving a bmesh has to go through them. diff --git a/source/blender/bmesh/tools/bmesh_bevel.h b/source/blender/bmesh/tools/bmesh_bevel.h index 479a8a3f6d6..8562e584ec9 100644 --- a/source/blender/bmesh/tools/bmesh_bevel.h +++ b/source/blender/bmesh/tools/bmesh_bevel.h @@ -47,4 +47,5 @@ void BM_mesh_bevel(BMesh *bm, const bool use_custom_profile, const struct CurveProfile *custom_profile, const int vmesh_method); + #endif /* __BMESH_BEVEL_H__ */ diff --git a/source/blender/compositor/COM_compositor.h b/source/blender/compositor/COM_compositor.h index 1d7c2b6b349..a24904551c6 100644 --- a/source/blender/compositor/COM_compositor.h +++ b/source/blender/compositor/COM_compositor.h @@ -19,13 +19,13 @@ #ifndef __COM_COMPOSITOR_H__ #define __COM_COMPOSITOR_H__ +#include "DNA_color_types.h" +#include "DNA_node_types.h" + #ifdef __cplusplus extern "C" { #endif -#include "DNA_color_types.h" -#include "DNA_node_types.h" - /* Keep ascii art. */ /* clang-format off */ /** diff --git a/source/blender/compositor/intern/COM_Converter.cpp b/source/blender/compositor/intern/COM_Converter.cpp index e8474ba8318..edfeb3a3a04 100644 --- a/source/blender/compositor/intern/COM_Converter.cpp +++ b/source/blender/compositor/intern/COM_Converter.cpp @@ -18,11 +18,9 @@ #include -extern "C" { #include "DNA_node_types.h" #include "BKE_node.h" -} #include "COM_NodeOperation.h" #include "COM_NodeOperationBuilder.h" diff --git a/source/blender/compositor/intern/COM_ExecutionSystem.cpp b/source/blender/compositor/intern/COM_ExecutionSystem.cpp index fa40f150335..34682aae2fd 100644 --- a/source/blender/compositor/intern/COM_ExecutionSystem.cpp +++ b/source/blender/compositor/intern/COM_ExecutionSystem.cpp @@ -20,9 +20,8 @@ #include "BLI_utildefines.h" #include "PIL_time.h" -extern "C" { + #include "BKE_node.h" -} #include "BLT_translation.h" diff --git a/source/blender/compositor/intern/COM_MemoryBuffer.h b/source/blender/compositor/intern/COM_MemoryBuffer.h index 7e5b0264aa3..6ba8f144482 100644 --- a/source/blender/compositor/intern/COM_MemoryBuffer.h +++ b/source/blender/compositor/intern/COM_MemoryBuffer.h @@ -25,10 +25,8 @@ class MemoryBuffer; #include "COM_MemoryProxy.h" #include "COM_SocketReader.h" -extern "C" { #include "BLI_math.h" #include "BLI_rect.h" -} /** * \brief state of a memory buffer diff --git a/source/blender/compositor/intern/COM_Node.cpp b/source/blender/compositor/intern/COM_Node.cpp index df5a8e690d3..31535c5851f 100644 --- a/source/blender/compositor/intern/COM_Node.cpp +++ b/source/blender/compositor/intern/COM_Node.cpp @@ -18,11 +18,9 @@ #include -extern "C" { #include "BKE_node.h" #include "RNA_access.h" -} #include "COM_ExecutionSystem.h" #include "COM_NodeOperation.h" diff --git a/source/blender/compositor/intern/COM_NodeConverter.cpp b/source/blender/compositor/intern/COM_NodeConverter.cpp index eff825b075d..2db31bd4133 100644 --- a/source/blender/compositor/intern/COM_NodeConverter.cpp +++ b/source/blender/compositor/intern/COM_NodeConverter.cpp @@ -16,9 +16,7 @@ * Copyright 2013, Blender Foundation. */ -extern "C" { #include "BLI_utildefines.h" -} #include "COM_Debug.h" diff --git a/source/blender/compositor/intern/COM_NodeGraph.cpp b/source/blender/compositor/intern/COM_NodeGraph.cpp index 6640f144518..cb27fa21b4d 100644 --- a/source/blender/compositor/intern/COM_NodeGraph.cpp +++ b/source/blender/compositor/intern/COM_NodeGraph.cpp @@ -18,14 +18,12 @@ #include -extern "C" { #include "BLI_listbase.h" #include "BLI_utildefines.h" #include "DNA_node_types.h" #include "BKE_node.h" -} #include "COM_CompositorContext.h" #include "COM_Converter.h" diff --git a/source/blender/compositor/intern/COM_NodeGraph.h b/source/blender/compositor/intern/COM_NodeGraph.h index b005149c839..531832c2c65 100644 --- a/source/blender/compositor/intern/COM_NodeGraph.h +++ b/source/blender/compositor/intern/COM_NodeGraph.h @@ -23,9 +23,7 @@ #include #include -extern "C" { #include "DNA_node_types.h" -} #ifdef WITH_CXX_GUARDEDALLOC # include "MEM_guardedalloc.h" diff --git a/source/blender/compositor/intern/COM_NodeOperation.h b/source/blender/compositor/intern/COM_NodeOperation.h index b2c4961ca35..07f482f9e5f 100644 --- a/source/blender/compositor/intern/COM_NodeOperation.h +++ b/source/blender/compositor/intern/COM_NodeOperation.h @@ -23,11 +23,9 @@ #include #include -extern "C" { #include "BLI_math_color.h" #include "BLI_math_vector.h" #include "BLI_threads.h" -} #include "COM_MemoryBuffer.h" #include "COM_MemoryProxy.h" diff --git a/source/blender/compositor/intern/COM_NodeOperationBuilder.cpp b/source/blender/compositor/intern/COM_NodeOperationBuilder.cpp index 9f6b91915e0..5ce6ca34b34 100644 --- a/source/blender/compositor/intern/COM_NodeOperationBuilder.cpp +++ b/source/blender/compositor/intern/COM_NodeOperationBuilder.cpp @@ -16,9 +16,7 @@ * Copyright 2013, Blender Foundation. */ -extern "C" { #include "BLI_utildefines.h" -} #include "COM_Converter.h" #include "COM_Debug.h" diff --git a/source/blender/compositor/intern/COM_WorkScheduler.h b/source/blender/compositor/intern/COM_WorkScheduler.h index 5e0675f1833..3a1b4c533bd 100644 --- a/source/blender/compositor/intern/COM_WorkScheduler.h +++ b/source/blender/compositor/intern/COM_WorkScheduler.h @@ -20,9 +20,9 @@ #define __COM_WORKSCHEDULER_H__ #include "COM_ExecutionGroup.h" -extern "C" { + #include "BLI_threads.h" -} + #include "COM_Device.h" #include "COM_WorkPackage.h" #include "COM_defines.h" diff --git a/source/blender/compositor/intern/COM_compositor.cpp b/source/blender/compositor/intern/COM_compositor.cpp index 1793abae134..bccdd026ead 100644 --- a/source/blender/compositor/intern/COM_compositor.cpp +++ b/source/blender/compositor/intern/COM_compositor.cpp @@ -16,13 +16,11 @@ * Copyright 2011, Blender Foundation. */ -extern "C" { -#include "BKE_node.h" #include "BLI_threads.h" -} #include "BLT_translation.h" +#include "BKE_node.h" #include "BKE_scene.h" #include "COM_ExecutionSystem.h" diff --git a/source/blender/compositor/nodes/COM_CornerPinNode.h b/source/blender/compositor/nodes/COM_CornerPinNode.h index ea62dea12de..a8e88a0ef4f 100644 --- a/source/blender/compositor/nodes/COM_CornerPinNode.h +++ b/source/blender/compositor/nodes/COM_CornerPinNode.h @@ -20,9 +20,7 @@ #include "COM_Node.h" -extern "C" { #include "DNA_node_types.h" -} /** * \brief CornerPinNode diff --git a/source/blender/compositor/nodes/COM_ImageNode.h b/source/blender/compositor/nodes/COM_ImageNode.h index 6ed9acd58b8..7883f4d7ab3 100644 --- a/source/blender/compositor/nodes/COM_ImageNode.h +++ b/source/blender/compositor/nodes/COM_ImageNode.h @@ -23,9 +23,8 @@ #include "COM_defines.h" #include "DNA_image_types.h" #include "DNA_node_types.h" -extern "C" { + #include "RE_engine.h" -} /** * \brief ImageNode diff --git a/source/blender/compositor/nodes/COM_KeyingScreenNode.cpp b/source/blender/compositor/nodes/COM_KeyingScreenNode.cpp index 6a005b2b712..93a9a071226 100644 --- a/source/blender/compositor/nodes/COM_KeyingScreenNode.cpp +++ b/source/blender/compositor/nodes/COM_KeyingScreenNode.cpp @@ -20,9 +20,7 @@ #include "COM_ExecutionSystem.h" #include "COM_KeyingScreenOperation.h" -extern "C" { #include "DNA_movieclip_types.h" -} KeyingScreenNode::KeyingScreenNode(bNode *editorNode) : Node(editorNode) { diff --git a/source/blender/compositor/nodes/COM_MaskNode.cpp b/source/blender/compositor/nodes/COM_MaskNode.cpp index cceeef6b437..b28b849521c 100644 --- a/source/blender/compositor/nodes/COM_MaskNode.cpp +++ b/source/blender/compositor/nodes/COM_MaskNode.cpp @@ -20,9 +20,7 @@ #include "COM_ExecutionSystem.h" #include "COM_MaskOperation.h" -extern "C" { #include "DNA_mask_types.h" -} MaskNode::MaskNode(bNode *editorNode) : Node(editorNode) { diff --git a/source/blender/compositor/nodes/COM_MovieClipNode.cpp b/source/blender/compositor/nodes/COM_MovieClipNode.cpp index 29fd47f33b3..3366a8c20d6 100644 --- a/source/blender/compositor/nodes/COM_MovieClipNode.cpp +++ b/source/blender/compositor/nodes/COM_MovieClipNode.cpp @@ -22,12 +22,12 @@ #include "COM_MovieClipOperation.h" #include "COM_SetValueOperation.h" -extern "C" { #include "BKE_movieclip.h" #include "BKE_tracking.h" + #include "DNA_movieclip_types.h" + #include "IMB_imbuf.h" -} MovieClipNode::MovieClipNode(bNode *editorNode) : Node(editorNode) { diff --git a/source/blender/compositor/nodes/COM_PlaneTrackDeformNode.cpp b/source/blender/compositor/nodes/COM_PlaneTrackDeformNode.cpp index 39616bba4f9..6b9b51631ec 100644 --- a/source/blender/compositor/nodes/COM_PlaneTrackDeformNode.cpp +++ b/source/blender/compositor/nodes/COM_PlaneTrackDeformNode.cpp @@ -21,11 +21,9 @@ #include "COM_PlaneTrackOperation.h" -extern "C" { #include "BKE_movieclip.h" #include "BKE_node.h" #include "BKE_tracking.h" -} PlaneTrackDeformNode::PlaneTrackDeformNode(bNode *editorNode) : Node(editorNode) { diff --git a/source/blender/compositor/nodes/COM_PlaneTrackDeformNode.h b/source/blender/compositor/nodes/COM_PlaneTrackDeformNode.h index 6ee73e22af0..2c17739a220 100644 --- a/source/blender/compositor/nodes/COM_PlaneTrackDeformNode.h +++ b/source/blender/compositor/nodes/COM_PlaneTrackDeformNode.h @@ -21,10 +21,8 @@ #include "COM_Node.h" -extern "C" { #include "DNA_movieclip_types.h" #include "DNA_node_types.h" -} /** * \brief PlaneTrackDeformNode diff --git a/source/blender/compositor/nodes/COM_Stabilize2dNode.cpp b/source/blender/compositor/nodes/COM_Stabilize2dNode.cpp index 0b6cb97b049..7a308ac47b9 100644 --- a/source/blender/compositor/nodes/COM_Stabilize2dNode.cpp +++ b/source/blender/compositor/nodes/COM_Stabilize2dNode.cpp @@ -24,10 +24,9 @@ #include "COM_SetSamplerOperation.h" #include "COM_TranslateOperation.h" -extern "C" { #include "BKE_tracking.h" + #include "DNA_movieclip_types.h" -} Stabilize2dNode::Stabilize2dNode(bNode *editorNode) : Node(editorNode) { diff --git a/source/blender/compositor/nodes/COM_TimeNode.cpp b/source/blender/compositor/nodes/COM_TimeNode.cpp index b6927fb8373..9722ead0716 100644 --- a/source/blender/compositor/nodes/COM_TimeNode.cpp +++ b/source/blender/compositor/nodes/COM_TimeNode.cpp @@ -19,9 +19,9 @@ #include "COM_TimeNode.h" #include "COM_ExecutionSystem.h" #include "COM_SetValueOperation.h" -extern "C" { + #include "BKE_colortools.h" -} + #include "BLI_utildefines.h" TimeNode::TimeNode(bNode *editorNode) : Node(editorNode) diff --git a/source/blender/compositor/nodes/COM_TrackPositionNode.cpp b/source/blender/compositor/nodes/COM_TrackPositionNode.cpp index da9f50a590b..52e7f7d832b 100644 --- a/source/blender/compositor/nodes/COM_TrackPositionNode.cpp +++ b/source/blender/compositor/nodes/COM_TrackPositionNode.cpp @@ -22,11 +22,9 @@ #include "COM_ExecutionSystem.h" #include "COM_TrackPositionOperation.h" -extern "C" { #include "DNA_movieclip_types.h" #include "BKE_node.h" -} TrackPositionNode::TrackPositionNode(bNode *editorNode) : Node(editorNode) { diff --git a/source/blender/compositor/operations/COM_AntiAliasOperation.cpp b/source/blender/compositor/operations/COM_AntiAliasOperation.cpp index de7c43a8751..85725cc1d37 100644 --- a/source/blender/compositor/operations/COM_AntiAliasOperation.cpp +++ b/source/blender/compositor/operations/COM_AntiAliasOperation.cpp @@ -22,9 +22,7 @@ #include "MEM_guardedalloc.h" -extern "C" { #include "RE_render_ext.h" -} /* An implementation of the Scale3X edge-extrapolation algorithm. * diff --git a/source/blender/compositor/operations/COM_BilateralBlurOperation.cpp b/source/blender/compositor/operations/COM_BilateralBlurOperation.cpp index 44cb4056c99..8168867a522 100644 --- a/source/blender/compositor/operations/COM_BilateralBlurOperation.cpp +++ b/source/blender/compositor/operations/COM_BilateralBlurOperation.cpp @@ -19,9 +19,7 @@ #include "COM_BilateralBlurOperation.h" #include "BLI_math.h" -extern "C" { #include "RE_pipeline.h" -} BilateralBlurOperation::BilateralBlurOperation() : NodeOperation() { diff --git a/source/blender/compositor/operations/COM_BlurBaseOperation.cpp b/source/blender/compositor/operations/COM_BlurBaseOperation.cpp index 24c68ddbec7..ef0f259c592 100644 --- a/source/blender/compositor/operations/COM_BlurBaseOperation.cpp +++ b/source/blender/compositor/operations/COM_BlurBaseOperation.cpp @@ -20,9 +20,7 @@ #include "BLI_math.h" #include "MEM_guardedalloc.h" -extern "C" { #include "RE_pipeline.h" -} BlurBaseOperation::BlurBaseOperation(DataType data_type) : NodeOperation() { diff --git a/source/blender/compositor/operations/COM_BokehBlurOperation.cpp b/source/blender/compositor/operations/COM_BokehBlurOperation.cpp index 4d858934796..c00ef2468c0 100644 --- a/source/blender/compositor/operations/COM_BokehBlurOperation.cpp +++ b/source/blender/compositor/operations/COM_BokehBlurOperation.cpp @@ -20,9 +20,7 @@ #include "BLI_math.h" #include "COM_OpenCLDevice.h" -extern "C" { #include "RE_pipeline.h" -} BokehBlurOperation::BokehBlurOperation() : NodeOperation() { diff --git a/source/blender/compositor/operations/COM_CalculateMeanOperation.cpp b/source/blender/compositor/operations/COM_CalculateMeanOperation.cpp index 5d01154bbda..ecd61e95f43 100644 --- a/source/blender/compositor/operations/COM_CalculateMeanOperation.cpp +++ b/source/blender/compositor/operations/COM_CalculateMeanOperation.cpp @@ -20,9 +20,7 @@ #include "BLI_math.h" #include "BLI_utildefines.h" -extern "C" { #include "IMB_colormanagement.h" -} CalculateMeanOperation::CalculateMeanOperation() : NodeOperation() { diff --git a/source/blender/compositor/operations/COM_CalculateStandardDeviationOperation.cpp b/source/blender/compositor/operations/COM_CalculateStandardDeviationOperation.cpp index dfe1a936c9c..059040d6f05 100644 --- a/source/blender/compositor/operations/COM_CalculateStandardDeviationOperation.cpp +++ b/source/blender/compositor/operations/COM_CalculateStandardDeviationOperation.cpp @@ -20,9 +20,7 @@ #include "BLI_math.h" #include "BLI_utildefines.h" -extern "C" { #include "IMB_colormanagement.h" -} CalculateStandardDeviationOperation::CalculateStandardDeviationOperation() : CalculateMeanOperation() diff --git a/source/blender/compositor/operations/COM_ColorCorrectionOperation.cpp b/source/blender/compositor/operations/COM_ColorCorrectionOperation.cpp index 31567398d98..39ffb690328 100644 --- a/source/blender/compositor/operations/COM_ColorCorrectionOperation.cpp +++ b/source/blender/compositor/operations/COM_ColorCorrectionOperation.cpp @@ -19,9 +19,7 @@ #include "COM_ColorCorrectionOperation.h" #include "BLI_math.h" -extern "C" { #include "IMB_colormanagement.h" -} ColorCorrectionOperation::ColorCorrectionOperation() : NodeOperation() { diff --git a/source/blender/compositor/operations/COM_ColorCurveOperation.cpp b/source/blender/compositor/operations/COM_ColorCurveOperation.cpp index 90d3a60abd0..9d514c872f7 100644 --- a/source/blender/compositor/operations/COM_ColorCurveOperation.cpp +++ b/source/blender/compositor/operations/COM_ColorCurveOperation.cpp @@ -18,14 +18,9 @@ #include "COM_ColorCurveOperation.h" -#ifdef __cplusplus -extern "C" { -#endif #include "BKE_colortools.h" -#ifdef __cplusplus -} -# include "MEM_guardedalloc.h" -#endif + +#include "MEM_guardedalloc.h" ColorCurveOperation::ColorCurveOperation() : CurveBaseOperation() { diff --git a/source/blender/compositor/operations/COM_ColorRampOperation.cpp b/source/blender/compositor/operations/COM_ColorRampOperation.cpp index f2c153c5d30..95e0bd2d82b 100644 --- a/source/blender/compositor/operations/COM_ColorRampOperation.cpp +++ b/source/blender/compositor/operations/COM_ColorRampOperation.cpp @@ -18,13 +18,7 @@ #include "COM_ColorRampOperation.h" -#ifdef __cplusplus -extern "C" { -#endif #include "BKE_colorband.h" -#ifdef __cplusplus -} -#endif ColorRampOperation::ColorRampOperation() : NodeOperation() { diff --git a/source/blender/compositor/operations/COM_CompositorOperation.cpp b/source/blender/compositor/operations/COM_CompositorOperation.cpp index cb41071e6f0..71cef9dc4da 100644 --- a/source/blender/compositor/operations/COM_CompositorOperation.cpp +++ b/source/blender/compositor/operations/COM_CompositorOperation.cpp @@ -22,13 +22,14 @@ #include "BLI_listbase.h" #include "MEM_guardedalloc.h" -extern "C" { #include "BLI_threads.h" + #include "RE_pipeline.h" #include "RE_render_ext.h" #include "RE_shader_ext.h" + #include "render_types.h" -} + #include "PIL_time.h" CompositorOperation::CompositorOperation() : NodeOperation() diff --git a/source/blender/compositor/operations/COM_ConvertColorProfileOperation.cpp b/source/blender/compositor/operations/COM_ConvertColorProfileOperation.cpp index 59a605a77c9..6a4c5db856c 100644 --- a/source/blender/compositor/operations/COM_ConvertColorProfileOperation.cpp +++ b/source/blender/compositor/operations/COM_ConvertColorProfileOperation.cpp @@ -18,9 +18,8 @@ #include "COM_ConvertColorProfileOperation.h" -extern "C" { #include "IMB_imbuf.h" -} + ConvertColorProfileOperation::ConvertColorProfileOperation() : NodeOperation() { this->addInputSocket(COM_DT_COLOR); diff --git a/source/blender/compositor/operations/COM_ConvertOperation.cpp b/source/blender/compositor/operations/COM_ConvertOperation.cpp index 6caccb89046..0bd3f5b8796 100644 --- a/source/blender/compositor/operations/COM_ConvertOperation.cpp +++ b/source/blender/compositor/operations/COM_ConvertOperation.cpp @@ -18,9 +18,7 @@ #include "COM_ConvertOperation.h" -extern "C" { #include "IMB_colormanagement.h" -} ConvertBaseOperation::ConvertBaseOperation() { diff --git a/source/blender/compositor/operations/COM_CurveBaseOperation.cpp b/source/blender/compositor/operations/COM_CurveBaseOperation.cpp index 858931ad46d..b18e77cf0e3 100644 --- a/source/blender/compositor/operations/COM_CurveBaseOperation.cpp +++ b/source/blender/compositor/operations/COM_CurveBaseOperation.cpp @@ -18,13 +18,7 @@ #include "COM_CurveBaseOperation.h" -#ifdef __cplusplus -extern "C" { -#endif #include "BKE_colortools.h" -#ifdef __cplusplus -} -#endif CurveBaseOperation::CurveBaseOperation() : NodeOperation() { diff --git a/source/blender/compositor/operations/COM_DirectionalBlurOperation.cpp b/source/blender/compositor/operations/COM_DirectionalBlurOperation.cpp index 1b590c0c392..31eb74fbc42 100644 --- a/source/blender/compositor/operations/COM_DirectionalBlurOperation.cpp +++ b/source/blender/compositor/operations/COM_DirectionalBlurOperation.cpp @@ -17,11 +17,11 @@ */ #include "COM_DirectionalBlurOperation.h" -#include "BLI_math.h" #include "COM_OpenCLDevice.h" -extern "C" { + +#include "BLI_math.h" + #include "RE_pipeline.h" -} DirectionalBlurOperation::DirectionalBlurOperation() : NodeOperation() { diff --git a/source/blender/compositor/operations/COM_GaussianAlphaXBlurOperation.cpp b/source/blender/compositor/operations/COM_GaussianAlphaXBlurOperation.cpp index c6239dba604..c028a2c0e4c 100644 --- a/source/blender/compositor/operations/COM_GaussianAlphaXBlurOperation.cpp +++ b/source/blender/compositor/operations/COM_GaussianAlphaXBlurOperation.cpp @@ -20,9 +20,7 @@ #include "BLI_math.h" #include "MEM_guardedalloc.h" -extern "C" { #include "RE_pipeline.h" -} GaussianAlphaXBlurOperation::GaussianAlphaXBlurOperation() : BlurBaseOperation(COM_DT_VALUE) { diff --git a/source/blender/compositor/operations/COM_GaussianAlphaYBlurOperation.cpp b/source/blender/compositor/operations/COM_GaussianAlphaYBlurOperation.cpp index 37109b4a03e..35abe4cd47b 100644 --- a/source/blender/compositor/operations/COM_GaussianAlphaYBlurOperation.cpp +++ b/source/blender/compositor/operations/COM_GaussianAlphaYBlurOperation.cpp @@ -20,9 +20,7 @@ #include "BLI_math.h" #include "MEM_guardedalloc.h" -extern "C" { #include "RE_pipeline.h" -} GaussianAlphaYBlurOperation::GaussianAlphaYBlurOperation() : BlurBaseOperation(COM_DT_VALUE) { diff --git a/source/blender/compositor/operations/COM_GaussianBokehBlurOperation.cpp b/source/blender/compositor/operations/COM_GaussianBokehBlurOperation.cpp index 318c182fdff..43e571c4bb7 100644 --- a/source/blender/compositor/operations/COM_GaussianBokehBlurOperation.cpp +++ b/source/blender/compositor/operations/COM_GaussianBokehBlurOperation.cpp @@ -19,9 +19,8 @@ #include "COM_GaussianBokehBlurOperation.h" #include "BLI_math.h" #include "MEM_guardedalloc.h" -extern "C" { + #include "RE_pipeline.h" -} GaussianBokehBlurOperation::GaussianBokehBlurOperation() : BlurBaseOperation(COM_DT_COLOR) { diff --git a/source/blender/compositor/operations/COM_GaussianXBlurOperation.cpp b/source/blender/compositor/operations/COM_GaussianXBlurOperation.cpp index 68cde0d365f..32ad0482791 100644 --- a/source/blender/compositor/operations/COM_GaussianXBlurOperation.cpp +++ b/source/blender/compositor/operations/COM_GaussianXBlurOperation.cpp @@ -21,9 +21,7 @@ #include "COM_OpenCLDevice.h" #include "MEM_guardedalloc.h" -extern "C" { #include "RE_pipeline.h" -} GaussianXBlurOperation::GaussianXBlurOperation() : BlurBaseOperation(COM_DT_COLOR) { diff --git a/source/blender/compositor/operations/COM_GaussianYBlurOperation.cpp b/source/blender/compositor/operations/COM_GaussianYBlurOperation.cpp index eeddd98d4a4..3ffa797c0c1 100644 --- a/source/blender/compositor/operations/COM_GaussianYBlurOperation.cpp +++ b/source/blender/compositor/operations/COM_GaussianYBlurOperation.cpp @@ -21,9 +21,7 @@ #include "COM_OpenCLDevice.h" #include "MEM_guardedalloc.h" -extern "C" { #include "RE_pipeline.h" -} GaussianYBlurOperation::GaussianYBlurOperation() : BlurBaseOperation(COM_DT_COLOR) { diff --git a/source/blender/compositor/operations/COM_GlareThresholdOperation.cpp b/source/blender/compositor/operations/COM_GlareThresholdOperation.cpp index 142c51122a1..d050d9b58a9 100644 --- a/source/blender/compositor/operations/COM_GlareThresholdOperation.cpp +++ b/source/blender/compositor/operations/COM_GlareThresholdOperation.cpp @@ -19,9 +19,7 @@ #include "COM_GlareThresholdOperation.h" #include "BLI_math.h" -extern "C" { #include "IMB_colormanagement.h" -} GlareThresholdOperation::GlareThresholdOperation() : NodeOperation() { diff --git a/source/blender/compositor/operations/COM_HueSaturationValueCorrectOperation.cpp b/source/blender/compositor/operations/COM_HueSaturationValueCorrectOperation.cpp index fae280249de..8292413f6f1 100644 --- a/source/blender/compositor/operations/COM_HueSaturationValueCorrectOperation.cpp +++ b/source/blender/compositor/operations/COM_HueSaturationValueCorrectOperation.cpp @@ -20,13 +20,7 @@ #include "BLI_math.h" -#ifdef __cplusplus -extern "C" { -#endif #include "BKE_colortools.h" -#ifdef __cplusplus -} -#endif HueSaturationValueCorrectOperation::HueSaturationValueCorrectOperation() : CurveBaseOperation() { diff --git a/source/blender/compositor/operations/COM_ImageOperation.cpp b/source/blender/compositor/operations/COM_ImageOperation.cpp index d70cab4ad2a..38d2fbf9ed4 100644 --- a/source/blender/compositor/operations/COM_ImageOperation.cpp +++ b/source/blender/compositor/operations/COM_ImageOperation.cpp @@ -24,14 +24,12 @@ #include "BLI_math.h" #include "DNA_image_types.h" -extern "C" { #include "IMB_colormanagement.h" #include "IMB_imbuf.h" #include "IMB_imbuf_types.h" #include "RE_pipeline.h" #include "RE_render_ext.h" #include "RE_shader_ext.h" -} BaseImageOperation::BaseImageOperation() : NodeOperation() { diff --git a/source/blender/compositor/operations/COM_ImageOperation.h b/source/blender/compositor/operations/COM_ImageOperation.h index 57656d03092..3e081ee0000 100644 --- a/source/blender/compositor/operations/COM_ImageOperation.h +++ b/source/blender/compositor/operations/COM_ImageOperation.h @@ -24,11 +24,10 @@ #include "BLI_utildefines.h" #include "COM_NodeOperation.h" #include "MEM_guardedalloc.h" -extern "C" { + #include "RE_pipeline.h" #include "RE_render_ext.h" #include "RE_shader_ext.h" -} /** * \brief Base class for all image operations diff --git a/source/blender/compositor/operations/COM_KeyingScreenOperation.cpp b/source/blender/compositor/operations/COM_KeyingScreenOperation.cpp index ab9ef0335e0..082091411fb 100644 --- a/source/blender/compositor/operations/COM_KeyingScreenOperation.cpp +++ b/source/blender/compositor/operations/COM_KeyingScreenOperation.cpp @@ -24,13 +24,11 @@ #include "BLI_math.h" #include "BLI_math_color.h" -extern "C" { #include "BKE_movieclip.h" #include "BKE_tracking.h" #include "IMB_imbuf.h" #include "IMB_imbuf_types.h" -} KeyingScreenOperation::KeyingScreenOperation() : NodeOperation() { diff --git a/source/blender/compositor/operations/COM_KeyingScreenOperation.h b/source/blender/compositor/operations/COM_KeyingScreenOperation.h index 860a358e79d..593e902117b 100644 --- a/source/blender/compositor/operations/COM_KeyingScreenOperation.h +++ b/source/blender/compositor/operations/COM_KeyingScreenOperation.h @@ -28,9 +28,7 @@ #include "BLI_listbase.h" #include "BLI_string.h" -extern "C" { #include "BLI_voronoi_2d.h" -} /** * Class with implementation of green screen gradient rasterization diff --git a/source/blender/compositor/operations/COM_LuminanceMatteOperation.cpp b/source/blender/compositor/operations/COM_LuminanceMatteOperation.cpp index 30ad954e0bc..936ac00a0e8 100644 --- a/source/blender/compositor/operations/COM_LuminanceMatteOperation.cpp +++ b/source/blender/compositor/operations/COM_LuminanceMatteOperation.cpp @@ -19,9 +19,7 @@ #include "COM_LuminanceMatteOperation.h" #include "BLI_math.h" -extern "C" { #include "IMB_colormanagement.h" -} LuminanceMatteOperation::LuminanceMatteOperation() : NodeOperation() { diff --git a/source/blender/compositor/operations/COM_MaskOperation.cpp b/source/blender/compositor/operations/COM_MaskOperation.cpp index 88a3a5c535c..bdc954ac081 100644 --- a/source/blender/compositor/operations/COM_MaskOperation.cpp +++ b/source/blender/compositor/operations/COM_MaskOperation.cpp @@ -23,9 +23,7 @@ #include "BLI_listbase.h" #include "BLI_math.h" -extern "C" { #include "BKE_mask.h" -} MaskOperation::MaskOperation() : NodeOperation() { diff --git a/source/blender/compositor/operations/COM_MathBaseOperation.cpp b/source/blender/compositor/operations/COM_MathBaseOperation.cpp index 524812ac992..1363b75433a 100644 --- a/source/blender/compositor/operations/COM_MathBaseOperation.cpp +++ b/source/blender/compositor/operations/COM_MathBaseOperation.cpp @@ -17,9 +17,8 @@ */ #include "COM_MathBaseOperation.h" -extern "C" { + #include "BLI_math.h" -} MathBaseOperation::MathBaseOperation() : NodeOperation() { diff --git a/source/blender/compositor/operations/COM_MixOperation.cpp b/source/blender/compositor/operations/COM_MixOperation.cpp index 6b8a0caa13b..371da20044f 100644 --- a/source/blender/compositor/operations/COM_MixOperation.cpp +++ b/source/blender/compositor/operations/COM_MixOperation.cpp @@ -18,9 +18,7 @@ #include "COM_MixOperation.h" -extern "C" { #include "BLI_math.h" -} /* ******** Mix Base Operation ******** */ diff --git a/source/blender/compositor/operations/COM_MovieClipAttributeOperation.cpp b/source/blender/compositor/operations/COM_MovieClipAttributeOperation.cpp index 4f5d7f6f00b..34773a1e4f8 100644 --- a/source/blender/compositor/operations/COM_MovieClipAttributeOperation.cpp +++ b/source/blender/compositor/operations/COM_MovieClipAttributeOperation.cpp @@ -17,10 +17,10 @@ */ #include "COM_MovieClipAttributeOperation.h" -extern "C" { + #include "BKE_movieclip.h" #include "BKE_tracking.h" -} + MovieClipAttributeOperation::MovieClipAttributeOperation() : NodeOperation() { this->addOutputSocket(COM_DT_VALUE); diff --git a/source/blender/compositor/operations/COM_MovieClipOperation.cpp b/source/blender/compositor/operations/COM_MovieClipOperation.cpp index c5757274143..17794ae879e 100644 --- a/source/blender/compositor/operations/COM_MovieClipOperation.cpp +++ b/source/blender/compositor/operations/COM_MovieClipOperation.cpp @@ -20,11 +20,11 @@ #include "BLI_listbase.h" #include "BLI_math.h" -extern "C" { + +#include "BKE_image.h" #include "BKE_movieclip.h" + #include "IMB_imbuf.h" -} -#include "BKE_image.h" MovieClipBaseOperation::MovieClipBaseOperation() : NodeOperation() { diff --git a/source/blender/compositor/operations/COM_MovieDistortionOperation.cpp b/source/blender/compositor/operations/COM_MovieDistortionOperation.cpp index fe2943419c5..67491d51547 100644 --- a/source/blender/compositor/operations/COM_MovieDistortionOperation.cpp +++ b/source/blender/compositor/operations/COM_MovieDistortionOperation.cpp @@ -18,11 +18,10 @@ #include "COM_MovieDistortionOperation.h" -extern "C" { #include "BKE_movieclip.h" #include "BKE_tracking.h" + #include "BLI_linklist.h" -} MovieDistortionOperation::MovieDistortionOperation(bool distortion) : NodeOperation() { diff --git a/source/blender/compositor/operations/COM_MovieDistortionOperation.h b/source/blender/compositor/operations/COM_MovieDistortionOperation.h index 3ca9fe16b1e..799c6385a10 100644 --- a/source/blender/compositor/operations/COM_MovieDistortionOperation.h +++ b/source/blender/compositor/operations/COM_MovieDistortionOperation.h @@ -23,9 +23,7 @@ #include "DNA_movieclip_types.h" #include "MEM_guardedalloc.h" -extern "C" { #include "BKE_tracking.h" -} class MovieDistortionOperation : public NodeOperation { private: diff --git a/source/blender/compositor/operations/COM_MultilayerImageOperation.cpp b/source/blender/compositor/operations/COM_MultilayerImageOperation.cpp index 9876c319944..8878b05ade7 100644 --- a/source/blender/compositor/operations/COM_MultilayerImageOperation.cpp +++ b/source/blender/compositor/operations/COM_MultilayerImageOperation.cpp @@ -17,10 +17,9 @@ */ #include "COM_MultilayerImageOperation.h" -extern "C" { + #include "IMB_imbuf.h" #include "IMB_imbuf_types.h" -} MultilayerBaseOperation::MultilayerBaseOperation(int passindex, int view) : BaseImageOperation() { diff --git a/source/blender/compositor/operations/COM_OutputFileMultiViewOperation.cpp b/source/blender/compositor/operations/COM_OutputFileMultiViewOperation.cpp index 65f4eeeb8bb..c0fe7237687 100644 --- a/source/blender/compositor/operations/COM_OutputFileMultiViewOperation.cpp +++ b/source/blender/compositor/operations/COM_OutputFileMultiViewOperation.cpp @@ -33,11 +33,9 @@ #include "DNA_color_types.h" #include "MEM_guardedalloc.h" -extern "C" { #include "IMB_colormanagement.h" #include "IMB_imbuf.h" #include "IMB_imbuf_types.h" -} /************************************ OpenEXR Singlelayer Multiview ******************************/ diff --git a/source/blender/compositor/operations/COM_OutputFileOperation.cpp b/source/blender/compositor/operations/COM_OutputFileOperation.cpp index efe01d0b5cc..ee3779edcb4 100644 --- a/source/blender/compositor/operations/COM_OutputFileOperation.cpp +++ b/source/blender/compositor/operations/COM_OutputFileOperation.cpp @@ -32,11 +32,9 @@ #include "DNA_color_types.h" #include "MEM_guardedalloc.h" -extern "C" { #include "IMB_colormanagement.h" #include "IMB_imbuf.h" #include "IMB_imbuf_types.h" -} void add_exr_channels(void *exrhandle, const char *layerName, diff --git a/source/blender/compositor/operations/COM_PlaneCornerPinOperation.cpp b/source/blender/compositor/operations/COM_PlaneCornerPinOperation.cpp index 676601d82da..eae576ceb56 100644 --- a/source/blender/compositor/operations/COM_PlaneCornerPinOperation.cpp +++ b/source/blender/compositor/operations/COM_PlaneCornerPinOperation.cpp @@ -24,9 +24,7 @@ #include "BLI_math.h" #include "BLI_math_color.h" -extern "C" { #include "BKE_node.h" -} static bool check_corners(float corners[4][2]) { diff --git a/source/blender/compositor/operations/COM_PlaneDistortCommonOperation.cpp b/source/blender/compositor/operations/COM_PlaneDistortCommonOperation.cpp index 07053d01d43..e7574e80c2f 100644 --- a/source/blender/compositor/operations/COM_PlaneDistortCommonOperation.cpp +++ b/source/blender/compositor/operations/COM_PlaneDistortCommonOperation.cpp @@ -20,7 +20,6 @@ #include "MEM_guardedalloc.h" -extern "C" { #include "BLI_jitter_2d.h" #include "BLI_listbase.h" #include "BLI_math.h" @@ -29,7 +28,6 @@ extern "C" { #include "BKE_movieclip.h" #include "BKE_node.h" #include "BKE_tracking.h" -} /* ******** PlaneDistort WarpImage ******** */ diff --git a/source/blender/compositor/operations/COM_PlaneTrackOperation.cpp b/source/blender/compositor/operations/COM_PlaneTrackOperation.cpp index cbf5a25fa31..ed9a776d0a3 100644 --- a/source/blender/compositor/operations/COM_PlaneTrackOperation.cpp +++ b/source/blender/compositor/operations/COM_PlaneTrackOperation.cpp @@ -25,11 +25,9 @@ #include "BLI_math.h" #include "BLI_math_color.h" -extern "C" { #include "BKE_movieclip.h" #include "BKE_node.h" #include "BKE_tracking.h" -} /* ******** PlaneTrackCommon ******** */ diff --git a/source/blender/compositor/operations/COM_PreviewOperation.cpp b/source/blender/compositor/operations/COM_PreviewOperation.cpp index e9e1b4a8cd9..30fe2ca824d 100644 --- a/source/blender/compositor/operations/COM_PreviewOperation.cpp +++ b/source/blender/compositor/operations/COM_PreviewOperation.cpp @@ -27,12 +27,11 @@ #include "PIL_time.h" #include "WM_api.h" #include "WM_types.h" -extern "C" { + #include "BKE_node.h" #include "IMB_colormanagement.h" #include "IMB_imbuf.h" #include "IMB_imbuf_types.h" -} PreviewOperation::PreviewOperation(const ColorManagedViewSettings *viewSettings, const ColorManagedDisplaySettings *displaySettings) diff --git a/source/blender/compositor/operations/COM_RenderLayersProg.cpp b/source/blender/compositor/operations/COM_RenderLayersProg.cpp index 722aab329d7..c8a68c70c4d 100644 --- a/source/blender/compositor/operations/COM_RenderLayersProg.cpp +++ b/source/blender/compositor/operations/COM_RenderLayersProg.cpp @@ -22,11 +22,9 @@ #include "BLI_listbase.h" #include "DNA_scene_types.h" -extern "C" { #include "RE_pipeline.h" #include "RE_render_ext.h" #include "RE_shader_ext.h" -} /* ******** Render Layers Base Prog ******** */ diff --git a/source/blender/compositor/operations/COM_RenderLayersProg.h b/source/blender/compositor/operations/COM_RenderLayersProg.h index cb47725b749..079376c0ce1 100644 --- a/source/blender/compositor/operations/COM_RenderLayersProg.h +++ b/source/blender/compositor/operations/COM_RenderLayersProg.h @@ -24,9 +24,8 @@ #include "COM_NodeOperation.h" #include "DNA_scene_types.h" #include "MEM_guardedalloc.h" -extern "C" { + #include "RE_pipeline.h" -} /** * Base class for all renderlayeroperations diff --git a/source/blender/compositor/operations/COM_ScreenLensDistortionOperation.cpp b/source/blender/compositor/operations/COM_ScreenLensDistortionOperation.cpp index 1afc6d9477f..738c51fc719 100644 --- a/source/blender/compositor/operations/COM_ScreenLensDistortionOperation.cpp +++ b/source/blender/compositor/operations/COM_ScreenLensDistortionOperation.cpp @@ -18,12 +18,11 @@ #include "COM_ScreenLensDistortionOperation.h" -extern "C" { #include "BLI_math.h" #include "BLI_rand.h" #include "BLI_utildefines.h" + #include "PIL_time.h" -} ScreenLensDistortionOperation::ScreenLensDistortionOperation() : NodeOperation() { diff --git a/source/blender/compositor/operations/COM_SplitOperation.cpp b/source/blender/compositor/operations/COM_SplitOperation.cpp index 1862fde2d40..3eddf033cf4 100644 --- a/source/blender/compositor/operations/COM_SplitOperation.cpp +++ b/source/blender/compositor/operations/COM_SplitOperation.cpp @@ -24,10 +24,8 @@ #include "BLI_utildefines.h" #include "MEM_guardedalloc.h" -extern "C" { #include "IMB_imbuf.h" #include "IMB_imbuf_types.h" -} SplitOperation::SplitOperation() : NodeOperation() { diff --git a/source/blender/compositor/operations/COM_TextureOperation.cpp b/source/blender/compositor/operations/COM_TextureOperation.cpp index 0a27a6916b7..07316280bbc 100644 --- a/source/blender/compositor/operations/COM_TextureOperation.cpp +++ b/source/blender/compositor/operations/COM_TextureOperation.cpp @@ -20,13 +20,11 @@ #include "COM_WorkScheduler.h" #include "BKE_image.h" +#include "BKE_node.h" + #include "BLI_listbase.h" #include "BLI_threads.h" -extern "C" { -#include "BKE_node.h" -} - TextureBaseOperation::TextureBaseOperation() : NodeOperation() { this->addInputSocket(COM_DT_VECTOR); // offset diff --git a/source/blender/compositor/operations/COM_TextureOperation.h b/source/blender/compositor/operations/COM_TextureOperation.h index 0d06ac0bc27..ebfdbb6513a 100644 --- a/source/blender/compositor/operations/COM_TextureOperation.h +++ b/source/blender/compositor/operations/COM_TextureOperation.h @@ -23,11 +23,10 @@ #include "COM_NodeOperation.h" #include "DNA_texture_types.h" #include "MEM_guardedalloc.h" -extern "C" { + #include "RE_pipeline.h" #include "RE_render_ext.h" #include "RE_shader_ext.h" -} /** * Base class for all renderlayeroperations diff --git a/source/blender/compositor/operations/COM_TonemapOperation.cpp b/source/blender/compositor/operations/COM_TonemapOperation.cpp index 6b408a0a791..417fe8713ed 100644 --- a/source/blender/compositor/operations/COM_TonemapOperation.cpp +++ b/source/blender/compositor/operations/COM_TonemapOperation.cpp @@ -20,9 +20,7 @@ #include "BLI_math.h" #include "BLI_utildefines.h" -extern "C" { #include "IMB_colormanagement.h" -} TonemapOperation::TonemapOperation() : NodeOperation() { diff --git a/source/blender/compositor/operations/COM_TrackPositionOperation.cpp b/source/blender/compositor/operations/COM_TrackPositionOperation.cpp index e497d58732b..5c4f3b99f58 100644 --- a/source/blender/compositor/operations/COM_TrackPositionOperation.cpp +++ b/source/blender/compositor/operations/COM_TrackPositionOperation.cpp @@ -24,11 +24,9 @@ #include "BLI_math.h" #include "BLI_math_color.h" -extern "C" { #include "BKE_movieclip.h" #include "BKE_node.h" #include "BKE_tracking.h" -} TrackPositionOperation::TrackPositionOperation() : NodeOperation() { diff --git a/source/blender/compositor/operations/COM_VariableSizeBokehBlurOperation.cpp b/source/blender/compositor/operations/COM_VariableSizeBokehBlurOperation.cpp index 02f13effc8f..057dc553f7f 100644 --- a/source/blender/compositor/operations/COM_VariableSizeBokehBlurOperation.cpp +++ b/source/blender/compositor/operations/COM_VariableSizeBokehBlurOperation.cpp @@ -20,9 +20,7 @@ #include "BLI_math.h" #include "COM_OpenCLDevice.h" -extern "C" { #include "RE_pipeline.h" -} VariableSizeBokehBlurOperation::VariableSizeBokehBlurOperation() : NodeOperation() { diff --git a/source/blender/compositor/operations/COM_VectorBlurOperation.cpp b/source/blender/compositor/operations/COM_VectorBlurOperation.cpp index 83ae1a0526d..7a34c84827e 100644 --- a/source/blender/compositor/operations/COM_VectorBlurOperation.cpp +++ b/source/blender/compositor/operations/COM_VectorBlurOperation.cpp @@ -16,12 +16,13 @@ * Copyright 2011, Blender Foundation. */ -#include "BLI_math.h" -#include "MEM_guardedalloc.h" #include -extern "C" { + +#include "MEM_guardedalloc.h" + #include "BLI_jitter_2d.h" -} +#include "BLI_math.h" + #include "COM_VectorBlurOperation.h" /* Defined */ diff --git a/source/blender/compositor/operations/COM_VectorCurveOperation.cpp b/source/blender/compositor/operations/COM_VectorCurveOperation.cpp index 6996c7ecb71..61312355a39 100644 --- a/source/blender/compositor/operations/COM_VectorCurveOperation.cpp +++ b/source/blender/compositor/operations/COM_VectorCurveOperation.cpp @@ -18,13 +18,7 @@ #include "COM_VectorCurveOperation.h" -#ifdef __cplusplus -extern "C" { -#endif #include "BKE_colortools.h" -#ifdef __cplusplus -} -#endif VectorCurveOperation::VectorCurveOperation() : CurveBaseOperation() { diff --git a/source/blender/compositor/operations/COM_ViewerOperation.cpp b/source/blender/compositor/operations/COM_ViewerOperation.cpp index 5c32b9962f4..fc26d6219e1 100644 --- a/source/blender/compositor/operations/COM_ViewerOperation.cpp +++ b/source/blender/compositor/operations/COM_ViewerOperation.cpp @@ -28,11 +28,9 @@ #include "WM_api.h" #include "WM_types.h" -extern "C" { #include "IMB_colormanagement.h" #include "IMB_imbuf.h" #include "IMB_imbuf_types.h" -} ViewerOperation::ViewerOperation() : NodeOperation() { diff --git a/source/blender/depsgraph/DEG_depsgraph_build.h b/source/blender/depsgraph/DEG_depsgraph_build.h index e24fa9e8996..19e9c5c26b1 100644 --- a/source/blender/depsgraph/DEG_depsgraph_build.h +++ b/source/blender/depsgraph/DEG_depsgraph_build.h @@ -42,12 +42,12 @@ struct Scene; struct ViewLayer; struct bNodeTree; +#include "BLI_sys_types.h" + #ifdef __cplusplus extern "C" { #endif -#include "BLI_sys_types.h" - /* Graph Building -------------------------------- */ /* Build depsgraph for the given scene, and dump results in given graph container. */ diff --git a/source/blender/depsgraph/intern/builder/deg_builder_cache.cc b/source/blender/depsgraph/intern/builder/deg_builder_cache.cc index fe1886c67e8..ba0238b43c7 100644 --- a/source/blender/depsgraph/intern/builder/deg_builder_cache.cc +++ b/source/blender/depsgraph/intern/builder/deg_builder_cache.cc @@ -29,9 +29,7 @@ #include "BLI_utildefines.h" -extern "C" { #include "BKE_animsys.h" -} namespace DEG { diff --git a/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc b/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc index f43a1de3b01..0f25bc0e9ef 100644 --- a/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc +++ b/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc @@ -34,7 +34,6 @@ #include "BLI_string.h" #include "BLI_utildefines.h" -extern "C" { #include "DNA_action_types.h" #include "DNA_anim_types.h" #include "DNA_armature_types.h" @@ -105,7 +104,6 @@ extern "C" { #include "RNA_access.h" #include "RNA_types.h" -} /* extern "C" */ #include "DEG_depsgraph.h" #include "DEG_depsgraph_build.h" diff --git a/source/blender/depsgraph/intern/builder/deg_builder_nodes_rig.cc b/source/blender/depsgraph/intern/builder/deg_builder_nodes_rig.cc index 7a05ae36ea4..0055c141b71 100644 --- a/source/blender/depsgraph/intern/builder/deg_builder_nodes_rig.cc +++ b/source/blender/depsgraph/intern/builder/deg_builder_nodes_rig.cc @@ -34,7 +34,6 @@ #include "BLI_string.h" #include "BLI_utildefines.h" -extern "C" { #include "DNA_anim_types.h" #include "DNA_armature_types.h" #include "DNA_constraint_types.h" @@ -44,7 +43,6 @@ extern "C" { #include "BKE_action.h" #include "BKE_armature.h" #include "BKE_constraint.h" -} /* extern "C" */ #include "DEG_depsgraph.h" #include "DEG_depsgraph_build.h" diff --git a/source/blender/depsgraph/intern/builder/deg_builder_nodes_view_layer.cc b/source/blender/depsgraph/intern/builder/deg_builder_nodes_view_layer.cc index 1aa3c5bf613..58cfb36b4ab 100644 --- a/source/blender/depsgraph/intern/builder/deg_builder_nodes_view_layer.cc +++ b/source/blender/depsgraph/intern/builder/deg_builder_nodes_view_layer.cc @@ -34,7 +34,6 @@ #include "BLI_string.h" #include "BLI_utildefines.h" -extern "C" { #include "DNA_freestyle_types.h" #include "DNA_layer_types.h" #include "DNA_linestyle_types.h" @@ -45,7 +44,6 @@ extern "C" { #include "BKE_layer.h" #include "BKE_main.h" #include "BKE_node.h" -} /* extern "C" */ #include "DEG_depsgraph.h" #include "DEG_depsgraph_build.h" diff --git a/source/blender/depsgraph/intern/builder/deg_builder_relations.cc b/source/blender/depsgraph/intern/builder/deg_builder_relations.cc index 20b8ed5b35b..6bdb7500b4a 100644 --- a/source/blender/depsgraph/intern/builder/deg_builder_relations.cc +++ b/source/blender/depsgraph/intern/builder/deg_builder_relations.cc @@ -34,7 +34,6 @@ #include "BLI_blenlib.h" #include "BLI_utildefines.h" -extern "C" { #include "DNA_action_types.h" #include "DNA_anim_types.h" #include "DNA_armature_types.h" @@ -99,7 +98,6 @@ extern "C" { #include "RNA_access.h" #include "RNA_types.h" -} /* extern "C" */ #include "DEG_depsgraph.h" #include "DEG_depsgraph_build.h" diff --git a/source/blender/depsgraph/intern/builder/deg_builder_relations_impl.h b/source/blender/depsgraph/intern/builder/deg_builder_relations_impl.h index eeeb58100b0..5983627fafc 100644 --- a/source/blender/depsgraph/intern/builder/deg_builder_relations_impl.h +++ b/source/blender/depsgraph/intern/builder/deg_builder_relations_impl.h @@ -25,10 +25,8 @@ #include "intern/node/deg_node_id.h" -extern "C" { #include "DNA_ID.h" #include "DNA_object_types.h" -} namespace DEG { diff --git a/source/blender/depsgraph/intern/builder/deg_builder_relations_rig.cc b/source/blender/depsgraph/intern/builder/deg_builder_relations_rig.cc index b75252aa325..fe9adecbf0a 100644 --- a/source/blender/depsgraph/intern/builder/deg_builder_relations_rig.cc +++ b/source/blender/depsgraph/intern/builder/deg_builder_relations_rig.cc @@ -34,7 +34,6 @@ #include "BLI_blenlib.h" #include "BLI_utildefines.h" -extern "C" { #include "DNA_action_types.h" #include "DNA_anim_types.h" #include "DNA_armature_types.h" @@ -45,7 +44,6 @@ extern "C" { #include "BKE_action.h" #include "BKE_armature.h" #include "BKE_constraint.h" -} /* extern "C" */ #include "DEG_depsgraph.h" #include "DEG_depsgraph_build.h" diff --git a/source/blender/depsgraph/intern/builder/deg_builder_relations_view_layer.cc b/source/blender/depsgraph/intern/builder/deg_builder_relations_view_layer.cc index d3bdaccd404..e132ba30e67 100644 --- a/source/blender/depsgraph/intern/builder/deg_builder_relations_view_layer.cc +++ b/source/blender/depsgraph/intern/builder/deg_builder_relations_view_layer.cc @@ -34,7 +34,6 @@ #include "BLI_blenlib.h" #include "BLI_utildefines.h" -extern "C" { #include "DNA_linestyle_types.h" #include "DNA_node_types.h" #include "DNA_object_types.h" @@ -43,7 +42,6 @@ extern "C" { #include "BKE_layer.h" #include "BKE_main.h" #include "BKE_node.h" -} /* extern "C" */ #include "DEG_depsgraph.h" #include "DEG_depsgraph_build.h" diff --git a/source/blender/depsgraph/intern/builder/deg_builder_rna.cc b/source/blender/depsgraph/intern/builder/deg_builder_rna.cc index a35b69df60d..9fa663b9b6d 100644 --- a/source/blender/depsgraph/intern/builder/deg_builder_rna.cc +++ b/source/blender/depsgraph/intern/builder/deg_builder_rna.cc @@ -30,14 +30,12 @@ #include "BLI_listbase.h" #include "BLI_utildefines.h" -extern "C" { #include "DNA_action_types.h" #include "DNA_armature_types.h" #include "DNA_constraint_types.h" #include "DNA_key_types.h" #include "DNA_object_types.h" #include "DNA_sequence_types.h" -} #include "BKE_constraint.h" diff --git a/source/blender/depsgraph/intern/debug/deg_debug_relations_graphviz.cc b/source/blender/depsgraph/intern/debug/deg_debug_relations_graphviz.cc index 14a095fdb8e..bde48affc28 100644 --- a/source/blender/depsgraph/intern/debug/deg_debug_relations_graphviz.cc +++ b/source/blender/depsgraph/intern/debug/deg_debug_relations_graphviz.cc @@ -27,9 +27,7 @@ #include "BLI_utildefines.h" -extern "C" { #include "DNA_listBase.h" -} /* extern "C" */ #include "DEG_depsgraph.h" #include "DEG_depsgraph_debug.h" diff --git a/source/blender/depsgraph/intern/debug/deg_debug_stats_gnuplot.cc b/source/blender/depsgraph/intern/debug/deg_debug_stats_gnuplot.cc index c37188bc3ca..7bef5fda636 100644 --- a/source/blender/depsgraph/intern/debug/deg_debug_stats_gnuplot.cc +++ b/source/blender/depsgraph/intern/debug/deg_debug_stats_gnuplot.cc @@ -32,9 +32,7 @@ #include "intern/depsgraph.h" #include "intern/node/deg_node_id.h" -extern "C" { #include "DNA_ID.h" -} /* extern "C" */ #define NL "\r\n" diff --git a/source/blender/depsgraph/intern/depsgraph.cc b/source/blender/depsgraph/intern/depsgraph.cc index faf375155b5..d4a6b0a8b76 100644 --- a/source/blender/depsgraph/intern/depsgraph.cc +++ b/source/blender/depsgraph/intern/depsgraph.cc @@ -34,11 +34,9 @@ #include "BLI_hash.h" #include "BLI_utildefines.h" -extern "C" { #include "BKE_global.h" #include "BKE_idtype.h" #include "BKE_scene.h" -} #include "DEG_depsgraph.h" #include "DEG_depsgraph_debug.h" diff --git a/source/blender/depsgraph/intern/depsgraph_build.cc b/source/blender/depsgraph/intern/depsgraph_build.cc index 59065ea671a..9e12d00b42f 100644 --- a/source/blender/depsgraph/intern/depsgraph_build.cc +++ b/source/blender/depsgraph/intern/depsgraph_build.cc @@ -31,14 +31,12 @@ #include "PIL_time.h" #include "PIL_time_utildefines.h" -extern "C" { #include "DNA_cachefile_types.h" #include "DNA_object_types.h" #include "DNA_scene_types.h" #include "BKE_main.h" #include "BKE_scene.h" -} /* extern "C" */ #include "DEG_depsgraph.h" #include "DEG_depsgraph_build.h" diff --git a/source/blender/depsgraph/intern/depsgraph_debug.cc b/source/blender/depsgraph/intern/depsgraph_debug.cc index 8b6984c9870..8dbcb9534eb 100644 --- a/source/blender/depsgraph/intern/depsgraph_debug.cc +++ b/source/blender/depsgraph/intern/depsgraph_debug.cc @@ -25,9 +25,7 @@ #include "BLI_utildefines.h" -extern "C" { #include "DNA_scene_types.h" -} /* extern "C" */ #include "DNA_object_types.h" diff --git a/source/blender/depsgraph/intern/depsgraph_eval.cc b/source/blender/depsgraph/intern/depsgraph_eval.cc index c5628a4f8b9..b6c6129e9ba 100644 --- a/source/blender/depsgraph/intern/depsgraph_eval.cc +++ b/source/blender/depsgraph/intern/depsgraph_eval.cc @@ -28,12 +28,10 @@ #include "BLI_listbase.h" #include "BLI_utildefines.h" -extern "C" { #include "BKE_scene.h" #include "DNA_object_types.h" #include "DNA_scene_types.h" -} /* extern "C" */ #include "DEG_depsgraph.h" #include "DEG_depsgraph_query.h" diff --git a/source/blender/depsgraph/intern/depsgraph_physics.cc b/source/blender/depsgraph/intern/depsgraph_physics.cc index 380e6e99c5e..a9391e5fe8b 100644 --- a/source/blender/depsgraph/intern/depsgraph_physics.cc +++ b/source/blender/depsgraph/intern/depsgraph_physics.cc @@ -30,11 +30,9 @@ #include "BLI_compiler_compat.h" #include "BLI_listbase.h" -extern "C" { #include "BKE_collision.h" #include "BKE_effect.h" #include "BKE_modifier.h" -} /* extern "C" */ #include "DNA_collection_types.h" #include "DNA_object_force_types.h" diff --git a/source/blender/depsgraph/intern/depsgraph_query.cc b/source/blender/depsgraph/intern/depsgraph_query.cc index b64b6c0e715..3c760e71197 100644 --- a/source/blender/depsgraph/intern/depsgraph_query.cc +++ b/source/blender/depsgraph/intern/depsgraph_query.cc @@ -25,7 +25,6 @@ #include "MEM_guardedalloc.h" -extern "C" { #include // XXX: memcpy #include "BLI_listbase.h" @@ -36,8 +35,6 @@ extern "C" { #include "BKE_idtype.h" #include "BKE_main.h" -} /* extern "C" */ - #include "DNA_object_types.h" #include "DNA_scene_types.h" diff --git a/source/blender/depsgraph/intern/depsgraph_query_iter.cc b/source/blender/depsgraph/intern/depsgraph_query_iter.cc index c4b53bd8176..1eb07206465 100644 --- a/source/blender/depsgraph/intern/depsgraph_query_iter.cc +++ b/source/blender/depsgraph/intern/depsgraph_query_iter.cc @@ -28,15 +28,14 @@ #include "MEM_guardedalloc.h" -extern "C" { #include "BKE_duplilist.h" #include "BKE_idprop.h" #include "BKE_layer.h" #include "BKE_node.h" #include "BKE_object.h" + #include "BLI_math.h" #include "BLI_utildefines.h" -} /* extern "C" */ #include "DNA_object_types.h" #include "DNA_scene_types.h" diff --git a/source/blender/depsgraph/intern/depsgraph_tag.cc b/source/blender/depsgraph/intern/depsgraph_tag.cc index ff7d9ee0170..0ee86088e43 100644 --- a/source/blender/depsgraph/intern/depsgraph_tag.cc +++ b/source/blender/depsgraph/intern/depsgraph_tag.cc @@ -33,7 +33,6 @@ #include "BLI_task.h" #include "BLI_utildefines.h" -extern "C" { #include "DNA_anim_types.h" #include "DNA_curve_types.h" #include "DNA_key_types.h" @@ -54,7 +53,6 @@ extern "C" { #define new new_ #include "BKE_screen.h" #undef new -} /* extern "C" */ #include "DEG_depsgraph.h" #include "DEG_depsgraph_debug.h" diff --git a/source/blender/depsgraph/intern/eval/deg_eval_copy_on_write.cc b/source/blender/depsgraph/intern/eval/deg_eval_copy_on_write.cc index b87a877ae99..2f2e05d410e 100644 --- a/source/blender/depsgraph/intern/eval/deg_eval_copy_on_write.cc +++ b/source/blender/depsgraph/intern/eval/deg_eval_copy_on_write.cc @@ -53,7 +53,6 @@ #include "MEM_guardedalloc.h" -extern "C" { #include "DNA_ID.h" #include "DNA_anim_types.h" #include "DNA_armature_types.h" @@ -92,7 +91,6 @@ extern "C" { #include "BKE_pointcache.h" #include "BKE_sequencer.h" #include "BKE_sound.h" -} #include "intern/builder/deg_builder.h" #include "intern/builder/deg_builder_nodes.h" diff --git a/source/blender/depsgraph/intern/eval/deg_eval_flush.cc b/source/blender/depsgraph/intern/eval/deg_eval_flush.cc index 5ff1b31b07c..ee543dcf25d 100644 --- a/source/blender/depsgraph/intern/eval/deg_eval_flush.cc +++ b/source/blender/depsgraph/intern/eval/deg_eval_flush.cc @@ -35,12 +35,10 @@ #include "BKE_object.h" #include "BKE_scene.h" -extern "C" { #include "DNA_object_types.h" #include "DNA_scene_types.h" #include "DRW_engine.h" -} /* extern "C" */ #include "DEG_depsgraph.h" diff --git a/source/blender/depsgraph/intern/node/deg_node_component.cc b/source/blender/depsgraph/intern/node/deg_node_component.cc index 9c142cdc97b..e2c1f74ec46 100644 --- a/source/blender/depsgraph/intern/node/deg_node_component.cc +++ b/source/blender/depsgraph/intern/node/deg_node_component.cc @@ -28,11 +28,9 @@ #include "BLI_utildefines.h" -extern "C" { #include "DNA_object_types.h" #include "BKE_action.h" -} /* extern "C" */ #include "intern/node/deg_node_factory.h" #include "intern/node/deg_node_id.h" diff --git a/source/blender/depsgraph/intern/node/deg_node_id.cc b/source/blender/depsgraph/intern/node/deg_node_id.cc index 4e998fb095a..4a7e5c4568b 100644 --- a/source/blender/depsgraph/intern/node/deg_node_id.cc +++ b/source/blender/depsgraph/intern/node/deg_node_id.cc @@ -29,12 +29,10 @@ #include "BLI_string.h" #include "BLI_utildefines.h" -extern "C" { #include "DNA_ID.h" #include "DNA_anim_types.h" #include "BKE_lib_id.h" -} #include "DEG_depsgraph.h" diff --git a/source/blender/draw/DRW_engine.h b/source/blender/draw/DRW_engine.h index 6e7654aed02..6c835c6d7ae 100644 --- a/source/blender/draw/DRW_engine.h +++ b/source/blender/draw/DRW_engine.h @@ -23,12 +23,16 @@ #ifndef __DRW_ENGINE_H__ #define __DRW_ENGINE_H__ +#include "BLI_sys_types.h" /* for bool */ + +#include "DNA_object_enums.h" + +#include "DRW_engine_types.h" + #ifdef __cplusplus extern "C" { #endif -#include "BLI_sys_types.h" /* for bool */ - struct ARegion; struct DRWInstanceDataList; struct Depsgraph; @@ -47,9 +51,6 @@ struct ViewLayer; struct bContext; struct rcti; -#include "DNA_object_enums.h" -#include "DRW_engine_types.h" - void DRW_engines_register(void); void DRW_engines_free(void); diff --git a/source/blender/editors/include/ED_keyframes_edit.h b/source/blender/editors/include/ED_keyframes_edit.h index 3ae864721e8..28bc0b22790 100644 --- a/source/blender/editors/include/ED_keyframes_edit.h +++ b/source/blender/editors/include/ED_keyframes_edit.h @@ -24,12 +24,12 @@ #ifndef __ED_KEYFRAMES_EDIT_H__ #define __ED_KEYFRAMES_EDIT_H__ +#include "ED_anim_api.h" /* for enum eAnimFilter_Flags */ + #ifdef __cplusplus extern "C" { #endif -#include "ED_anim_api.h" /* for enum eAnimFilter_Flags */ - struct BezTriple; struct FCurve; struct Scene; diff --git a/source/blender/editors/include/ED_keyframing.h b/source/blender/editors/include/ED_keyframing.h index 4225ecc6f3d..5635ef2800a 100644 --- a/source/blender/editors/include/ED_keyframing.h +++ b/source/blender/editors/include/ED_keyframing.h @@ -24,6 +24,9 @@ #ifndef __ED_KEYFRAMING_H__ #define __ED_KEYFRAMING_H__ +#include "DNA_anim_types.h" +#include "RNA_types.h" + #ifdef __cplusplus extern "C" { #endif @@ -50,9 +53,6 @@ struct PropertyRNA; struct NlaKeyframingContext; -#include "DNA_anim_types.h" -#include "RNA_types.h" - /* ************ Keyframing Management **************** */ /* Get the active settings for keyframing settings from context (specifically the given scene) diff --git a/source/blender/editors/include/ED_object.h b/source/blender/editors/include/ED_object.h index 9d25fff477d..32e62a6436c 100644 --- a/source/blender/editors/include/ED_object.h +++ b/source/blender/editors/include/ED_object.h @@ -24,6 +24,9 @@ #ifndef __ED_OBJECT_H__ #define __ED_OBJECT_H__ +#include "BLI_compiler_attrs.h" +#include "DNA_object_enums.h" + #ifdef __cplusplus extern "C" { #endif @@ -54,9 +57,6 @@ struct wmOperator; struct wmOperatorType; struct wmWindowManager; -#include "BLI_compiler_attrs.h" -#include "DNA_object_enums.h" - /* object_edit.c */ /* context.object */ struct Object *ED_object_context(struct bContext *C); diff --git a/source/blender/editors/include/UI_resources.h b/source/blender/editors/include/UI_resources.h index b0995250979..c5c4ca79f14 100644 --- a/source/blender/editors/include/UI_resources.h +++ b/source/blender/editors/include/UI_resources.h @@ -26,10 +26,6 @@ #include "BLI_sys_types.h" -#ifdef __cplusplus -extern "C" { -#endif - /* Define icon enum. */ #define DEF_ICON(name) ICON_##name, #define DEF_ICON_VECTOR(name) ICON_##name, @@ -47,6 +43,10 @@ typedef enum { /* use to denote intentionally unset theme color */ #define TH_UNDEFINED -1 +#ifdef __cplusplus +extern "C" { +#endif + typedef enum ThemeColorID { TH_REDALERT, diff --git a/source/blender/editors/uvedit/uvedit_parametrizer.h b/source/blender/editors/uvedit/uvedit_parametrizer.h index 2b80241e6e3..53188ea42bb 100644 --- a/source/blender/editors/uvedit/uvedit_parametrizer.h +++ b/source/blender/editors/uvedit/uvedit_parametrizer.h @@ -21,12 +21,12 @@ * \ingroup eduv */ +#include "BLI_sys_types.h" // for intptr_t support + #ifdef __cplusplus extern "C" { #endif -#include "BLI_sys_types.h" // for intptr_t support - typedef void ParamHandle; /* handle to a set of charts */ typedef intptr_t ParamKey; /* (hash) key for identifying verts and faces */ typedef enum ParamBool { diff --git a/source/blender/freestyle/intern/blender_interface/BlenderStrokeRenderer.cpp b/source/blender/freestyle/intern/blender_interface/BlenderStrokeRenderer.cpp index b8f3a27be9c..a53df06e8c9 100644 --- a/source/blender/freestyle/intern/blender_interface/BlenderStrokeRenderer.cpp +++ b/source/blender/freestyle/intern/blender_interface/BlenderStrokeRenderer.cpp @@ -25,7 +25,6 @@ #include "MEM_guardedalloc.h" -extern "C" { #include "RNA_access.h" #include "RNA_types.h" @@ -64,7 +63,6 @@ extern "C" { #include "RE_pipeline.h" #include "render_types.h" -} #include diff --git a/source/blender/freestyle/intern/blender_interface/BlenderStyleModule.h b/source/blender/freestyle/intern/blender_interface/BlenderStyleModule.h index a4beb1c119c..95612a42722 100644 --- a/source/blender/freestyle/intern/blender_interface/BlenderStyleModule.h +++ b/source/blender/freestyle/intern/blender_interface/BlenderStyleModule.h @@ -24,11 +24,9 @@ #include "../stroke/StyleModule.h" #include "../system/PythonInterpreter.h" -extern "C" { #include "BLI_utildefines.h" // BLI_assert() struct Text; -} namespace Freestyle { diff --git a/source/blender/freestyle/intern/geometry/Grid.h b/source/blender/freestyle/intern/geometry/Grid.h index 0a9fa5dc85a..c1a8dcdb370 100644 --- a/source/blender/freestyle/intern/geometry/Grid.h +++ b/source/blender/freestyle/intern/geometry/Grid.h @@ -33,9 +33,7 @@ #include "../system/FreestyleConfig.h" -extern "C" { #include "BLI_utildefines.h" -} #ifdef WITH_CXX_GUARDEDALLOC # include "MEM_guardedalloc.h" diff --git a/source/blender/freestyle/intern/image/GaussianFilter.h b/source/blender/freestyle/intern/image/GaussianFilter.h index f8e2524fa4f..625e357eddf 100644 --- a/source/blender/freestyle/intern/image/GaussianFilter.h +++ b/source/blender/freestyle/intern/image/GaussianFilter.h @@ -27,9 +27,7 @@ #include "../system/FreestyleConfig.h" -extern "C" { #include "BLI_math.h" -} #ifdef WITH_CXX_GUARDEDALLOC # include "MEM_guardedalloc.h" diff --git a/source/blender/freestyle/intern/scene_graph/NodeViewLayer.h b/source/blender/freestyle/intern/scene_graph/NodeViewLayer.h index f220bbfd6f1..2339abe9aed 100644 --- a/source/blender/freestyle/intern/scene_graph/NodeViewLayer.h +++ b/source/blender/freestyle/intern/scene_graph/NodeViewLayer.h @@ -24,9 +24,7 @@ #include "Node.h" -extern "C" { #include "DNA_scene_types.h" /* for Scene and ViewLayer */ -} using namespace std; diff --git a/source/blender/freestyle/intern/stroke/Canvas.cpp b/source/blender/freestyle/intern/stroke/Canvas.cpp index 7d04a55c5d9..4386e64345f 100644 --- a/source/blender/freestyle/intern/stroke/Canvas.cpp +++ b/source/blender/freestyle/intern/stroke/Canvas.cpp @@ -41,10 +41,8 @@ // soc #include // soc #include -extern "C" { #include "IMB_imbuf.h" #include "IMB_imbuf_types.h" -} using namespace std; diff --git a/source/blender/freestyle/intern/stroke/StrokeRep.h b/source/blender/freestyle/intern/stroke/StrokeRep.h index b2bfb805ee6..d6ee1d01279 100644 --- a/source/blender/freestyle/intern/stroke/StrokeRep.h +++ b/source/blender/freestyle/intern/stroke/StrokeRep.h @@ -30,10 +30,8 @@ # include "MEM_guardedalloc.h" #endif -extern "C" { #include "DNA_material_types.h" // for MAX_MTEX struct bNodeTree; -} namespace Freestyle { diff --git a/source/blender/freestyle/intern/view_map/SteerableViewMap.cpp b/source/blender/freestyle/intern/view_map/SteerableViewMap.cpp index a6a72bfa314..efda4b7fd2a 100644 --- a/source/blender/freestyle/intern/view_map/SteerableViewMap.cpp +++ b/source/blender/freestyle/intern/view_map/SteerableViewMap.cpp @@ -33,10 +33,8 @@ #include "BKE_global.h" #include "BLI_math.h" -extern "C" { #include "IMB_imbuf.h" #include "IMB_imbuf_types.h" -} namespace Freestyle { diff --git a/source/blender/gpu/GPU_context.h b/source/blender/gpu/GPU_context.h index dd7611fe2fc..9876aa6998c 100644 --- a/source/blender/gpu/GPU_context.h +++ b/source/blender/gpu/GPU_context.h @@ -26,14 +26,14 @@ #ifndef __GPU_CONTEXT_H__ #define __GPU_CONTEXT_H__ -#ifdef __cplusplus -extern "C" { -#endif - #include "GPU_batch.h" #include "GPU_common.h" #include "GPU_shader_interface.h" +#ifdef __cplusplus +extern "C" { +#endif + typedef struct GPUContext GPUContext; GPUContext *GPU_context_create(GLuint default_framebuffer); diff --git a/source/blender/gpu/GPU_draw.h b/source/blender/gpu/GPU_draw.h index f521fa3c702..e5a6a8ffde8 100644 --- a/source/blender/gpu/GPU_draw.h +++ b/source/blender/gpu/GPU_draw.h @@ -24,6 +24,9 @@ #ifndef __GPU_DRAW_H__ #define __GPU_DRAW_H__ +#include "BLI_utildefines.h" +#include "DNA_object_enums.h" + #ifdef __cplusplus extern "C" { #endif @@ -34,9 +37,6 @@ struct Image; struct ImageUser; struct Main; -#include "BLI_utildefines.h" -#include "DNA_object_enums.h" - /* OpenGL drawing functions related to shading. */ /* Initialize diff --git a/source/blender/gpu/GPU_init_exit.h b/source/blender/gpu/GPU_init_exit.h index 0046eaa942b..3e30a1ddcf5 100644 --- a/source/blender/gpu/GPU_init_exit.h +++ b/source/blender/gpu/GPU_init_exit.h @@ -24,12 +24,12 @@ #ifndef __GPU_INIT_EXIT_H__ #define __GPU_INIT_EXIT_H__ +#include "BLI_utildefines.h" + #ifdef __cplusplus extern "C" { #endif -#include "BLI_utildefines.h" - void GPU_init(void); void GPU_exit(void); bool GPU_is_initialized(void); diff --git a/source/blender/gpu/intern/gpu_batch_private.h b/source/blender/gpu/intern/gpu_batch_private.h index 42cfc1e2a5c..58d1810ac7a 100644 --- a/source/blender/gpu/intern/gpu_batch_private.h +++ b/source/blender/gpu/intern/gpu_batch_private.h @@ -27,14 +27,14 @@ #ifndef __GPU_BATCH_PRIVATE_H__ #define __GPU_BATCH_PRIVATE_H__ -#ifdef __cplusplus -extern "C" { -#endif - #include "GPU_batch.h" #include "GPU_context.h" #include "GPU_shader_interface.h" +#ifdef __cplusplus +extern "C" { +#endif + void gpu_batch_remove_interface_ref(GPUBatch *batch, const GPUShaderInterface *interface); #ifdef __cplusplus diff --git a/source/blender/gpu/intern/gpu_context_private.h b/source/blender/gpu/intern/gpu_context_private.h index c9379e5433f..f64cdf439a1 100644 --- a/source/blender/gpu/intern/gpu_context_private.h +++ b/source/blender/gpu/intern/gpu_context_private.h @@ -26,12 +26,12 @@ #ifndef __GPU_CONTEXT_PRIVATE_H__ #define __GPU_CONTEXT_PRIVATE_H__ +#include "GPU_context.h" + #ifdef __cplusplus extern "C" { #endif -#include "GPU_context.h" - struct GPUFrameBuffer; GLuint GPU_vao_default(void); diff --git a/source/blender/ikplugin/intern/itasc_plugin.cpp b/source/blender/ikplugin/intern/itasc_plugin.cpp index 19a4390598f..66ed0dd0fa5 100644 --- a/source/blender/ikplugin/intern/itasc_plugin.cpp +++ b/source/blender/ikplugin/intern/itasc_plugin.cpp @@ -40,7 +40,6 @@ #include "MEM_guardedalloc.h" -extern "C" { #include "BIK_api.h" #include "BLI_blenlib.h" #include "BLI_math.h" @@ -55,7 +54,6 @@ extern "C" { #include "DNA_constraint_types.h" #include "DNA_object_types.h" #include "DNA_scene_types.h" -}; #include "itasc_plugin.h" diff --git a/source/blender/imbuf/intern/IMB_allocimbuf.h b/source/blender/imbuf/intern/IMB_allocimbuf.h index c252a9a63f8..9f89969cf1c 100644 --- a/source/blender/imbuf/intern/IMB_allocimbuf.h +++ b/source/blender/imbuf/intern/IMB_allocimbuf.h @@ -24,6 +24,10 @@ #ifndef __IMB_ALLOCIMBUF_H__ #define __IMB_ALLOCIMBUF_H__ +#ifdef __cplusplus +extern "C" { +#endif + struct ImBuf; void imb_refcounter_lock_init(void); @@ -44,4 +48,8 @@ void imb_mmap_unlock(void); bool imb_addencodedbufferImBuf(struct ImBuf *ibuf); bool imb_enlargeencodedbufferImBuf(struct ImBuf *ibuf); +#ifdef __cplusplus +} +#endif + #endif diff --git a/source/blender/imbuf/intern/IMB_colormanagement_intern.h b/source/blender/imbuf/intern/IMB_colormanagement_intern.h index f0e599c1375..79abe8472b9 100644 --- a/source/blender/imbuf/intern/IMB_colormanagement_intern.h +++ b/source/blender/imbuf/intern/IMB_colormanagement_intern.h @@ -27,6 +27,10 @@ #include "BLI_sys_types.h" #include "DNA_listBase.h" +#ifdef __cplusplus +extern "C" { +#endif + struct ImBuf; struct OCIO_ConstProcessorRcPtr; @@ -123,4 +127,8 @@ void colorspace_set_default_role(char *colorspace, int size, int role); void colormanage_imbuf_set_default_spaces(struct ImBuf *ibuf); void colormanage_imbuf_make_linear(struct ImBuf *ibuf, const char *from_colorspace); +#ifdef __cplusplus +} +#endif + #endif /* __IMB_COLORMANAGEMENT_INTERN_H__ */ diff --git a/source/blender/imbuf/intern/cineon/cineonlib.h b/source/blender/imbuf/intern/cineon/cineonlib.h index 461407fcf25..040435e44ee 100644 --- a/source/blender/imbuf/intern/cineon/cineonlib.h +++ b/source/blender/imbuf/intern/cineon/cineonlib.h @@ -26,12 +26,12 @@ #ifndef __CINEONLIB_H__ #define __CINEONLIB_H__ +#include "logImageCore.h" + #ifdef __cplusplus extern "C" { #endif -#include "logImageCore.h" - #define CINEON_FILE_MAGIC 0x802A5FD7 #define CINEON_UNDEFINED_U8 0xFF #define CINEON_UNDEFINED_U16 0xFFFF diff --git a/source/blender/imbuf/intern/cineon/dpxlib.h b/source/blender/imbuf/intern/cineon/dpxlib.h index bf07b8e329d..3a7ebe9dddf 100644 --- a/source/blender/imbuf/intern/cineon/dpxlib.h +++ b/source/blender/imbuf/intern/cineon/dpxlib.h @@ -25,12 +25,12 @@ #ifndef __DPXLIB_H__ #define __DPXLIB_H__ +#include "logImageCore.h" + #ifdef __cplusplus extern "C" { #endif -#include "logImageCore.h" - #define DPX_FILE_MAGIC 0x53445058 #define DPX_UNDEFINED_U8 0xFF #define DPX_UNDEFINED_U16 0xFFFF diff --git a/source/blender/imbuf/intern/dds/dds_api.cpp b/source/blender/imbuf/intern/dds/dds_api.cpp index 832b380bbc2..83d304203a0 100644 --- a/source/blender/imbuf/intern/dds/dds_api.cpp +++ b/source/blender/imbuf/intern/dds/dds_api.cpp @@ -18,9 +18,7 @@ * \ingroup imbdds */ -extern "C" { #include "BLI_utildefines.h" -} #include #include @@ -34,8 +32,6 @@ extern "C" { # include "utfconv.h" #endif -extern "C" { - #include "IMB_allocimbuf.h" #include "IMB_imbuf.h" #include "IMB_imbuf_types.h" @@ -44,6 +40,8 @@ extern "C" { #include "IMB_colormanagement.h" #include "IMB_colormanagement_intern.h" +extern "C" { + int imb_save_dds(struct ImBuf *ibuf, const char *name, int /*flags*/) { return (0); /* todo: finish this function */ diff --git a/source/blender/imbuf/intern/dds/dds_api.h b/source/blender/imbuf/intern/dds/dds_api.h index 12db8aa6416..e6782e217fc 100644 --- a/source/blender/imbuf/intern/dds/dds_api.h +++ b/source/blender/imbuf/intern/dds/dds_api.h @@ -21,12 +21,12 @@ #ifndef __DDS_API_H__ #define __DDS_API_H__ +#include "../../IMB_imbuf.h" + #ifdef __cplusplus extern "C" { #endif -#include "../../IMB_imbuf.h" - int imb_is_a_dds(const unsigned char *mem); /* use only first 32 bytes of mem */ int imb_save_dds(struct ImBuf *ibuf, const char *name, int flags); struct ImBuf *imb_load_dds(const unsigned char *mem, diff --git a/source/blender/imbuf/intern/oiio/openimageio_api.cpp b/source/blender/imbuf/intern/oiio/openimageio_api.cpp index 6d3234771e7..df51aada5f0 100644 --- a/source/blender/imbuf/intern/oiio/openimageio_api.cpp +++ b/source/blender/imbuf/intern/oiio/openimageio_api.cpp @@ -35,7 +35,6 @@ #include "MEM_guardedalloc.h" -extern "C" { #include "BLI_blenlib.h" #include "IMB_allocimbuf.h" @@ -43,7 +42,6 @@ extern "C" { #include "IMB_colormanagement_intern.h" #include "IMB_imbuf.h" #include "IMB_imbuf_types.h" -} OIIO_NAMESPACE_USING diff --git a/source/blender/imbuf/intern/oiio/openimageio_api.h b/source/blender/imbuf/intern/oiio/openimageio_api.h index 520ad0c5da5..3dd089d65cb 100644 --- a/source/blender/imbuf/intern/oiio/openimageio_api.h +++ b/source/blender/imbuf/intern/oiio/openimageio_api.h @@ -24,12 +24,12 @@ #ifndef __OPENIMAGEIO_API_H__ #define __OPENIMAGEIO_API_H__ +#include + #ifdef __cplusplus extern "C" { #endif -#include - struct ImBuf; int imb_is_a_photoshop(const char *name); diff --git a/source/blender/imbuf/intern/openexr/openexr_api.cpp b/source/blender/imbuf/intern/openexr/openexr_api.cpp index a1719895853..62cc2e605e5 100644 --- a/source/blender/imbuf/intern/openexr/openexr_api.cpp +++ b/source/blender/imbuf/intern/openexr/openexr_api.cpp @@ -75,7 +75,7 @@ _CRTIMP void __cdecl _invalid_parameter_noinfo(void) { } #endif - +} #include "BLI_blenlib.h" #include "BLI_math_color.h" #include "BLI_threads.h" @@ -84,17 +84,13 @@ _CRTIMP void __cdecl _invalid_parameter_noinfo(void) #include "BKE_image.h" #include "IMB_allocimbuf.h" +#include "IMB_colormanagement.h" +#include "IMB_colormanagement_intern.h" #include "IMB_imbuf.h" #include "IMB_imbuf_types.h" #include "IMB_metadata.h" #include "openexr_multi.h" -} - -extern "C" { -#include "IMB_colormanagement.h" -#include "IMB_colormanagement_intern.h" -} using namespace Imf; using namespace Imath; diff --git a/source/blender/imbuf/intern/openexr/openexr_api.h b/source/blender/imbuf/intern/openexr/openexr_api.h index df03d0d205f..b0835e5082e 100644 --- a/source/blender/imbuf/intern/openexr/openexr_api.h +++ b/source/blender/imbuf/intern/openexr/openexr_api.h @@ -24,12 +24,12 @@ #ifndef __OPENEXR_API_H__ #define __OPENEXR_API_H__ +#include + #ifdef __cplusplus extern "C" { #endif -#include - void imb_initopenexr(void); void imb_exitopenexr(void); diff --git a/source/blender/io/alembic/intern/abc_customdata.cc b/source/blender/io/alembic/intern/abc_customdata.cc index c5f60ac3e29..64f8f9c81a8 100644 --- a/source/blender/io/alembic/intern/abc_customdata.cc +++ b/source/blender/io/alembic/intern/abc_customdata.cc @@ -27,7 +27,6 @@ #include #include -extern "C" { #include "DNA_customdata_types.h" #include "DNA_meshdata_types.h" @@ -35,7 +34,6 @@ extern "C" { #include "BLI_utildefines.h" #include "BKE_customdata.h" -} /* NOTE: for now only UVs and Vertex Colors are supported for streaming. * Although Alembic only allows for a single UV layer per {I|O}Schema, and does diff --git a/source/blender/io/alembic/intern/abc_exporter.cc b/source/blender/io/alembic/intern/abc_exporter.cc index f661083b0a7..dbf24452b78 100644 --- a/source/blender/io/alembic/intern/abc_exporter.cc +++ b/source/blender/io/alembic/intern/abc_exporter.cc @@ -33,7 +33,6 @@ #include "abc_writer_points.h" #include "abc_writer_transform.h" -extern "C" { #include "DNA_camera_types.h" #include "DNA_curve_types.h" #include "DNA_fluid_types.h" @@ -62,7 +61,6 @@ extern "C" { #include "BKE_scene.h" #include "DEG_depsgraph_query.h" -} using Alembic::Abc::OBox3dProperty; using Alembic::Abc::TimeSamplingPtr; diff --git a/source/blender/io/alembic/intern/abc_reader_archive.cc b/source/blender/io/alembic/intern/abc_reader_archive.cc index 6ad44553701..ea8478f7b56 100644 --- a/source/blender/io/alembic/intern/abc_reader_archive.cc +++ b/source/blender/io/alembic/intern/abc_reader_archive.cc @@ -23,12 +23,10 @@ #include "abc_reader_archive.h" -extern "C" { #include "BKE_main.h" #include "BLI_path_util.h" #include "BLI_string.h" -} #ifdef WIN32 # include "utfconv.h" diff --git a/source/blender/io/alembic/intern/abc_reader_camera.cc b/source/blender/io/alembic/intern/abc_reader_camera.cc index ab506f32cbe..0752534f8c2 100644 --- a/source/blender/io/alembic/intern/abc_reader_camera.cc +++ b/source/blender/io/alembic/intern/abc_reader_camera.cc @@ -22,7 +22,6 @@ #include "abc_reader_transform.h" #include "abc_util.h" -extern "C" { #include "DNA_camera_types.h" #include "DNA_object_types.h" @@ -30,7 +29,6 @@ extern "C" { #include "BKE_object.h" #include "BLI_math.h" -} using Alembic::AbcGeom::CameraSample; using Alembic::AbcGeom::ICamera; diff --git a/source/blender/io/alembic/intern/abc_reader_curves.cc b/source/blender/io/alembic/intern/abc_reader_curves.cc index 9fdc8b2b93f..1fda102a3cd 100644 --- a/source/blender/io/alembic/intern/abc_reader_curves.cc +++ b/source/blender/io/alembic/intern/abc_reader_curves.cc @@ -30,7 +30,6 @@ #include "MEM_guardedalloc.h" -extern "C" { #include "DNA_curve_types.h" #include "DNA_object_types.h" @@ -39,7 +38,6 @@ extern "C" { #include "BKE_curve.h" #include "BKE_mesh.h" #include "BKE_object.h" -} using Alembic::Abc::FloatArraySamplePtr; using Alembic::Abc::Int32ArraySamplePtr; diff --git a/source/blender/io/alembic/intern/abc_reader_mesh.cc b/source/blender/io/alembic/intern/abc_reader_mesh.cc index a5c893a262a..f22f2a53a78 100644 --- a/source/blender/io/alembic/intern/abc_reader_mesh.cc +++ b/source/blender/io/alembic/intern/abc_reader_mesh.cc @@ -27,7 +27,6 @@ #include "MEM_guardedalloc.h" -extern "C" { #include "DNA_material_types.h" #include "DNA_mesh_types.h" #include "DNA_meshdata_types.h" @@ -40,7 +39,6 @@ extern "C" { #include "BKE_mesh.h" #include "BKE_modifier.h" #include "BKE_object.h" -} using Alembic::Abc::Int32ArraySamplePtr; using Alembic::Abc::P3fArraySamplePtr; diff --git a/source/blender/io/alembic/intern/abc_reader_nurbs.cc b/source/blender/io/alembic/intern/abc_reader_nurbs.cc index a57a1f55608..10d9a35a8e1 100644 --- a/source/blender/io/alembic/intern/abc_reader_nurbs.cc +++ b/source/blender/io/alembic/intern/abc_reader_nurbs.cc @@ -25,7 +25,6 @@ #include "MEM_guardedalloc.h" -extern "C" { #include "DNA_curve_types.h" #include "DNA_object_types.h" @@ -34,7 +33,6 @@ extern "C" { #include "BKE_curve.h" #include "BKE_object.h" -} using Alembic::AbcGeom::FloatArraySamplePtr; using Alembic::AbcGeom::kWrapExisting; diff --git a/source/blender/io/alembic/intern/abc_reader_object.cc b/source/blender/io/alembic/intern/abc_reader_object.cc index c40421da8c2..e5bd0771a42 100644 --- a/source/blender/io/alembic/intern/abc_reader_object.cc +++ b/source/blender/io/alembic/intern/abc_reader_object.cc @@ -22,7 +22,6 @@ #include "abc_axis_conversion.h" #include "abc_util.h" -extern "C" { #include "DNA_cachefile_types.h" #include "DNA_constraint_types.h" #include "DNA_modifier_types.h" @@ -37,7 +36,6 @@ extern "C" { #include "BLI_math_geom.h" #include "BLI_string.h" #include "BLI_utildefines.h" -} using Alembic::AbcGeom::IObject; using Alembic::AbcGeom::IXform; diff --git a/source/blender/io/alembic/intern/abc_reader_object.h b/source/blender/io/alembic/intern/abc_reader_object.h index 94923df2df9..dcc2697e0b5 100644 --- a/source/blender/io/alembic/intern/abc_reader_object.h +++ b/source/blender/io/alembic/intern/abc_reader_object.h @@ -24,9 +24,7 @@ #include #include -extern "C" { #include "DNA_ID.h" -} struct CacheFile; struct Main; diff --git a/source/blender/io/alembic/intern/abc_reader_points.cc b/source/blender/io/alembic/intern/abc_reader_points.cc index e4dc345f868..2b82dadbcbc 100644 --- a/source/blender/io/alembic/intern/abc_reader_points.cc +++ b/source/blender/io/alembic/intern/abc_reader_points.cc @@ -26,14 +26,12 @@ #include "abc_reader_transform.h" #include "abc_util.h" -extern "C" { #include "DNA_mesh_types.h" #include "DNA_object_types.h" #include "BKE_customdata.h" #include "BKE_mesh.h" #include "BKE_object.h" -} using Alembic::AbcGeom::kWrapExisting; using Alembic::AbcGeom::N3fArraySamplePtr; diff --git a/source/blender/io/alembic/intern/abc_reader_transform.cc b/source/blender/io/alembic/intern/abc_reader_transform.cc index ce569a9ccb5..3df391f8432 100644 --- a/source/blender/io/alembic/intern/abc_reader_transform.cc +++ b/source/blender/io/alembic/intern/abc_reader_transform.cc @@ -21,13 +21,11 @@ #include "abc_reader_transform.h" #include "abc_util.h" -extern "C" { #include "DNA_object_types.h" #include "BLI_utildefines.h" #include "BKE_object.h" -} using Alembic::Abc::ISampleSelector; diff --git a/source/blender/io/alembic/intern/abc_util.cc b/source/blender/io/alembic/intern/abc_util.cc index 6b27c389363..1f3bd2a1aaa 100644 --- a/source/blender/io/alembic/intern/abc_util.cc +++ b/source/blender/io/alembic/intern/abc_util.cc @@ -32,13 +32,11 @@ #include -extern "C" { #include "DNA_object_types.h" #include "BLI_math_geom.h" #include "PIL_time.h" -} std::string get_id_name(const Object *const ob) { diff --git a/source/blender/io/alembic/intern/abc_writer_archive.cc b/source/blender/io/alembic/intern/abc_writer_archive.cc index af18d480a18..ea0d684347d 100644 --- a/source/blender/io/alembic/intern/abc_writer_archive.cc +++ b/source/blender/io/alembic/intern/abc_writer_archive.cc @@ -22,14 +22,13 @@ */ #include "abc_writer_archive.h" -extern "C" { + #include "BKE_blender_version.h" #include "BLI_path_util.h" #include "BLI_string.h" #include "DNA_scene_types.h" -} #ifdef WIN32 # include "utfconv.h" diff --git a/source/blender/io/alembic/intern/abc_writer_camera.cc b/source/blender/io/alembic/intern/abc_writer_camera.cc index e705e5ba911..07ae81e584f 100644 --- a/source/blender/io/alembic/intern/abc_writer_camera.cc +++ b/source/blender/io/alembic/intern/abc_writer_camera.cc @@ -21,10 +21,8 @@ #include "abc_writer_camera.h" #include "abc_writer_transform.h" -extern "C" { #include "DNA_camera_types.h" #include "DNA_object_types.h" -} using Alembic::AbcGeom::OCamera; using Alembic::AbcGeom::OFloatProperty; diff --git a/source/blender/io/alembic/intern/abc_writer_curves.cc b/source/blender/io/alembic/intern/abc_writer_curves.cc index 8cb40c4ffab..0deda76e123 100644 --- a/source/blender/io/alembic/intern/abc_writer_curves.cc +++ b/source/blender/io/alembic/intern/abc_writer_curves.cc @@ -26,14 +26,12 @@ #include "abc_reader_curves.h" #include "abc_writer_transform.h" -extern "C" { #include "DNA_curve_types.h" #include "DNA_object_types.h" #include "BKE_curve.h" #include "BKE_mesh.h" #include "BKE_object.h" -} using Alembic::AbcGeom::OCompoundProperty; using Alembic::AbcGeom::OCurves; diff --git a/source/blender/io/alembic/intern/abc_writer_hair.cc b/source/blender/io/alembic/intern/abc_writer_hair.cc index dd1203de835..ed62889b03d 100644 --- a/source/blender/io/alembic/intern/abc_writer_hair.cc +++ b/source/blender/io/alembic/intern/abc_writer_hair.cc @@ -24,7 +24,6 @@ #include -extern "C" { #include "DNA_mesh_types.h" #include "DNA_meshdata_types.h" #include "DNA_modifier_types.h" @@ -35,7 +34,6 @@ extern "C" { #include "BKE_mesh.h" #include "BKE_mesh_runtime.h" #include "BKE_particle.h" -} using Alembic::Abc::P3fArraySamplePtr; diff --git a/source/blender/io/alembic/intern/abc_writer_mball.cc b/source/blender/io/alembic/intern/abc_writer_mball.cc index 151848674f9..3593acf18b0 100644 --- a/source/blender/io/alembic/intern/abc_writer_mball.cc +++ b/source/blender/io/alembic/intern/abc_writer_mball.cc @@ -21,7 +21,6 @@ #include "abc_writer_mball.h" #include "abc_writer_mesh.h" -extern "C" { #include "DNA_mesh_types.h" #include "DNA_meta_types.h" #include "DNA_object_types.h" @@ -33,7 +32,6 @@ extern "C" { #include "BKE_object.h" #include "BLI_utildefines.h" -} AbcMBallWriter::AbcMBallWriter(Main *bmain, Object *ob, diff --git a/source/blender/io/alembic/intern/abc_writer_mesh.cc b/source/blender/io/alembic/intern/abc_writer_mesh.cc index 38939d15c85..d5ab4e34828 100644 --- a/source/blender/io/alembic/intern/abc_writer_mesh.cc +++ b/source/blender/io/alembic/intern/abc_writer_mesh.cc @@ -22,7 +22,6 @@ #include "abc_axis_conversion.h" #include "abc_writer_transform.h" -extern "C" { #include "DNA_material_types.h" #include "DNA_mesh_types.h" #include "DNA_meshdata_types.h" @@ -40,7 +39,6 @@ extern "C" { #include "bmesh_tools.h" #include "DEG_depsgraph_query.h" -} using Alembic::Abc::FloatArraySample; using Alembic::Abc::Int32ArraySample; diff --git a/source/blender/io/alembic/intern/abc_writer_nurbs.cc b/source/blender/io/alembic/intern/abc_writer_nurbs.cc index 3521c62075f..8b4a1050d33 100644 --- a/source/blender/io/alembic/intern/abc_writer_nurbs.cc +++ b/source/blender/io/alembic/intern/abc_writer_nurbs.cc @@ -22,14 +22,12 @@ #include "abc_axis_conversion.h" #include "abc_writer_transform.h" -extern "C" { #include "DNA_curve_types.h" #include "DNA_object_types.h" #include "BLI_listbase.h" #include "BKE_curve.h" -} using Alembic::AbcGeom::FloatArraySample; using Alembic::AbcGeom::OBoolProperty; diff --git a/source/blender/io/alembic/intern/abc_writer_object.cc b/source/blender/io/alembic/intern/abc_writer_object.cc index 75dc93bd08e..f4a3587f54d 100644 --- a/source/blender/io/alembic/intern/abc_writer_object.cc +++ b/source/blender/io/alembic/intern/abc_writer_object.cc @@ -20,11 +20,9 @@ #include "abc_writer_object.h" -extern "C" { #include "DNA_object_types.h" #include "BKE_object.h" -} AbcObjectWriter::AbcObjectWriter(Object *ob, uint32_t time_sampling, diff --git a/source/blender/io/alembic/intern/abc_writer_object.h b/source/blender/io/alembic/intern/abc_writer_object.h index c3511566372..830c4aee903 100644 --- a/source/blender/io/alembic/intern/abc_writer_object.h +++ b/source/blender/io/alembic/intern/abc_writer_object.h @@ -26,9 +26,7 @@ #include "abc_exporter.h" -extern "C" { #include "DNA_ID.h" -} class AbcTransformWriter; diff --git a/source/blender/io/alembic/intern/abc_writer_points.cc b/source/blender/io/alembic/intern/abc_writer_points.cc index 70a1ead239a..7b5cf47431c 100644 --- a/source/blender/io/alembic/intern/abc_writer_points.cc +++ b/source/blender/io/alembic/intern/abc_writer_points.cc @@ -26,7 +26,6 @@ #include "abc_writer_mesh.h" #include "abc_writer_transform.h" -extern "C" { #include "DNA_object_types.h" #include "DNA_particle_types.h" @@ -36,7 +35,6 @@ extern "C" { #include "BLI_math.h" #include "DEG_depsgraph_query.h" -} using Alembic::AbcGeom::kVertexScope; using Alembic::AbcGeom::OPoints; diff --git a/source/blender/io/alembic/intern/abc_writer_transform.cc b/source/blender/io/alembic/intern/abc_writer_transform.cc index 18f4487cf05..1ec7db0a1c6 100644 --- a/source/blender/io/alembic/intern/abc_writer_transform.cc +++ b/source/blender/io/alembic/intern/abc_writer_transform.cc @@ -23,13 +23,11 @@ #include -extern "C" { #include "DNA_object_types.h" #include "BLI_math.h" #include "DEG_depsgraph_query.h" -} using Alembic::AbcGeom::OObject; using Alembic::AbcGeom::OXform; diff --git a/source/blender/io/alembic/intern/alembic_capi.cc b/source/blender/io/alembic/intern/alembic_capi.cc index ced5791e0e8..987a3cacb3b 100644 --- a/source/blender/io/alembic/intern/alembic_capi.cc +++ b/source/blender/io/alembic/intern/alembic_capi.cc @@ -40,7 +40,6 @@ #include "MEM_guardedalloc.h" -extern "C" { #include "DNA_cachefile_types.h" #include "DNA_curve_types.h" #include "DNA_modifier_types.h" @@ -74,7 +73,6 @@ extern "C" { #include "WM_api.h" #include "WM_types.h" -} using Alembic::Abc::Int32ArraySamplePtr; using Alembic::Abc::ObjectHeader; diff --git a/source/blender/io/collada/AnimationExporter.h b/source/blender/io/collada/AnimationExporter.h index 3e40a485ddf..b4564eb7b2d 100644 --- a/source/blender/io/collada/AnimationExporter.h +++ b/source/blender/io/collada/AnimationExporter.h @@ -23,7 +23,6 @@ #include "BCAnimationCurve.h" -extern "C" { #include "DNA_action_types.h" #include "DNA_anim_types.h" #include "DNA_armature_types.h" @@ -48,7 +47,6 @@ extern "C" { #include "BKE_object.h" #include "BKE_scene.h" #include "ED_object.h" -} #include "MEM_guardedalloc.h" diff --git a/source/blender/io/collada/AnimationImporter.h b/source/blender/io/collada/AnimationImporter.h index 263a130d1eb..51041c6ee3e 100644 --- a/source/blender/io/collada/AnimationImporter.h +++ b/source/blender/io/collada/AnimationImporter.h @@ -35,14 +35,14 @@ #include "COLLADAFWNode.h" #include "COLLADAFWUniqueId.h" -extern "C" { #include "BKE_context.h" + #include "DNA_anim_types.h" + #include "DNA_camera_types.h" #include "DNA_light_types.h" #include "DNA_object_types.h" #include "DNA_scene_types.h" -} //#include "ArmatureImporter.h" #include "TransformReader.h" diff --git a/source/blender/io/collada/ArmatureExporter.cpp b/source/blender/io/collada/ArmatureExporter.cpp index 660917c2aa1..fc697e1617b 100644 --- a/source/blender/io/collada/ArmatureExporter.cpp +++ b/source/blender/io/collada/ArmatureExporter.cpp @@ -29,11 +29,8 @@ #include "BKE_action.h" #include "BKE_armature.h" - -extern "C" { #include "BKE_global.h" #include "BKE_mesh.h" -} #include "ED_armature.h" diff --git a/source/blender/io/collada/ArmatureImporter.cpp b/source/blender/io/collada/ArmatureImporter.cpp index 4e9f31182f1..2d5107058fe 100644 --- a/source/blender/io/collada/ArmatureImporter.cpp +++ b/source/blender/io/collada/ArmatureImporter.cpp @@ -25,14 +25,12 @@ #include "COLLADAFWUniqueId.h" -extern "C" { #include "BKE_action.h" #include "BKE_armature.h" #include "BKE_object.h" #include "BLI_listbase.h" #include "BLI_string.h" #include "ED_armature.h" -} #include "DEG_depsgraph.h" diff --git a/source/blender/io/collada/ArmatureImporter.h b/source/blender/io/collada/ArmatureImporter.h index bafa10ca804..7393b882f4b 100644 --- a/source/blender/io/collada/ArmatureImporter.h +++ b/source/blender/io/collada/ArmatureImporter.h @@ -25,7 +25,6 @@ #include "COLLADAFWNode.h" #include "COLLADAFWUniqueId.h" -extern "C" { #include "BKE_context.h" #include "BKE_key.h" @@ -35,7 +34,6 @@ extern "C" { #include "DNA_scene_types.h" #include "ED_armature.h" -} #include "AnimationImporter.h" #include "ExtraTags.h" diff --git a/source/blender/io/collada/BCAnimationCurve.h b/source/blender/io/collada/BCAnimationCurve.h index 71640ff3013..e0216ee6849 100644 --- a/source/blender/io/collada/BCAnimationCurve.h +++ b/source/blender/io/collada/BCAnimationCurve.h @@ -25,14 +25,13 @@ #include "MEM_guardedalloc.h" -extern "C" { #include "BKE_armature.h" #include "BKE_fcurve.h" #include "BKE_material.h" + #include "ED_anim_api.h" #include "ED_keyframes_edit.h" #include "ED_keyframing.h" -} typedef float(TangentPoint)[2]; diff --git a/source/blender/io/collada/BCAnimationSampler.cpp b/source/blender/io/collada/BCAnimationSampler.cpp index 0c19ce9a4c7..fc23a58ccbc 100644 --- a/source/blender/io/collada/BCAnimationSampler.cpp +++ b/source/blender/io/collada/BCAnimationSampler.cpp @@ -27,20 +27,21 @@ #include "ExportSettings.h" #include "collada_utils.h" -extern "C" { #include "BKE_action.h" #include "BKE_constraint.h" #include "BKE_key.h" #include "BKE_lib_id.h" #include "BKE_main.h" #include "BKE_material.h" + #include "BLI_listbase.h" + #include "DNA_anim_types.h" #include "DNA_constraint_types.h" #include "DNA_key_types.h" #include "DNA_scene_types.h" + #include "ED_object.h" -} static std::string EMPTY_STRING; static BCAnimationCurveMap BCEmptyAnimationCurves; diff --git a/source/blender/io/collada/BCAnimationSampler.h b/source/blender/io/collada/BCAnimationSampler.h index 96138d0cbca..3273ac8e0a0 100644 --- a/source/blender/io/collada/BCAnimationSampler.h +++ b/source/blender/io/collada/BCAnimationSampler.h @@ -21,12 +21,12 @@ #include "BCSampleData.h" #include "collada_utils.h" -extern "C" { #include "BKE_action.h" #include "BKE_lib_id.h" + #include "BLI_math_rotation.h" + #include "DNA_action_types.h" -} /* Collection of animation curves */ class BCAnimation { diff --git a/source/blender/io/collada/BCMath.h b/source/blender/io/collada/BCMath.h index 9ecea85b08c..38158751740 100644 --- a/source/blender/io/collada/BCMath.h +++ b/source/blender/io/collada/BCMath.h @@ -23,10 +23,9 @@ #include "BlenderTypes.h" -extern "C" { #include "BKE_object.h" + #include "BLI_math.h" -} class BCQuat { private: diff --git a/source/blender/io/collada/BCSampleData.h b/source/blender/io/collada/BCSampleData.h index 877fb49981a..6f3ca9135b3 100644 --- a/source/blender/io/collada/BCSampleData.h +++ b/source/blender/io/collada/BCSampleData.h @@ -28,15 +28,15 @@ #include "BCSampleData.h" #include "ExportSettings.h" -extern "C" { #include "BKE_object.h" + #include "BLI_math_rotation.h" + #include "DNA_armature_types.h" #include "DNA_camera_types.h" #include "DNA_light_types.h" #include "DNA_material_types.h" #include "DNA_object_types.h" -} typedef std::map BCBoneMatrixMap; diff --git a/source/blender/io/collada/BlenderContext.h b/source/blender/io/collada/BlenderContext.h index 15ebd671b1a..bf6fde134fa 100644 --- a/source/blender/io/collada/BlenderContext.h +++ b/source/blender/io/collada/BlenderContext.h @@ -21,11 +21,6 @@ #ifndef __BLENDERCONTEXT_H__ #define __BLENDERCONTEXT_H__ -#ifdef __cplusplus - -extern "C" { -#endif - #include "BKE_context.h" #include "BKE_main.h" #include "BLI_linklist.h" @@ -35,6 +30,10 @@ extern "C" { #include "DNA_layer_types.h" #include "DNA_object_types.h" +#ifdef __cplusplus +extern "C" { +#endif + static const BC_global_forward_axis BC_DEFAULT_FORWARD = BC_GLOBAL_FORWARD_Y; static const BC_global_up_axis BC_DEFAULT_UP = BC_GLOBAL_UP_Z; diff --git a/source/blender/io/collada/CameraExporter.cpp b/source/blender/io/collada/CameraExporter.cpp index 74862c44270..246a454eb66 100644 --- a/source/blender/io/collada/CameraExporter.cpp +++ b/source/blender/io/collada/CameraExporter.cpp @@ -22,9 +22,8 @@ #include "COLLADASWCamera.h" -extern "C" { #include "DNA_camera_types.h" -} + #include "CameraExporter.h" #include "collada_internal.h" diff --git a/source/blender/io/collada/CameraExporter.h b/source/blender/io/collada/CameraExporter.h index e4df994354c..0dda6392d03 100644 --- a/source/blender/io/collada/CameraExporter.h +++ b/source/blender/io/collada/CameraExporter.h @@ -24,10 +24,8 @@ #include "COLLADASWLibraryCameras.h" #include "COLLADASWStreamWriter.h" -extern "C" { #include "DNA_object_types.h" #include "DNA_scene_types.h" -} #include "DNA_camera_types.h" #include "ExportSettings.h" diff --git a/source/blender/io/collada/ControllerExporter.cpp b/source/blender/io/collada/ControllerExporter.cpp index c26647d4747..1b8c859f443 100644 --- a/source/blender/io/collada/ControllerExporter.cpp +++ b/source/blender/io/collada/ControllerExporter.cpp @@ -29,13 +29,10 @@ #include "BKE_action.h" #include "BKE_armature.h" - -extern "C" { #include "BKE_global.h" #include "BKE_idprop.h" #include "BKE_lib_id.h" #include "BKE_mesh.h" -} #include "ED_armature.h" diff --git a/source/blender/io/collada/DocumentExporter.cpp b/source/blender/io/collada/DocumentExporter.cpp index 7565aa881fd..b890d4cf018 100644 --- a/source/blender/io/collada/DocumentExporter.cpp +++ b/source/blender/io/collada/DocumentExporter.cpp @@ -58,7 +58,6 @@ #include "MEM_guardedalloc.h" -extern "C" { #include "DNA_action_types.h" #include "DNA_anim_types.h" #include "DNA_armature_types.h" @@ -96,13 +95,12 @@ extern "C" { #include "ED_keyframing.h" #ifdef WITH_BUILDINFO -extern char build_commit_date[]; -extern char build_commit_time[]; -extern char build_hash[]; +extern "C" char build_commit_date[]; +extern "C" char build_commit_time[]; +extern "C" char build_hash[]; #endif #include "RNA_access.h" -} #include "DocumentExporter.h" #include "collada_internal.h" diff --git a/source/blender/io/collada/DocumentExporter.h b/source/blender/io/collada/DocumentExporter.h index f024befbd17..1fe52420534 100644 --- a/source/blender/io/collada/DocumentExporter.h +++ b/source/blender/io/collada/DocumentExporter.h @@ -25,9 +25,7 @@ #include "collada.h" #include "collada_utils.h" -extern "C" { #include "DNA_customdata_types.h" -} class DocumentExporter { public: diff --git a/source/blender/io/collada/DocumentImporter.cpp b/source/blender/io/collada/DocumentImporter.cpp index 281786bb45f..2305072a6eb 100644 --- a/source/blender/io/collada/DocumentImporter.cpp +++ b/source/blender/io/collada/DocumentImporter.cpp @@ -45,7 +45,6 @@ #include "MEM_guardedalloc.h" -extern "C" { #include "BLI_fileops.h" #include "BLI_listbase.h" #include "BLI_math.h" @@ -72,7 +71,6 @@ extern "C" { #include "WM_api.h" #include "WM_types.h" -} #include "DEG_depsgraph.h" #include "DEG_depsgraph_build.h" diff --git a/source/blender/io/collada/EffectExporter.cpp b/source/blender/io/collada/EffectExporter.cpp index f21ea57c91c..7f6d3cbdc6f 100644 --- a/source/blender/io/collada/EffectExporter.cpp +++ b/source/blender/io/collada/EffectExporter.cpp @@ -31,7 +31,6 @@ #include "collada_internal.h" #include "collada_utils.h" -extern "C" { #include "DNA_mesh_types.h" #include "DNA_world_types.h" @@ -39,7 +38,6 @@ extern "C" { #include "BKE_customdata.h" #include "BKE_material.h" #include "BKE_mesh.h" -} static std::string getActiveUVLayerName(Object *ob) { diff --git a/source/blender/io/collada/ExportSettings.h b/source/blender/io/collada/ExportSettings.h index 69e260a1e91..477f0b8b678 100644 --- a/source/blender/io/collada/ExportSettings.h +++ b/source/blender/io/collada/ExportSettings.h @@ -21,6 +21,9 @@ #ifndef __EXPORTSETTINGS_H__ #define __EXPORTSETTINGS_H__ +#include "BLI_linklist.h" +#include "BlenderContext.h" + #ifdef __cplusplus # include "BCMath.h" # include @@ -28,9 +31,6 @@ extern "C" { #endif -#include "BLI_linklist.h" -#include "BlenderContext.h" - typedef enum BC_export_mesh_type { BC_MESH_TYPE_VIEW, BC_MESH_TYPE_RENDER, diff --git a/source/blender/io/collada/GeometryExporter.cpp b/source/blender/io/collada/GeometryExporter.cpp index 469d8601a8b..c7fcc51d42f 100644 --- a/source/blender/io/collada/GeometryExporter.cpp +++ b/source/blender/io/collada/GeometryExporter.cpp @@ -29,7 +29,6 @@ #include "DNA_meshdata_types.h" -extern "C" { #include "BLI_utildefines.h" #include "BKE_customdata.h" @@ -37,7 +36,6 @@ extern "C" { #include "BKE_lib_id.h" #include "BKE_material.h" #include "BKE_mesh.h" -} #include "collada_internal.h" #include "collada_utils.h" diff --git a/source/blender/io/collada/ImageExporter.cpp b/source/blender/io/collada/ImageExporter.cpp index 1cd3301b8a8..1c897e37a4a 100644 --- a/source/blender/io/collada/ImageExporter.cpp +++ b/source/blender/io/collada/ImageExporter.cpp @@ -21,7 +21,6 @@ #include "COLLADABUURI.h" #include "COLLADASWImage.h" -extern "C" { #include "DNA_image_types.h" #include "DNA_meshdata_types.h" #include "DNA_texture_types.h" @@ -37,7 +36,6 @@ extern "C" { #include "BLI_string.h" #include "IMB_imbuf_types.h" -} #include "ImageExporter.h" #include "MaterialExporter.h" diff --git a/source/blender/io/collada/InstanceWriter.cpp b/source/blender/io/collada/InstanceWriter.cpp index a0bea16adfb..6c197823ec2 100644 --- a/source/blender/io/collada/InstanceWriter.cpp +++ b/source/blender/io/collada/InstanceWriter.cpp @@ -23,11 +23,10 @@ #include "COLLADASWInstanceMaterial.h" -extern "C" { #include "BKE_customdata.h" #include "BKE_material.h" + #include "DNA_mesh_types.h" -} #include "InstanceWriter.h" #include "collada_internal.h" diff --git a/source/blender/io/collada/MaterialExporter.h b/source/blender/io/collada/MaterialExporter.h index 8b3d1130fe9..babb113567f 100644 --- a/source/blender/io/collada/MaterialExporter.h +++ b/source/blender/io/collada/MaterialExporter.h @@ -27,12 +27,11 @@ #include "COLLADASWLibraryMaterials.h" #include "COLLADASWStreamWriter.h" -extern "C" { #include "BKE_material.h" + #include "DNA_material_types.h" #include "DNA_object_types.h" #include "DNA_scene_types.h" -} #include "ExportSettings.h" #include "GeometryExporter.h" diff --git a/source/blender/io/collada/Materials.h b/source/blender/io/collada/Materials.h index 86fc4c00073..e1d12246a2b 100644 --- a/source/blender/io/collada/Materials.h +++ b/source/blender/io/collada/Materials.h @@ -20,13 +20,11 @@ #include #include -extern "C" { #include "BKE_context.h" #include "BKE_node.h" #include "BLI_listbase.h" #include "DNA_material_types.h" #include "DNA_node_types.h" -} #include "COLLADAFWEffectCommon.h" #include "collada_utils.h" diff --git a/source/blender/io/collada/MeshImporter.cpp b/source/blender/io/collada/MeshImporter.cpp index 6ac87d3d394..6683f07bf65 100644 --- a/source/blender/io/collada/MeshImporter.cpp +++ b/source/blender/io/collada/MeshImporter.cpp @@ -30,7 +30,6 @@ #include "MEM_guardedalloc.h" -extern "C" { #include "BKE_customdata.h" #include "BKE_displist.h" #include "BKE_global.h" @@ -43,7 +42,6 @@ extern "C" { #include "BLI_listbase.h" #include "BLI_math.h" #include "BLI_string.h" -} #include "ArmatureImporter.h" #include "MeshImporter.h" diff --git a/source/blender/io/collada/MeshImporter.h b/source/blender/io/collada/MeshImporter.h index 5ad2fb17fce..2f2a18ff11a 100644 --- a/source/blender/io/collada/MeshImporter.h +++ b/source/blender/io/collada/MeshImporter.h @@ -38,14 +38,13 @@ #include "ArmatureImporter.h" #include "collada_utils.h" -extern "C" { #include "BLI_edgehash.h" + #include "DNA_material_types.h" #include "DNA_mesh_types.h" #include "DNA_meshdata_types.h" #include "DNA_object_types.h" #include "DNA_scene_types.h" -} /* only for ArmatureImporter to "see" MeshImporter::get_object_by_geom_uid */ class MeshImporterBase { diff --git a/source/blender/io/collada/SceneExporter.cpp b/source/blender/io/collada/SceneExporter.cpp index 2f70bc1c26b..1b3bc1b66ea 100644 --- a/source/blender/io/collada/SceneExporter.cpp +++ b/source/blender/io/collada/SceneExporter.cpp @@ -18,13 +18,11 @@ * \ingroup collada */ -extern "C" { #include "BKE_collection.h" #include "BKE_lib_id.h" #include "BKE_object.h" #include "BLI_listbase.h" #include "BLI_utildefines.h" -} #include "BCSampleData.h" #include "SceneExporter.h" diff --git a/source/blender/io/collada/SceneExporter.h b/source/blender/io/collada/SceneExporter.h index 6effb54fd48..3ea6a9fac8e 100644 --- a/source/blender/io/collada/SceneExporter.h +++ b/source/blender/io/collada/SceneExporter.h @@ -25,7 +25,6 @@ #include #include -extern "C" { #include "DNA_action_types.h" #include "DNA_anim_types.h" #include "DNA_armature_types.h" @@ -47,7 +46,6 @@ extern "C" { #include "BLI_fileops.h" #include "BLI_path_util.h" #include "ED_keyframing.h" -} #include "COLLADASWAsset.h" #include "COLLADASWBaseInputElement.h" diff --git a/source/blender/io/collada/collada.cpp b/source/blender/io/collada/collada.cpp index 683e64b2647..bf1ebbfa669 100644 --- a/source/blender/io/collada/collada.cpp +++ b/source/blender/io/collada/collada.cpp @@ -27,7 +27,6 @@ #include "ImportSettings.h" #include "collada.h" -extern "C" { #include "BKE_context.h" #include "BKE_scene.h" #include "DEG_depsgraph.h" @@ -37,6 +36,8 @@ extern "C" { #include "BLI_fileops.h" #include "BLI_linklist.h" +extern "C" { + static void print_import_header(ImportSettings &import_settings) { fprintf(stderr, "+-- Collada Import parameters------\n"); diff --git a/source/blender/io/collada/collada.h b/source/blender/io/collada/collada.h index deadbcffcaf..d8e498ef4b2 100644 --- a/source/blender/io/collada/collada.h +++ b/source/blender/io/collada/collada.h @@ -26,14 +26,14 @@ #include "ExportSettings.h" #include "ImportSettings.h" -#ifdef __cplusplus -extern "C" { -#endif - #include "BLI_linklist.h" #include "BLI_path_util.h" #include "RNA_types.h" +#ifdef __cplusplus +extern "C" { +#endif + struct bContext; /* diff --git a/source/blender/io/collada/collada_utils.cpp b/source/blender/io/collada/collada_utils.cpp index 1df82ed3038..d2e05c7ae5b 100644 --- a/source/blender/io/collada/collada_utils.cpp +++ b/source/blender/io/collada/collada_utils.cpp @@ -30,7 +30,6 @@ #include "MEM_guardedalloc.h" -extern "C" { #include "DNA_armature_types.h" #include "DNA_constraint_types.h" #include "DNA_customdata_types.h" @@ -75,7 +74,6 @@ extern "C" { #if 0 # include "NOD_common.h" #endif -} #include "BlenderContext.h" #include "ExportSettings.h" diff --git a/source/blender/io/collada/collada_utils.h b/source/blender/io/collada/collada_utils.h index 54ba8073679..b1ec2c8b81a 100644 --- a/source/blender/io/collada/collada_utils.h +++ b/source/blender/io/collada/collada_utils.h @@ -33,7 +33,6 @@ #include #include -extern "C" { #include "DNA_anim_types.h" #include "DNA_camera_types.h" #include "DNA_constraint_types.h" @@ -57,7 +56,6 @@ extern "C" { #include "BKE_node.h" #include "BKE_object.h" #include "BKE_scene.h" -} #include "DEG_depsgraph_query.h" diff --git a/source/blender/io/usd/intern/abstract_hierarchy_iterator.cc b/source/blender/io/usd/intern/abstract_hierarchy_iterator.cc index 9d163222863..e382fa6bb1d 100644 --- a/source/blender/io/usd/intern/abstract_hierarchy_iterator.cc +++ b/source/blender/io/usd/intern/abstract_hierarchy_iterator.cc @@ -24,7 +24,6 @@ #include #include -extern "C" { #include "BKE_anim_data.h" #include "BKE_duplilist.h" #include "BKE_key.h" @@ -41,7 +40,6 @@ extern "C" { #include "DNA_particle_types.h" #include "DEG_depsgraph_query.h" -} namespace USD { diff --git a/source/blender/io/usd/intern/usd_capi.cc b/source/blender/io/usd/intern/usd_capi.cc index 60ab3676847..f8e0a03abfa 100644 --- a/source/blender/io/usd/intern/usd_capi.cc +++ b/source/blender/io/usd/intern/usd_capi.cc @@ -26,7 +26,6 @@ #include "MEM_guardedalloc.h" -extern "C" { #include "DEG_depsgraph.h" #include "DEG_depsgraph_build.h" #include "DEG_depsgraph_query.h" @@ -44,7 +43,6 @@ extern "C" { #include "WM_api.h" #include "WM_types.h" -} namespace USD { diff --git a/source/blender/io/usd/intern/usd_hierarchy_iterator.cc b/source/blender/io/usd/intern/usd_hierarchy_iterator.cc index 47f09af7442..56e367dd877 100644 --- a/source/blender/io/usd/intern/usd_hierarchy_iterator.cc +++ b/source/blender/io/usd/intern/usd_hierarchy_iterator.cc @@ -31,7 +31,6 @@ #include -extern "C" { #include "BKE_duplilist.h" #include "BLI_assert.h" @@ -41,7 +40,6 @@ extern "C" { #include "DNA_ID.h" #include "DNA_layer_types.h" #include "DNA_object_types.h" -} namespace USD { diff --git a/source/blender/io/usd/intern/usd_writer_abstract.h b/source/blender/io/usd/intern/usd_writer_abstract.h index cf0f7e9d437..01b53f4c916 100644 --- a/source/blender/io/usd/intern/usd_writer_abstract.h +++ b/source/blender/io/usd/intern/usd_writer_abstract.h @@ -29,10 +29,9 @@ #include -extern "C" { #include "DEG_depsgraph_query.h" + #include "DNA_material_types.h" -} struct Material; struct Object; diff --git a/source/blender/io/usd/intern/usd_writer_camera.cc b/source/blender/io/usd/intern/usd_writer_camera.cc index 9b85d69559c..ea551a43c9f 100644 --- a/source/blender/io/usd/intern/usd_writer_camera.cc +++ b/source/blender/io/usd/intern/usd_writer_camera.cc @@ -22,13 +22,11 @@ #include #include -extern "C" { #include "BKE_camera.h" #include "BLI_assert.h" #include "DNA_camera_types.h" #include "DNA_scene_types.h" -} namespace USD { diff --git a/source/blender/io/usd/intern/usd_writer_hair.cc b/source/blender/io/usd/intern/usd_writer_hair.cc index 9251425c0b8..d38c1032969 100644 --- a/source/blender/io/usd/intern/usd_writer_hair.cc +++ b/source/blender/io/usd/intern/usd_writer_hair.cc @@ -22,11 +22,9 @@ #include #include -extern "C" { #include "BKE_particle.h" #include "DNA_particle_types.h" -} namespace USD { diff --git a/source/blender/io/usd/intern/usd_writer_light.cc b/source/blender/io/usd/intern/usd_writer_light.cc index e13e2c58a79..0ce3ee5f8ce 100644 --- a/source/blender/io/usd/intern/usd_writer_light.cc +++ b/source/blender/io/usd/intern/usd_writer_light.cc @@ -24,13 +24,11 @@ #include #include -extern "C" { #include "BLI_assert.h" #include "BLI_utildefines.h" #include "DNA_light_types.h" #include "DNA_object_types.h" -} namespace USD { diff --git a/source/blender/io/usd/intern/usd_writer_mesh.cc b/source/blender/io/usd/intern/usd_writer_mesh.cc index fa43d80538a..909869d2af1 100644 --- a/source/blender/io/usd/intern/usd_writer_mesh.cc +++ b/source/blender/io/usd/intern/usd_writer_mesh.cc @@ -23,7 +23,6 @@ #include #include -extern "C" { #include "BLI_assert.h" #include "BLI_math_vector.h" @@ -42,7 +41,6 @@ extern "C" { #include "DNA_modifier_types.h" #include "DNA_object_fluidsim_types.h" #include "DNA_particle_types.h" -} namespace USD { diff --git a/source/blender/io/usd/intern/usd_writer_metaball.cc b/source/blender/io/usd/intern/usd_writer_metaball.cc index 25b216d20f3..96bf854d327 100644 --- a/source/blender/io/usd/intern/usd_writer_metaball.cc +++ b/source/blender/io/usd/intern/usd_writer_metaball.cc @@ -23,7 +23,6 @@ #include #include -extern "C" { #include "BLI_assert.h" #include "BKE_displist.h" @@ -34,7 +33,6 @@ extern "C" { #include "DNA_mesh_types.h" #include "DNA_meta_types.h" -} namespace USD { diff --git a/source/blender/io/usd/intern/usd_writer_transform.cc b/source/blender/io/usd/intern/usd_writer_transform.cc index 321b516221a..038f2b17b1a 100644 --- a/source/blender/io/usd/intern/usd_writer_transform.cc +++ b/source/blender/io/usd/intern/usd_writer_transform.cc @@ -22,13 +22,11 @@ #include #include -extern "C" { #include "BKE_object.h" #include "BLI_math_matrix.h" #include "DNA_layer_types.h" -} namespace USD { diff --git a/source/blender/io/usd/usd.h b/source/blender/io/usd/usd.h index 8a5575d53cf..eee98521289 100644 --- a/source/blender/io/usd/usd.h +++ b/source/blender/io/usd/usd.h @@ -20,12 +20,12 @@ #ifndef __USD_H__ #define __USD_H__ +#include "DEG_depsgraph.h" + #ifdef __cplusplus extern "C" { #endif -#include "DEG_depsgraph.h" - struct Scene; struct bContext; diff --git a/source/blender/makesdna/DNA_ID.h b/source/blender/makesdna/DNA_ID.h index 289f8c7a7b9..39f22fb9555 100644 --- a/source/blender/makesdna/DNA_ID.h +++ b/source/blender/makesdna/DNA_ID.h @@ -25,14 +25,13 @@ #ifndef __DNA_ID_H__ #define __DNA_ID_H__ +#include "DNA_defs.h" #include "DNA_listBase.h" #ifdef __cplusplus extern "C" { #endif -#include "DNA_defs.h" - struct FileData; struct GHash; struct GPUTexture; diff --git a/source/blender/makesdna/DNA_action_types.h b/source/blender/makesdna/DNA_action_types.h index 40c25d39cad..c95a701a78a 100644 --- a/source/blender/makesdna/DNA_action_types.h +++ b/source/blender/makesdna/DNA_action_types.h @@ -28,16 +28,16 @@ #ifndef __DNA_ACTION_TYPES_H__ #define __DNA_ACTION_TYPES_H__ -#ifdef __cplusplus -extern "C" { -#endif - #include "DNA_ID.h" #include "DNA_listBase.h" #include "DNA_userdef_types.h" /* ThemeWireColor */ #include "DNA_vec_types.h" #include "DNA_view2d_types.h" +#ifdef __cplusplus +extern "C" { +#endif + struct Collection; struct GHash; struct Object; diff --git a/source/blender/makesdna/DNA_anim_types.h b/source/blender/makesdna/DNA_anim_types.h index fbffa039ee9..6a024ec9e7e 100644 --- a/source/blender/makesdna/DNA_anim_types.h +++ b/source/blender/makesdna/DNA_anim_types.h @@ -24,15 +24,15 @@ #ifndef __DNA_ANIM_TYPES_H__ #define __DNA_ANIM_TYPES_H__ -#ifdef __cplusplus -extern "C" { -#endif - #include "DNA_ID.h" #include "DNA_action_types.h" #include "DNA_curve_types.h" #include "DNA_listBase.h" +#ifdef __cplusplus +extern "C" { +#endif + /* ************************************************ */ /* F-Curve DataTypes */ diff --git a/source/blender/makesdna/DNA_customdata_types.h b/source/blender/makesdna/DNA_customdata_types.h index 5ee16c2631d..e99d7fd5609 100644 --- a/source/blender/makesdna/DNA_customdata_types.h +++ b/source/blender/makesdna/DNA_customdata_types.h @@ -26,12 +26,12 @@ #ifndef __DNA_CUSTOMDATA_TYPES_H__ #define __DNA_CUSTOMDATA_TYPES_H__ +#include "DNA_defs.h" + #ifdef __cplusplus extern "C" { #endif -#include "DNA_defs.h" - /** Descriptor and storage for a custom data layer. */ typedef struct CustomDataLayer { /** Type of data in layer. */ diff --git a/source/blender/makesdna/DNA_defaults.h b/source/blender/makesdna/DNA_defaults.h index 9b4a05034df..ca5ac649e33 100644 --- a/source/blender/makesdna/DNA_defaults.h +++ b/source/blender/makesdna/DNA_defaults.h @@ -29,12 +29,12 @@ #include "BLI_utildefines.h" +#include "dna_type_offsets.h" + #ifdef __cplusplus extern "C" { #endif -#include "dna_type_offsets.h" - extern const void *DNA_default_table[SDNA_TYPE_MAX]; char *_DNA_struct_default_alloc_impl(const char *data_src, size_t size, const char *alloc_str); diff --git a/source/blender/makesdna/DNA_layer_types.h b/source/blender/makesdna/DNA_layer_types.h index ef129a92699..6348dc5f03d 100644 --- a/source/blender/makesdna/DNA_layer_types.h +++ b/source/blender/makesdna/DNA_layer_types.h @@ -21,13 +21,13 @@ #ifndef __DNA_LAYER_TYPES_H__ #define __DNA_LAYER_TYPES_H__ +#include "DNA_freestyle_types.h" +#include "DNA_listBase.h" + #ifdef __cplusplus extern "C" { #endif -#include "DNA_freestyle_types.h" -#include "DNA_listBase.h" - /** * Render-passes for EEVEE. * #ViewLayerEEVEE.render_passes diff --git a/source/blender/makesdna/DNA_movieclip_types.h b/source/blender/makesdna/DNA_movieclip_types.h index 557e069a4a6..94d11095108 100644 --- a/source/blender/makesdna/DNA_movieclip_types.h +++ b/source/blender/makesdna/DNA_movieclip_types.h @@ -24,14 +24,14 @@ #ifndef __DNA_MOVIECLIP_TYPES_H__ #define __DNA_MOVIECLIP_TYPES_H__ -#ifdef __cplusplus -extern "C" { -#endif - #include "DNA_ID.h" #include "DNA_color_types.h" /* for color management */ #include "DNA_tracking_types.h" +#ifdef __cplusplus +extern "C" { +#endif + struct AnimData; struct ImBuf; struct MovieClipProxy; diff --git a/source/blender/makesdna/DNA_object_force_types.h b/source/blender/makesdna/DNA_object_force_types.h index daa3a629d27..73cfcddf984 100644 --- a/source/blender/makesdna/DNA_object_force_types.h +++ b/source/blender/makesdna/DNA_object_force_types.h @@ -24,13 +24,13 @@ #ifndef __DNA_OBJECT_FORCE_TYPES_H__ #define __DNA_OBJECT_FORCE_TYPES_H__ +#include "DNA_defs.h" +#include "DNA_listBase.h" + #ifdef __cplusplus extern "C" { #endif -#include "DNA_defs.h" -#include "DNA_listBase.h" - /* pd->forcefield: Effector Fields types */ typedef enum ePFieldType { /** (this is used for general effector weight). */ diff --git a/source/blender/makesdna/DNA_scene_types.h b/source/blender/makesdna/DNA_scene_types.h index 357c1158b47..3ed9ce1ea06 100644 --- a/source/blender/makesdna/DNA_scene_types.h +++ b/source/blender/makesdna/DNA_scene_types.h @@ -29,10 +29,6 @@ /* XXX, temp feature - campbell */ #define DURIAN_CAMERA_SWITCH -#ifdef __cplusplus -extern "C" { -#endif - #include "DNA_ID.h" #include "DNA_collection_types.h" #include "DNA_color_types.h" /* color management */ @@ -46,6 +42,10 @@ extern "C" { #include "DNA_vec_types.h" #include "DNA_view3d_types.h" +#ifdef __cplusplus +extern "C" { +#endif + struct AnimData; struct Brush; struct Collection; diff --git a/source/blender/physics/intern/BPH_mass_spring.cpp b/source/blender/physics/intern/BPH_mass_spring.cpp index 76f0f8c8b55..6a951519730 100644 --- a/source/blender/physics/intern/BPH_mass_spring.cpp +++ b/source/blender/physics/intern/BPH_mass_spring.cpp @@ -23,7 +23,6 @@ #include "MEM_guardedalloc.h" -extern "C" { #include "DNA_cloth_types.h" #include "DNA_meshdata_types.h" #include "DNA_modifier_types.h" @@ -38,7 +37,6 @@ extern "C" { #include "BKE_cloth.h" #include "BKE_collision.h" #include "BKE_effect.h" -} #include "BPH_mass_spring.h" #include "implicit.h" diff --git a/source/blender/physics/intern/hair_volume.cpp b/source/blender/physics/intern/hair_volume.cpp index b8783c51fe8..6246bf54f75 100644 --- a/source/blender/physics/intern/hair_volume.cpp +++ b/source/blender/physics/intern/hair_volume.cpp @@ -23,14 +23,12 @@ #include "MEM_guardedalloc.h" -extern "C" { #include "BLI_math.h" #include "BLI_utildefines.h" #include "DNA_texture_types.h" #include "BKE_effect.h" -} #include "eigen_utils.h" #include "implicit.h" diff --git a/source/blender/python/BPY_extern.h b/source/blender/python/BPY_extern.h index d4e57f0beb6..18d4c7da534 100644 --- a/source/blender/python/BPY_extern.h +++ b/source/blender/python/BPY_extern.h @@ -35,12 +35,12 @@ struct bContext; struct bContextDataResult; struct bPythonConstraint; /* DNA_constraint_types.h */ +#include "BLI_utildefines.h" + #ifdef __cplusplus extern "C" { #endif -#include "BLI_utildefines.h" - void BPY_pyconstraint_exec(struct bPythonConstraint *con, struct bConstraintOb *cob, struct ListBase *targets); diff --git a/source/blender/render/extern/include/RE_pipeline.h b/source/blender/render/extern/include/RE_pipeline.h index 54296e16834..b963021dfd9 100644 --- a/source/blender/render/extern/include/RE_pipeline.h +++ b/source/blender/render/extern/include/RE_pipeline.h @@ -40,6 +40,10 @@ struct StampData; struct ViewLayer; struct bMovieHandle; +#ifdef __cplusplus +extern "C" { +#endif + /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ /* this include is what is exposed of render to outside world */ /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ @@ -386,4 +390,8 @@ struct RenderView *RE_RenderViewGetByName(struct RenderResult *res, const char * RenderResult *RE_DuplicateRenderResult(RenderResult *rr); +#ifdef __cplusplus +} +#endif + #endif /* __RE_PIPELINE_H__ */ diff --git a/source/blender/render/extern/include/RE_shader_ext.h b/source/blender/render/extern/include/RE_shader_ext.h index 792b2b7e071..f69ae4dfd5c 100644 --- a/source/blender/render/extern/include/RE_shader_ext.h +++ b/source/blender/render/extern/include/RE_shader_ext.h @@ -23,6 +23,10 @@ #ifndef __RE_SHADER_EXT_H__ #define __RE_SHADER_EXT_H__ +#ifdef __cplusplus +extern "C" { +#endif + /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ /* this include is for texture exports */ /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ @@ -75,4 +79,8 @@ int multitex_nodes(struct Tex *tex, struct MTex *mtex, struct ImagePool *pool); +#ifdef __cplusplus +} +#endif + #endif /* __RE_SHADER_EXT_H__ */ diff --git a/source/blender/windowmanager/WM_types.h b/source/blender/windowmanager/WM_types.h index 7ce34dd1af4..4acce793707 100644 --- a/source/blender/windowmanager/WM_types.h +++ b/source/blender/windowmanager/WM_types.h @@ -109,10 +109,6 @@ #ifndef __WM_TYPES_H__ #define __WM_TYPES_H__ -#ifdef __cplusplus -extern "C" { -#endif - struct ID; struct ImBuf; struct bContext; @@ -133,6 +129,10 @@ struct wmWindowManager; /* Include external gizmo API's */ #include "gizmo/WM_gizmo_api.h" +#ifdef __cplusplus +extern "C" { +#endif + typedef struct wmGenericUserData { void *data; /** When NULL, use #MEM_freeN. */ -- cgit v1.2.3