From 3ce4a58aa90d93d1d0f1ec5dcc63a482d1b1af78 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 18 Jun 2015 06:11:02 +1000 Subject: [PATCH] Cleanup: duplicate includes --- source/blender/blenkernel/intern/appdir.c | 3 +-- source/blender/blenloader/intern/versioning_270.c | 3 --- source/blender/compositor/intern/COM_ExecutionGroup.cpp | 1 - .../blender/compositor/nodes/COM_PlaneTrackDeformNode.h | 1 - source/blender/editors/space_info/info_draw.c | 2 +- source/blender/imbuf/intern/IMB_anim.h | 6 +----- source/blender/imbuf/intern/anim_movie.c | 9 ++------- source/blender/imbuf/intern/indexer.c | 1 - source/blender/makesrna/intern/rna_brush.c | 2 -- source/blender/makesrna/intern/rna_curve.c | 5 ----- source/blender/makesrna/intern/rna_image_api.c | 1 - source/blender/makesrna/intern/rna_key.c | 1 - source/blender/makesrna/intern/rna_mask.c | 2 -- source/blender/makesrna/intern/rna_mesh.c | 1 - source/blender/makesrna/intern/rna_nodetree.c | 3 --- source/blender/makesrna/intern/rna_object.c | 2 -- source/blender/makesrna/intern/rna_pose.c | 2 -- source/blender/makesrna/intern/rna_rna.c | 1 - source/blender/makesrna/intern/rna_scene.c | 9 --------- source/blender/makesrna/intern/rna_sequencer.c | 1 - source/blender/makesrna/intern/rna_sequencer_api.c | 2 -- source/blender/makesrna/intern/rna_space.c | 4 ---- source/blender/makesrna/intern/rna_userdef.c | 3 --- source/blender/nodes/texture/node_texture_util.h | 2 -- source/blender/python/generic/blf_py_api.c | 2 +- source/blender/python/generic/idprop_py_api.c | 2 +- source/blender/python/generic/py_capi_utils.c | 2 +- source/blender/python/intern/bpy_interface.c | 1 - source/blender/python/intern/bpy_rna.c | 4 ---- source/blender/python/mathutils/mathutils.c | 2 +- 30 files changed, 9 insertions(+), 71 deletions(-) diff --git a/source/blender/blenkernel/intern/appdir.c b/source/blender/blenkernel/intern/appdir.c index b1b32e75f59..233186993db 100644 --- a/source/blender/blenkernel/intern/appdir.c +++ b/source/blender/blenkernel/intern/appdir.c @@ -32,12 +32,11 @@ #include "BLI_fileops.h" #include "BLI_path_util.h" +#include "BKE_blender.h" /* BLENDER_VERSION */ #include "BKE_appdir.h" /* own include */ #include "GHOST_Path-api.h" -#include "../blenkernel/BKE_blender.h" /* BLENDER_VERSION, bad level include (no function call) */ - #include "MEM_guardedalloc.h" #ifdef WIN32 diff --git a/source/blender/blenloader/intern/versioning_270.c b/source/blender/blenloader/intern/versioning_270.c index 37c255620d9..6ab655e9b45 100644 --- a/source/blender/blenloader/intern/versioning_270.c +++ b/source/blender/blenloader/intern/versioning_270.c @@ -27,7 +27,6 @@ #include "BLI_utildefines.h" #include "BLI_compiler_attrs.h" -#include "BLI_string.h" /* for MinGW32 definition of NULL, could use BLI_blenlib.h instead too */ #include @@ -49,7 +48,6 @@ #include "DNA_particle_types.h" #include "DNA_linestyle_types.h" #include "DNA_actuator_types.h" -#include "DNA_camera_types.h" #include "DNA_view3d_types.h" #include "DNA_genfile.h" @@ -60,7 +58,6 @@ #include "BKE_scene.h" #include "BKE_sequencer.h" #include "BKE_screen.h" -#include "BKE_sequencer.h" #include "BLI_math.h" #include "BLI_listbase.h" diff --git a/source/blender/compositor/intern/COM_ExecutionGroup.cpp b/source/blender/compositor/intern/COM_ExecutionGroup.cpp index 74c1128a37e..5cb757d7dcb 100644 --- a/source/blender/compositor/intern/COM_ExecutionGroup.cpp +++ b/source/blender/compositor/intern/COM_ExecutionGroup.cpp @@ -32,7 +32,6 @@ #include "COM_ExecutionSystem.h" #include "COM_ReadBufferOperation.h" #include "COM_WriteBufferOperation.h" -#include "COM_ReadBufferOperation.h" #include "COM_WorkScheduler.h" #include "COM_ViewerOperation.h" #include "COM_ChunkOrder.h" diff --git a/source/blender/compositor/nodes/COM_PlaneTrackDeformNode.h b/source/blender/compositor/nodes/COM_PlaneTrackDeformNode.h index 71e6ab12dfc..653100ce6a4 100644 --- a/source/blender/compositor/nodes/COM_PlaneTrackDeformNode.h +++ b/source/blender/compositor/nodes/COM_PlaneTrackDeformNode.h @@ -20,7 +20,6 @@ */ #include "COM_Node.h" -#include "DNA_node_types.h" extern "C" { # include "DNA_movieclip_types.h" diff --git a/source/blender/editors/space_info/info_draw.c b/source/blender/editors/space_info/info_draw.c index e2895109b48..cd424f45842 100644 --- a/source/blender/editors/space_info/info_draw.c +++ b/source/blender/editors/space_info/info_draw.c @@ -50,7 +50,7 @@ #include "UI_view2d.h" #include "info_intern.h" -#include "../space_info/textview.h" +#include "textview.h" /* complicates things a bit, so leaving in old simple code */ #define USE_INFO_NEWLINE diff --git a/source/blender/imbuf/intern/IMB_anim.h b/source/blender/imbuf/intern/IMB_anim.h index 1fc43e22f68..690ec813407 100644 --- a/source/blender/imbuf/intern/IMB_anim.h +++ b/source/blender/imbuf/intern/IMB_anim.h @@ -79,11 +79,7 @@ #endif #ifdef WITH_REDCODE -# ifdef _WIN32 /* on windows we use the one in extern instead */ -# include "libredcode/format.h" -# else -# include "libredcode/format.h" -# endif +# include "libredcode/format.h" #endif #include "IMB_imbuf_types.h" diff --git a/source/blender/imbuf/intern/anim_movie.c b/source/blender/imbuf/intern/anim_movie.c index 2c8431d25ea..e2d56d29726 100644 --- a/source/blender/imbuf/intern/anim_movie.c +++ b/source/blender/imbuf/intern/anim_movie.c @@ -99,13 +99,8 @@ #endif //WITH_FFMPEG #ifdef WITH_REDCODE -#ifdef _WIN32 /* on windows we use the ones in extern instead */ -#include "libredcode/format.h" -#include "libredcode/codec.h" -#else -#include "libredcode/format.h" -#include "libredcode/codec.h" -#endif +# include "libredcode/format.h" +# include "libredcode/codec.h" #endif #include "IMB_colormanagement.h" diff --git a/source/blender/imbuf/intern/indexer.c b/source/blender/imbuf/intern/indexer.c index 0509dea89d5..ac57b095800 100644 --- a/source/blender/imbuf/intern/indexer.c +++ b/source/blender/imbuf/intern/indexer.c @@ -41,7 +41,6 @@ #include "IMB_anim.h" #include "imbuf.h" -#include "MEM_guardedalloc.h" #include "BKE_global.h" #ifdef WITH_AVI diff --git a/source/blender/makesrna/intern/rna_brush.c b/source/blender/makesrna/intern/rna_brush.c index e9e4282772d..b03b099048f 100644 --- a/source/blender/makesrna/intern/rna_brush.c +++ b/source/blender/makesrna/intern/rna_brush.c @@ -111,8 +111,6 @@ EnumPropertyItem brush_image_tool_items[] = { #include "MEM_guardedalloc.h" -#include "DNA_object_types.h" - #include "RNA_access.h" #include "BKE_texture.h" diff --git a/source/blender/makesrna/intern/rna_curve.c b/source/blender/makesrna/intern/rna_curve.c index 9a9ac28a7fd..fc028a46b78 100644 --- a/source/blender/makesrna/intern/rna_curve.c +++ b/source/blender/makesrna/intern/rna_curve.c @@ -46,9 +46,6 @@ #include "WM_types.h" -#include "BKE_curve.h" -#include "ED_curve.h" - #ifndef RNA_RUNTIME static EnumPropertyItem beztriple_handle_type_items[] = { {HD_FREE, "FREE", 0, "Free", ""}, @@ -124,8 +121,6 @@ static const EnumPropertyItem curve2d_fill_mode_items[] = { #ifdef RNA_RUNTIME -#include "BLI_math.h" - #include "DNA_object_types.h" #include "BKE_curve.h" diff --git a/source/blender/makesrna/intern/rna_image_api.c b/source/blender/makesrna/intern/rna_image_api.c index 945359515ab..c3c152a10b6 100644 --- a/source/blender/makesrna/intern/rna_image_api.c +++ b/source/blender/makesrna/intern/rna_image_api.c @@ -56,7 +56,6 @@ #include "IMB_imbuf.h" #include "IMB_colormanagement.h" -#include "BIF_gl.h" #include "GPU_draw.h" #include "GPU_debug.h" diff --git a/source/blender/makesrna/intern/rna_key.c b/source/blender/makesrna/intern/rna_key.c index 249d132068c..04cba835ae2 100644 --- a/source/blender/makesrna/intern/rna_key.c +++ b/source/blender/makesrna/intern/rna_key.c @@ -48,7 +48,6 @@ #include #include "DNA_object_types.h" -#include "DNA_scene_types.h" #include "BKE_animsys.h" #include "BKE_depsgraph.h" diff --git a/source/blender/makesrna/intern/rna_mask.c b/source/blender/makesrna/intern/rna_mask.c index 4144872a637..b660236ea4f 100644 --- a/source/blender/makesrna/intern/rna_mask.c +++ b/source/blender/makesrna/intern/rna_mask.c @@ -52,12 +52,10 @@ #ifdef RNA_RUNTIME -#include "DNA_mask_types.h" #include "DNA_movieclip_types.h" #include "BKE_depsgraph.h" #include "BKE_mask.h" -#include "BKE_tracking.h" #include "BLI_math.h" diff --git a/source/blender/makesrna/intern/rna_mesh.c b/source/blender/makesrna/intern/rna_mesh.c index d51ec2b3a70..ec64aa38275 100644 --- a/source/blender/makesrna/intern/rna_mesh.c +++ b/source/blender/makesrna/intern/rna_mesh.c @@ -75,7 +75,6 @@ EnumPropertyItem mesh_delimit_mode_items[] = { #include "ED_mesh.h" /* XXX Bad level call */ #include "WM_api.h" -#include "WM_types.h" #include "rna_mesh_utils.h" diff --git a/source/blender/makesrna/intern/rna_nodetree.c b/source/blender/makesrna/intern/rna_nodetree.c index d0cb0b990ef..19db101b32b 100644 --- a/source/blender/makesrna/intern/rna_nodetree.c +++ b/source/blender/makesrna/intern/rna_nodetree.c @@ -30,7 +30,6 @@ #include "BLI_listbase.h" #include "BLI_math.h" -#include "BLI_string.h" #include "BLI_utildefines.h" #include "BLF_translation.h" @@ -39,7 +38,6 @@ #include "DNA_mesh_types.h" #include "DNA_node_types.h" #include "DNA_object_types.h" -#include "DNA_scene_types.h" #include "DNA_text_types.h" #include "DNA_texture_types.h" @@ -48,7 +46,6 @@ #include "BKE_node.h" #include "BKE_image.h" #include "BKE_texture.h" -#include "BKE_idprop.h" #include "RNA_access.h" #include "RNA_define.h" diff --git a/source/blender/makesrna/intern/rna_object.c b/source/blender/makesrna/intern/rna_object.c index 2ef5c6ec12e..c6a6136d90d 100644 --- a/source/blender/makesrna/intern/rna_object.c +++ b/source/blender/makesrna/intern/rna_object.c @@ -46,7 +46,6 @@ #include "BKE_paint.h" #include "BKE_editmesh.h" #include "BKE_group.h" /* needed for BKE_group_object_exists() */ -#include "BKE_object.h" /* Needed for BKE_object_matrix_local_get() */ #include "BKE_object_deform.h" #include "RNA_access.h" @@ -202,7 +201,6 @@ EnumPropertyItem object_axis_unsigned_items[] = { #include "BKE_scene.h" #include "BKE_deform.h" -#include "ED_mesh.h" #include "ED_object.h" #include "ED_particle.h" #include "ED_curve.h" diff --git a/source/blender/makesrna/intern/rna_pose.c b/source/blender/makesrna/intern/rna_pose.c index 3ff51423e9a..afbb97f519d 100644 --- a/source/blender/makesrna/intern/rna_pose.c +++ b/source/blender/makesrna/intern/rna_pose.c @@ -109,8 +109,6 @@ EnumPropertyItem color_sets_items[] = { #include "ED_object.h" #include "ED_armature.h" -#include "MEM_guardedalloc.h" - #include "WM_api.h" #include "RNA_access.h" diff --git a/source/blender/makesrna/intern/rna_rna.c b/source/blender/makesrna/intern/rna_rna.c index 42e231fa76f..4650e27f63e 100644 --- a/source/blender/makesrna/intern/rna_rna.c +++ b/source/blender/makesrna/intern/rna_rna.c @@ -105,7 +105,6 @@ EnumPropertyItem property_unit_items[] = { #ifdef RNA_RUNTIME #include "MEM_guardedalloc.h" -#include "BLI_utildefines.h" #include "BLI_ghash.h" /* Struct */ diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c index 87118e257b8..0986c50e8e4 100644 --- a/source/blender/makesrna/intern/rna_scene.c +++ b/source/blender/makesrna/intern/rna_scene.c @@ -42,10 +42,8 @@ #include "BLF_translation.h" -#include "BKE_freestyle.h" #include "BKE_editmesh.h" #include "BKE_paint.h" -#include "BKE_scene.h" #include "GPU_extensions.h" @@ -407,8 +405,6 @@ EnumPropertyItem stereo3d_interlace_type_items[] = { #include "MEM_guardedalloc.h" -#include "BLI_threads.h" - #include "BKE_brush.h" #include "BKE_context.h" #include "BKE_global.h" @@ -418,7 +414,6 @@ EnumPropertyItem stereo3d_interlace_type_items[] = { #include "BKE_pointcache.h" #include "BKE_scene.h" #include "BKE_depsgraph.h" -#include "BKE_image.h" #include "BKE_mesh.h" #include "BKE_sound.h" #include "BKE_screen.h" @@ -426,8 +421,6 @@ EnumPropertyItem stereo3d_interlace_type_items[] = { #include "BKE_animsys.h" #include "BKE_freestyle.h" -#include "WM_api.h" - #include "ED_info.h" #include "ED_node.h" #include "ED_view3d.h" @@ -435,8 +428,6 @@ EnumPropertyItem stereo3d_interlace_type_items[] = { #include "ED_keyframing.h" #include "ED_image.h" -#include "RE_engine.h" - #ifdef WITH_FREESTYLE #include "FRS_freestyle.h" #endif diff --git a/source/blender/makesrna/intern/rna_sequencer.c b/source/blender/makesrna/intern/rna_sequencer.c index df996c8f31a..d62509e5ab5 100644 --- a/source/blender/makesrna/intern/rna_sequencer.c +++ b/source/blender/makesrna/intern/rna_sequencer.c @@ -75,7 +75,6 @@ EnumPropertyItem sequence_modifier_type_items[] = { #include "BKE_idprop.h" #include "WM_api.h" -#include "WM_types.h" #include "IMB_imbuf.h" diff --git a/source/blender/makesrna/intern/rna_sequencer_api.c b/source/blender/makesrna/intern/rna_sequencer_api.c index 44169fa641e..5e9866fa73e 100644 --- a/source/blender/makesrna/intern/rna_sequencer_api.c +++ b/source/blender/makesrna/intern/rna_sequencer_api.c @@ -42,8 +42,6 @@ //#include "DNA_anim_types.h" #include "DNA_image_types.h" -#include "DNA_scene_types.h" -#include "DNA_sequence_types.h" #include "DNA_mask_types.h" #include "DNA_sound_types.h" diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c index 8cc6ddcf23a..8de81e4f3c7 100644 --- a/source/blender/makesrna/intern/rna_space.c +++ b/source/blender/makesrna/intern/rna_space.c @@ -35,7 +35,6 @@ #include "BKE_key.h" #include "BKE_movieclip.h" #include "BKE_node.h" -#include "BKE_screen.h" #include "DNA_action_types.h" #include "DNA_key_types.h" @@ -58,8 +57,6 @@ #include "RE_engine.h" #include "RE_pipeline.h" -#include "ED_fileselect.h" - #include "RNA_enum_types.h" @@ -225,7 +222,6 @@ static EnumPropertyItem buttons_texture_context_items[] = { #ifdef RNA_RUNTIME #include "DNA_anim_types.h" -#include "DNA_mask_types.h" #include "DNA_scene_types.h" #include "DNA_screen_types.h" #include "DNA_userdef_types.h" diff --git a/source/blender/makesrna/intern/rna_userdef.c b/source/blender/makesrna/intern/rna_userdef.c index b4f67630ffd..9123a0682e6 100644 --- a/source/blender/makesrna/intern/rna_userdef.c +++ b/source/blender/makesrna/intern/rna_userdef.c @@ -87,7 +87,6 @@ EnumPropertyItem navigation_mode_items[] = { #include "DNA_screen_types.h" #include "BKE_blender.h" -#include "BKE_DerivedMesh.h" #include "BKE_depsgraph.h" #include "BKE_global.h" #include "BKE_main.h" @@ -105,8 +104,6 @@ EnumPropertyItem navigation_mode_items[] = { #include "CCL_api.h" -#include "BKE_addon.h" - #ifdef WITH_SDL_DYNLOAD # include "sdlew.h" #endif diff --git a/source/blender/nodes/texture/node_texture_util.h b/source/blender/nodes/texture/node_texture_util.h index eb81bcd6949..2c5ecfdae0d 100644 --- a/source/blender/nodes/texture/node_texture_util.h +++ b/source/blender/nodes/texture/node_texture_util.h @@ -67,8 +67,6 @@ #include "node_util.h" #include "NOD_texture.h" -#include "NOD_texture.h" - #include "BLF_translation.h" #include "IMB_imbuf_types.h" diff --git a/source/blender/python/generic/blf_py_api.c b/source/blender/python/generic/blf_py_api.c index ed1ac7ceed9..5364c3bbb9e 100644 --- a/source/blender/python/generic/blf_py_api.c +++ b/source/blender/python/generic/blf_py_api.c @@ -33,7 +33,7 @@ #include "BLI_utildefines.h" -#include "../generic/python_utildefines.h" +#include "python_utildefines.h" PyDoc_STRVAR(py_blf_position_doc, diff --git a/source/blender/python/generic/idprop_py_api.c b/source/blender/python/generic/idprop_py_api.c index 1f35572a483..30e0ccdb106 100644 --- a/source/blender/python/generic/idprop_py_api.c +++ b/source/blender/python/generic/idprop_py_api.c @@ -41,7 +41,7 @@ #include "py_capi_utils.h" #endif -#include "../generic/python_utildefines.h" +#include "python_utildefines.h" /*********************** ID Property Main Wrapper Stuff ***************/ diff --git a/source/blender/python/generic/py_capi_utils.c b/source/blender/python/generic/py_capi_utils.c index 6443c65a50a..1b72928b26e 100644 --- a/source/blender/python/generic/py_capi_utils.c +++ b/source/blender/python/generic/py_capi_utils.c @@ -37,7 +37,7 @@ #include "py_capi_utils.h" -#include "../generic/python_utildefines.h" +#include "python_utildefines.h" /* only for BLI_strncpy_wchar_from_utf8, should replace with py funcs but too late in release now */ #include "BLI_string_utf8.h" diff --git a/source/blender/python/intern/bpy_interface.c b/source/blender/python/intern/bpy_interface.c index 2c893c37bd6..7e5ad00159e 100644 --- a/source/blender/python/intern/bpy_interface.c +++ b/source/blender/python/intern/bpy_interface.c @@ -788,7 +788,6 @@ int BPY_context_member_get(bContext *C, const char *member, bContextDataResult * } #ifdef WITH_PYTHON_MODULE -#include "BLI_fileops.h" /* TODO, reloading the module isn't functional at the moment. */ static void bpy_module_free(void *mod); diff --git a/source/blender/python/intern/bpy_rna.c b/source/blender/python/intern/bpy_rna.c index 3f6ba4cd21c..d15e3b36ced 100644 --- a/source/blender/python/intern/bpy_rna.c +++ b/source/blender/python/intern/bpy_rna.c @@ -52,10 +52,6 @@ #include "bpy_rna_callback.h" #include "bpy_intern_string.h" -#ifdef USE_PYRNA_INVALIDATE_WEAKREF -# include "MEM_guardedalloc.h" -#endif - #ifdef USE_PYRNA_INVALIDATE_WEAKREF # include "BLI_ghash.h" #endif diff --git a/source/blender/python/mathutils/mathutils.c b/source/blender/python/mathutils/mathutils.c index 9ec5e90a493..361fbc8a005 100644 --- a/source/blender/python/mathutils/mathutils.c +++ b/source/blender/python/mathutils/mathutils.c @@ -110,7 +110,7 @@ Py_hash_t mathutils_array_hash(const float *array, size_t array_len) return x; } -/* helper functionm returns length of the 'value', -1 on error */ +/* helper function returns length of the 'value', -1 on error */ int mathutils_array_parse(float *array, int array_min, int array_max, PyObject *value, const char *error_prefix) { const int flag = array_max;