Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2019-01-26 12:41:52 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-01-26 13:20:25 +0300
commit1e4aab36c237b751c23be161217d989472bfaf20 (patch)
treeaad83d43f5b0cc531623f1351abeaff063b3b72f /source
parent19b5f5493cd6a9b60486d570b6a50c7a42a96ae0 (diff)
Cleanup: remove redundant BKE/BLI/BIF headers
Diffstat (limited to 'source')
-rw-r--r--source/blender/blenfont/intern/blf_dir.c2
-rw-r--r--source/blender/blenfont/intern/blf_font.c2
-rw-r--r--source/blender/blenfont/intern/blf_font_i18n.c3
-rw-r--r--source/blender/blenfont/intern/blf_glyph.c1
-rw-r--r--source/blender/blenkernel/intern/CCGSubSurf.c1
-rw-r--r--source/blender/blenkernel/intern/action.c3
-rw-r--r--source/blender/blenkernel/intern/anim.c2
-rw-r--r--source/blender/blenkernel/intern/armature.c2
-rw-r--r--source/blender/blenkernel/intern/armature_update.c1
-rw-r--r--source/blender/blenkernel/intern/blender.c2
-rw-r--r--source/blender/blenkernel/intern/blender_copybuffer.c1
-rw-r--r--source/blender/blenkernel/intern/blender_undo.c1
-rw-r--r--source/blender/blenkernel/intern/brush.c2
-rw-r--r--source/blender/blenkernel/intern/camera.c2
-rw-r--r--source/blender/blenkernel/intern/cdderivedmesh.c3
-rw-r--r--source/blender/blenkernel/intern/collection.c1
-rw-r--r--source/blender/blenkernel/intern/curve.c3
-rw-r--r--source/blender/blenkernel/intern/customdata.c2
-rw-r--r--source/blender/blenkernel/intern/data_transfer.c2
-rw-r--r--source/blender/blenkernel/intern/displist.c2
-rw-r--r--source/blender/blenkernel/intern/dynamicpaint.c1
-rw-r--r--source/blender/blenkernel/intern/editmesh_cache.c1
-rw-r--r--source/blender/blenkernel/intern/effect.c1
-rw-r--r--source/blender/blenkernel/intern/fcurve.c2
-rw-r--r--source/blender/blenkernel/intern/gpencil.c5
-rw-r--r--source/blender/blenkernel/intern/gpencil_modifier.c1
-rw-r--r--source/blender/blenkernel/intern/image.c2
-rw-r--r--source/blender/blenkernel/intern/key.c2
-rw-r--r--source/blender/blenkernel/intern/lamp.c2
-rw-r--r--source/blender/blenkernel/intern/lattice.c2
-rw-r--r--source/blender/blenkernel/intern/layer.c2
-rw-r--r--source/blender/blenkernel/intern/layer_utils.c1
-rw-r--r--source/blender/blenkernel/intern/library.c3
-rw-r--r--source/blender/blenkernel/intern/library_idmap.c1
-rw-r--r--source/blender/blenkernel/intern/library_query.c1
-rw-r--r--source/blender/blenkernel/intern/lightprobe.c2
-rw-r--r--source/blender/blenkernel/intern/material.c4
-rw-r--r--source/blender/blenkernel/intern/mball.c3
-rw-r--r--source/blender/blenkernel/intern/mball_tessellate.c1
-rw-r--r--source/blender/blenkernel/intern/mesh_convert.c1
-rw-r--r--source/blender/blenkernel/intern/mesh_evaluate.c1
-rw-r--r--source/blender/blenkernel/intern/mesh_tangent.c2
-rw-r--r--source/blender/blenkernel/intern/movieclip.c1
-rw-r--r--source/blender/blenkernel/intern/multires.c1
-rw-r--r--source/blender/blenkernel/intern/multires_subdiv.c1
-rw-r--r--source/blender/blenkernel/intern/node.c2
-rw-r--r--source/blender/blenkernel/intern/object_facemap.c2
-rw-r--r--source/blender/blenkernel/intern/object_update.c3
-rw-r--r--source/blender/blenkernel/intern/ocean.c5
-rw-r--r--source/blender/blenkernel/intern/packedFile.c2
-rw-r--r--source/blender/blenkernel/intern/paint.c3
-rw-r--r--source/blender/blenkernel/intern/particle.c4
-rw-r--r--source/blender/blenkernel/intern/particle_system.c4
-rw-r--r--source/blender/blenkernel/intern/pbvh.c1
-rw-r--r--source/blender/blenkernel/intern/pointcache.c1
-rw-r--r--source/blender/blenkernel/intern/rigidbody.c9
-rw-r--r--source/blender/blenkernel/intern/scene.c1
-rw-r--r--source/blender/blenkernel/intern/shader_fx.c1
-rw-r--r--source/blender/blenkernel/intern/smoke.c9
-rw-r--r--source/blender/blenkernel/intern/speaker.c2
-rw-r--r--source/blender/blenkernel/intern/studiolight.c1
-rw-r--r--source/blender/blenkernel/intern/subdiv_ccg_mask.c1
-rw-r--r--source/blender/blenkernel/intern/subdiv_converter_mesh.c1
-rw-r--r--source/blender/blenkernel/intern/subdiv_foreach.c2
-rw-r--r--source/blender/blenkernel/intern/subdiv_mesh.c2
-rw-r--r--source/blender/blenkernel/intern/subsurf_ccg.c1
-rw-r--r--source/blender/blenkernel/intern/text.c1
-rw-r--r--source/blender/blenkernel/intern/texture.c2
-rw-r--r--source/blender/blenkernel/intern/undo_system.c2
-rw-r--r--source/blender/blenkernel/intern/workspace.c3
-rw-r--r--source/blender/blenkernel/intern/world.c3
-rw-r--r--source/blender/blenkernel/intern/writeavi.c9
-rw-r--r--source/blender/blenlib/intern/astar.c1
-rw-r--r--source/blender/blenlib/intern/path_util.c1
-rw-r--r--source/blender/blenlib/intern/storage.c1
-rw-r--r--source/blender/blenlib/intern/string_utils.c1
-rw-r--r--source/blender/blenloader/intern/readblenentry.c2
-rw-r--r--source/blender/blenloader/intern/readfile.c1
-rw-r--r--source/blender/blenloader/intern/undofile.c1
-rw-r--r--source/blender/blenloader/intern/versioning_270.c1
-rw-r--r--source/blender/blenloader/intern/versioning_280.c1
-rw-r--r--source/blender/blenloader/intern/writefile.c1
-rw-r--r--source/blender/blentranslation/intern/blt_lang.c5
-rw-r--r--source/blender/blentranslation/intern/blt_translation.c4
-rw-r--r--source/blender/bmesh/intern/bmesh_mesh_conv.c1
-rw-r--r--source/blender/bmesh/intern/bmesh_polygon.c1
-rw-r--r--source/blender/bmesh/intern/bmesh_polygon_edgenet.c1
-rw-r--r--source/blender/bmesh/operators/bmo_connect_pair.c1
-rw-r--r--source/blender/bmesh/tools/bmesh_bevel.c2
-rw-r--r--source/blender/bmesh/tools/bmesh_decimate_collapse.c1
-rw-r--r--source/blender/bmesh/tools/bmesh_intersect.c1
-rw-r--r--source/blender/collada/MaterialExporter.cpp2
-rw-r--r--source/blender/draw/engines/eevee/eevee_bloom.c2
-rw-r--r--source/blender/draw/engines/eevee/eevee_engine.c3
-rw-r--r--source/blender/draw/intern/draw_anim_viz.c3
-rw-r--r--source/blender/draw/modes/object_mode.c2
-rw-r--r--source/blender/editors/animation/anim_channels_defines.c2
-rw-r--r--source/blender/editors/animation/anim_markers.c2
-rw-r--r--source/blender/editors/animation/keyframes_general.c1
-rw-r--r--source/blender/editors/armature/armature_naming.c1
-rw-r--r--source/blender/editors/armature/armature_relations.c1
-rw-r--r--source/blender/editors/armature/armature_select.c2
-rw-r--r--source/blender/editors/armature/armature_skinning.c1
-rw-r--r--source/blender/editors/armature/editarmature_undo.c1
-rw-r--r--source/blender/editors/armature/pose_lib.c1
-rw-r--r--source/blender/editors/armature/pose_transform.c1
-rw-r--r--source/blender/editors/armature/pose_utils.c1
-rw-r--r--source/blender/editors/curve/editcurve_paint.c2
-rw-r--r--source/blender/editors/curve/editcurve_select.c1
-rw-r--r--source/blender/editors/gizmo_library/gizmo_draw_utils.c4
-rw-r--r--source/blender/editors/gizmo_library/gizmo_library_presets.c2
-rw-r--r--source/blender/editors/gizmo_library/gizmo_library_utils.c1
-rw-r--r--source/blender/editors/gizmo_library/gizmo_types/arrow2d_gizmo.c3
-rw-r--r--source/blender/editors/gizmo_library/gizmo_types/arrow3d_gizmo.c1
-rw-r--r--source/blender/editors/gizmo_library/gizmo_types/blank3d_gizmo.c1
-rw-r--r--source/blender/editors/gizmo_library/gizmo_types/button2d_gizmo.c2
-rw-r--r--source/blender/editors/gizmo_library/gizmo_types/cage2d_gizmo.c1
-rw-r--r--source/blender/editors/gizmo_library/gizmo_types/cage3d_gizmo.c3
-rw-r--r--source/blender/editors/gizmo_library/gizmo_types/dial3d_gizmo.c2
-rw-r--r--source/blender/editors/gizmo_library/gizmo_types/move3d_gizmo.c2
-rw-r--r--source/blender/editors/gizmo_library/gizmo_types/primitive3d_gizmo.c1
-rw-r--r--source/blender/editors/gpencil/annotate_draw.c1
-rw-r--r--source/blender/editors/gpencil/annotate_paint.c1
-rw-r--r--source/blender/editors/gpencil/gpencil_add_monkey.c1
-rw-r--r--source/blender/editors/gpencil/gpencil_add_stroke.c1
-rw-r--r--source/blender/editors/gpencil/gpencil_armature.c2
-rw-r--r--source/blender/editors/gpencil/gpencil_brush.c1
-rw-r--r--source/blender/editors/gpencil/gpencil_convert.c1
-rw-r--r--source/blender/editors/gpencil/gpencil_data.c2
-rw-r--r--source/blender/editors/gpencil/gpencil_edit.c2
-rw-r--r--source/blender/editors/gpencil/gpencil_interpolate.c2
-rw-r--r--source/blender/editors/gpencil/gpencil_paint.c1
-rw-r--r--source/blender/editors/gpencil/gpencil_undo.c1
-rw-r--r--source/blender/editors/interface/interface_align.c1
-rw-r--r--source/blender/editors/interface/interface_eyedropper.c1
-rw-r--r--source/blender/editors/interface/interface_eyedropper_color.c1
-rw-r--r--source/blender/editors/interface/interface_eyedropper_datablock.c1
-rw-r--r--source/blender/editors/interface/interface_eyedropper_depth.c1
-rw-r--r--source/blender/editors/interface/interface_eyedropper_driver.c1
-rw-r--r--source/blender/editors/interface/interface_icons_event.c4
-rw-r--r--source/blender/editors/interface/interface_region_hud.c3
-rw-r--r--source/blender/editors/interface/interface_region_search.c1
-rw-r--r--source/blender/editors/interface/interface_region_tooltip.c2
-rw-r--r--source/blender/editors/interface/interface_style.c2
-rw-r--r--source/blender/editors/mask/mask_draw.c1
-rw-r--r--source/blender/editors/mesh/editmesh_bevel.c1
-rw-r--r--source/blender/editors/mesh/editmesh_extrude_screw.c2
-rw-r--r--source/blender/editors/mesh/editmesh_intersect.c1
-rw-r--r--source/blender/editors/mesh/editmesh_loopcut.c1
-rw-r--r--source/blender/editors/mesh/editmesh_preselect_elem.c2
-rw-r--r--source/blender/editors/mesh/editmesh_tools.c1
-rw-r--r--source/blender/editors/mesh/editmesh_undo.c1
-rw-r--r--source/blender/editors/mesh/mesh_data.c1
-rw-r--r--source/blender/editors/mesh/mesh_mirror.c1
-rw-r--r--source/blender/editors/mesh/mesh_ops.c1
-rw-r--r--source/blender/editors/object/object_add.c1
-rw-r--r--source/blender/editors/object/object_bake.c3
-rw-r--r--source/blender/editors/object/object_bake_api.c2
-rw-r--r--source/blender/editors/object/object_collection.c1
-rw-r--r--source/blender/editors/object/object_constraint.c1
-rw-r--r--source/blender/editors/object/object_edit.c3
-rw-r--r--source/blender/editors/object/object_facemap_ops.c2
-rw-r--r--source/blender/editors/object/object_gpencil_modifier.c2
-rw-r--r--source/blender/editors/object/object_relations.c1
-rw-r--r--source/blender/editors/object/object_shader_fx.c2
-rw-r--r--source/blender/editors/object/object_vgroup.c1
-rw-r--r--source/blender/editors/physics/particle_edit.c2
-rw-r--r--source/blender/editors/physics/particle_edit_undo.c1
-rw-r--r--source/blender/editors/physics/physics_fluid.c9
-rw-r--r--source/blender/editors/physics/physics_pointcache.c2
-rw-r--r--source/blender/editors/render/render_internal.c4
-rw-r--r--source/blender/editors/render/render_preview.c1
-rw-r--r--source/blender/editors/screen/area_utils.c2
-rw-r--r--source/blender/editors/screen/glutil.c2
-rw-r--r--source/blender/editors/screen/screen_context.c2
-rw-r--r--source/blender/editors/screen/screen_edit.c2
-rw-r--r--source/blender/editors/screen/workspace_edit.c1
-rw-r--r--source/blender/editors/screen/workspace_layout_edit.c1
-rw-r--r--source/blender/editors/sculpt_paint/paint_curve_undo.c1
-rw-r--r--source/blender/editors/sculpt_paint/paint_image.c1
-rw-r--r--source/blender/editors/sculpt_paint/paint_image_undo.c1
-rw-r--r--source/blender/editors/sculpt_paint/paint_ops.c2
-rw-r--r--source/blender/editors/sculpt_paint/paint_stroke.c2
-rw-r--r--source/blender/editors/sculpt_paint/paint_vertex_weight_ops.c3
-rw-r--r--source/blender/editors/sculpt_paint/sculpt.c1
-rw-r--r--source/blender/editors/space_action/action_buttons.c2
-rw-r--r--source/blender/editors/space_action/action_data.c2
-rw-r--r--source/blender/editors/space_action/action_draw.c1
-rw-r--r--source/blender/editors/space_action/space_action.c4
-rw-r--r--source/blender/editors/space_buttons/buttons_ops.c1
-rw-r--r--source/blender/editors/space_clip/clip_buttons.c1
-rw-r--r--source/blender/editors/space_clip/clip_utils.c1
-rw-r--r--source/blender/editors/space_clip/tracking_ops_track.c1
-rw-r--r--source/blender/editors/space_console/console_draw.c1
-rw-r--r--source/blender/editors/space_console/space_console.c2
-rw-r--r--source/blender/editors/space_file/file_draw.c2
-rw-r--r--source/blender/editors/space_file/file_ops.c1
-rw-r--r--source/blender/editors/space_file/file_utils.c1
-rw-r--r--source/blender/editors/space_file/filelist.c1
-rw-r--r--source/blender/editors/space_file/filesel.c4
-rw-r--r--source/blender/editors/space_file/space_file.c2
-rw-r--r--source/blender/editors/space_graph/graph_draw.c1
-rw-r--r--source/blender/editors/space_graph/graph_edit.c1
-rw-r--r--source/blender/editors/space_graph/space_graph.c2
-rw-r--r--source/blender/editors/space_image/image_draw.c1
-rw-r--r--source/blender/editors/space_image/image_ops.c1
-rw-r--r--source/blender/editors/space_image/space_image.c1
-rw-r--r--source/blender/editors/space_info/info_draw.c4
-rw-r--r--source/blender/editors/space_info/space_info.c3
-rw-r--r--source/blender/editors/space_info/textview.c1
-rw-r--r--source/blender/editors/space_nla/nla_draw.c1
-rw-r--r--source/blender/editors/space_nla/space_nla.c3
-rw-r--r--source/blender/editors/space_node/node_group.c1
-rw-r--r--source/blender/editors/space_node/node_relationships.c1
-rw-r--r--source/blender/editors/space_node/node_templates.c1
-rw-r--r--source/blender/editors/space_outliner/outliner_draw.c1
-rw-r--r--source/blender/editors/space_outliner/outliner_edit.c3
-rw-r--r--source/blender/editors/space_outliner/outliner_ops.c4
-rw-r--r--source/blender/editors/space_outliner/outliner_tools.c1
-rw-r--r--source/blender/editors/space_outliner/space_outliner.c2
-rw-r--r--source/blender/editors/space_script/script_edit.c1
-rw-r--r--source/blender/editors/space_script/space_script.c1
-rw-r--r--source/blender/editors/space_sequencer/sequencer_add.c1
-rw-r--r--source/blender/editors/space_sequencer/sequencer_buttons.c1
-rw-r--r--source/blender/editors/space_sequencer/sequencer_draw.c2
-rw-r--r--source/blender/editors/space_text/space_text.c1
-rw-r--r--source/blender/editors/space_text/text_draw.c2
-rw-r--r--source/blender/editors/space_text/text_ops.c1
-rw-r--r--source/blender/editors/space_text/text_undo.c1
-rw-r--r--source/blender/editors/space_view3d/view3d_camera_control.c1
-rw-r--r--source/blender/editors/space_view3d/view3d_draw.c2
-rw-r--r--source/blender/editors/space_view3d/view3d_draw_legacy.c3
-rw-r--r--source/blender/editors/space_view3d/view3d_fly.c1
-rw-r--r--source/blender/editors/space_view3d/view3d_gizmo_empty.c1
-rw-r--r--source/blender/editors/space_view3d/view3d_gizmo_forcefield.c2
-rw-r--r--source/blender/editors/space_view3d/view3d_gizmo_lamp.c1
-rw-r--r--source/blender/editors/space_view3d/view3d_gizmo_navigate.c1
-rw-r--r--source/blender/editors/space_view3d/view3d_gizmo_navigate_type.c2
-rw-r--r--source/blender/editors/space_view3d/view3d_gizmo_preselect.c2
-rw-r--r--source/blender/editors/space_view3d/view3d_gizmo_ruler.c3
-rw-r--r--source/blender/editors/space_view3d/view3d_header.c2
-rw-r--r--source/blender/editors/space_view3d/view3d_iterators.c1
-rw-r--r--source/blender/editors/space_view3d/view3d_utils.c2
-rw-r--r--source/blender/editors/space_view3d/view3d_walk.c3
-rw-r--r--source/blender/editors/transform/transform.c2
-rw-r--r--source/blender/editors/transform/transform_gizmo_2d.c1
-rw-r--r--source/blender/editors/transform/transform_gizmo_3d.c2
-rw-r--r--source/blender/editors/transform/transform_orientations.c2
-rw-r--r--source/blender/editors/transform/transform_snap.c1
-rw-r--r--source/blender/editors/transform/transform_snap_object.c1
-rw-r--r--source/blender/editors/util/ed_util.c3
-rw-r--r--source/blender/editors/uvedit/uvedit_draw.c4
-rw-r--r--source/blender/editors/uvedit/uvedit_parametrizer.c1
-rw-r--r--source/blender/editors/uvedit/uvedit_smart_stitch.c2
-rw-r--r--source/blender/gpencil_modifiers/intern/MOD_gpencil_util.c3
-rw-r--r--source/blender/gpencil_modifiers/intern/MOD_gpencilarmature.c3
-rw-r--r--source/blender/gpencil_modifiers/intern/MOD_gpencilarray.c1
-rw-r--r--source/blender/gpencil_modifiers/intern/MOD_gpencilbuild.c1
-rw-r--r--source/blender/gpencil_modifiers/intern/MOD_gpencilcolor.c2
-rw-r--r--source/blender/gpencil_modifiers/intern/MOD_gpencilhook.c1
-rw-r--r--source/blender/gpencil_modifiers/intern/MOD_gpencillattice.c1
-rw-r--r--source/blender/gpencil_modifiers/intern/MOD_gpencilmirror.c1
-rw-r--r--source/blender/gpencil_modifiers/intern/MOD_gpencilnoise.c3
-rw-r--r--source/blender/gpencil_modifiers/intern/MOD_gpenciloffset.c1
-rw-r--r--source/blender/gpencil_modifiers/intern/MOD_gpencilopacity.c1
-rw-r--r--source/blender/gpencil_modifiers/intern/MOD_gpencilsimplify.c1
-rw-r--r--source/blender/gpencil_modifiers/intern/MOD_gpencilsmooth.c1
-rw-r--r--source/blender/gpencil_modifiers/intern/MOD_gpencilsubdiv.c2
-rw-r--r--source/blender/gpencil_modifiers/intern/MOD_gpencilthick.c1
-rw-r--r--source/blender/gpencil_modifiers/intern/MOD_gpenciltime.c1
-rw-r--r--source/blender/gpencil_modifiers/intern/MOD_gpenciltint.c2
-rw-r--r--source/blender/gpu/intern/gpu_buffers.c1
-rw-r--r--source/blender/gpu/intern/gpu_draw.c1
-rw-r--r--source/blender/gpu/intern/gpu_framebuffer.c2
-rw-r--r--source/blender/gpu/intern/gpu_select_pick.c1
-rw-r--r--source/blender/gpu/intern/gpu_texture.c2
-rw-r--r--source/blender/gpu/intern/gpu_viewport.c2
-rw-r--r--source/blender/ikplugin/intern/ikplugin_api.c1
-rw-r--r--source/blender/imbuf/intern/stereoimbuf.c1
-rw-r--r--source/blender/imbuf/intern/thumbs_blend.c2
-rw-r--r--source/blender/imbuf/intern/util.c15
-rw-r--r--source/blender/makesrna/intern/rna_ID.c2
-rw-r--r--source/blender/makesrna/intern/rna_cloth.c2
-rw-r--r--source/blender/makesrna/intern/rna_constraint.c1
-rw-r--r--source/blender/makesrna/intern/rna_dynamicpaint.c1
-rw-r--r--source/blender/makesrna/intern/rna_fcurve.c1
-rw-r--r--source/blender/makesrna/intern/rna_gpencil.c2
-rw-r--r--source/blender/makesrna/intern/rna_image.c4
-rw-r--r--source/blender/makesrna/intern/rna_key.c3
-rw-r--r--source/blender/makesrna/intern/rna_layer.c2
-rw-r--r--source/blender/makesrna/intern/rna_linestyle.c3
-rw-r--r--source/blender/makesrna/intern/rna_main_api.c1
-rw-r--r--source/blender/makesrna/intern/rna_mesh_api.c1
-rw-r--r--source/blender/makesrna/intern/rna_nodetree.c1
-rw-r--r--source/blender/makesrna/intern/rna_object.c1
-rw-r--r--source/blender/makesrna/intern/rna_particle.c2
-rw-r--r--source/blender/makesrna/intern/rna_pose.c6
-rw-r--r--source/blender/makesrna/intern/rna_scene.c3
-rw-r--r--source/blender/makesrna/intern/rna_sculpt_paint.c1
-rw-r--r--source/blender/makesrna/intern/rna_smoke.c3
-rw-r--r--source/blender/makesrna/intern/rna_texture_api.c1
-rw-r--r--source/blender/makesrna/intern/rna_tracking.c3
-rw-r--r--source/blender/makesrna/intern/rna_userdef.c3
-rw-r--r--source/blender/makesrna/intern/rna_wm.c4
-rw-r--r--source/blender/makesrna/intern/rna_wm_gizmo.c3
-rw-r--r--source/blender/modifiers/intern/MOD_armature.c1
-rw-r--r--source/blender/modifiers/intern/MOD_bevel.c2
-rw-r--r--source/blender/modifiers/intern/MOD_decimate.c1
-rw-r--r--source/blender/modifiers/intern/MOD_dynamicpaint.c1
-rw-r--r--source/blender/modifiers/intern/MOD_edgesplit.c1
-rw-r--r--source/blender/modifiers/intern/MOD_fluidsim_util.c8
-rw-r--r--source/blender/modifiers/intern/MOD_mask.c1
-rw-r--r--source/blender/modifiers/intern/MOD_meshcache.c2
-rw-r--r--source/blender/modifiers/intern/MOD_meshsequencecache.c2
-rw-r--r--source/blender/modifiers/intern/MOD_multires.c1
-rw-r--r--source/blender/modifiers/intern/MOD_ocean.c6
-rw-r--r--source/blender/modifiers/intern/MOD_particleinstance.c1
-rw-r--r--source/blender/modifiers/intern/MOD_remesh.c3
-rw-r--r--source/blender/modifiers/intern/MOD_screw.c1
-rw-r--r--source/blender/modifiers/intern/MOD_shrinkwrap.c1
-rw-r--r--source/blender/modifiers/intern/MOD_smoke.c2
-rw-r--r--source/blender/modifiers/intern/MOD_surfacedeform.c1
-rw-r--r--source/blender/modifiers/intern/MOD_uvproject.c1
-rw-r--r--source/blender/modifiers/intern/MOD_weighted_normal.c1
-rw-r--r--source/blender/modifiers/intern/MOD_weightvgedit.c1
-rw-r--r--source/blender/modifiers/intern/MOD_weightvgmix.c1
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_keying.c1
-rw-r--r--source/blender/physics/intern/implicit_blender.c1
-rw-r--r--source/blender/python/generic/idprop_py_api.c1
-rw-r--r--source/blender/python/gpu/gpu_py_batch.c1
-rw-r--r--source/blender/python/gpu/gpu_py_offscreen.c1
-rw-r--r--source/blender/python/intern/bpy_app_translations.c7
-rw-r--r--source/blender/python/intern/bpy_driver.c1
-rw-r--r--source/blender/python/intern/bpy_operator.c1
-rw-r--r--source/blender/python/intern/bpy_rna_array.c1
-rw-r--r--source/blender/python/intern/bpy_rna_callback.c1
-rw-r--r--source/blender/python/intern/bpy_rna_gizmo.c1
-rw-r--r--source/blender/render/intern/source/pipeline.c1
-rw-r--r--source/blender/render/intern/source/pointdensity.c1
-rw-r--r--source/blender/render/intern/source/render_texture.c2
-rw-r--r--source/blender/shader_fx/intern/FX_shader_flip.c1
-rw-r--r--source/blender/shader_fx/intern/FX_shader_glow.c2
-rw-r--r--source/blender/shader_fx/intern/FX_shader_light.c1
-rw-r--r--source/blender/shader_fx/intern/FX_shader_shadow.c1
-rw-r--r--source/blender/shader_fx/intern/FX_shader_util.c1
-rw-r--r--source/blender/windowmanager/gizmo/intern/wm_gizmo.c2
-rw-r--r--source/blender/windowmanager/gizmo/intern/wm_gizmo_group_type.c2
-rw-r--r--source/blender/windowmanager/gizmo/intern/wm_gizmo_map.c1
-rw-r--r--source/blender/windowmanager/gizmo/intern/wm_gizmo_target_props.c2
-rw-r--r--source/blender/windowmanager/gizmo/intern/wm_gizmo_type.c2
-rw-r--r--source/blender/windowmanager/intern/wm.c2
-rw-r--r--source/blender/windowmanager/intern/wm_files_link.c3
-rw-r--r--source/blender/windowmanager/intern/wm_operators.c1
-rw-r--r--source/blender/windowmanager/intern/wm_playanim.c1
-rw-r--r--source/blender/windowmanager/intern/wm_stereo.c1
-rw-r--r--source/blender/windowmanager/intern/wm_uilist_type.c1
-rw-r--r--source/blender/windowmanager/message_bus/intern/wm_message_bus_rna.c2
-rw-r--r--source/creator/creator_signals.c1
358 files changed, 67 insertions, 590 deletions
diff --git a/source/blender/blenfont/intern/blf_dir.c b/source/blender/blenfont/intern/blf_dir.c
index f37ed3cb54f..b072f08a89a 100644
--- a/source/blender/blenfont/intern/blf_dir.c
+++ b/source/blender/blenfont/intern/blf_dir.c
@@ -50,8 +50,6 @@
#include "BLI_string.h"
#include "BLI_threads.h"
-#include "BIF_gl.h"
-
#include "BLF_api.h"
#include "blf_internal_types.h"
#include "blf_internal.h"
diff --git a/source/blender/blenfont/intern/blf_font.c b/source/blender/blenfont/intern/blf_font.c
index 3b7addd3211..2c1fa586127 100644
--- a/source/blender/blenfont/intern/blf_font.c
+++ b/source/blender/blenfont/intern/blf_font.c
@@ -53,9 +53,7 @@
#include "BLI_string.h"
#include "BLI_string_utf8.h"
#include "BLI_threads.h"
-#include "BLI_alloca.h"
-#include "BIF_gl.h"
#include "BLF_api.h"
#include "UI_interface.h"
diff --git a/source/blender/blenfont/intern/blf_font_i18n.c b/source/blender/blenfont/intern/blf_font_i18n.c
index 89f1ab938a1..c1762cf497f 100644
--- a/source/blender/blenfont/intern/blf_font_i18n.c
+++ b/source/blender/blenfont/intern/blf_font_i18n.c
@@ -37,9 +37,6 @@
#include "MEM_guardedalloc.h"
-#include "BLI_fileops.h"
-#include "BLI_path_util.h"
-#include "BLI_string.h"
#include "BLI_utildefines.h"
#include "BKE_appdir.h"
diff --git a/source/blender/blenfont/intern/blf_glyph.c b/source/blender/blenfont/intern/blf_glyph.c
index d223afa2ede..a7a88f34c0e 100644
--- a/source/blender/blenfont/intern/blf_glyph.c
+++ b/source/blender/blenfont/intern/blf_glyph.c
@@ -52,7 +52,6 @@
#include "BLI_rect.h"
#include "BLI_threads.h"
-#include "BIF_gl.h"
#include "BLF_api.h"
#ifndef BLF_STANDALONE
diff --git a/source/blender/blenkernel/intern/CCGSubSurf.c b/source/blender/blenkernel/intern/CCGSubSurf.c
index 6ec1b1b36b9..b3b503d9ff7 100644
--- a/source/blender/blenkernel/intern/CCGSubSurf.c
+++ b/source/blender/blenkernel/intern/CCGSubSurf.c
@@ -30,7 +30,6 @@
#include "BLI_sys_types.h" // for intptr_t support
#include "BLI_utildefines.h" /* for BLI_assert */
-#include "BLI_math.h"
#include "BKE_ccg.h"
#include "CCGSubSurf.h"
diff --git a/source/blender/blenkernel/intern/action.c b/source/blender/blenkernel/intern/action.c
index 2810daf5019..10ceee487fb 100644
--- a/source/blender/blenkernel/intern/action.c
+++ b/source/blender/blenkernel/intern/action.c
@@ -56,11 +56,8 @@
#include "BKE_constraint.h"
#include "BKE_deform.h"
#include "BKE_fcurve.h"
-#include "BKE_global.h"
#include "BKE_idprop.h"
#include "BKE_library.h"
-#include "BKE_library_query.h"
-#include "BKE_library_remap.h"
#include "BKE_main.h"
#include "BKE_object.h"
diff --git a/source/blender/blenkernel/intern/anim.c b/source/blender/blenkernel/intern/anim.c
index 1eea203f078..9c9736d9bc5 100644
--- a/source/blender/blenkernel/intern/anim.c
+++ b/source/blender/blenkernel/intern/anim.c
@@ -47,9 +47,7 @@
#include "BKE_anim.h"
#include "BKE_animsys.h"
#include "BKE_action.h"
-#include "BKE_context.h"
#include "BKE_curve.h"
-#include "BKE_global.h"
#include "BKE_key.h"
#include "BKE_main.h"
#include "BKE_object.h"
diff --git a/source/blender/blenkernel/intern/armature.c b/source/blender/blenkernel/intern/armature.c
index 490b6bbcf34..f5916283653 100644
--- a/source/blender/blenkernel/intern/armature.c
+++ b/source/blender/blenkernel/intern/armature.c
@@ -64,8 +64,6 @@
#include "BKE_displist.h"
#include "BKE_idprop.h"
#include "BKE_library.h"
-#include "BKE_library_query.h"
-#include "BKE_library_remap.h"
#include "BKE_lattice.h"
#include "BKE_main.h"
#include "BKE_object.h"
diff --git a/source/blender/blenkernel/intern/armature_update.c b/source/blender/blenkernel/intern/armature_update.c
index e155c14ce4a..989e5a74085 100644
--- a/source/blender/blenkernel/intern/armature_update.c
+++ b/source/blender/blenkernel/intern/armature_update.c
@@ -52,7 +52,6 @@
#include "BIK_api.h"
-#include "BKE_main.h"
#include "DEG_depsgraph.h"
diff --git a/source/blender/blenkernel/intern/blender.c b/source/blender/blenkernel/intern/blender.c
index 0ba19d5b4da..f109d431df1 100644
--- a/source/blender/blenkernel/intern/blender.c
+++ b/source/blender/blenkernel/intern/blender.c
@@ -52,12 +52,10 @@
#include "BKE_blendfile.h"
#include "BKE_brush.h"
#include "BKE_cachefile.h"
-#include "BKE_context.h"
#include "BKE_global.h"
#include "BKE_idprop.h"
#include "BKE_image.h"
#include "BKE_layer.h"
-#include "BKE_library.h"
#include "BKE_main.h"
#include "BKE_node.h"
#include "BKE_report.h"
diff --git a/source/blender/blenkernel/intern/blender_copybuffer.c b/source/blender/blenkernel/intern/blender_copybuffer.c
index 004aaf2801c..a0bdbef4e84 100644
--- a/source/blender/blenkernel/intern/blender_copybuffer.c
+++ b/source/blender/blenkernel/intern/blender_copybuffer.c
@@ -36,7 +36,6 @@
#include "BLI_blenlib.h"
#include "BLI_utildefines.h"
-#include "BLI_callbacks.h"
#include "IMB_imbuf.h"
#include "IMB_moviecache.h"
diff --git a/source/blender/blenkernel/intern/blender_undo.c b/source/blender/blenkernel/intern/blender_undo.c
index fac3685f7b1..32e2ca94fed 100644
--- a/source/blender/blenkernel/intern/blender_undo.c
+++ b/source/blender/blenkernel/intern/blender_undo.c
@@ -51,7 +51,6 @@
#include "BKE_blendfile.h"
#include "BKE_context.h"
#include "BKE_global.h"
-#include "BKE_library.h"
#include "BKE_main.h"
#include "BLO_undofile.h"
diff --git a/source/blender/blenkernel/intern/brush.c b/source/blender/blenkernel/intern/brush.c
index bb42f7412e6..a7066dd9c47 100644
--- a/source/blender/blenkernel/intern/brush.c
+++ b/source/blender/blenkernel/intern/brush.c
@@ -32,13 +32,11 @@
#include "DNA_gpencil_types.h"
#include "BLI_math.h"
-#include "BLI_blenlib.h"
#include "BLI_rand.h"
#include "BKE_brush.h"
#include "BKE_colortools.h"
#include "BKE_context.h"
-#include "BKE_global.h"
#include "BKE_library.h"
#include "BKE_library_query.h"
#include "BKE_library_remap.h"
diff --git a/source/blender/blenkernel/intern/camera.c b/source/blender/blenkernel/intern/camera.c
index 7cf16b2b772..eb4f670da30 100644
--- a/source/blender/blenkernel/intern/camera.c
+++ b/source/blender/blenkernel/intern/camera.c
@@ -50,8 +50,6 @@
#include "BKE_object.h"
#include "BKE_layer.h"
#include "BKE_library.h"
-#include "BKE_library_query.h"
-#include "BKE_library_remap.h"
#include "BKE_main.h"
#include "BKE_scene.h"
#include "BKE_screen.h"
diff --git a/source/blender/blenkernel/intern/cdderivedmesh.c b/source/blender/blenkernel/intern/cdderivedmesh.c
index 1c3b75b1771..03534d8bbea 100644
--- a/source/blender/blenkernel/intern/cdderivedmesh.c
+++ b/source/blender/blenkernel/intern/cdderivedmesh.c
@@ -37,13 +37,10 @@
#include "atomic_ops.h"
#include "BLI_math.h"
-#include "BLI_edgehash.h"
#include "BLI_utildefines.h"
-#include "BLI_utildefines_stack.h"
#include "BKE_pbvh.h"
#include "BKE_cdderivedmesh.h"
-#include "BKE_global.h"
#include "BKE_mesh.h"
#include "BKE_mesh_mapping.h"
#include "BKE_object.h"
diff --git a/source/blender/blenkernel/intern/collection.c b/source/blender/blenkernel/intern/collection.c
index 5f4d57d9c5c..2f8748e7d1a 100644
--- a/source/blender/blenkernel/intern/collection.c
+++ b/source/blender/blenkernel/intern/collection.c
@@ -33,7 +33,6 @@
#include "BLI_math_base.h"
#include "BLI_threads.h"
#include "BLT_translation.h"
-#include "BLI_string_utils.h"
#include "BKE_collection.h"
#include "BKE_icons.h"
diff --git a/source/blender/blenkernel/intern/curve.c b/source/blender/blenkernel/intern/curve.c
index 900c5c27024..782f6c94fea 100644
--- a/source/blender/blenkernel/intern/curve.c
+++ b/source/blender/blenkernel/intern/curve.c
@@ -55,11 +55,8 @@
#include "BKE_curve.h"
#include "BKE_displist.h"
#include "BKE_font.h"
-#include "BKE_global.h"
#include "BKE_key.h"
#include "BKE_library.h"
-#include "BKE_library_query.h"
-#include "BKE_library_remap.h"
#include "BKE_main.h"
#include "BKE_object.h"
#include "BKE_material.h"
diff --git a/source/blender/blenkernel/intern/customdata.c b/source/blender/blenkernel/intern/customdata.c
index 1fbeaf67596..54ed69fecf9 100644
--- a/source/blender/blenkernel/intern/customdata.c
+++ b/source/blender/blenkernel/intern/customdata.c
@@ -52,8 +52,6 @@
#include "BKE_customdata.h"
#include "BKE_customdata_file.h"
-#include "BKE_global.h"
-#include "BKE_library.h"
#include "BKE_main.h"
#include "BKE_mesh_mapping.h"
#include "BKE_mesh_remap.h"
diff --git a/source/blender/blenkernel/intern/data_transfer.c b/source/blender/blenkernel/intern/data_transfer.c
index 9ee27a29c8b..e3230076022 100644
--- a/source/blender/blenkernel/intern/data_transfer.c
+++ b/source/blender/blenkernel/intern/data_transfer.c
@@ -37,12 +37,10 @@
#include "DNA_object_types.h"
#include "DNA_scene_types.h"
-#include "BLI_array.h"
#include "BLI_math.h"
#include "BLI_blenlib.h"
#include "BLI_utildefines.h"
-#include "BKE_context.h"
#include "BKE_customdata.h"
#include "BKE_data_transfer.h"
#include "BKE_deform.h"
diff --git a/source/blender/blenkernel/intern/displist.c b/source/blender/blenkernel/intern/displist.c
index c5c503966c4..b9d451085b8 100644
--- a/source/blender/blenkernel/intern/displist.c
+++ b/source/blender/blenkernel/intern/displist.c
@@ -48,12 +48,10 @@
#include "BLI_scanfill.h"
#include "BLI_utildefines.h"
-#include "BKE_global.h"
#include "BKE_displist.h"
#include "BKE_cdderivedmesh.h"
#include "BKE_object.h"
#include "BKE_library.h"
-#include "BKE_main.h"
#include "BKE_mball.h"
#include "BKE_mball_tessellate.h"
#include "BKE_mesh.h"
diff --git a/source/blender/blenkernel/intern/dynamicpaint.c b/source/blender/blenkernel/intern/dynamicpaint.c
index 094f13d066c..2cb9bd5c619 100644
--- a/source/blender/blenkernel/intern/dynamicpaint.c
+++ b/source/blender/blenkernel/intern/dynamicpaint.c
@@ -63,7 +63,6 @@
#include "BKE_deform.h"
#include "BKE_dynamicpaint.h"
#include "BKE_effect.h"
-#include "BKE_global.h"
#include "BKE_image.h"
#include "BKE_library.h"
#include "BKE_main.h"
diff --git a/source/blender/blenkernel/intern/editmesh_cache.c b/source/blender/blenkernel/intern/editmesh_cache.c
index 09bf7e9b39b..2cae2204c78 100644
--- a/source/blender/blenkernel/intern/editmesh_cache.c
+++ b/source/blender/blenkernel/intern/editmesh_cache.c
@@ -28,7 +28,6 @@
#include "DNA_mesh_types.h"
-#include "BLI_math.h"
#include "BKE_editmesh.h"
#include "BKE_editmesh_cache.h" /* own include */
diff --git a/source/blender/blenkernel/intern/effect.c b/source/blender/blenkernel/intern/effect.c
index 0c8a47be4b4..453d1e70309 100644
--- a/source/blender/blenkernel/intern/effect.c
+++ b/source/blender/blenkernel/intern/effect.c
@@ -66,7 +66,6 @@
#include "BKE_effect.h"
#include "BKE_global.h"
#include "BKE_layer.h"
-#include "BKE_library.h"
#include "BKE_modifier.h"
#include "BKE_object.h"
#include "BKE_particle.h"
diff --git a/source/blender/blenkernel/intern/fcurve.c b/source/blender/blenkernel/intern/fcurve.c
index 2f0c70a4e12..8ac3c840680 100644
--- a/source/blender/blenkernel/intern/fcurve.c
+++ b/source/blender/blenkernel/intern/fcurve.c
@@ -29,8 +29,6 @@
* \ingroup bke
*/
-
-
#include <math.h>
#include <stdio.h>
#include <stddef.h>
diff --git a/source/blender/blenkernel/intern/gpencil.c b/source/blender/blenkernel/intern/gpencil.c
index 3d1208b43de..38a3a9aad54 100644
--- a/source/blender/blenkernel/intern/gpencil.c
+++ b/source/blender/blenkernel/intern/gpencil.c
@@ -39,10 +39,7 @@
#include "BLI_blenlib.h"
#include "BLI_utildefines.h"
#include "BLI_math_vector.h"
-#include "BLI_math_color.h"
#include "BLI_string_utils.h"
-#include "BLI_rand.h"
-#include "BLI_ghash.h"
#include "BLT_translation.h"
@@ -54,11 +51,9 @@
#include "DNA_scene_types.h"
#include "DNA_object_types.h"
-#include "BKE_context.h"
#include "BKE_action.h"
#include "BKE_animsys.h"
#include "BKE_deform.h"
-#include "BKE_global.h"
#include "BKE_gpencil.h"
#include "BKE_colortools.h"
#include "BKE_icons.h"
diff --git a/source/blender/blenkernel/intern/gpencil_modifier.c b/source/blender/blenkernel/intern/gpencil_modifier.c
index 9d45bfd0649..7fd949cb645 100644
--- a/source/blender/blenkernel/intern/gpencil_modifier.c
+++ b/source/blender/blenkernel/intern/gpencil_modifier.c
@@ -45,7 +45,6 @@
#include "DNA_gpencil_types.h"
#include "DNA_gpencil_modifier_types.h"
-#include "BKE_global.h"
#include "BKE_library.h"
#include "BKE_library_query.h"
#include "BKE_gpencil.h"
diff --git a/source/blender/blenkernel/intern/image.c b/source/blender/blenkernel/intern/image.c
index 550edce31e0..e4ed92d9eaa 100644
--- a/source/blender/blenkernel/intern/image.c
+++ b/source/blender/blenkernel/intern/image.c
@@ -74,8 +74,6 @@
#include "BKE_icons.h"
#include "BKE_image.h"
#include "BKE_library.h"
-#include "BKE_library_query.h"
-#include "BKE_library_remap.h"
#include "BKE_main.h"
#include "BKE_packedFile.h"
#include "BKE_report.h"
diff --git a/source/blender/blenkernel/intern/key.c b/source/blender/blenkernel/intern/key.c
index 599d0989250..fb892f878b5 100644
--- a/source/blender/blenkernel/intern/key.c
+++ b/source/blender/blenkernel/intern/key.c
@@ -55,7 +55,6 @@
#include "BKE_curve.h"
#include "BKE_customdata.h"
#include "BKE_deform.h"
-#include "BKE_global.h"
#include "BKE_key.h"
#include "BKE_lattice.h"
#include "BKE_library.h"
@@ -64,7 +63,6 @@
#include "BKE_editmesh.h"
#include "BKE_scene.h"
-
#include "RNA_access.h"
#define KEY_MODE_DUMMY 0 /* use where mode isn't checked for */
diff --git a/source/blender/blenkernel/intern/lamp.c b/source/blender/blenkernel/intern/lamp.c
index ff79185d2b4..4730486c2ba 100644
--- a/source/blender/blenkernel/intern/lamp.c
+++ b/source/blender/blenkernel/intern/lamp.c
@@ -49,8 +49,6 @@
#include "BKE_icons.h"
#include "BKE_lamp.h"
#include "BKE_library.h"
-#include "BKE_library_query.h"
-#include "BKE_library_remap.h"
#include "BKE_main.h"
#include "BKE_node.h"
diff --git a/source/blender/blenkernel/intern/lattice.c b/source/blender/blenkernel/intern/lattice.c
index 02cec8b692e..6464fb0c1fb 100644
--- a/source/blender/blenkernel/intern/lattice.c
+++ b/source/blender/blenkernel/intern/lattice.c
@@ -57,8 +57,6 @@
#include "BKE_key.h"
#include "BKE_lattice.h"
#include "BKE_library.h"
-#include "BKE_library_query.h"
-#include "BKE_library_remap.h"
#include "BKE_main.h"
#include "BKE_modifier.h"
#include "BKE_object.h"
diff --git a/source/blender/blenkernel/intern/layer.c b/source/blender/blenkernel/intern/layer.c
index 304702ce475..f6628e0d634 100644
--- a/source/blender/blenkernel/intern/layer.c
+++ b/source/blender/blenkernel/intern/layer.c
@@ -26,7 +26,6 @@
#include <string.h>
-#include "BLI_array.h"
#include "BLI_listbase.h"
#include "BLI_string.h"
#include "BLI_string_utf8.h"
@@ -37,7 +36,6 @@
#include "BKE_animsys.h"
#include "BKE_collection.h"
#include "BKE_freestyle.h"
-#include "BKE_global.h"
#include "BKE_idprop.h"
#include "BKE_layer.h"
#include "BKE_main.h"
diff --git a/source/blender/blenkernel/intern/layer_utils.c b/source/blender/blenkernel/intern/layer_utils.c
index fb25ca3ece4..fcb4dc07814 100644
--- a/source/blender/blenkernel/intern/layer_utils.c
+++ b/source/blender/blenkernel/intern/layer_utils.c
@@ -25,7 +25,6 @@
#include <string.h>
#include "BLI_array.h"
-#include "BLI_listbase.h"
#include "BKE_collection.h"
#include "BKE_editmesh.h"
diff --git a/source/blender/blenkernel/intern/library.c b/source/blender/blenkernel/intern/library.c
index e6c99e6a57b..957004c496f 100644
--- a/source/blender/blenkernel/intern/library.c
+++ b/source/blender/blenkernel/intern/library.c
@@ -78,9 +78,7 @@
#include "BLI_ghash.h"
#include "BLI_linklist.h"
#include "BLI_memarena.h"
-#include "BLI_mempool.h"
#include "BLI_string_utils.h"
-#include "BLI_threads.h"
#include "BLT_translation.h"
@@ -104,7 +102,6 @@
#include "BKE_lamp.h"
#include "BKE_lattice.h"
#include "BKE_library.h"
-#include "BKE_library_override.h"
#include "BKE_library_query.h"
#include "BKE_library_remap.h"
#include "BKE_linestyle.h"
diff --git a/source/blender/blenkernel/intern/library_idmap.c b/source/blender/blenkernel/intern/library_idmap.c
index 1cc13b39a97..b3eb1f33f6a 100644
--- a/source/blender/blenkernel/intern/library_idmap.c
+++ b/source/blender/blenkernel/intern/library_idmap.c
@@ -30,7 +30,6 @@
#include "DNA_ID.h"
#include "BKE_idcode.h"
-#include "BKE_library.h"
#include "BKE_library_idmap.h" /* own include */
#include "BKE_main.h"
diff --git a/source/blender/blenkernel/intern/library_query.c b/source/blender/blenkernel/intern/library_query.c
index cec5f275ebe..32800b67836 100644
--- a/source/blender/blenkernel/intern/library_query.c
+++ b/source/blender/blenkernel/intern/library_query.c
@@ -64,7 +64,6 @@
#include "DNA_world_types.h"
#include "BLI_utildefines.h"
-#include "BLI_listbase.h"
#include "BLI_ghash.h"
#include "BLI_linklist_stack.h"
diff --git a/source/blender/blenkernel/intern/lightprobe.c b/source/blender/blenkernel/intern/lightprobe.c
index 5017827ea9c..1a764091446 100644
--- a/source/blender/blenkernel/intern/lightprobe.c
+++ b/source/blender/blenkernel/intern/lightprobe.c
@@ -32,11 +32,9 @@
#include "DNA_object_types.h"
#include "DNA_lightprobe_types.h"
-#include "BLI_math.h"
#include "BLI_utildefines.h"
#include "BKE_animsys.h"
-#include "BKE_global.h"
#include "BKE_library.h"
#include "BKE_lightprobe.h"
#include "BKE_main.h"
diff --git a/source/blender/blenkernel/intern/material.c b/source/blender/blenkernel/intern/material.c
index a23b192af4d..58bcedec2b2 100644
--- a/source/blender/blenkernel/intern/material.c
+++ b/source/blender/blenkernel/intern/material.c
@@ -53,19 +53,15 @@
#include "BLI_math.h"
#include "BLI_listbase.h"
#include "BLI_utildefines.h"
-#include "BLI_string.h"
#include "BLI_array_utils.h"
#include "BKE_animsys.h"
#include "BKE_brush.h"
#include "BKE_displist.h"
-#include "BKE_global.h"
#include "BKE_gpencil.h"
#include "BKE_icons.h"
#include "BKE_image.h"
#include "BKE_library.h"
-#include "BKE_library_query.h"
-#include "BKE_library_remap.h"
#include "BKE_main.h"
#include "BKE_material.h"
#include "BKE_mesh.h"
diff --git a/source/blender/blenkernel/intern/mball.c b/source/blender/blenkernel/intern/mball.c
index 5ce080fd4c2..ef641c87462 100644
--- a/source/blender/blenkernel/intern/mball.c
+++ b/source/blender/blenkernel/intern/mball.c
@@ -52,15 +52,12 @@
#include "BLI_string_utils.h"
#include "BLI_utildefines.h"
-#include "BKE_global.h"
#include "BKE_main.h"
#include "BKE_animsys.h"
#include "BKE_curve.h"
#include "BKE_scene.h"
#include "BKE_library.h"
-#include "BKE_library_query.h"
-#include "BKE_library_remap.h"
#include "BKE_displist.h"
#include "BKE_mball.h"
#include "BKE_object.h"
diff --git a/source/blender/blenkernel/intern/mball_tessellate.c b/source/blender/blenkernel/intern/mball_tessellate.c
index 5525c41c9dd..2024f3cc82c 100644
--- a/source/blender/blenkernel/intern/mball_tessellate.c
+++ b/source/blender/blenkernel/intern/mball_tessellate.c
@@ -49,7 +49,6 @@
#include "BKE_global.h"
#include "BKE_displist.h"
-#include "BKE_main.h"
#include "BKE_mball_tessellate.h" /* own include */
#include "BKE_scene.h"
diff --git a/source/blender/blenkernel/intern/mesh_convert.c b/source/blender/blenkernel/intern/mesh_convert.c
index 659177654d6..4d26054560d 100644
--- a/source/blender/blenkernel/intern/mesh_convert.c
+++ b/source/blender/blenkernel/intern/mesh_convert.c
@@ -40,7 +40,6 @@
#include "BKE_main.h"
#include "BKE_DerivedMesh.h"
-#include "BKE_global.h"
#include "BKE_key.h"
#include "BKE_mesh.h"
#include "BKE_mesh_runtime.h"
diff --git a/source/blender/blenkernel/intern/mesh_evaluate.c b/source/blender/blenkernel/intern/mesh_evaluate.c
index b871b67527b..192d12fd25f 100644
--- a/source/blender/blenkernel/intern/mesh_evaluate.c
+++ b/source/blender/blenkernel/intern/mesh_evaluate.c
@@ -39,7 +39,6 @@
#include "BLI_utildefines.h"
#include "BLI_memarena.h"
-#include "BLI_mempool.h"
#include "BLI_math.h"
#include "BLI_edgehash.h"
#include "BLI_bitmap.h"
diff --git a/source/blender/blenkernel/intern/mesh_tangent.c b/source/blender/blenkernel/intern/mesh_tangent.c
index a222c681a5e..dff7bbf4b4b 100644
--- a/source/blender/blenkernel/intern/mesh_tangent.c
+++ b/source/blender/blenkernel/intern/mesh_tangent.c
@@ -38,11 +38,9 @@
#include "BLI_utildefines.h"
#include "BLI_math.h"
-#include "BLI_stack.h"
#include "BLI_task.h"
#include "BKE_customdata.h"
-#include "BKE_global.h"
#include "BKE_mesh.h"
#include "BKE_mesh_tangent.h"
#include "BKE_mesh_runtime.h"
diff --git a/source/blender/blenkernel/intern/movieclip.c b/source/blender/blenkernel/intern/movieclip.c
index 7d279342093..738b9e50e96 100644
--- a/source/blender/blenkernel/intern/movieclip.c
+++ b/source/blender/blenkernel/intern/movieclip.c
@@ -62,7 +62,6 @@
#include "BKE_animsys.h"
#include "BKE_colortools.h"
#include "BKE_library.h"
-#include "BKE_global.h"
#include "BKE_main.h"
#include "BKE_movieclip.h"
#include "BKE_node.h"
diff --git a/source/blender/blenkernel/intern/multires.c b/source/blender/blenkernel/intern/multires.c
index f0c0046db1f..ddd76e2463b 100644
--- a/source/blender/blenkernel/intern/multires.c
+++ b/source/blender/blenkernel/intern/multires.c
@@ -49,7 +49,6 @@
#include "BKE_pbvh.h"
#include "BKE_ccg.h"
#include "BKE_cdderivedmesh.h"
-#include "BKE_library.h"
#include "BKE_mesh.h"
#include "BKE_mesh_mapping.h"
#include "BKE_mesh_runtime.h"
diff --git a/source/blender/blenkernel/intern/multires_subdiv.c b/source/blender/blenkernel/intern/multires_subdiv.c
index 150e7192934..1afc497f611 100644
--- a/source/blender/blenkernel/intern/multires_subdiv.c
+++ b/source/blender/blenkernel/intern/multires_subdiv.c
@@ -34,7 +34,6 @@
#include "BLI_utildefines.h"
-#include "BKE_library.h"
#include "BKE_mesh.h"
#include "BKE_modifier.h"
#include "BKE_multires.h"
diff --git a/source/blender/blenkernel/intern/node.c b/source/blender/blenkernel/intern/node.c
index 5634d23727a..ef265f873f4 100644
--- a/source/blender/blenkernel/intern/node.c
+++ b/source/blender/blenkernel/intern/node.c
@@ -59,8 +59,6 @@
#include "BKE_global.h"
#include "BKE_idprop.h"
#include "BKE_library.h"
-#include "BKE_library_query.h"
-#include "BKE_library_remap.h"
#include "BKE_main.h"
#include "BKE_node.h"
diff --git a/source/blender/blenkernel/intern/object_facemap.c b/source/blender/blenkernel/intern/object_facemap.c
index ef254864d2e..865246ec7e4 100644
--- a/source/blender/blenkernel/intern/object_facemap.c
+++ b/source/blender/blenkernel/intern/object_facemap.c
@@ -35,12 +35,10 @@
#include "DNA_mesh_types.h"
#include "BLI_utildefines.h"
-#include "BLI_path_util.h"
#include "BLI_string.h"
#include "BLI_string_utils.h"
#include "BLI_listbase.h"
-#include "BKE_context.h"
#include "BKE_customdata.h"
#include "BKE_editmesh.h"
#include "BKE_object.h"
diff --git a/source/blender/blenkernel/intern/object_update.c b/source/blender/blenkernel/intern/object_update.c
index a159e713d01..c44a45e67eb 100644
--- a/source/blender/blenkernel/intern/object_update.c
+++ b/source/blender/blenkernel/intern/object_update.c
@@ -48,13 +48,10 @@
#include "BKE_displist.h"
#include "BKE_editmesh.h"
#include "BKE_effect.h"
-#include "BKE_global.h"
#include "BKE_image.h"
#include "BKE_key.h"
#include "BKE_lamp.h"
#include "BKE_lattice.h"
-#include "BKE_library.h"
-#include "BKE_main.h"
#include "BKE_material.h"
#include "BKE_mball.h"
#include "BKE_mesh.h"
diff --git a/source/blender/blenkernel/intern/ocean.c b/source/blender/blenkernel/intern/ocean.c
index adbe1a7f889..09a5cac48a1 100644
--- a/source/blender/blenkernel/intern/ocean.c
+++ b/source/blender/blenkernel/intern/ocean.c
@@ -39,11 +39,6 @@
#include "DNA_modifier_types.h"
#include "DNA_scene_types.h"
-#include "BLI_math.h"
-#include "BLI_path_util.h"
-#include "BLI_rand.h"
-#include "BLI_task.h"
-#include "BLI_threads.h"
#include "BLI_utildefines.h"
#include "BKE_image.h"
diff --git a/source/blender/blenkernel/intern/packedFile.c b/source/blender/blenkernel/intern/packedFile.c
index 0446b697c68..dce15a6dba1 100644
--- a/source/blender/blenkernel/intern/packedFile.c
+++ b/source/blender/blenkernel/intern/packedFile.c
@@ -52,9 +52,7 @@
#include "BLI_utildefines.h"
#include "BKE_font.h"
-#include "BKE_global.h"
#include "BKE_image.h"
-#include "BKE_library.h"
#include "BKE_main.h"
#include "BKE_packedFile.h"
#include "BKE_report.h"
diff --git a/source/blender/blenkernel/intern/paint.c b/source/blender/blenkernel/intern/paint.c
index ae5455c1a6d..42f460ae679 100644
--- a/source/blender/blenkernel/intern/paint.c
+++ b/source/blender/blenkernel/intern/paint.c
@@ -45,9 +45,7 @@
#include "DNA_workspace_types.h"
#include "BLI_bitmap.h"
-#include "BLI_blenlib.h"
#include "BLI_utildefines.h"
-#include "BLI_string_utils.h"
#include "BLI_math_vector.h"
#include "BLI_listbase.h"
@@ -61,7 +59,6 @@
#include "BKE_main.h"
#include "BKE_context.h"
#include "BKE_crazyspace.h"
-#include "BKE_global.h"
#include "BKE_gpencil.h"
#include "BKE_image.h"
#include "BKE_key.h"
diff --git a/source/blender/blenkernel/intern/particle.c b/source/blender/blenkernel/intern/particle.c
index 3b61c47cb43..8800d9cc4ae 100644
--- a/source/blender/blenkernel/intern/particle.c
+++ b/source/blender/blenkernel/intern/particle.c
@@ -48,7 +48,6 @@
#include "DNA_dynamicpaint_types.h"
#include "BLI_blenlib.h"
-#include "BLI_noise.h"
#include "BLI_math.h"
#include "BLI_utildefines.h"
#include "BLI_kdopbvh.h"
@@ -68,7 +67,6 @@
#include "BKE_collection.h"
#include "BKE_colortools.h"
#include "BKE_effect.h"
-#include "BKE_global.h"
#include "BKE_main.h"
#include "BKE_lattice.h"
@@ -77,8 +75,6 @@
#include "BKE_material.h"
#include "BKE_key.h"
#include "BKE_library.h"
-#include "BKE_library_query.h"
-#include "BKE_library_remap.h"
#include "BKE_modifier.h"
#include "BKE_mesh.h"
#include "BKE_cdderivedmesh.h" /* for weight_to_rgb() */
diff --git a/source/blender/blenkernel/intern/particle_system.c b/source/blender/blenkernel/intern/particle_system.c
index bed03858db8..59eb431b44b 100644
--- a/source/blender/blenkernel/intern/particle_system.c
+++ b/source/blender/blenkernel/intern/particle_system.c
@@ -58,12 +58,10 @@
#include "BLI_utildefines.h"
#include "BLI_edgehash.h"
#include "BLI_rand.h"
-#include "BLI_jitter_2d.h"
#include "BLI_math.h"
#include "BLI_blenlib.h"
#include "BLI_kdtree.h"
#include "BLI_kdopbvh.h"
-#include "BLI_sort.h"
#include "BLI_task.h"
#include "BLI_threads.h"
#include "BLI_linklist.h"
@@ -73,10 +71,8 @@
#include "BKE_collision.h"
#include "BKE_colortools.h"
#include "BKE_effect.h"
-#include "BKE_global.h"
#include "BKE_library.h"
#include "BKE_library_query.h"
-#include "BKE_main.h"
#include "BKE_particle.h"
#include "BKE_collection.h"
diff --git a/source/blender/blenkernel/intern/pbvh.c b/source/blender/blenkernel/intern/pbvh.c
index 413f0407c86..1bb4041e84f 100644
--- a/source/blender/blenkernel/intern/pbvh.c
+++ b/source/blender/blenkernel/intern/pbvh.c
@@ -36,7 +36,6 @@
#include "BKE_ccg.h"
#include "BKE_subsurf.h"
#include "BKE_DerivedMesh.h"
-#include "BKE_global.h"
#include "BKE_mesh.h" /* for BKE_mesh_calc_normals */
#include "BKE_paint.h"
diff --git a/source/blender/blenkernel/intern/pointcache.c b/source/blender/blenkernel/intern/pointcache.c
index 4419485c4c4..10f6cfc4fec 100644
--- a/source/blender/blenkernel/intern/pointcache.c
+++ b/source/blender/blenkernel/intern/pointcache.c
@@ -48,7 +48,6 @@
#include "DNA_smoke_types.h"
#include "BLI_blenlib.h"
-#include "BLI_threads.h"
#include "BLI_math.h"
#include "BLI_string.h"
#include "BLI_utildefines.h"
diff --git a/source/blender/blenkernel/intern/rigidbody.c b/source/blender/blenkernel/intern/rigidbody.c
index 4e6d6cf0971..67e0834e088 100644
--- a/source/blender/blenkernel/intern/rigidbody.c
+++ b/source/blender/blenkernel/intern/rigidbody.c
@@ -39,7 +39,6 @@
#include "MEM_guardedalloc.h"
-#include "BLI_blenlib.h"
#include "BLI_math.h"
#ifdef WITH_BULLET
@@ -57,10 +56,7 @@
#include "BKE_collection.h"
#include "BKE_effect.h"
-#include "BKE_global.h"
#include "BKE_layer.h"
-#include "BKE_library.h"
-#include "BKE_library_query.h"
#include "BKE_main.h"
#include "BKE_mesh.h"
#include "BKE_mesh_runtime.h"
@@ -68,6 +64,11 @@
#include "BKE_pointcache.h"
#include "BKE_rigidbody.h"
#include "BKE_scene.h"
+#ifdef WITH_BULLET
+# include "BKE_global.h"
+# include "BKE_library.h"
+# include "BKE_library_query.h"
+#endif
#include "DEG_depsgraph.h"
#include "DEG_depsgraph_query.h"
diff --git a/source/blender/blenkernel/intern/scene.c b/source/blender/blenkernel/intern/scene.c
index f266a839c52..126a4dfed47 100644
--- a/source/blender/blenkernel/intern/scene.c
+++ b/source/blender/blenkernel/intern/scene.c
@@ -73,7 +73,6 @@
#include "BKE_editmesh.h"
#include "BKE_fcurve.h"
#include "BKE_freestyle.h"
-#include "BKE_global.h"
#include "BKE_gpencil.h"
#include "BKE_icons.h"
#include "BKE_idprop.h"
diff --git a/source/blender/blenkernel/intern/shader_fx.c b/source/blender/blenkernel/intern/shader_fx.c
index f19b450dece..31161d8d00a 100644
--- a/source/blender/blenkernel/intern/shader_fx.c
+++ b/source/blender/blenkernel/intern/shader_fx.c
@@ -45,7 +45,6 @@
#include "DNA_gpencil_types.h"
#include "DNA_shader_fx_types.h"
-#include "BKE_global.h"
#include "BKE_library.h"
#include "BKE_library_query.h"
#include "BKE_gpencil.h"
diff --git a/source/blender/blenkernel/intern/smoke.c b/source/blender/blenkernel/intern/smoke.c
index 2d404347cee..d45935e0faa 100644
--- a/source/blender/blenkernel/intern/smoke.c
+++ b/source/blender/blenkernel/intern/smoke.c
@@ -42,12 +42,9 @@
#include "BLI_blenlib.h"
#include "BLI_math.h"
-#include "BLI_kdtree.h"
#include "BLI_kdopbvh.h"
-#include "BLI_task.h"
#include "BLI_threads.h"
#include "BLI_utildefines.h"
-#include "BLI_voxel.h"
#include "DNA_anim_types.h"
#include "DNA_armature_types.h"
@@ -72,9 +69,7 @@
#include "BKE_customdata.h"
#include "BKE_deform.h"
#include "BKE_effect.h"
-#include "BKE_global.h"
#include "BKE_library.h"
-#include "BKE_main.h"
#include "BKE_mesh.h"
#include "BKE_mesh_runtime.h"
#include "BKE_modifier.h"
@@ -105,6 +100,10 @@
#ifdef WITH_SMOKE
+#include "BLI_task.h"
+#include "BLI_kdtree.h"
+#include "BLI_voxel.h"
+
static ThreadMutex object_update_lock = BLI_MUTEX_INITIALIZER;
struct Mesh;
diff --git a/source/blender/blenkernel/intern/speaker.c b/source/blender/blenkernel/intern/speaker.c
index 7c92844ac2e..2b27bb92ec4 100644
--- a/source/blender/blenkernel/intern/speaker.c
+++ b/source/blender/blenkernel/intern/speaker.c
@@ -33,8 +33,6 @@
#include "BKE_animsys.h"
#include "BKE_library.h"
-#include "BKE_library_query.h"
-#include "BKE_library_remap.h"
#include "BKE_main.h"
#include "BKE_speaker.h"
diff --git a/source/blender/blenkernel/intern/studiolight.c b/source/blender/blenkernel/intern/studiolight.c
index ca02fcef746..3f8bcea2147 100644
--- a/source/blender/blenkernel/intern/studiolight.c
+++ b/source/blender/blenkernel/intern/studiolight.c
@@ -43,7 +43,6 @@
#include "BLI_math.h"
#include "BLI_math_color.h"
#include "BLI_path_util.h"
-#include "BLI_rand.h"
#include "BLI_string.h"
#include "BLI_string_utils.h"
diff --git a/source/blender/blenkernel/intern/subdiv_ccg_mask.c b/source/blender/blenkernel/intern/subdiv_ccg_mask.c
index 0da30fb1bf0..2acb1bffb68 100644
--- a/source/blender/blenkernel/intern/subdiv_ccg_mask.c
+++ b/source/blender/blenkernel/intern/subdiv_ccg_mask.c
@@ -35,7 +35,6 @@
#include "DNA_object_types.h"
#include "BLI_utildefines.h"
-#include "BLI_math_vector.h"
#include "BKE_customdata.h"
#include "BKE_subdiv.h"
diff --git a/source/blender/blenkernel/intern/subdiv_converter_mesh.c b/source/blender/blenkernel/intern/subdiv_converter_mesh.c
index 0dad259b001..9389aef2545 100644
--- a/source/blender/blenkernel/intern/subdiv_converter_mesh.c
+++ b/source/blender/blenkernel/intern/subdiv_converter_mesh.c
@@ -36,7 +36,6 @@
#include "BLI_utildefines.h"
#include "BLI_bitmap.h"
-#include "BLI_math_vector.h"
#include "BKE_customdata.h"
#include "BKE_mesh_mapping.h"
diff --git a/source/blender/blenkernel/intern/subdiv_foreach.c b/source/blender/blenkernel/intern/subdiv_foreach.c
index 7cb539c6c9e..30116aeb65c 100644
--- a/source/blender/blenkernel/intern/subdiv_foreach.c
+++ b/source/blender/blenkernel/intern/subdiv_foreach.c
@@ -35,9 +35,7 @@
#include "DNA_meshdata_types.h"
#include "DNA_key_types.h"
-#include "BLI_alloca.h"
#include "BLI_bitmap.h"
-#include "BLI_math_vector.h"
#include "BLI_task.h"
#include "BKE_mesh.h"
diff --git a/source/blender/blenkernel/intern/subdiv_mesh.c b/source/blender/blenkernel/intern/subdiv_mesh.c
index d45c6bad55d..b42b34df058 100644
--- a/source/blender/blenkernel/intern/subdiv_mesh.c
+++ b/source/blender/blenkernel/intern/subdiv_mesh.c
@@ -36,9 +36,7 @@
#include "DNA_key_types.h"
#include "BLI_alloca.h"
-#include "BLI_bitmap.h"
#include "BLI_math_vector.h"
-#include "BLI_task.h"
#include "BKE_mesh.h"
#include "BKE_key.h"
diff --git a/source/blender/blenkernel/intern/subsurf_ccg.c b/source/blender/blenkernel/intern/subsurf_ccg.c
index b1c4102df83..4921183c177 100644
--- a/source/blender/blenkernel/intern/subsurf_ccg.c
+++ b/source/blender/blenkernel/intern/subsurf_ccg.c
@@ -64,7 +64,6 @@
#include "BKE_pbvh.h"
#include "BKE_ccg.h"
#include "BKE_cdderivedmesh.h"
-#include "BKE_global.h"
#include "BKE_mesh.h"
#include "BKE_mesh_mapping.h"
#include "BKE_modifier.h"
diff --git a/source/blender/blenkernel/intern/text.c b/source/blender/blenkernel/intern/text.c
index 39388ebeb4f..979358b8159 100644
--- a/source/blender/blenkernel/intern/text.c
+++ b/source/blender/blenkernel/intern/text.c
@@ -56,7 +56,6 @@
#include "DNA_node_types.h"
#include "DNA_material_types.h"
-#include "BKE_global.h"
#include "BKE_library.h"
#include "BKE_main.h"
#include "BKE_text.h"
diff --git a/source/blender/blenkernel/intern/texture.c b/source/blender/blenkernel/intern/texture.c
index 3d180bd7856..6cecb402bfa 100644
--- a/source/blender/blenkernel/intern/texture.c
+++ b/source/blender/blenkernel/intern/texture.c
@@ -57,8 +57,6 @@
#include "BKE_colorband.h"
#include "BKE_library.h"
-#include "BKE_library_query.h"
-#include "BKE_library_remap.h"
#include "BKE_image.h"
#include "BKE_material.h"
#include "BKE_texture.h"
diff --git a/source/blender/blenkernel/intern/undo_system.c b/source/blender/blenkernel/intern/undo_system.c
index 12cd8fc43e9..25eaf4cb7ab 100644
--- a/source/blender/blenkernel/intern/undo_system.c
+++ b/source/blender/blenkernel/intern/undo_system.c
@@ -32,14 +32,12 @@
#include "BLI_sys_types.h"
#include "BLI_listbase.h"
#include "BLI_string.h"
-#include "BLI_sort_utils.h"
#include "DNA_listBase.h"
#include "DNA_windowmanager_types.h"
#include "BKE_context.h"
#include "BKE_global.h"
-#include "BKE_library.h"
#include "BKE_library_override.h"
#include "BKE_main.h"
#include "BKE_undo_system.h"
diff --git a/source/blender/blenkernel/intern/workspace.c b/source/blender/blenkernel/intern/workspace.c
index dca89a42c49..35cce1b04f4 100644
--- a/source/blender/blenkernel/intern/workspace.c
+++ b/source/blender/blenkernel/intern/workspace.c
@@ -30,16 +30,13 @@
#include "BLI_utildefines.h"
#include "BLI_string.h"
-#include "BLI_string_utf8.h"
#include "BLI_string_utils.h"
#include "BLI_listbase.h"
-#include "BKE_global.h"
#include "BKE_idprop.h"
#include "BKE_library.h"
#include "BKE_main.h"
#include "BKE_scene.h"
-#include "BKE_screen.h"
#include "BKE_object.h"
#include "BKE_workspace.h"
diff --git a/source/blender/blenkernel/intern/world.c b/source/blender/blenkernel/intern/world.c
index 319bc3532c2..b084e76ee78 100644
--- a/source/blender/blenkernel/intern/world.c
+++ b/source/blender/blenkernel/intern/world.c
@@ -44,11 +44,8 @@
#include "BLI_listbase.h"
#include "BKE_animsys.h"
-#include "BKE_global.h"
#include "BKE_icons.h"
#include "BKE_library.h"
-#include "BKE_library_query.h"
-#include "BKE_library_remap.h"
#include "BKE_main.h"
#include "BKE_node.h"
#include "BKE_world.h"
diff --git a/source/blender/blenkernel/intern/writeavi.c b/source/blender/blenkernel/intern/writeavi.c
index a1732b79ea3..cad4b6d2e79 100644
--- a/source/blender/blenkernel/intern/writeavi.c
+++ b/source/blender/blenkernel/intern/writeavi.c
@@ -39,13 +39,14 @@
#include "DNA_scene_types.h"
-#include "BLI_blenlib.h"
#include "BLI_utildefines.h"
-#include "BKE_global.h"
-#include "BKE_library.h"
-#include "BKE_main.h"
#include "BKE_report.h"
+#ifdef WITH_AVI
+# include "BLI_blenlib.h"
+
+# include "BKE_main.h"
+#endif
#include "BKE_writeavi.h"
diff --git a/source/blender/blenlib/intern/astar.c b/source/blender/blenlib/intern/astar.c
index 29975185f0b..3d84cacb154 100644
--- a/source/blender/blenlib/intern/astar.c
+++ b/source/blender/blenlib/intern/astar.c
@@ -51,7 +51,6 @@
#include "BLI_sys_types.h"
#include "BLI_compiler_attrs.h"
-#include "BLI_alloca.h"
#include "BLI_heap_simple.h"
#include "BLI_listbase.h"
#include "BLI_math.h"
diff --git a/source/blender/blenlib/intern/path_util.c b/source/blender/blenlib/intern/path_util.c
index dd4077d5b2d..5c83ccba56f 100644
--- a/source/blender/blenlib/intern/path_util.c
+++ b/source/blender/blenlib/intern/path_util.c
@@ -42,7 +42,6 @@
#include "BLI_fileops.h"
#include "BLI_path_util.h"
#include "BLI_string.h"
-#include "BLI_string_utf8.h"
#include "BLI_fnmatch.h"
#ifdef WIN32
diff --git a/source/blender/blenlib/intern/storage.c b/source/blender/blenlib/intern/storage.c
index cfcc2bc4390..03cbeefbab2 100644
--- a/source/blender/blenlib/intern/storage.c
+++ b/source/blender/blenlib/intern/storage.c
@@ -74,7 +74,6 @@
#include "BLI_linklist.h"
#include "BLI_string.h"
#include "BLI_fileops.h"
-#include "BLI_fileops_types.h"
#include "BLI_path_util.h"
/**
diff --git a/source/blender/blenlib/intern/string_utils.c b/source/blender/blenlib/intern/string_utils.c
index ca7894cf115..5e0c39f1869 100644
--- a/source/blender/blenlib/intern/string_utils.c
+++ b/source/blender/blenlib/intern/string_utils.c
@@ -34,7 +34,6 @@
#include "MEM_guardedalloc.h"
-#include "BLI_listbase.h"
#include "BLI_string.h"
#include "BLI_string_utf8.h"
#include "BLI_string_utils.h"
diff --git a/source/blender/blenloader/intern/readblenentry.c b/source/blender/blenloader/intern/readblenentry.c
index fee648ac5f4..8d8f6f8e706 100644
--- a/source/blender/blenloader/intern/readblenentry.c
+++ b/source/blender/blenloader/intern/readblenentry.c
@@ -41,7 +41,6 @@
#include "MEM_guardedalloc.h"
#include "BLI_utildefines.h"
-#include "BLI_path_util.h"
#include "BLI_ghash.h"
#include "BLI_linklist.h"
#include "BLI_listbase.h"
@@ -52,7 +51,6 @@
#include "BKE_main.h"
-#include "BKE_library.h" // for BKE_main_free
#include "BKE_idcode.h"
#include "BLO_readfile.h"
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index f27cd7c74e4..42f3c35034e 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -129,7 +129,6 @@
#include "BKE_collection.h"
#include "BKE_colortools.h"
#include "BKE_constraint.h"
-#include "BKE_context.h"
#include "BKE_curve.h"
#include "BKE_effect.h"
#include "BKE_fcurve.h"
diff --git a/source/blender/blenloader/intern/undofile.c b/source/blender/blenloader/intern/undofile.c
index 8ee40da13c7..f55d20b8145 100644
--- a/source/blender/blenloader/intern/undofile.c
+++ b/source/blender/blenloader/intern/undofile.c
@@ -53,7 +53,6 @@
#include "BLO_undofile.h"
#include "BLO_readfile.h"
-#include "BKE_library.h"
#include "BKE_main.h"
/* keep last */
diff --git a/source/blender/blenloader/intern/versioning_270.c b/source/blender/blenloader/intern/versioning_270.c
index 7e201aaf1d1..87329729cc3 100644
--- a/source/blender/blenloader/intern/versioning_270.c
+++ b/source/blender/blenloader/intern/versioning_270.c
@@ -63,7 +63,6 @@
#include "BKE_colortools.h"
#include "BKE_fcurve.h"
#include "BKE_gpencil.h"
-#include "BKE_library.h"
#include "BKE_main.h"
#include "BKE_mask.h"
#include "BKE_modifier.h"
diff --git a/source/blender/blenloader/intern/versioning_280.c b/source/blender/blenloader/intern/versioning_280.c
index 8a75ec17567..7c9f627c3f7 100644
--- a/source/blender/blenloader/intern/versioning_280.c
+++ b/source/blender/blenloader/intern/versioning_280.c
@@ -35,7 +35,6 @@
#include "BLI_math.h"
#include "BLI_mempool.h"
#include "BLI_string.h"
-#include "BLI_string_utf8.h"
#include "BLI_utildefines.h"
#include "DNA_object_types.h"
diff --git a/source/blender/blenloader/intern/writefile.c b/source/blender/blenloader/intern/writefile.c
index 0df90571daa..fb5d41d0071 100644
--- a/source/blender/blenloader/intern/writefile.c
+++ b/source/blender/blenloader/intern/writefile.c
@@ -157,7 +157,6 @@
#include "MEM_guardedalloc.h" // MEM_freeN
#include "BLI_bitmap.h"
#include "BLI_blenlib.h"
-#include "BLI_linklist.h"
#include "BLI_mempool.h"
#include "BKE_action.h"
diff --git a/source/blender/blentranslation/intern/blt_lang.c b/source/blender/blentranslation/intern/blt_lang.c
index a36fe245a2a..89f8e7b7acc 100644
--- a/source/blender/blentranslation/intern/blt_lang.c
+++ b/source/blender/blentranslation/intern/blt_lang.c
@@ -42,8 +42,6 @@
#include "BLT_translation.h"
#include "BLT_lang.h" /* own include */
-#include "BLI_fileops.h"
-#include "BLI_linklist.h"
#include "BLI_path_util.h"
#include "BLI_string.h"
#include "BLI_utildefines.h"
@@ -60,6 +58,9 @@ static void blt_lang_check_ime_supported(void);
#ifdef WITH_INTERNATIONAL
+#include "BLI_fileops.h"
+#include "BLI_linklist.h"
+
#include "boost_locale_wrapper.h"
/* Locale options. */
diff --git a/source/blender/blentranslation/intern/blt_translation.c b/source/blender/blentranslation/intern/blt_translation.c
index 40d384dd0fe..91370b9a509 100644
--- a/source/blender/blentranslation/intern/blt_translation.c
+++ b/source/blender/blentranslation/intern/blt_translation.c
@@ -38,10 +38,6 @@
#include "MEM_guardedalloc.h"
-#include "BLI_fileops.h"
-#include "BLI_path_util.h"
-#include "BLI_string.h"
-#include "BLI_threads.h"
#include "DNA_userdef_types.h" /* For user settings. */
diff --git a/source/blender/bmesh/intern/bmesh_mesh_conv.c b/source/blender/bmesh/intern/bmesh_mesh_conv.c
index e9ca659faa7..574d1756f17 100644
--- a/source/blender/bmesh/intern/bmesh_mesh_conv.c
+++ b/source/blender/bmesh/intern/bmesh_mesh_conv.c
@@ -92,7 +92,6 @@
#include "BKE_customdata.h"
#include "BKE_multires.h"
-#include "BKE_global.h" /* ugh - for looping over all objects */
#include "BKE_main.h"
#include "BKE_key.h"
diff --git a/source/blender/bmesh/intern/bmesh_polygon.c b/source/blender/bmesh/intern/bmesh_polygon.c
index a3b0f72fbcf..3010daf694c 100644
--- a/source/blender/bmesh/intern/bmesh_polygon.c
+++ b/source/blender/bmesh/intern/bmesh_polygon.c
@@ -40,7 +40,6 @@
#include "BLI_polyfill_2d.h"
#include "BLI_polyfill_2d_beautify.h"
#include "BLI_linklist.h"
-#include "BLI_edgehash.h"
#include "BLI_heap.h"
#include "bmesh.h"
diff --git a/source/blender/bmesh/intern/bmesh_polygon_edgenet.c b/source/blender/bmesh/intern/bmesh_polygon_edgenet.c
index 53874e4ed96..c0a5b882b8f 100644
--- a/source/blender/bmesh/intern/bmesh_polygon_edgenet.c
+++ b/source/blender/bmesh/intern/bmesh_polygon_edgenet.c
@@ -34,7 +34,6 @@
#include "BLI_alloca.h"
#include "BLI_utildefines_stack.h"
#include "BLI_linklist_stack.h"
-#include "BLI_sort.h"
#include "BLI_sort_utils.h"
#include "BLI_kdopbvh.h"
diff --git a/source/blender/bmesh/operators/bmo_connect_pair.c b/source/blender/bmesh/operators/bmo_connect_pair.c
index caf40c71756..51f892912f3 100644
--- a/source/blender/bmesh/operators/bmo_connect_pair.c
+++ b/source/blender/bmesh/operators/bmo_connect_pair.c
@@ -37,7 +37,6 @@
#include "intern/bmesh_operators_private.h" /* own include */
#include "BLI_mempool.h"
-#include "BLI_listbase.h"
/**
* Method for connecting across many faces.
diff --git a/source/blender/bmesh/tools/bmesh_bevel.c b/source/blender/bmesh/tools/bmesh_bevel.c
index e4de1b1d80e..5d4082aded4 100644
--- a/source/blender/bmesh/tools/bmesh_bevel.c
+++ b/source/blender/bmesh/tools/bmesh_bevel.c
@@ -38,8 +38,6 @@
#include "BLI_array.h"
#include "BLI_alloca.h"
-#include "BLI_gsqueue.h"
-#include "BLI_linklist_stack.h"
#include "BLI_math.h"
#include "BLI_memarena.h"
#include "BLI_utildefines.h"
diff --git a/source/blender/bmesh/tools/bmesh_decimate_collapse.c b/source/blender/bmesh/tools/bmesh_decimate_collapse.c
index 66b726f946c..94e81548108 100644
--- a/source/blender/bmesh/tools/bmesh_decimate_collapse.c
+++ b/source/blender/bmesh/tools/bmesh_decimate_collapse.c
@@ -37,7 +37,6 @@
#include "BLI_linklist.h"
#include "BLI_alloca.h"
#include "BLI_memarena.h"
-#include "BLI_edgehash.h"
#include "BLI_polyfill_2d.h"
#include "BLI_polyfill_2d_beautify.h"
#include "BLI_utildefines_stack.h"
diff --git a/source/blender/bmesh/tools/bmesh_intersect.c b/source/blender/bmesh/tools/bmesh_intersect.c
index a90422e9911..1bc7285d97a 100644
--- a/source/blender/bmesh/tools/bmesh_intersect.c
+++ b/source/blender/bmesh/tools/bmesh_intersect.c
@@ -46,7 +46,6 @@
#include "BLI_linklist_stack.h"
#include "BLI_utildefines_stack.h"
#ifndef NDEBUG
-# include "BLI_array_utils.h"
#endif
#include "BLI_kdopbvh.h"
diff --git a/source/blender/collada/MaterialExporter.cpp b/source/blender/collada/MaterialExporter.cpp
index 2fa71817ac8..92b948b7a92 100644
--- a/source/blender/collada/MaterialExporter.cpp
+++ b/source/blender/collada/MaterialExporter.cpp
@@ -25,8 +25,6 @@
* \ingroup collada
*/
-
-
#include "MaterialExporter.h"
#include "COLLADABUUtils.h"
#include "collada_internal.h"
diff --git a/source/blender/draw/engines/eevee/eevee_bloom.c b/source/blender/draw/engines/eevee/eevee_bloom.c
index 3402a7c1cab..f0f443b83eb 100644
--- a/source/blender/draw/engines/eevee/eevee_bloom.c
+++ b/source/blender/draw/engines/eevee/eevee_bloom.c
@@ -30,8 +30,6 @@
#include "DRW_render.h"
-
-
#include "GPU_texture.h"
#include "DEG_depsgraph_query.h"
diff --git a/source/blender/draw/engines/eevee/eevee_engine.c b/source/blender/draw/engines/eevee/eevee_engine.c
index 7fc15342c7c..bb8314a7d75 100644
--- a/source/blender/draw/engines/eevee/eevee_engine.c
+++ b/source/blender/draw/engines/eevee/eevee_engine.c
@@ -35,13 +35,10 @@
#include "DNA_world_types.h"
-
-
#include "eevee_private.h"
#define EEVEE_ENGINE "BLENDER_EEVEE"
-
/* *********** FUNCTIONS *********** */
static void eevee_engine_init(void *ved)
diff --git a/source/blender/draw/intern/draw_anim_viz.c b/source/blender/draw/intern/draw_anim_viz.c
index c35dab2f2e7..3e0da378fb9 100644
--- a/source/blender/draw/intern/draw_anim_viz.c
+++ b/source/blender/draw/intern/draw_anim_viz.c
@@ -40,8 +40,6 @@
#include "BLI_math.h"
-
-
#include "UI_resources.h"
#include "DEG_depsgraph_query.h"
@@ -55,7 +53,6 @@
#include "draw_common.h"
#include "draw_manager_text.h"
-
/* ********************************* Lists ************************************** */
/* All lists are per viewport specific datas.
* They are all free when viewport changes engines
diff --git a/source/blender/draw/modes/object_mode.c b/source/blender/draw/modes/object_mode.c
index 255c8fc937f..8b5c5e9406c 100644
--- a/source/blender/draw/modes/object_mode.c
+++ b/source/blender/draw/modes/object_mode.c
@@ -45,8 +45,6 @@
#include "DNA_view3d_types.h"
#include "DNA_world_types.h"
-
-
#include "BKE_anim.h"
#include "BKE_camera.h"
#include "BKE_constraint.h"
diff --git a/source/blender/editors/animation/anim_channels_defines.c b/source/blender/editors/animation/anim_channels_defines.c
index 8f052b4c19a..c95da49831a 100644
--- a/source/blender/editors/animation/anim_channels_defines.c
+++ b/source/blender/editors/animation/anim_channels_defines.c
@@ -82,8 +82,6 @@
#include "ED_anim_api.h"
#include "ED_keyframing.h"
-#include "BIF_gl.h"
-
#include "WM_api.h"
#include "WM_types.h"
diff --git a/source/blender/editors/animation/anim_markers.c b/source/blender/editors/animation/anim_markers.c
index 6b687041324..4a43d98d740 100644
--- a/source/blender/editors/animation/anim_markers.c
+++ b/source/blender/editors/animation/anim_markers.c
@@ -57,8 +57,6 @@
#include "WM_api.h"
#include "WM_types.h"
-#include "BIF_glutil.h"
-
#include "GPU_immediate.h"
#include "GPU_matrix.h"
#include "GPU_state.h"
diff --git a/source/blender/editors/animation/keyframes_general.c b/source/blender/editors/animation/keyframes_general.c
index df87e1b7a5f..a5cd138343c 100644
--- a/source/blender/editors/animation/keyframes_general.c
+++ b/source/blender/editors/animation/keyframes_general.c
@@ -48,7 +48,6 @@
#include "BKE_fcurve.h"
#include "BKE_report.h"
#include "BKE_main.h"
-#include "BKE_global.h"
#include "BKE_deform.h"
#include "RNA_access.h"
diff --git a/source/blender/editors/armature/armature_naming.c b/source/blender/editors/armature/armature_naming.c
index a027b00f3e1..1a1073ddcf5 100644
--- a/source/blender/editors/armature/armature_naming.c
+++ b/source/blender/editors/armature/armature_naming.c
@@ -52,7 +52,6 @@
#include "BKE_constraint.h"
#include "BKE_context.h"
#include "BKE_deform.h"
-#include "BKE_global.h"
#include "BKE_layer.h"
#include "BKE_main.h"
#include "BKE_modifier.h"
diff --git a/source/blender/editors/armature/armature_relations.c b/source/blender/editors/armature/armature_relations.c
index e48c2df74e5..40e065ef014 100644
--- a/source/blender/editors/armature/armature_relations.c
+++ b/source/blender/editors/armature/armature_relations.c
@@ -48,7 +48,6 @@
#include "BKE_constraint.h"
#include "BKE_context.h"
#include "BKE_fcurve.h"
-#include "BKE_global.h"
#include "BKE_layer.h"
#include "BKE_main.h"
#include "BKE_report.h"
diff --git a/source/blender/editors/armature/armature_select.c b/source/blender/editors/armature/armature_select.c
index da82bc4bbce..f26975fae6a 100644
--- a/source/blender/editors/armature/armature_select.c
+++ b/source/blender/editors/armature/armature_select.c
@@ -45,8 +45,6 @@
#include "BKE_report.h"
#include "BKE_layer.h"
-#include "BIF_gl.h"
-
#include "RNA_access.h"
#include "RNA_define.h"
diff --git a/source/blender/editors/armature/armature_skinning.c b/source/blender/editors/armature/armature_skinning.c
index 462c17e9008..aabed4f6c29 100644
--- a/source/blender/editors/armature/armature_skinning.c
+++ b/source/blender/editors/armature/armature_skinning.c
@@ -43,7 +43,6 @@
#include "BKE_action.h"
#include "BKE_armature.h"
-#include "BKE_context.h"
#include "BKE_deform.h"
#include "BKE_mesh_iterators.h"
#include "BKE_mesh_runtime.h"
diff --git a/source/blender/editors/armature/editarmature_undo.c b/source/blender/editors/armature/editarmature_undo.c
index 0fd94f664ab..3119c303801 100644
--- a/source/blender/editors/armature/editarmature_undo.c
+++ b/source/blender/editors/armature/editarmature_undo.c
@@ -35,7 +35,6 @@
#include "DNA_armature_types.h"
#include "DNA_object_types.h"
-#include "BLI_math.h"
#include "BLI_array_utils.h"
#include "BKE_context.h"
diff --git a/source/blender/editors/armature/pose_lib.c b/source/blender/editors/armature/pose_lib.c
index 30f0b82396a..f438d631dd9 100644
--- a/source/blender/editors/armature/pose_lib.c
+++ b/source/blender/editors/armature/pose_lib.c
@@ -46,7 +46,6 @@
#include "BKE_action.h"
#include "BKE_animsys.h"
#include "BKE_armature.h"
-#include "BKE_global.h"
#include "BKE_idprop.h"
#include "BKE_library.h"
#include "BKE_main.h"
diff --git a/source/blender/editors/armature/pose_transform.c b/source/blender/editors/armature/pose_transform.c
index ad4853256e4..0bec35aedaa 100644
--- a/source/blender/editors/armature/pose_transform.c
+++ b/source/blender/editors/armature/pose_transform.c
@@ -45,7 +45,6 @@
#include "BKE_blender_copybuffer.h"
#include "BKE_context.h"
#include "BKE_deform.h"
-#include "BKE_global.h"
#include "BKE_idprop.h"
#include "BKE_layer.h"
#include "BKE_main.h"
diff --git a/source/blender/editors/armature/pose_utils.c b/source/blender/editors/armature/pose_utils.c
index 90208c40a30..cc466b06e82 100644
--- a/source/blender/editors/armature/pose_utils.c
+++ b/source/blender/editors/armature/pose_utils.c
@@ -41,7 +41,6 @@
#include "BKE_armature.h"
#include "BKE_idprop.h"
#include "BKE_layer.h"
-#include "BKE_main.h"
#include "BKE_object.h"
#include "BKE_context.h"
diff --git a/source/blender/editors/curve/editcurve_paint.c b/source/blender/editors/curve/editcurve_paint.c
index 3fe880865bb..679e601f6ae 100644
--- a/source/blender/editors/curve/editcurve_paint.c
+++ b/source/blender/editors/curve/editcurve_paint.c
@@ -34,7 +34,6 @@
#include "BKE_context.h"
#include "BKE_curve.h"
#include "BKE_fcurve.h"
-#include "BKE_main.h"
#include "BKE_report.h"
#include "BKE_layer.h"
@@ -48,7 +47,6 @@
#include "ED_view3d.h"
#include "ED_curve.h"
-#include "BIF_gl.h"
#include "GPU_batch.h"
#include "GPU_batch_presets.h"
diff --git a/source/blender/editors/curve/editcurve_select.c b/source/blender/editors/curve/editcurve_select.c
index cafc3cb076f..b0e39b7555a 100644
--- a/source/blender/editors/curve/editcurve_select.c
+++ b/source/blender/editors/curve/editcurve_select.c
@@ -37,7 +37,6 @@
#include "BLI_bitmap.h"
#include "BLI_math.h"
#include "BLI_rand.h"
-#include "BLI_heap.h"
#include "BLI_heap_simple.h"
#include "BLI_kdtree.h"
diff --git a/source/blender/editors/gizmo_library/gizmo_draw_utils.c b/source/blender/editors/gizmo_library/gizmo_draw_utils.c
index 9ef53d8f696..f44e5d2bee7 100644
--- a/source/blender/editors/gizmo_library/gizmo_draw_utils.c
+++ b/source/blender/editors/gizmo_library/gizmo_draw_utils.c
@@ -28,10 +28,6 @@
*/
#include "BLI_listbase.h"
-#include "BLI_ghash.h"
-#include "BLI_math.h"
-#include "BLI_string.h"
-#include "BLI_string_utils.h"
#include "BKE_context.h"
diff --git a/source/blender/editors/gizmo_library/gizmo_library_presets.c b/source/blender/editors/gizmo_library/gizmo_library_presets.c
index 4eeddb92664..dc1b9dfde62 100644
--- a/source/blender/editors/gizmo_library/gizmo_library_presets.c
+++ b/source/blender/editors/gizmo_library/gizmo_library_presets.c
@@ -35,8 +35,6 @@
#include "BKE_context.h"
-#include "BIF_gl.h"
-
#include "GPU_draw.h"
#include "GPU_immediate.h"
#include "GPU_immediate_util.h"
diff --git a/source/blender/editors/gizmo_library/gizmo_library_utils.c b/source/blender/editors/gizmo_library/gizmo_library_utils.c
index d8c29eb6675..b47b20517a3 100644
--- a/source/blender/editors/gizmo_library/gizmo_library_utils.c
+++ b/source/blender/editors/gizmo_library/gizmo_library_utils.c
@@ -32,7 +32,6 @@
*/
#include "BLI_math.h"
-#include "BLI_listbase.h"
#include "DNA_view3d_types.h"
#include "DNA_screen_types.h"
diff --git a/source/blender/editors/gizmo_library/gizmo_types/arrow2d_gizmo.c b/source/blender/editors/gizmo_library/gizmo_types/arrow2d_gizmo.c
index fb3583b7b27..15c1ebdb08f 100644
--- a/source/blender/editors/gizmo_library/gizmo_types/arrow2d_gizmo.c
+++ b/source/blender/editors/gizmo_library/gizmo_types/arrow2d_gizmo.c
@@ -31,15 +31,12 @@
* \brief Simple arrow gizmo which is dragged into a certain direction.
*/
-#include "BLI_listbase.h"
#include "BLI_math.h"
-#include "BLI_rect.h"
#include "DNA_windowmanager_types.h"
#include "BKE_context.h"
-#include "BIF_gl.h"
#include "GPU_draw.h"
#include "GPU_immediate.h"
diff --git a/source/blender/editors/gizmo_library/gizmo_types/arrow3d_gizmo.c b/source/blender/editors/gizmo_library/gizmo_types/arrow3d_gizmo.c
index e02d4b8470c..88fd71f0548 100644
--- a/source/blender/editors/gizmo_library/gizmo_types/arrow3d_gizmo.c
+++ b/source/blender/editors/gizmo_library/gizmo_types/arrow3d_gizmo.c
@@ -38,7 +38,6 @@
* - `matrix[2]` is the arrow direction (for all arrowes).
*/
-#include "BIF_gl.h"
#include "BLI_math.h"
diff --git a/source/blender/editors/gizmo_library/gizmo_types/blank3d_gizmo.c b/source/blender/editors/gizmo_library/gizmo_types/blank3d_gizmo.c
index 6bff72d75cd..db9b8934c00 100644
--- a/source/blender/editors/gizmo_library/gizmo_types/blank3d_gizmo.c
+++ b/source/blender/editors/gizmo_library/gizmo_types/blank3d_gizmo.c
@@ -31,7 +31,6 @@
* \brief Gizmo to use as a fallback (catch events).
*/
-#include "BLI_math.h"
#include "BKE_context.h"
diff --git a/source/blender/editors/gizmo_library/gizmo_types/button2d_gizmo.c b/source/blender/editors/gizmo_library/gizmo_types/button2d_gizmo.c
index 7b625364905..c17ec43b086 100644
--- a/source/blender/editors/gizmo_library/gizmo_types/button2d_gizmo.c
+++ b/source/blender/editors/gizmo_library/gizmo_types/button2d_gizmo.c
@@ -37,8 +37,6 @@
#include "BKE_context.h"
-#include "BIF_gl.h"
-#include "BIF_glutil.h"
#include "GPU_immediate.h"
#include "GPU_immediate_util.h"
diff --git a/source/blender/editors/gizmo_library/gizmo_types/cage2d_gizmo.c b/source/blender/editors/gizmo_library/gizmo_types/cage2d_gizmo.c
index df0c9f084fd..521347a1db3 100644
--- a/source/blender/editors/gizmo_library/gizmo_types/cage2d_gizmo.c
+++ b/source/blender/editors/gizmo_library/gizmo_types/cage2d_gizmo.c
@@ -42,7 +42,6 @@
#include "BKE_context.h"
-#include "BIF_gl.h"
#include "GPU_matrix.h"
#include "GPU_shader.h"
diff --git a/source/blender/editors/gizmo_library/gizmo_types/cage3d_gizmo.c b/source/blender/editors/gizmo_library/gizmo_types/cage3d_gizmo.c
index 3bbe13362d0..43a4fbe33ad 100644
--- a/source/blender/editors/gizmo_library/gizmo_types/cage3d_gizmo.c
+++ b/source/blender/editors/gizmo_library/gizmo_types/cage3d_gizmo.c
@@ -37,12 +37,9 @@
#include "MEM_guardedalloc.h"
#include "BLI_math.h"
-#include "BLI_rect.h"
#include "BKE_context.h"
-#include "BIF_gl.h"
-
#include "GPU_matrix.h"
#include "GPU_shader.h"
#include "GPU_immediate.h"
diff --git a/source/blender/editors/gizmo_library/gizmo_types/dial3d_gizmo.c b/source/blender/editors/gizmo_library/gizmo_types/dial3d_gizmo.c
index c391ec812c7..db865712ca5 100644
--- a/source/blender/editors/gizmo_library/gizmo_types/dial3d_gizmo.c
+++ b/source/blender/editors/gizmo_library/gizmo_types/dial3d_gizmo.c
@@ -44,8 +44,6 @@
#include "BKE_context.h"
-#include "BIF_gl.h"
-#include "BIF_glutil.h"
#include "GPU_immediate.h"
#include "GPU_immediate_util.h"
diff --git a/source/blender/editors/gizmo_library/gizmo_types/move3d_gizmo.c b/source/blender/editors/gizmo_library/gizmo_types/move3d_gizmo.c
index b91a193e9a0..bdbca2316e7 100644
--- a/source/blender/editors/gizmo_library/gizmo_types/move3d_gizmo.c
+++ b/source/blender/editors/gizmo_library/gizmo_types/move3d_gizmo.c
@@ -39,8 +39,6 @@
#include "BKE_context.h"
-#include "BIF_gl.h"
-#include "BIF_glutil.h"
#include "GPU_immediate.h"
#include "GPU_immediate_util.h"
diff --git a/source/blender/editors/gizmo_library/gizmo_types/primitive3d_gizmo.c b/source/blender/editors/gizmo_library/gizmo_types/primitive3d_gizmo.c
index d5f1c23971c..c0aef37474c 100644
--- a/source/blender/editors/gizmo_library/gizmo_types/primitive3d_gizmo.c
+++ b/source/blender/editors/gizmo_library/gizmo_types/primitive3d_gizmo.c
@@ -37,7 +37,6 @@
#include "BKE_context.h"
-#include "BIF_gl.h"
#include "GPU_immediate.h"
#include "GPU_matrix.h"
diff --git a/source/blender/editors/gpencil/annotate_draw.c b/source/blender/editors/gpencil/annotate_draw.c
index 7c31527dfe7..db1b24499db 100644
--- a/source/blender/editors/gpencil/annotate_draw.c
+++ b/source/blender/editors/gpencil/annotate_draw.c
@@ -41,7 +41,6 @@
#include "BLI_math.h"
#include "BLI_utildefines.h"
-#include "BLI_polyfill_2d.h"
#include "BLF_api.h"
#include "BLT_translation.h"
diff --git a/source/blender/editors/gpencil/annotate_paint.c b/source/blender/editors/gpencil/annotate_paint.c
index a5382ebf8e2..d0c95af5f5c 100644
--- a/source/blender/editors/gpencil/annotate_paint.c
+++ b/source/blender/editors/gpencil/annotate_paint.c
@@ -67,7 +67,6 @@
#include "ED_view3d.h"
#include "ED_clip.h"
-#include "BIF_glutil.h"
#include "GPU_immediate.h"
#include "GPU_immediate_util.h"
diff --git a/source/blender/editors/gpencil/gpencil_add_monkey.c b/source/blender/editors/gpencil/gpencil_add_monkey.c
index 60faf6e0276..eb542530833 100644
--- a/source/blender/editors/gpencil/gpencil_add_monkey.c
+++ b/source/blender/editors/gpencil/gpencil_add_monkey.c
@@ -27,7 +27,6 @@
* \ingroup edgpencil
*/
-#include "BLI_blenlib.h"
#include "BLI_math.h"
#include "BLI_utildefines.h"
diff --git a/source/blender/editors/gpencil/gpencil_add_stroke.c b/source/blender/editors/gpencil/gpencil_add_stroke.c
index 6df3638d859..475e0c2fdb8 100644
--- a/source/blender/editors/gpencil/gpencil_add_stroke.c
+++ b/source/blender/editors/gpencil/gpencil_add_stroke.c
@@ -27,7 +27,6 @@
* \ingroup edgpencil
*/
-#include "BLI_blenlib.h"
#include "BLI_math.h"
#include "BLI_utildefines.h"
diff --git a/source/blender/editors/gpencil/gpencil_armature.c b/source/blender/editors/gpencil/gpencil_armature.c
index 78152f1d86b..c5f2b651906 100644
--- a/source/blender/editors/gpencil/gpencil_armature.c
+++ b/source/blender/editors/gpencil/gpencil_armature.c
@@ -40,9 +40,7 @@
#include "BLI_blenlib.h"
#include "BLI_utildefines.h"
-#include "BLI_ghash.h"
#include "BLI_math.h"
-#include "BLI_string_utils.h"
#include "BLT_translation.h"
diff --git a/source/blender/editors/gpencil/gpencil_brush.c b/source/blender/editors/gpencil/gpencil_brush.c
index 3f21a076bea..ada02018257 100644
--- a/source/blender/editors/gpencil/gpencil_brush.c
+++ b/source/blender/editors/gpencil/gpencil_brush.c
@@ -63,7 +63,6 @@
#include "BKE_material.h"
#include "BKE_object_deform.h"
#include "BKE_report.h"
-#include "BKE_screen.h"
#include "UI_interface.h"
diff --git a/source/blender/editors/gpencil/gpencil_convert.c b/source/blender/editors/gpencil/gpencil_convert.c
index a880e6c3bf6..dd276cf33d6 100644
--- a/source/blender/editors/gpencil/gpencil_convert.c
+++ b/source/blender/editors/gpencil/gpencil_convert.c
@@ -68,7 +68,6 @@
#include "BKE_object.h"
#include "BKE_report.h"
#include "BKE_scene.h"
-#include "BKE_screen.h"
#include "BKE_tracking.h"
#include "DEG_depsgraph.h"
diff --git a/source/blender/editors/gpencil/gpencil_data.c b/source/blender/editors/gpencil/gpencil_data.c
index 385d70773ca..4ab3d70a553 100644
--- a/source/blender/editors/gpencil/gpencil_data.c
+++ b/source/blender/editors/gpencil/gpencil_data.c
@@ -62,7 +62,6 @@
#include "BKE_context.h"
#include "BKE_deform.h"
#include "BKE_fcurve.h"
-#include "BKE_global.h"
#include "BKE_gpencil.h"
#include "BKE_gpencil_modifier.h"
#include "BKE_library.h"
@@ -73,7 +72,6 @@
#include "BKE_paint.h"
#include "BKE_report.h"
#include "BKE_scene.h"
-#include "BKE_screen.h"
#include "UI_interface.h"
#include "UI_resources.h"
diff --git a/source/blender/editors/gpencil/gpencil_edit.c b/source/blender/editors/gpencil/gpencil_edit.c
index b13a15e6096..98232486e0b 100644
--- a/source/blender/editors/gpencil/gpencil_edit.c
+++ b/source/blender/editors/gpencil/gpencil_edit.c
@@ -43,7 +43,6 @@
#include "BLI_lasso_2d.h"
#include "BLI_math.h"
#include "BLI_string.h"
-#include "BLI_string_utils.h"
#include "BLI_utildefines.h"
#include "BLT_translation.h"
@@ -66,7 +65,6 @@
#include "BKE_object.h"
#include "BKE_paint.h"
#include "BKE_report.h"
-#include "BKE_screen.h"
#include "BKE_workspace.h"
#include "UI_interface.h"
diff --git a/source/blender/editors/gpencil/gpencil_interpolate.c b/source/blender/editors/gpencil/gpencil_interpolate.c
index 4b1706f50b7..ad41bc5e140 100644
--- a/source/blender/editors/gpencil/gpencil_interpolate.c
+++ b/source/blender/editors/gpencil/gpencil_interpolate.c
@@ -57,10 +57,8 @@
#include "BKE_colortools.h"
#include "BKE_context.h"
#include "BKE_deform.h"
-#include "BKE_global.h"
#include "BKE_gpencil.h"
#include "BKE_report.h"
-#include "BKE_screen.h"
#include "UI_interface.h"
#include "UI_resources.h"
diff --git a/source/blender/editors/gpencil/gpencil_paint.c b/source/blender/editors/gpencil/gpencil_paint.c
index e1f66758007..fbd5ac9e583 100644
--- a/source/blender/editors/gpencil/gpencil_paint.c
+++ b/source/blender/editors/gpencil/gpencil_paint.c
@@ -76,7 +76,6 @@
#include "ED_view3d.h"
#include "ED_clip.h"
-#include "BIF_glutil.h"
#include "GPU_immediate.h"
#include "GPU_immediate_util.h"
diff --git a/source/blender/editors/gpencil/gpencil_undo.c b/source/blender/editors/gpencil/gpencil_undo.c
index 212a119facb..97365990fd4 100644
--- a/source/blender/editors/gpencil/gpencil_undo.c
+++ b/source/blender/editors/gpencil/gpencil_undo.c
@@ -44,7 +44,6 @@
#include "BKE_blender_undo.h"
#include "BKE_context.h"
-#include "BKE_global.h"
#include "BKE_gpencil.h"
#include "ED_gpencil.h"
diff --git a/source/blender/editors/interface/interface_align.c b/source/blender/editors/interface/interface_align.c
index 488ee0fd003..cb0583fb535 100644
--- a/source/blender/editors/interface/interface_align.c
+++ b/source/blender/editors/interface/interface_align.c
@@ -31,7 +31,6 @@
#include "DNA_screen_types.h"
#include "DNA_userdef_types.h"
-#include "BLI_alloca.h"
#include "BLI_math.h"
#include "BLI_rect.h"
diff --git a/source/blender/editors/interface/interface_eyedropper.c b/source/blender/editors/interface/interface_eyedropper.c
index 4567440b8ac..ed6c7bdc3ea 100644
--- a/source/blender/editors/interface/interface_eyedropper.c
+++ b/source/blender/editors/interface/interface_eyedropper.c
@@ -31,7 +31,6 @@
#include "DNA_screen_types.h"
#include "BLI_blenlib.h"
-#include "BLI_math_vector.h"
#include "BKE_context.h"
#include "BKE_screen.h"
diff --git a/source/blender/editors/interface/interface_eyedropper_color.c b/source/blender/editors/interface/interface_eyedropper_color.c
index 9448585a563..7f2b686ded8 100644
--- a/source/blender/editors/interface/interface_eyedropper_color.c
+++ b/source/blender/editors/interface/interface_eyedropper_color.c
@@ -36,7 +36,6 @@
#include "DNA_screen_types.h"
#include "BLI_math_vector.h"
-#include "BLI_string.h"
#include "BKE_context.h"
#include "BKE_main.h"
diff --git a/source/blender/editors/interface/interface_eyedropper_datablock.c b/source/blender/editors/interface/interface_eyedropper_datablock.c
index 594488ff148..5ee542d5382 100644
--- a/source/blender/editors/interface/interface_eyedropper_datablock.c
+++ b/source/blender/editors/interface/interface_eyedropper_datablock.c
@@ -37,7 +37,6 @@
#include "DNA_object_types.h"
#include "BLI_string.h"
-#include "BLI_math_vector.h"
#include "BLT_translation.h"
diff --git a/source/blender/editors/interface/interface_eyedropper_depth.c b/source/blender/editors/interface/interface_eyedropper_depth.c
index 68a93229eb5..63111fe6e1e 100644
--- a/source/blender/editors/interface/interface_eyedropper_depth.c
+++ b/source/blender/editors/interface/interface_eyedropper_depth.c
@@ -41,7 +41,6 @@
#include "BLI_math_vector.h"
#include "BKE_context.h"
-#include "BKE_main.h"
#include "BKE_screen.h"
#include "BKE_unit.h"
diff --git a/source/blender/editors/interface/interface_eyedropper_driver.c b/source/blender/editors/interface/interface_eyedropper_driver.c
index c9b29da2e61..f509e9a61d1 100644
--- a/source/blender/editors/interface/interface_eyedropper_driver.c
+++ b/source/blender/editors/interface/interface_eyedropper_driver.c
@@ -38,7 +38,6 @@
#include "DNA_screen_types.h"
#include "DNA_object_types.h"
-#include "BLI_math_vector.h"
#include "BKE_context.h"
#include "BKE_animsys.h"
diff --git a/source/blender/editors/interface/interface_icons_event.c b/source/blender/editors/interface/interface_icons_event.c
index 598adcce87f..16e177b48cc 100644
--- a/source/blender/editors/interface/interface_icons_event.c
+++ b/source/blender/editors/interface/interface_icons_event.c
@@ -41,7 +41,6 @@
#include "BLI_blenlib.h"
#include "BLI_utildefines.h"
-#include "BLI_fileops_types.h"
#include "BLI_math_vector.h"
#include "DNA_brush_types.h"
@@ -55,8 +54,6 @@
#include "RNA_access.h"
#include "RNA_enum_types.h"
-#include "BKE_context.h"
-#include "BKE_global.h"
#include "BKE_icons.h"
#include "BKE_appdir.h"
#include "BKE_studiolight.h"
@@ -65,7 +62,6 @@
#include "IMB_imbuf_types.h"
#include "IMB_thumbs.h"
-#include "BIF_glutil.h"
#include "BLF_api.h"
#include "DEG_depsgraph.h"
diff --git a/source/blender/editors/interface/interface_region_hud.c b/source/blender/editors/interface/interface_region_hud.c
index cc87b829034..009f2d0f1d9 100644
--- a/source/blender/editors/interface/interface_region_hud.c
+++ b/source/blender/editors/interface/interface_region_hud.c
@@ -39,18 +39,15 @@
#include "BLI_rect.h"
#include "BLI_listbase.h"
#include "BLI_utildefines.h"
-#include "BLI_math_color.h"
#include "BKE_context.h"
#include "BKE_screen.h"
-#include "BKE_main.h"
#include "WM_api.h"
#include "WM_types.h"
#include "RNA_access.h"
-#include "BIF_gl.h"
#include "UI_interface.h"
#include "UI_view2d.h"
diff --git a/source/blender/editors/interface/interface_region_search.c b/source/blender/editors/interface/interface_region_search.c
index 9091bb1c3d9..9a70f6668f7 100644
--- a/source/blender/editors/interface/interface_region_search.c
+++ b/source/blender/editors/interface/interface_region_search.c
@@ -52,7 +52,6 @@
#include "RNA_access.h"
-#include "BIF_gl.h"
#include "UI_interface.h"
#include "UI_interface_icons.h"
diff --git a/source/blender/editors/interface/interface_region_tooltip.c b/source/blender/editors/interface/interface_region_tooltip.c
index e42d2e0cbac..0ce9a12634a 100644
--- a/source/blender/editors/interface/interface_region_tooltip.c
+++ b/source/blender/editors/interface/interface_region_tooltip.c
@@ -49,7 +49,6 @@
#include "BLI_math.h"
#include "BLI_string.h"
-#include "BLI_string_utf8.h"
#include "BLI_rect.h"
#include "BLI_utildefines.h"
@@ -62,7 +61,6 @@
#include "RNA_access.h"
-#include "BIF_gl.h"
#include "UI_interface.h"
diff --git a/source/blender/editors/interface/interface_style.c b/source/blender/editors/interface/interface_style.c
index b4df8d237e0..239525a074b 100644
--- a/source/blender/editors/interface/interface_style.c
+++ b/source/blender/editors/interface/interface_style.c
@@ -45,8 +45,6 @@
#include "BKE_global.h"
-#include "BIF_gl.h"
-
#include "BLF_api.h"
#ifdef WITH_INTERNATIONAL
# include "BLT_translation.h"
diff --git a/source/blender/editors/mask/mask_draw.c b/source/blender/editors/mask/mask_draw.c
index 871ce9b4a89..dbef4b5716b 100644
--- a/source/blender/editors/mask/mask_draw.c
+++ b/source/blender/editors/mask/mask_draw.c
@@ -35,7 +35,6 @@
#include "BLI_utildefines.h"
#include "BLI_math.h"
#include "BLI_rect.h"
-#include "BLI_task.h"
#include "BLI_listbase.h"
#include "BKE_context.h"
diff --git a/source/blender/editors/mesh/editmesh_bevel.c b/source/blender/editors/mesh/editmesh_bevel.c
index 4e796b9492a..585f45f20f8 100644
--- a/source/blender/editors/mesh/editmesh_bevel.c
+++ b/source/blender/editors/mesh/editmesh_bevel.c
@@ -30,7 +30,6 @@
#include "BLI_string.h"
#include "BLI_math.h"
-#include "BLI_linklist_stack.h"
#include "BLT_translation.h"
diff --git a/source/blender/editors/mesh/editmesh_extrude_screw.c b/source/blender/editors/mesh/editmesh_extrude_screw.c
index 08f1466a7a8..e9a517c19a7 100644
--- a/source/blender/editors/mesh/editmesh_extrude_screw.c
+++ b/source/blender/editors/mesh/editmesh_extrude_screw.c
@@ -49,8 +49,6 @@
#include "ED_screen.h"
#include "ED_view3d.h"
-
-
#include "mesh_intern.h" /* own include */
/* -------------------------------------------------------------------- */
diff --git a/source/blender/editors/mesh/editmesh_intersect.c b/source/blender/editors/mesh/editmesh_intersect.c
index 0d40f8589a1..e0c02a4cd39 100644
--- a/source/blender/editors/mesh/editmesh_intersect.c
+++ b/source/blender/editors/mesh/editmesh_intersect.c
@@ -30,7 +30,6 @@
#include "BLI_memarena.h"
#include "BLI_stack.h"
#include "BLI_buffer.h"
-#include "BLI_kdopbvh.h"
#include "BLI_linklist_stack.h"
#include "BKE_layer.h"
diff --git a/source/blender/editors/mesh/editmesh_loopcut.c b/source/blender/editors/mesh/editmesh_loopcut.c
index 352b0072c4d..30f7553b234 100644
--- a/source/blender/editors/mesh/editmesh_loopcut.c
+++ b/source/blender/editors/mesh/editmesh_loopcut.c
@@ -32,7 +32,6 @@
#include "MEM_guardedalloc.h"
-#include "BLI_stack.h"
#include "BLI_string.h"
#include "BLI_math.h"
diff --git a/source/blender/editors/mesh/editmesh_preselect_elem.c b/source/blender/editors/mesh/editmesh_preselect_elem.c
index e0b06019de1..b5e4f575cba 100644
--- a/source/blender/editors/mesh/editmesh_preselect_elem.c
+++ b/source/blender/editors/mesh/editmesh_preselect_elem.c
@@ -24,10 +24,8 @@
#include "MEM_guardedalloc.h"
-#include "BLI_stack.h"
#include "BLI_math.h"
-#include "BKE_context.h"
#include "BKE_editmesh.h"
#include "GPU_immediate.h"
diff --git a/source/blender/editors/mesh/editmesh_tools.c b/source/blender/editors/mesh/editmesh_tools.c
index f7056760d60..e3bd613ac39 100644
--- a/source/blender/editors/mesh/editmesh_tools.c
+++ b/source/blender/editors/mesh/editmesh_tools.c
@@ -46,7 +46,6 @@
#include "BLI_listbase.h"
#include "BLI_linklist.h"
#include "BLI_linklist_stack.h"
-#include "BLI_noise.h"
#include "BLI_math.h"
#include "BLI_rand.h"
#include "BLI_sort_utils.h"
diff --git a/source/blender/editors/mesh/editmesh_undo.c b/source/blender/editors/mesh/editmesh_undo.c
index 9b24157e4d9..235878fed53 100644
--- a/source/blender/editors/mesh/editmesh_undo.c
+++ b/source/blender/editors/mesh/editmesh_undo.c
@@ -34,7 +34,6 @@
#include "BLI_listbase.h"
#include "BLI_array_utils.h"
-#include "BLI_alloca.h"
#include "BKE_context.h"
#include "BKE_key.h"
diff --git a/source/blender/editors/mesh/mesh_data.c b/source/blender/editors/mesh/mesh_data.c
index 8b2c7601524..4ee5994b8b7 100644
--- a/source/blender/editors/mesh/mesh_data.c
+++ b/source/blender/editors/mesh/mesh_data.c
@@ -38,7 +38,6 @@
#include "BLI_utildefines.h"
#include "BLI_alloca.h"
-#include "BLI_path_util.h"
#include "BLI_math.h"
#include "BKE_context.h"
diff --git a/source/blender/editors/mesh/mesh_mirror.c b/source/blender/editors/mesh/mesh_mirror.c
index 32b0b653242..536c9a3b0ac 100644
--- a/source/blender/editors/mesh/mesh_mirror.c
+++ b/source/blender/editors/mesh/mesh_mirror.c
@@ -29,7 +29,6 @@
#include "MEM_guardedalloc.h"
#include "BLI_math.h"
-#include "BLI_bitmap.h"
#include "DNA_mesh_types.h"
#include "DNA_meshdata_types.h"
diff --git a/source/blender/editors/mesh/mesh_ops.c b/source/blender/editors/mesh/mesh_ops.c
index a517f41d1fe..34c840e017d 100644
--- a/source/blender/editors/mesh/mesh_ops.c
+++ b/source/blender/editors/mesh/mesh_ops.c
@@ -31,7 +31,6 @@
#include "DNA_scene_types.h"
#include "DNA_modifier_types.h"
-
#include "RNA_access.h"
#include "WM_api.h"
diff --git a/source/blender/editors/object/object_add.c b/source/blender/editors/object/object_add.c
index da911687f3e..462059262dd 100644
--- a/source/blender/editors/object/object_add.c
+++ b/source/blender/editors/object/object_add.c
@@ -90,7 +90,6 @@
#include "BKE_particle.h"
#include "BKE_report.h"
#include "BKE_scene.h"
-#include "BKE_screen.h"
#include "BKE_speaker.h"
#include "DEG_depsgraph.h"
diff --git a/source/blender/editors/object/object_bake.c b/source/blender/editors/object/object_bake.c
index a9efef2ab53..940c558c4d5 100644
--- a/source/blender/editors/object/object_bake.c
+++ b/source/blender/editors/object/object_bake.c
@@ -43,15 +43,12 @@
#include "DNA_meshdata_types.h"
#include "BLI_blenlib.h"
-#include "BLI_threads.h"
#include "BLI_utildefines.h"
#include "BKE_blender.h"
-#include "BKE_screen.h"
#include "BKE_context.h"
#include "BKE_global.h"
#include "BKE_image.h"
-#include "BKE_main.h"
#include "BKE_material.h"
#include "BKE_multires.h"
#include "BKE_report.h"
diff --git a/source/blender/editors/object/object_bake_api.c b/source/blender/editors/object/object_bake_api.c
index 5f403dad54a..da2c25db385 100644
--- a/source/blender/editors/object/object_bake_api.c
+++ b/source/blender/editors/object/object_bake_api.c
@@ -41,9 +41,7 @@
#include "RNA_enum_types.h"
#include "BLI_listbase.h"
-#include "BLI_string.h"
#include "BLI_fileops.h"
-#include "BLI_math_geom.h"
#include "BLI_path_util.h"
#include "BKE_context.h"
diff --git a/source/blender/editors/object/object_collection.c b/source/blender/editors/object/object_collection.c
index c9cdb77ca65..0761b7e4f4c 100644
--- a/source/blender/editors/object/object_collection.c
+++ b/source/blender/editors/object/object_collection.c
@@ -42,7 +42,6 @@
#include "BKE_collection.h"
#include "BKE_context.h"
#include "BKE_library.h"
-#include "BKE_library_remap.h"
#include "BKE_main.h"
#include "BKE_object.h"
#include "BKE_report.h"
diff --git a/source/blender/editors/object/object_constraint.c b/source/blender/editors/object/object_constraint.c
index 5416079ddf7..e362eb535b8 100644
--- a/source/blender/editors/object/object_constraint.c
+++ b/source/blender/editors/object/object_constraint.c
@@ -54,7 +54,6 @@
#include "BKE_constraint.h"
#include "BKE_context.h"
#include "BKE_fcurve.h"
-#include "BKE_global.h"
#include "BKE_main.h"
#include "BKE_object.h"
#include "BKE_report.h"
diff --git a/source/blender/editors/object/object_edit.c b/source/blender/editors/object/object_edit.c
index b3d6b7acaa2..f55bccdeb25 100644
--- a/source/blender/editors/object/object_edit.c
+++ b/source/blender/editors/object/object_edit.c
@@ -38,10 +38,8 @@
#include "MEM_guardedalloc.h"
#include "BLI_blenlib.h"
-#include "BLI_math.h"
#include "BLI_utildefines.h"
#include "BLI_ghash.h"
-#include "BLI_string_utils.h"
#include "BLT_translation.h"
@@ -73,7 +71,6 @@
#include "BKE_image.h"
#include "BKE_lattice.h"
#include "BKE_layer.h"
-#include "BKE_library.h"
#include "BKE_main.h"
#include "BKE_material.h"
#include "BKE_mball.h"
diff --git a/source/blender/editors/object/object_facemap_ops.c b/source/blender/editors/object/object_facemap_ops.c
index a111a73a42c..545082f82f0 100644
--- a/source/blender/editors/object/object_facemap_ops.c
+++ b/source/blender/editors/object/object_facemap_ops.c
@@ -33,8 +33,6 @@
#include "MEM_guardedalloc.h"
#include "BLI_utildefines.h"
-#include "BLI_path_util.h"
-#include "BLI_string.h"
#include "BLI_listbase.h"
#include "DNA_object_types.h"
diff --git a/source/blender/editors/object/object_gpencil_modifier.c b/source/blender/editors/object/object_gpencil_modifier.c
index 1523cafa928..e5f118bfba5 100644
--- a/source/blender/editors/object/object_gpencil_modifier.c
+++ b/source/blender/editors/object/object_gpencil_modifier.c
@@ -39,9 +39,7 @@
#include "DNA_object_types.h"
#include "DNA_scene_types.h"
-#include "BLI_math.h"
#include "BLI_listbase.h"
-#include "BLI_string.h"
#include "BLI_string_utf8.h"
#include "BLI_utildefines.h"
diff --git a/source/blender/editors/object/object_relations.c b/source/blender/editors/object/object_relations.c
index 80ae81ba737..c3d194e176f 100644
--- a/source/blender/editors/object/object_relations.c
+++ b/source/blender/editors/object/object_relations.c
@@ -70,7 +70,6 @@
#include "BKE_DerivedMesh.h"
#include "BKE_displist.h"
#include "BKE_editmesh.h"
-#include "BKE_global.h"
#include "BKE_gpencil.h"
#include "BKE_fcurve.h"
#include "BKE_idprop.h"
diff --git a/source/blender/editors/object/object_shader_fx.c b/source/blender/editors/object/object_shader_fx.c
index a7505c4b2cc..f8a33577f5d 100644
--- a/source/blender/editors/object/object_shader_fx.c
+++ b/source/blender/editors/object/object_shader_fx.c
@@ -39,9 +39,7 @@
#include "DNA_object_types.h"
#include "DNA_scene_types.h"
-#include "BLI_math.h"
#include "BLI_listbase.h"
-#include "BLI_string.h"
#include "BLI_string_utf8.h"
#include "BLI_utildefines.h"
diff --git a/source/blender/editors/object/object_vgroup.c b/source/blender/editors/object/object_vgroup.c
index 9108de3612a..624788c8123 100644
--- a/source/blender/editors/object/object_vgroup.c
+++ b/source/blender/editors/object/object_vgroup.c
@@ -50,7 +50,6 @@
#include "BLI_math.h"
#include "BLI_blenlib.h"
#include "BLI_utildefines.h"
-#include "BLI_linklist_stack.h"
#include "BLI_utildefines_stack.h"
diff --git a/source/blender/editors/physics/particle_edit.c b/source/blender/editors/physics/particle_edit.c
index 145b024af06..3ad3bafffa6 100644
--- a/source/blender/editors/physics/particle_edit.c
+++ b/source/blender/editors/physics/particle_edit.c
@@ -46,7 +46,6 @@
#include "BLI_math.h"
#include "BLI_lasso_2d.h"
#include "BLI_listbase.h"
-#include "BLI_string.h"
#include "BLI_kdtree.h"
#include "BLI_rand.h"
#include "BLI_task.h"
@@ -67,7 +66,6 @@
#include "DEG_depsgraph.h"
-#include "BIF_gl.h"
#include "ED_object.h"
#include "ED_physics.h"
diff --git a/source/blender/editors/physics/particle_edit_undo.c b/source/blender/editors/physics/particle_edit_undo.c
index 911a1ce0676..9839248a4cf 100644
--- a/source/blender/editors/physics/particle_edit_undo.c
+++ b/source/blender/editors/physics/particle_edit_undo.c
@@ -41,7 +41,6 @@
#include "DNA_windowmanager_types.h"
#include "BLI_listbase.h"
-#include "BLI_string.h"
#include "BLI_utildefines.h"
#include "BKE_context.h"
diff --git a/source/blender/editors/physics/physics_fluid.c b/source/blender/editors/physics/physics_fluid.c
index 4279cfd5101..96d67398b2b 100644
--- a/source/blender/editors/physics/physics_fluid.c
+++ b/source/blender/editors/physics/physics_fluid.c
@@ -41,15 +41,11 @@
#include "DNA_object_types.h"
#include "DNA_object_fluidsim_types.h"
-#include "BLI_blenlib.h"
-#include "BLI_path_util.h"
-#include "BLI_math.h"
#include "BLI_utildefines.h"
#include "BKE_context.h"
#include "BKE_customdata.h"
#include "BKE_fluidsim.h"
-#include "BKE_main.h"
#include "BKE_modifier.h"
#include "BKE_object.h"
#include "BKE_report.h"
@@ -69,7 +65,12 @@
/* enable/disable overall compilation */
#ifdef WITH_MOD_FLUID
+#include "BLI_blenlib.h"
+#include "BLI_path_util.h"
+#include "BLI_math.h"
+
#include "BKE_global.h"
+#include "BKE_main.h"
#include "WM_api.h"
diff --git a/source/blender/editors/physics/physics_pointcache.c b/source/blender/editors/physics/physics_pointcache.c
index bf94b510303..fcfbe5dca36 100644
--- a/source/blender/editors/physics/physics_pointcache.c
+++ b/source/blender/editors/physics/physics_pointcache.c
@@ -40,10 +40,8 @@
#include "DNA_scene_types.h"
#include "BKE_context.h"
-#include "BKE_screen.h"
#include "BKE_global.h"
#include "BKE_layer.h"
-#include "BKE_main.h"
#include "BKE_particle.h"
#include "BKE_pointcache.h"
diff --git a/source/blender/editors/render/render_internal.c b/source/blender/editors/render/render_internal.c
index 73ce1a1fa80..53158de6bae 100644
--- a/source/blender/editors/render/render_internal.c
+++ b/source/blender/editors/render/render_internal.c
@@ -34,7 +34,6 @@
#include "MEM_guardedalloc.h"
#include "BLI_listbase.h"
-#include "BLI_rect.h"
#include "BLI_timecode.h"
#include "BLI_math.h"
#include "BLI_threads.h"
@@ -87,9 +86,6 @@
#include "GPU_shader.h"
-#include "BIF_gl.h"
-#include "BIF_glutil.h"
-
#include "RNA_access.h"
#include "RNA_define.h"
diff --git a/source/blender/editors/render/render_preview.c b/source/blender/editors/render/render_preview.c
index ad2caead1e6..7d6940ee0cf 100644
--- a/source/blender/editors/render/render_preview.c
+++ b/source/blender/editors/render/render_preview.c
@@ -71,7 +71,6 @@
#include "BKE_icons.h"
#include "BKE_lamp.h"
#include "BKE_layer.h"
-#include "BKE_library_remap.h"
#include "BKE_main.h"
#include "BKE_material.h"
#include "BKE_node.h"
diff --git a/source/blender/editors/screen/area_utils.c b/source/blender/editors/screen/area_utils.c
index 53e2f96d6c4..b0efdfddbef 100644
--- a/source/blender/editors/screen/area_utils.c
+++ b/source/blender/editors/screen/area_utils.c
@@ -29,8 +29,6 @@
#include "BLI_blenlib.h"
#include "BLI_utildefines.h"
-#include "BKE_context.h"
-
#include "RNA_access.h"
#include "RNA_types.h"
diff --git a/source/blender/editors/screen/glutil.c b/source/blender/editors/screen/glutil.c
index 60a16d04efe..d1613a928b3 100644
--- a/source/blender/editors/screen/glutil.c
+++ b/source/blender/editors/screen/glutil.c
@@ -36,13 +36,11 @@
#include "DNA_userdef_types.h"
#include "DNA_vec_types.h"
-#include "BLI_rect.h"
#include "BLI_utildefines.h"
#include "BLI_math.h"
#include "BKE_context.h"
-#include "BIF_gl.h"
#include "BIF_glutil.h"
#include "IMB_colormanagement.h"
diff --git a/source/blender/editors/screen/screen_context.c b/source/blender/editors/screen/screen_context.c
index b1f390263d1..986f93fc48a 100644
--- a/source/blender/editors/screen/screen_context.c
+++ b/source/blender/editors/screen/screen_context.c
@@ -51,10 +51,8 @@
#include "BKE_action.h"
#include "BKE_armature.h"
#include "BKE_paint.h"
-#include "BKE_main.h"
#include "BKE_gpencil.h"
#include "BKE_layer.h"
-#include "BKE_screen.h"
#include "BKE_sequencer.h"
#include "BKE_workspace.h"
diff --git a/source/blender/editors/screen/screen_edit.c b/source/blender/editors/screen/screen_edit.c
index 7e6e31d339d..24808c9e389 100644
--- a/source/blender/editors/screen/screen_edit.c
+++ b/source/blender/editors/screen/screen_edit.c
@@ -38,7 +38,6 @@
#include "DNA_workspace_types.h"
#include "DNA_userdef_types.h"
-#include "BLI_math.h"
#include "BLI_blenlib.h"
#include "BLI_utildefines.h"
@@ -48,7 +47,6 @@
#include "BKE_image.h"
#include "BKE_layer.h"
#include "BKE_library.h"
-#include "BKE_library_remap.h"
#include "BKE_main.h"
#include "BKE_node.h"
#include "BKE_screen.h"
diff --git a/source/blender/editors/screen/workspace_edit.c b/source/blender/editors/screen/workspace_edit.c
index d734bac1eee..9da98f092bc 100644
--- a/source/blender/editors/screen/workspace_edit.c
+++ b/source/blender/editors/screen/workspace_edit.c
@@ -29,7 +29,6 @@
#include "BLI_fileops.h"
#include "BLI_listbase.h"
#include "BLI_path_util.h"
-#include "BLI_string.h"
#include "BKE_appdir.h"
#include "BKE_blendfile.h"
diff --git a/source/blender/editors/screen/workspace_layout_edit.c b/source/blender/editors/screen/workspace_layout_edit.c
index 6d504c05dd1..4a0a0138a6e 100644
--- a/source/blender/editors/screen/workspace_layout_edit.c
+++ b/source/blender/editors/screen/workspace_layout_edit.c
@@ -31,7 +31,6 @@
#include "DNA_workspace_types.h"
#include "BKE_context.h"
-#include "BKE_global.h"
#include "BKE_main.h"
#include "BKE_screen.h"
#include "BKE_workspace.h"
diff --git a/source/blender/editors/sculpt_paint/paint_curve_undo.c b/source/blender/editors/sculpt_paint/paint_curve_undo.c
index 77f06180df6..59f424a9f31 100644
--- a/source/blender/editors/sculpt_paint/paint_curve_undo.c
+++ b/source/blender/editors/sculpt_paint/paint_curve_undo.c
@@ -29,7 +29,6 @@
#include "DNA_brush_types.h"
#include "DNA_space_types.h"
-#include "BLI_string.h"
#include "BLI_array_utils.h"
#include "BKE_context.h"
diff --git a/source/blender/editors/sculpt_paint/paint_image.c b/source/blender/editors/sculpt_paint/paint_image.c
index f348273e745..f90b724ec2d 100644
--- a/source/blender/editors/sculpt_paint/paint_image.c
+++ b/source/blender/editors/sculpt_paint/paint_image.c
@@ -84,7 +84,6 @@
#include "GPU_immediate.h"
#include "GPU_state.h"
-#include "BIF_gl.h"
#include "IMB_colormanagement.h"
diff --git a/source/blender/editors/sculpt_paint/paint_image_undo.c b/source/blender/editors/sculpt_paint/paint_image_undo.c
index 2baa793d807..7a4641008a4 100644
--- a/source/blender/editors/sculpt_paint/paint_image_undo.c
+++ b/source/blender/editors/sculpt_paint/paint_image_undo.c
@@ -40,7 +40,6 @@
#include "BKE_context.h"
#include "BKE_image.h"
-#include "BKE_main.h"
#include "BKE_undo_system.h"
#include "DEG_depsgraph.h"
diff --git a/source/blender/editors/sculpt_paint/paint_ops.c b/source/blender/editors/sculpt_paint/paint_ops.c
index 7ff9faef1f7..8a3ed67a3a3 100644
--- a/source/blender/editors/sculpt_paint/paint_ops.c
+++ b/source/blender/editors/sculpt_paint/paint_ops.c
@@ -26,10 +26,8 @@
#include <stdlib.h>
#include "BLI_listbase.h"
-#include "BLI_string.h"
#include "BLI_utildefines.h"
#include "BLI_math_vector.h"
-#include "BLI_math_color.h"
#include "DNA_customdata_types.h"
#include "DNA_object_types.h"
diff --git a/source/blender/editors/sculpt_paint/paint_stroke.c b/source/blender/editors/sculpt_paint/paint_stroke.c
index 4e9feb7ace4..b7709082d2b 100644
--- a/source/blender/editors/sculpt_paint/paint_stroke.c
+++ b/source/blender/editors/sculpt_paint/paint_stroke.c
@@ -58,8 +58,6 @@
#include "WM_api.h"
#include "WM_types.h"
-#include "BIF_gl.h"
-#include "BIF_glutil.h"
#include "GPU_immediate.h"
#include "GPU_state.h"
diff --git a/source/blender/editors/sculpt_paint/paint_vertex_weight_ops.c b/source/blender/editors/sculpt_paint/paint_vertex_weight_ops.c
index 28e9816befe..372a54a4d80 100644
--- a/source/blender/editors/sculpt_paint/paint_vertex_weight_ops.c
+++ b/source/blender/editors/sculpt_paint/paint_vertex_weight_ops.c
@@ -26,10 +26,7 @@
#include "BLI_blenlib.h"
#include "BLI_math.h"
-#include "BLI_array_utils.h"
#include "BLI_bitmap.h"
-#include "BLI_task.h"
-#include "BLI_string_utils.h"
#include "IMB_imbuf.h"
#include "IMB_imbuf_types.h"
diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c
index dc607fe91fd..cc3b8398610 100644
--- a/source/blender/editors/sculpt_paint/sculpt.c
+++ b/source/blender/editors/sculpt_paint/sculpt.c
@@ -56,7 +56,6 @@
#include "BKE_ccg.h"
#include "BKE_colortools.h"
#include "BKE_context.h"
-#include "BKE_global.h"
#include "BKE_image.h"
#include "BKE_key.h"
#include "BKE_library.h"
diff --git a/source/blender/editors/space_action/action_buttons.c b/source/blender/editors/space_action/action_buttons.c
index 55ad773f4df..416bb5f096c 100644
--- a/source/blender/editors/space_action/action_buttons.c
+++ b/source/blender/editors/space_action/action_buttons.c
@@ -40,8 +40,6 @@
#include "MEM_guardedalloc.h"
-#include "BLI_math.h"
-#include "BLI_blenlib.h"
#include "BLI_utildefines.h"
#include "BLT_translation.h"
diff --git a/source/blender/editors/space_action/action_data.c b/source/blender/editors/space_action/action_data.c
index 9e801a8a56b..024c5c0c1b8 100644
--- a/source/blender/editors/space_action/action_data.c
+++ b/source/blender/editors/space_action/action_data.c
@@ -34,8 +34,6 @@
#include <float.h>
-#include "BLI_blenlib.h"
-#include "BLI_math.h"
#include "BLI_utildefines.h"
#include "BLT_translation.h"
diff --git a/source/blender/editors/space_action/action_draw.c b/source/blender/editors/space_action/action_draw.c
index 738c5e4d2e2..7c1855227b6 100644
--- a/source/blender/editors/space_action/action_draw.c
+++ b/source/blender/editors/space_action/action_draw.c
@@ -55,7 +55,6 @@
/* Everything from source (BIF, BDR, BSE) ------------------------------ */
-#include "BIF_gl.h"
#include "GPU_immediate.h"
#include "GPU_matrix.h"
diff --git a/source/blender/editors/space_action/space_action.c b/source/blender/editors/space_action/space_action.c
index 814d99d423c..0cf45a1c046 100644
--- a/source/blender/editors/space_action/space_action.c
+++ b/source/blender/editors/space_action/space_action.c
@@ -28,7 +28,6 @@
* \ingroup spaction
*/
-
#include <string.h>
#include <stdio.h>
@@ -40,7 +39,6 @@
#include "MEM_guardedalloc.h"
#include "BLI_blenlib.h"
-#include "BLI_math.h"
#include "BLI_utildefines.h"
#include "BKE_context.h"
@@ -54,8 +52,6 @@
#include "WM_types.h"
#include "WM_message.h"
-#include "BIF_gl.h"
-
#include "UI_resources.h"
#include "UI_view2d.h"
diff --git a/source/blender/editors/space_buttons/buttons_ops.c b/source/blender/editors/space_buttons/buttons_ops.c
index 473deb35aac..6dd5e73b5ee 100644
--- a/source/blender/editors/space_buttons/buttons_ops.c
+++ b/source/blender/editors/space_buttons/buttons_ops.c
@@ -43,7 +43,6 @@
#include "BLT_translation.h"
#include "BKE_context.h"
-#include "BKE_global.h"
#include "BKE_main.h"
#include "BKE_report.h"
diff --git a/source/blender/editors/space_clip/clip_buttons.c b/source/blender/editors/space_clip/clip_buttons.c
index 3f95dabf10a..ec01f432641 100644
--- a/source/blender/editors/space_clip/clip_buttons.c
+++ b/source/blender/editors/space_clip/clip_buttons.c
@@ -40,7 +40,6 @@
#include "BLI_math.h"
#include "BLI_utildefines.h"
-#include "BLI_listbase.h"
#include "BLI_path_util.h"
#include "BLI_string.h"
diff --git a/source/blender/editors/space_clip/clip_utils.c b/source/blender/editors/space_clip/clip_utils.c
index 7dd5816794f..bf63febb30e 100644
--- a/source/blender/editors/space_clip/clip_utils.c
+++ b/source/blender/editors/space_clip/clip_utils.c
@@ -35,7 +35,6 @@
#include "BLI_utildefines.h"
#include "BLI_listbase.h"
-#include "BLI_string.h"
#include "BKE_animsys.h"
#include "BKE_context.h"
diff --git a/source/blender/editors/space_clip/tracking_ops_track.c b/source/blender/editors/space_clip/tracking_ops_track.c
index cd8e92c9b9c..3bf332ee68b 100644
--- a/source/blender/editors/space_clip/tracking_ops_track.c
+++ b/source/blender/editors/space_clip/tracking_ops_track.c
@@ -33,7 +33,6 @@
#include "BLI_utildefines.h"
#include "BLI_math.h"
-#include "BLI_blenlib.h"
#include "BKE_main.h"
#include "BKE_context.h"
diff --git a/source/blender/editors/space_console/console_draw.c b/source/blender/editors/space_console/console_draw.c
index 789194c21b9..6dabe7b739f 100644
--- a/source/blender/editors/space_console/console_draw.c
+++ b/source/blender/editors/space_console/console_draw.c
@@ -39,7 +39,6 @@
#include "MEM_guardedalloc.h"
-#include "BIF_gl.h"
#include "GPU_immediate.h"
#include "UI_interface.h"
diff --git a/source/blender/editors/space_console/space_console.c b/source/blender/editors/space_console/space_console.c
index ece29bcd721..00bb4574bd2 100644
--- a/source/blender/editors/space_console/space_console.c
+++ b/source/blender/editors/space_console/space_console.c
@@ -38,8 +38,6 @@
#include "ED_space_api.h"
#include "ED_screen.h"
-#include "BIF_gl.h"
-
#include "RNA_access.h"
#include "WM_api.h"
diff --git a/source/blender/editors/space_file/file_draw.c b/source/blender/editors/space_file/file_draw.c
index 73c670b09ac..06f59f07146 100644
--- a/source/blender/editors/space_file/file_draw.c
+++ b/source/blender/editors/space_file/file_draw.c
@@ -35,7 +35,6 @@
#include "BLI_blenlib.h"
#include "BLI_utildefines.h"
-#include "BLI_fileops_types.h"
#include "BLI_math.h"
#ifdef WIN32
@@ -45,7 +44,6 @@
#include "BIF_glutil.h"
#include "BKE_context.h"
-#include "BKE_global.h"
#include "BKE_main.h"
#include "BLO_readfile.h"
diff --git a/source/blender/editors/space_file/file_ops.c b/source/blender/editors/space_file/file_ops.c
index 6fc14e59e31..2dcd13d2295 100644
--- a/source/blender/editors/space_file/file_ops.c
+++ b/source/blender/editors/space_file/file_ops.c
@@ -30,7 +30,6 @@
#include "BLI_blenlib.h"
#include "BLI_utildefines.h"
-#include "BLI_fileops_types.h"
#include "BLI_linklist.h"
#include "BLO_readfile.h"
diff --git a/source/blender/editors/space_file/file_utils.c b/source/blender/editors/space_file/file_utils.c
index fc870399696..97ebdca87fe 100644
--- a/source/blender/editors/space_file/file_utils.c
+++ b/source/blender/editors/space_file/file_utils.c
@@ -25,7 +25,6 @@
*/
#include "BLI_rect.h"
-#include "BLI_fileops.h"
#include "BLI_listbase.h"
#include "BLO_readfile.h"
diff --git a/source/blender/editors/space_file/filelist.c b/source/blender/editors/space_file/filelist.c
index 75b5218d816..2e99e7400f5 100644
--- a/source/blender/editors/space_file/filelist.c
+++ b/source/blender/editors/space_file/filelist.c
@@ -51,7 +51,6 @@
#include "BLI_fileops_types.h"
#include "BLI_fnmatch.h"
#include "BLI_ghash.h"
-#include "BLI_hash_md5.h"
#include "BLI_linklist.h"
#include "BLI_math.h"
#include "BLI_stack.h"
diff --git a/source/blender/editors/space_file/filesel.c b/source/blender/editors/space_file/filesel.c
index 9a38c16e020..17b42b43553 100644
--- a/source/blender/editors/space_file/filesel.c
+++ b/source/blender/editors/space_file/filesel.c
@@ -55,23 +55,19 @@
#include "BLI_blenlib.h"
#include "BLI_utildefines.h"
-#include "BLI_fileops_types.h"
#include "BLI_fnmatch.h"
#include "BKE_appdir.h"
#include "BKE_context.h"
-#include "BKE_global.h"
#include "BKE_main.h"
#include "BLF_api.h"
-
#include "ED_fileselect.h"
#include "WM_api.h"
#include "WM_types.h"
-
#include "RNA_access.h"
#include "UI_interface.h"
diff --git a/source/blender/editors/space_file/space_file.c b/source/blender/editors/space_file/space_file.c
index fb6dfdad4db..769e13ea5bf 100644
--- a/source/blender/editors/space_file/space_file.c
+++ b/source/blender/editors/space_file/space_file.c
@@ -33,11 +33,9 @@
#include "MEM_guardedalloc.h"
-#include "BIF_gl.h"
#include "BLI_blenlib.h"
#include "BLI_utildefines.h"
-#include "BLI_fileops_types.h"
#include "BKE_appdir.h"
diff --git a/source/blender/editors/space_graph/graph_draw.c b/source/blender/editors/space_graph/graph_draw.c
index 26667b6edf7..ce813c9ed8f 100644
--- a/source/blender/editors/space_graph/graph_draw.c
+++ b/source/blender/editors/space_graph/graph_draw.c
@@ -46,7 +46,6 @@
#include "BKE_curve.h"
#include "BKE_fcurve.h"
-#include "BIF_glutil.h"
#include "GPU_draw.h"
#include "GPU_immediate.h"
diff --git a/source/blender/editors/space_graph/graph_edit.c b/source/blender/editors/space_graph/graph_edit.c
index 6a01f4a9d49..80f0d03b8ca 100644
--- a/source/blender/editors/space_graph/graph_edit.c
+++ b/source/blender/editors/space_graph/graph_edit.c
@@ -58,7 +58,6 @@
#include "BKE_context.h"
#include "BKE_fcurve.h"
#include "BKE_global.h"
-#include "BKE_main.h"
#include "BKE_nla.h"
#include "BKE_report.h"
diff --git a/source/blender/editors/space_graph/space_graph.c b/source/blender/editors/space_graph/space_graph.c
index 4e37b0c7b3f..ed76e2375c4 100644
--- a/source/blender/editors/space_graph/space_graph.c
+++ b/source/blender/editors/space_graph/space_graph.c
@@ -43,8 +43,6 @@
#include "BLI_utildefines.h"
#include "BKE_context.h"
-#include "BKE_global.h"
-#include "BKE_main.h"
#include "BKE_fcurve.h"
#include "BKE_screen.h"
diff --git a/source/blender/editors/space_image/image_draw.c b/source/blender/editors/space_image/image_draw.c
index 21b917b607d..b8730e6067c 100644
--- a/source/blender/editors/space_image/image_draw.c
+++ b/source/blender/editors/space_image/image_draw.c
@@ -56,7 +56,6 @@
#include "IMB_moviecache.h"
#include "BKE_context.h"
-#include "BKE_global.h"
#include "BKE_image.h"
#include "BKE_paint.h"
diff --git a/source/blender/editors/space_image/image_ops.c b/source/blender/editors/space_image/image_ops.c
index 741777282f2..cc1dcf03e29 100644
--- a/source/blender/editors/space_image/image_ops.c
+++ b/source/blender/editors/space_image/image_ops.c
@@ -44,7 +44,6 @@
#include "BLI_math.h"
#include "BLI_blenlib.h"
#include "BLI_utildefines.h"
-#include "BLI_string_utf8.h"
#include "BLT_translation.h"
diff --git a/source/blender/editors/space_image/space_image.c b/source/blender/editors/space_image/space_image.c
index ec87d611b31..fc1bf0fcbff 100644
--- a/source/blender/editors/space_image/space_image.c
+++ b/source/blender/editors/space_image/space_image.c
@@ -71,7 +71,6 @@
#include "ED_uvedit.h"
#include "ED_transform.h"
-#include "BIF_gl.h"
#include "WM_api.h"
#include "WM_types.h"
diff --git a/source/blender/editors/space_info/info_draw.c b/source/blender/editors/space_info/info_draw.c
index ecd0b082df6..ec2c6dccaab 100644
--- a/source/blender/editors/space_info/info_draw.c
+++ b/source/blender/editors/space_info/info_draw.c
@@ -33,7 +33,6 @@
#include <sys/stat.h>
#include <limits.h>
-
#include "BLI_utildefines.h"
#include "DNA_space_types.h"
@@ -42,9 +41,6 @@
// #include "BKE_suggestions.h"
#include "BKE_report.h"
-#include "BIF_gl.h"
-
-
#include "UI_resources.h"
#include "UI_interface.h"
#include "UI_view2d.h"
diff --git a/source/blender/editors/space_info/space_info.c b/source/blender/editors/space_info/space_info.c
index 076b66ef012..1156efbc2dd 100644
--- a/source/blender/editors/space_info/space_info.c
+++ b/source/blender/editors/space_info/space_info.c
@@ -40,14 +40,11 @@
#include "BLT_translation.h"
#include "BKE_context.h"
-#include "BKE_global.h"
#include "BKE_screen.h"
#include "ED_space_api.h"
#include "ED_screen.h"
-#include "BIF_gl.h"
-
#include "WM_api.h"
#include "WM_types.h"
#include "WM_message.h"
diff --git a/source/blender/editors/space_info/textview.c b/source/blender/editors/space_info/textview.c
index f1a40b41d55..9bcca94b119 100644
--- a/source/blender/editors/space_info/textview.c
+++ b/source/blender/editors/space_info/textview.c
@@ -42,7 +42,6 @@
#include "GPU_immediate.h"
#include "GPU_state.h"
-#include "BIF_gl.h"
#include "BKE_text.h"
diff --git a/source/blender/editors/space_nla/nla_draw.c b/source/blender/editors/space_nla/nla_draw.c
index 96e6a0e479d..528eac5da55 100644
--- a/source/blender/editors/space_nla/nla_draw.c
+++ b/source/blender/editors/space_nla/nla_draw.c
@@ -53,7 +53,6 @@
#include "ED_anim_api.h"
#include "ED_keyframes_draw.h"
-#include "BIF_glutil.h"
#include "GPU_immediate.h"
#include "GPU_immediate_util.h"
diff --git a/source/blender/editors/space_nla/space_nla.c b/source/blender/editors/space_nla/space_nla.c
index 1a7793fadb9..73a4c640758 100644
--- a/source/blender/editors/space_nla/space_nla.c
+++ b/source/blender/editors/space_nla/space_nla.c
@@ -42,8 +42,6 @@
#include "BLI_utildefines.h"
#include "BKE_context.h"
-#include "BKE_global.h"
-#include "BKE_main.h"
#include "BKE_screen.h"
#include "ED_space_api.h"
@@ -51,7 +49,6 @@
#include "ED_markers.h"
#include "ED_screen.h"
-#include "BIF_gl.h"
#include "WM_api.h"
#include "WM_types.h"
diff --git a/source/blender/editors/space_node/node_group.c b/source/blender/editors/space_node/node_group.c
index 91bb95c9cb4..ccb73d5bc9f 100644
--- a/source/blender/editors/space_node/node_group.c
+++ b/source/blender/editors/space_node/node_group.c
@@ -45,7 +45,6 @@
#include "BKE_action.h"
#include "BKE_animsys.h"
#include "BKE_context.h"
-#include "BKE_global.h"
#include "BKE_library.h"
#include "BKE_main.h"
#include "BKE_report.h"
diff --git a/source/blender/editors/space_node/node_relationships.c b/source/blender/editors/space_node/node_relationships.c
index 368bc0fd4b3..44ee667f99c 100644
--- a/source/blender/editors/space_node/node_relationships.c
+++ b/source/blender/editors/space_node/node_relationships.c
@@ -40,7 +40,6 @@
#include "BKE_animsys.h"
#include "BKE_context.h"
-#include "BKE_global.h"
#include "BKE_library.h"
#include "BKE_main.h"
#include "BKE_node.h"
diff --git a/source/blender/editors/space_node/node_templates.c b/source/blender/editors/space_node/node_templates.c
index 76cd7700216..b55a6b3333f 100644
--- a/source/blender/editors/space_node/node_templates.c
+++ b/source/blender/editors/space_node/node_templates.c
@@ -39,7 +39,6 @@
#include "BLT_translation.h"
#include "BKE_context.h"
-#include "BKE_global.h"
#include "BKE_library.h"
#include "BKE_main.h"
#include "BKE_scene.h"
diff --git a/source/blender/editors/space_outliner/outliner_draw.c b/source/blender/editors/space_outliner/outliner_draw.c
index 6c8d95c22fd..2ba5a510f7b 100644
--- a/source/blender/editors/space_outliner/outliner_draw.c
+++ b/source/blender/editors/space_outliner/outliner_draw.c
@@ -51,7 +51,6 @@
#include "BKE_context.h"
#include "BKE_deform.h"
#include "BKE_fcurve.h"
-#include "BKE_global.h"
#include "BKE_gpencil.h"
#include "BKE_idcode.h"
#include "BKE_layer.h"
diff --git a/source/blender/editors/space_outliner/outliner_edit.c b/source/blender/editors/space_outliner/outliner_edit.c
index 37f41cbf207..ee4c9dcb0ce 100644
--- a/source/blender/editors/space_outliner/outliner_edit.c
+++ b/source/blender/editors/space_outliner/outliner_edit.c
@@ -43,9 +43,6 @@
#include "BLI_blenlib.h"
#include "BLI_utildefines.h"
#include "BLI_path_util.h"
-#include "BLI_mempool.h"
-#include "BLI_stack.h"
-#include "BLI_string.h"
#include "BLT_translation.h"
diff --git a/source/blender/editors/space_outliner/outliner_ops.c b/source/blender/editors/space_outliner/outliner_ops.c
index 87c9827a15a..9de25bf3187 100644
--- a/source/blender/editors/space_outliner/outliner_ops.c
+++ b/source/blender/editors/space_outliner/outliner_ops.c
@@ -30,15 +30,11 @@
#include "MEM_guardedalloc.h"
-#include "BLI_listbase.h"
-#include "BLI_math.h"
#include "DNA_collection_types.h"
#include "BLT_translation.h"
-#include "BKE_context.h"
-#include "BKE_main.h"
#include "GPU_immediate.h"
#include "GPU_state.h"
diff --git a/source/blender/editors/space_outliner/outliner_tools.c b/source/blender/editors/space_outliner/outliner_tools.c
index a3c40918229..01836e1a666 100644
--- a/source/blender/editors/space_outliner/outliner_tools.c
+++ b/source/blender/editors/space_outliner/outliner_tools.c
@@ -60,7 +60,6 @@
#include "BKE_library.h"
#include "BKE_library_override.h"
#include "BKE_library_query.h"
-#include "BKE_library_remap.h"
#include "BKE_main.h"
#include "BKE_report.h"
#include "BKE_scene.h"
diff --git a/source/blender/editors/space_outliner/space_outliner.c b/source/blender/editors/space_outliner/space_outliner.c
index 423641c6fdd..73227e1f090 100644
--- a/source/blender/editors/space_outliner/space_outliner.c
+++ b/source/blender/editors/space_outliner/space_outliner.c
@@ -51,8 +51,6 @@
#include "WM_message.h"
#include "WM_types.h"
-#include "BIF_gl.h"
-
#include "RNA_access.h"
#include "DNA_scene_types.h"
diff --git a/source/blender/editors/space_script/script_edit.c b/source/blender/editors/space_script/script_edit.c
index ee8dcf0ca9a..bfca232a58c 100644
--- a/source/blender/editors/space_script/script_edit.c
+++ b/source/blender/editors/space_script/script_edit.c
@@ -36,7 +36,6 @@
#include "BKE_context.h"
#include "BKE_report.h"
-#include "BKE_global.h"
#include "WM_api.h"
#include "WM_types.h"
diff --git a/source/blender/editors/space_script/space_script.c b/source/blender/editors/space_script/space_script.c
index e3ae8accb67..2654374cb4f 100644
--- a/source/blender/editors/space_script/space_script.c
+++ b/source/blender/editors/space_script/space_script.c
@@ -43,7 +43,6 @@
#include "ED_space_api.h"
#include "ED_screen.h"
-#include "BIF_gl.h"
#include "WM_api.h"
#include "WM_types.h"
diff --git a/source/blender/editors/space_sequencer/sequencer_add.c b/source/blender/editors/space_sequencer/sequencer_add.c
index 5452bd9cc80..6b5c63cee17 100644
--- a/source/blender/editors/space_sequencer/sequencer_add.c
+++ b/source/blender/editors/space_sequencer/sequencer_add.c
@@ -45,7 +45,6 @@
#include "BKE_context.h"
-#include "BKE_global.h"
#include "BKE_library.h"
#include "BKE_main.h"
#include "BKE_mask.h"
diff --git a/source/blender/editors/space_sequencer/sequencer_buttons.c b/source/blender/editors/space_sequencer/sequencer_buttons.c
index a4bca555490..e001fa49896 100644
--- a/source/blender/editors/space_sequencer/sequencer_buttons.c
+++ b/source/blender/editors/space_sequencer/sequencer_buttons.c
@@ -31,7 +31,6 @@
#include "MEM_guardedalloc.h"
-#include "BLI_blenlib.h"
#include "BLI_utildefines.h"
#include "BLT_translation.h"
diff --git a/source/blender/editors/space_sequencer/sequencer_draw.c b/source/blender/editors/space_sequencer/sequencer_draw.c
index e6872496810..e33b3ba90aa 100644
--- a/source/blender/editors/space_sequencer/sequencer_draw.c
+++ b/source/blender/editors/space_sequencer/sequencer_draw.c
@@ -48,7 +48,6 @@
#include "BKE_context.h"
#include "BKE_global.h"
-#include "BKE_main.h"
#include "BKE_sequencer.h"
#include "BKE_sound.h"
#include "BKE_scene.h"
@@ -56,7 +55,6 @@
#include "IMB_colormanagement.h"
#include "IMB_imbuf.h"
-#include "BIF_glutil.h"
#include "GPU_immediate.h"
#include "GPU_immediate_util.h"
diff --git a/source/blender/editors/space_text/space_text.c b/source/blender/editors/space_text/space_text.c
index 8e04cd83fc5..528f0b9cee1 100644
--- a/source/blender/editors/space_text/space_text.c
+++ b/source/blender/editors/space_text/space_text.c
@@ -45,7 +45,6 @@
#include "ED_space_api.h"
#include "ED_screen.h"
-#include "BIF_gl.h"
#include "WM_api.h"
#include "WM_types.h"
diff --git a/source/blender/editors/space_text/text_draw.c b/source/blender/editors/space_text/text_draw.c
index fd7d2c92db9..0347dd6de35 100644
--- a/source/blender/editors/space_text/text_draw.c
+++ b/source/blender/editors/space_text/text_draw.c
@@ -46,8 +46,6 @@
#include "ED_text.h"
-#include "BIF_gl.h"
-#include "BIF_glutil.h"
#include "GPU_immediate.h"
#include "GPU_state.h"
diff --git a/source/blender/editors/space_text/text_ops.c b/source/blender/editors/space_text/text_ops.c
index 0045eec4f7e..c3c4a472fe7 100644
--- a/source/blender/editors/space_text/text_ops.c
+++ b/source/blender/editors/space_text/text_ops.c
@@ -44,7 +44,6 @@
#include "PIL_time.h"
#include "BKE_context.h"
-#include "BKE_global.h"
#include "BKE_library.h"
#include "BKE_main.h"
#include "BKE_report.h"
diff --git a/source/blender/editors/space_text/text_undo.c b/source/blender/editors/space_text/text_undo.c
index b427ce43dbb..f2bbcddcc27 100644
--- a/source/blender/editors/space_text/text_undo.c
+++ b/source/blender/editors/space_text/text_undo.c
@@ -29,7 +29,6 @@
#include "DNA_text_types.h"
-#include "BLI_listbase.h"
#include "BLI_array_utils.h"
#include "BLT_translation.h"
diff --git a/source/blender/editors/space_view3d/view3d_camera_control.c b/source/blender/editors/space_view3d/view3d_camera_control.c
index dc9144a4f5a..839ed10d881 100644
--- a/source/blender/editors/space_view3d/view3d_camera_control.c
+++ b/source/blender/editors/space_view3d/view3d_camera_control.c
@@ -54,7 +54,6 @@
#include "BLI_utildefines.h"
#include "BKE_object.h"
-#include "BKE_context.h"
#include "DEG_depsgraph.h"
diff --git a/source/blender/editors/space_view3d/view3d_draw.c b/source/blender/editors/space_view3d/view3d_draw.c
index 6c9d5f590c8..1916fd86b60 100644
--- a/source/blender/editors/space_view3d/view3d_draw.c
+++ b/source/blender/editors/space_view3d/view3d_draw.c
@@ -37,8 +37,6 @@
#include "BLI_threads.h"
#include "BLI_jitter_2d.h"
-#include "BIF_gl.h"
-#include "BIF_glutil.h"
#include "BKE_camera.h"
#include "BKE_collection.h"
diff --git a/source/blender/editors/space_view3d/view3d_draw_legacy.c b/source/blender/editors/space_view3d/view3d_draw_legacy.c
index 187413e6e62..e9073f7024d 100644
--- a/source/blender/editors/space_view3d/view3d_draw_legacy.c
+++ b/source/blender/editors/space_view3d/view3d_draw_legacy.c
@@ -48,7 +48,6 @@
#include "BLI_blenlib.h"
#include "BLI_math.h"
-#include "BLI_jitter_2d.h"
#include "BLI_utildefines.h"
#include "BLI_endian_switch.h"
#include "BLI_threads.h"
@@ -60,12 +59,10 @@
#include "BKE_image.h"
#include "BKE_key.h"
#include "BKE_layer.h"
-#include "BKE_main.h"
#include "BKE_object.h"
#include "BKE_global.h"
#include "BKE_paint.h"
#include "BKE_scene.h"
-#include "BKE_screen.h"
#include "BKE_unit.h"
#include "BKE_movieclip.h"
diff --git a/source/blender/editors/space_view3d/view3d_fly.c b/source/blender/editors/space_view3d/view3d_fly.c
index 319b79c43f4..e5218031c27 100644
--- a/source/blender/editors/space_view3d/view3d_fly.c
+++ b/source/blender/editors/space_view3d/view3d_fly.c
@@ -44,7 +44,6 @@
#include "BLT_translation.h"
-#include "BIF_gl.h"
#include "WM_api.h"
#include "WM_types.h"
diff --git a/source/blender/editors/space_view3d/view3d_gizmo_empty.c b/source/blender/editors/space_view3d/view3d_gizmo_empty.c
index b0eb9993576..6723811264b 100644
--- a/source/blender/editors/space_view3d/view3d_gizmo_empty.c
+++ b/source/blender/editors/space_view3d/view3d_gizmo_empty.c
@@ -23,7 +23,6 @@
*/
-#include "BLI_blenlib.h"
#include "BLI_math.h"
#include "BLI_utildefines.h"
diff --git a/source/blender/editors/space_view3d/view3d_gizmo_forcefield.c b/source/blender/editors/space_view3d/view3d_gizmo_forcefield.c
index b49a38085a1..1d812ec7dfd 100644
--- a/source/blender/editors/space_view3d/view3d_gizmo_forcefield.c
+++ b/source/blender/editors/space_view3d/view3d_gizmo_forcefield.c
@@ -23,8 +23,6 @@
*/
-#include "BLI_blenlib.h"
-#include "BLI_math.h"
#include "BLI_utildefines.h"
#include "BKE_context.h"
diff --git a/source/blender/editors/space_view3d/view3d_gizmo_lamp.c b/source/blender/editors/space_view3d/view3d_gizmo_lamp.c
index a723dae058a..616b03cd1a1 100644
--- a/source/blender/editors/space_view3d/view3d_gizmo_lamp.c
+++ b/source/blender/editors/space_view3d/view3d_gizmo_lamp.c
@@ -23,7 +23,6 @@
*/
-#include "BLI_blenlib.h"
#include "BLI_math.h"
#include "BLI_utildefines.h"
diff --git a/source/blender/editors/space_view3d/view3d_gizmo_navigate.c b/source/blender/editors/space_view3d/view3d_gizmo_navigate.c
index 0d9f7eef922..3626cfbe5a4 100644
--- a/source/blender/editors/space_view3d/view3d_gizmo_navigate.c
+++ b/source/blender/editors/space_view3d/view3d_gizmo_navigate.c
@@ -22,7 +22,6 @@
* \ingroup spview3d
*/
-#include "BLI_blenlib.h"
#include "BLI_math.h"
#include "BLI_utildefines.h"
diff --git a/source/blender/editors/space_view3d/view3d_gizmo_navigate_type.c b/source/blender/editors/space_view3d/view3d_gizmo_navigate_type.c
index d71cd68c2c0..d4f500481ac 100644
--- a/source/blender/editors/space_view3d/view3d_gizmo_navigate_type.c
+++ b/source/blender/editors/space_view3d/view3d_gizmo_navigate_type.c
@@ -37,8 +37,6 @@
#include "BKE_context.h"
-#include "BIF_gl.h"
-#include "BIF_glutil.h"
#include "GPU_immediate.h"
#include "GPU_immediate_util.h"
diff --git a/source/blender/editors/space_view3d/view3d_gizmo_preselect.c b/source/blender/editors/space_view3d/view3d_gizmo_preselect.c
index 7b8e3a76c85..716f1755014 100644
--- a/source/blender/editors/space_view3d/view3d_gizmo_preselect.c
+++ b/source/blender/editors/space_view3d/view3d_gizmo_preselect.c
@@ -24,8 +24,6 @@
#include "MEM_guardedalloc.h"
-#include "BLI_blenlib.h"
-#include "BLI_math.h"
#include "BLI_utildefines.h"
#include "BKE_context.h"
diff --git a/source/blender/editors/space_view3d/view3d_gizmo_ruler.c b/source/blender/editors/space_view3d/view3d_gizmo_ruler.c
index 2b0f7727677..b5986ea220c 100644
--- a/source/blender/editors/space_view3d/view3d_gizmo_ruler.c
+++ b/source/blender/editors/space_view3d/view3d_gizmo_ruler.c
@@ -44,8 +44,6 @@
#include "DNA_gpencil_types.h"
#include "DNA_view3d_types.h"
-#include "BIF_gl.h"
-
#include "ED_gizmo_utils.h"
#include "ED_gpencil.h"
#include "ED_screen.h"
@@ -72,7 +70,6 @@
#include "BLF_api.h"
-
static const char *view3d_gzgt_ruler_id = "VIEW3D_GGT_ruler";
diff --git a/source/blender/editors/space_view3d/view3d_header.c b/source/blender/editors/space_view3d/view3d_header.c
index f54548cee37..628e466a826 100644
--- a/source/blender/editors/space_view3d/view3d_header.c
+++ b/source/blender/editors/space_view3d/view3d_header.c
@@ -42,8 +42,6 @@
#include "BLT_translation.h"
#include "BKE_context.h"
-#include "BKE_main.h"
-#include "BKE_screen.h"
#include "BKE_editmesh.h"
#include "DEG_depsgraph.h"
diff --git a/source/blender/editors/space_view3d/view3d_iterators.c b/source/blender/editors/space_view3d/view3d_iterators.c
index 9ee7cbabd2a..c2e70a29961 100644
--- a/source/blender/editors/space_view3d/view3d_iterators.c
+++ b/source/blender/editors/space_view3d/view3d_iterators.c
@@ -42,7 +42,6 @@
#include "BKE_DerivedMesh.h"
#include "BKE_displist.h"
#include "BKE_editmesh.h"
-#include "BKE_context.h"
#include "BKE_mesh_runtime.h"
#include "BKE_mesh_iterators.h"
diff --git a/source/blender/editors/space_view3d/view3d_utils.c b/source/blender/editors/space_view3d/view3d_utils.c
index 57a8f2e46d7..8102d9cbb37 100644
--- a/source/blender/editors/space_view3d/view3d_utils.c
+++ b/source/blender/editors/space_view3d/view3d_utils.c
@@ -47,14 +47,12 @@
#include "BKE_camera.h"
#include "BKE_context.h"
-#include "BKE_main.h"
#include "BKE_object.h"
#include "BKE_screen.h"
#include "DEG_depsgraph.h"
#include "DEG_depsgraph_query.h"
-#include "BIF_gl.h"
#include "BIF_glutil.h"
#include "GPU_matrix.h"
diff --git a/source/blender/editors/space_view3d/view3d_walk.c b/source/blender/editors/space_view3d/view3d_walk.c
index 973f76a8b53..a2c3b5647f7 100644
--- a/source/blender/editors/space_view3d/view3d_walk.c
+++ b/source/blender/editors/space_view3d/view3d_walk.c
@@ -42,9 +42,6 @@
#include "BLT_translation.h"
-
-#include "BIF_gl.h"
-
#include "WM_api.h"
#include "WM_types.h"
diff --git a/source/blender/editors/transform/transform.c b/source/blender/editors/transform/transform.c
index 7d488b91ca5..93173dbe9f3 100644
--- a/source/blender/editors/transform/transform.c
+++ b/source/blender/editors/transform/transform.c
@@ -72,8 +72,6 @@
#include "DEG_depsgraph.h"
-#include "BIF_glutil.h"
-
#include "GPU_immediate.h"
#include "GPU_immediate_util.h"
#include "GPU_matrix.h"
diff --git a/source/blender/editors/transform/transform_gizmo_2d.c b/source/blender/editors/transform/transform_gizmo_2d.c
index 7d0584e3571..e0f64350db4 100644
--- a/source/blender/editors/transform/transform_gizmo_2d.c
+++ b/source/blender/editors/transform/transform_gizmo_2d.c
@@ -28,7 +28,6 @@
#include "MEM_guardedalloc.h"
-#include "BLI_listbase.h"
#include "BLI_math.h"
#include "DNA_meshdata_types.h"
diff --git a/source/blender/editors/transform/transform_gizmo_3d.c b/source/blender/editors/transform/transform_gizmo_3d.c
index 03851e5f0cf..a8469fe7412 100644
--- a/source/blender/editors/transform/transform_gizmo_3d.c
+++ b/source/blender/editors/transform/transform_gizmo_3d.c
@@ -59,8 +59,6 @@
#include "BKE_workspace.h"
#include "BKE_object.h"
-#include "BIF_gl.h"
-
#include "DEG_depsgraph.h"
#include "WM_api.h"
diff --git a/source/blender/editors/transform/transform_orientations.c b/source/blender/editors/transform/transform_orientations.c
index f08b26455fc..4539fad7b82 100644
--- a/source/blender/editors/transform/transform_orientations.c
+++ b/source/blender/editors/transform/transform_orientations.c
@@ -51,8 +51,6 @@
#include "BKE_context.h"
#include "BKE_editmesh.h"
#include "BKE_report.h"
-#include "BKE_main.h"
-#include "BKE_screen.h"
#include "BKE_scene.h"
#include "BKE_workspace.h"
diff --git a/source/blender/editors/transform/transform_snap.c b/source/blender/editors/transform/transform_snap.c
index 677da81127d..29008b512b8 100644
--- a/source/blender/editors/transform/transform_snap.c
+++ b/source/blender/editors/transform/transform_snap.c
@@ -52,7 +52,6 @@
#include "GPU_immediate.h"
#include "GPU_state.h"
-#include "BKE_global.h"
#include "BKE_layer.h"
#include "BKE_object.h"
#include "BKE_anim.h" /* for duplis */
diff --git a/source/blender/editors/transform/transform_snap_object.c b/source/blender/editors/transform/transform_snap_object.c
index b954aa27d74..14ee2d1857a 100644
--- a/source/blender/editors/transform/transform_snap_object.c
+++ b/source/blender/editors/transform/transform_snap_object.c
@@ -33,7 +33,6 @@
#include "BLI_kdopbvh.h"
#include "BLI_memarena.h"
#include "BLI_ghash.h"
-#include "BLI_linklist.h"
#include "BLI_listbase.h"
#include "BLI_utildefines.h"
diff --git a/source/blender/editors/util/ed_util.c b/source/blender/editors/util/ed_util.c
index 3bd87314c12..1d56ef24403 100644
--- a/source/blender/editors/util/ed_util.c
+++ b/source/blender/editors/util/ed_util.c
@@ -46,9 +46,6 @@
#include "BLI_string.h"
#include "BLI_path_util.h"
-#include "BIF_gl.h"
-#include "BIF_glutil.h"
-
#include "BLT_translation.h"
#include "BKE_context.h"
diff --git a/source/blender/editors/uvedit/uvedit_draw.c b/source/blender/editors/uvedit/uvedit_draw.c
index 4aa3f8fd08a..4f3daa4650d 100644
--- a/source/blender/editors/uvedit/uvedit_draw.c
+++ b/source/blender/editors/uvedit/uvedit_draw.c
@@ -47,8 +47,6 @@
#include "BLI_math.h"
#include "BLI_utildefines.h"
-#include "BLI_buffer.h"
-#include "BLI_bitmap.h"
#include "BKE_deform.h"
#include "BKE_editmesh.h"
@@ -57,8 +55,6 @@
#include "BKE_scene.h"
-#include "BIF_glutil.h"
-
#include "DEG_depsgraph.h"
#include "DEG_depsgraph_query.h"
diff --git a/source/blender/editors/uvedit/uvedit_parametrizer.c b/source/blender/editors/uvedit/uvedit_parametrizer.c
index cc1336d0827..7d0439d9b66 100644
--- a/source/blender/editors/uvedit/uvedit_parametrizer.c
+++ b/source/blender/editors/uvedit/uvedit_parametrizer.c
@@ -27,7 +27,6 @@
#include "MEM_guardedalloc.h"
#include "BLI_utildefines.h"
-#include "BLI_alloca.h"
#include "BLI_memarena.h"
#include "BLI_math.h"
#include "BLI_rand.h"
diff --git a/source/blender/editors/uvedit/uvedit_smart_stitch.c b/source/blender/editors/uvedit/uvedit_smart_stitch.c
index 4f770d82db8..c08a4c611c3 100644
--- a/source/blender/editors/uvedit/uvedit_smart_stitch.c
+++ b/source/blender/editors/uvedit/uvedit_smart_stitch.c
@@ -48,8 +48,6 @@
#include "BLT_translation.h"
-#include "BIF_gl.h"
-
#include "BKE_context.h"
#include "BKE_customdata.h"
#include "BKE_mesh_mapping.h"
diff --git a/source/blender/gpencil_modifiers/intern/MOD_gpencil_util.c b/source/blender/gpencil_modifiers/intern/MOD_gpencil_util.c
index d7828632ebf..f9b58330085 100644
--- a/source/blender/gpencil_modifiers/intern/MOD_gpencil_util.c
+++ b/source/blender/gpencil_modifiers/intern/MOD_gpencil_util.c
@@ -36,8 +36,6 @@
#include "BLI_ghash.h"
#include "BLI_utildefines.h"
#include "BLI_math_vector.h"
-#include "BLI_math_color.h"
-#include "BLI_rand.h"
#include "DNA_meshdata_types.h"
#include "DNA_scene_types.h"
@@ -46,7 +44,6 @@
#include "DNA_gpencil_modifier_types.h"
#include "BKE_deform.h"
-#include "BKE_global.h"
#include "BKE_main.h"
#include "BKE_object.h"
#include "BKE_lattice.h"
diff --git a/source/blender/gpencil_modifiers/intern/MOD_gpencilarmature.c b/source/blender/gpencil_modifiers/intern/MOD_gpencilarmature.c
index 55728ca581f..04c0071579f 100644
--- a/source/blender/gpencil_modifiers/intern/MOD_gpencilarmature.c
+++ b/source/blender/gpencil_modifiers/intern/MOD_gpencilarmature.c
@@ -39,12 +39,9 @@
#include "DNA_modifier_types.h"
#include "BLI_math.h"
-#include "BLI_listbase.h"
-#include "BLI_task.h"
#include "BLI_utildefines.h"
#include "BKE_lattice.h"
-#include "BKE_context.h"
#include "BKE_gpencil.h"
#include "BKE_gpencil_modifier.h"
#include "BKE_modifier.h"
diff --git a/source/blender/gpencil_modifiers/intern/MOD_gpencilarray.c b/source/blender/gpencil_modifiers/intern/MOD_gpencilarray.c
index 553d9087c3f..38c470e4ad6 100644
--- a/source/blender/gpencil_modifiers/intern/MOD_gpencilarray.c
+++ b/source/blender/gpencil_modifiers/intern/MOD_gpencilarray.c
@@ -45,7 +45,6 @@
#include "BKE_gpencil.h"
#include "BKE_gpencil_modifier.h"
#include "BKE_modifier.h"
-#include "BKE_context.h"
#include "BKE_global.h"
#include "BKE_object.h"
#include "BKE_main.h"
diff --git a/source/blender/gpencil_modifiers/intern/MOD_gpencilbuild.c b/source/blender/gpencil_modifiers/intern/MOD_gpencilbuild.c
index e9e82d0ed8e..26cda53d642 100644
--- a/source/blender/gpencil_modifiers/intern/MOD_gpencilbuild.c
+++ b/source/blender/gpencil_modifiers/intern/MOD_gpencilbuild.c
@@ -42,7 +42,6 @@
#include "BLI_math.h"
#include "BLI_utildefines.h"
-#include "BKE_context.h"
#include "BKE_gpencil.h"
#include "BKE_gpencil_modifier.h"
diff --git a/source/blender/gpencil_modifiers/intern/MOD_gpencilcolor.c b/source/blender/gpencil_modifiers/intern/MOD_gpencilcolor.c
index 94c5e9ddbdf..31c44c25a2d 100644
--- a/source/blender/gpencil_modifiers/intern/MOD_gpencilcolor.c
+++ b/source/blender/gpencil_modifiers/intern/MOD_gpencilcolor.c
@@ -41,8 +41,6 @@
#include "BLI_math_vector.h"
#include "BLI_utildefines.h"
-#include "BKE_global.h"
-#include "BKE_context.h"
#include "BKE_gpencil.h"
#include "BKE_gpencil_modifier.h"
#include "BKE_main.h"
diff --git a/source/blender/gpencil_modifiers/intern/MOD_gpencilhook.c b/source/blender/gpencil_modifiers/intern/MOD_gpencilhook.c
index 06cdbfcbbce..91ac040d6fd 100644
--- a/source/blender/gpencil_modifiers/intern/MOD_gpencilhook.c
+++ b/source/blender/gpencil_modifiers/intern/MOD_gpencilhook.c
@@ -41,7 +41,6 @@
#include "BLI_utildefines.h"
#include "BKE_action.h"
-#include "BKE_context.h"
#include "BKE_colortools.h"
#include "BKE_deform.h"
#include "BKE_gpencil.h"
diff --git a/source/blender/gpencil_modifiers/intern/MOD_gpencillattice.c b/source/blender/gpencil_modifiers/intern/MOD_gpencillattice.c
index c938446a623..b4a4d399872 100644
--- a/source/blender/gpencil_modifiers/intern/MOD_gpencillattice.c
+++ b/source/blender/gpencil_modifiers/intern/MOD_gpencillattice.c
@@ -38,7 +38,6 @@
#include "BLI_utildefines.h"
-#include "BKE_context.h"
#include "BKE_deform.h"
#include "BKE_gpencil.h"
#include "BKE_gpencil_modifier.h"
diff --git a/source/blender/gpencil_modifiers/intern/MOD_gpencilmirror.c b/source/blender/gpencil_modifiers/intern/MOD_gpencilmirror.c
index 00ffabe3c36..57f536001ae 100644
--- a/source/blender/gpencil_modifiers/intern/MOD_gpencilmirror.c
+++ b/source/blender/gpencil_modifiers/intern/MOD_gpencilmirror.c
@@ -40,7 +40,6 @@
#include "BLI_math.h"
#include "BLI_utildefines.h"
-#include "BKE_context.h"
#include "BKE_deform.h"
#include "BKE_gpencil.h"
#include "BKE_gpencil_modifier.h"
diff --git a/source/blender/gpencil_modifiers/intern/MOD_gpencilnoise.c b/source/blender/gpencil_modifiers/intern/MOD_gpencilnoise.c
index 8b3752c8028..ed5feed1455 100644
--- a/source/blender/gpencil_modifiers/intern/MOD_gpencilnoise.c
+++ b/source/blender/gpencil_modifiers/intern/MOD_gpencilnoise.c
@@ -30,7 +30,6 @@
#include <stdio.h>
-#include "BLI_blenlib.h"
#include "BLI_utildefines.h"
#include "BLI_math_vector.h"
#include "BLI_rand.h"
@@ -43,8 +42,6 @@
#include "DNA_gpencil_types.h"
#include "DNA_gpencil_modifier_types.h"
-#include "BKE_context.h"
-#include "BKE_global.h"
#include "BKE_deform.h"
#include "BKE_gpencil.h"
#include "BKE_gpencil_modifier.h"
diff --git a/source/blender/gpencil_modifiers/intern/MOD_gpenciloffset.c b/source/blender/gpencil_modifiers/intern/MOD_gpenciloffset.c
index 2c2a5c2f994..9ab422bdcbf 100644
--- a/source/blender/gpencil_modifiers/intern/MOD_gpenciloffset.c
+++ b/source/blender/gpencil_modifiers/intern/MOD_gpenciloffset.c
@@ -40,7 +40,6 @@
#include "BLI_math.h"
#include "BKE_colortools.h"
-#include "BKE_context.h"
#include "BKE_deform.h"
#include "BKE_gpencil.h"
#include "BKE_gpencil_modifier.h"
diff --git a/source/blender/gpencil_modifiers/intern/MOD_gpencilopacity.c b/source/blender/gpencil_modifiers/intern/MOD_gpencilopacity.c
index 7033b246e1c..514e884b19b 100644
--- a/source/blender/gpencil_modifiers/intern/MOD_gpencilopacity.c
+++ b/source/blender/gpencil_modifiers/intern/MOD_gpencilopacity.c
@@ -41,7 +41,6 @@
#include "DNA_gpencil_types.h"
#include "DNA_gpencil_modifier_types.h"
-#include "BKE_context.h"
#include "BKE_deform.h"
#include "BKE_material.h"
#include "BKE_gpencil.h"
diff --git a/source/blender/gpencil_modifiers/intern/MOD_gpencilsimplify.c b/source/blender/gpencil_modifiers/intern/MOD_gpencilsimplify.c
index 6ddf40df6c0..0df7cf5fa93 100644
--- a/source/blender/gpencil_modifiers/intern/MOD_gpencilsimplify.c
+++ b/source/blender/gpencil_modifiers/intern/MOD_gpencilsimplify.c
@@ -37,7 +37,6 @@
#include "BLI_utildefines.h"
-#include "BKE_context.h"
#include "BKE_gpencil.h"
#include "BKE_gpencil_modifier.h"
diff --git a/source/blender/gpencil_modifiers/intern/MOD_gpencilsmooth.c b/source/blender/gpencil_modifiers/intern/MOD_gpencilsmooth.c
index ece7ebc9816..675ff36b49f 100644
--- a/source/blender/gpencil_modifiers/intern/MOD_gpencilsmooth.c
+++ b/source/blender/gpencil_modifiers/intern/MOD_gpencilsmooth.c
@@ -35,7 +35,6 @@
#include "DNA_gpencil_types.h"
#include "DNA_gpencil_modifier_types.h"
-#include "BKE_context.h"
#include "BKE_deform.h"
#include "BKE_gpencil.h"
#include "BKE_gpencil_modifier.h"
diff --git a/source/blender/gpencil_modifiers/intern/MOD_gpencilsubdiv.c b/source/blender/gpencil_modifiers/intern/MOD_gpencilsubdiv.c
index 71881de50fc..58b28a308a4 100644
--- a/source/blender/gpencil_modifiers/intern/MOD_gpencilsubdiv.c
+++ b/source/blender/gpencil_modifiers/intern/MOD_gpencilsubdiv.c
@@ -38,10 +38,8 @@
#include "DNA_gpencil_types.h"
#include "DNA_gpencil_modifier_types.h"
-#include "BLI_math.h"
#include "BLI_utildefines.h"
-#include "BKE_context.h"
#include "BKE_gpencil.h"
#include "BKE_gpencil_modifier.h"
diff --git a/source/blender/gpencil_modifiers/intern/MOD_gpencilthick.c b/source/blender/gpencil_modifiers/intern/MOD_gpencilthick.c
index 441cab909d3..345d9162a8c 100644
--- a/source/blender/gpencil_modifiers/intern/MOD_gpencilthick.c
+++ b/source/blender/gpencil_modifiers/intern/MOD_gpencilthick.c
@@ -39,7 +39,6 @@
#include "BLI_utildefines.h"
#include "BKE_colortools.h"
-#include "BKE_context.h"
#include "BKE_deform.h"
#include "BKE_gpencil.h"
#include "BKE_gpencil_modifier.h"
diff --git a/source/blender/gpencil_modifiers/intern/MOD_gpenciltime.c b/source/blender/gpencil_modifiers/intern/MOD_gpenciltime.c
index d90dea91af9..8d4466e5911 100644
--- a/source/blender/gpencil_modifiers/intern/MOD_gpenciltime.c
+++ b/source/blender/gpencil_modifiers/intern/MOD_gpenciltime.c
@@ -40,7 +40,6 @@
#include "DNA_gpencil_modifier_types.h"
#include "BKE_colortools.h"
-#include "BKE_context.h"
#include "BKE_deform.h"
#include "BKE_gpencil.h"
#include "BKE_gpencil_modifier.h"
diff --git a/source/blender/gpencil_modifiers/intern/MOD_gpenciltint.c b/source/blender/gpencil_modifiers/intern/MOD_gpenciltint.c
index 385296c943e..42fb732bedd 100644
--- a/source/blender/gpencil_modifiers/intern/MOD_gpenciltint.c
+++ b/source/blender/gpencil_modifiers/intern/MOD_gpenciltint.c
@@ -40,8 +40,6 @@
#include "BLI_math_vector.h"
#include "BLI_utildefines.h"
-#include "BKE_context.h"
-#include "BKE_global.h"
#include "BKE_gpencil.h"
#include "BKE_gpencil_modifier.h"
#include "BKE_material.h"
diff --git a/source/blender/gpu/intern/gpu_buffers.c b/source/blender/gpu/intern/gpu_buffers.c
index deb10213976..ad13784b862 100644
--- a/source/blender/gpu/intern/gpu_buffers.c
+++ b/source/blender/gpu/intern/gpu_buffers.c
@@ -41,7 +41,6 @@
#include "BLI_math.h"
#include "BLI_utildefines.h"
#include "BLI_ghash.h"
-#include "BLI_threads.h"
#include "DNA_meshdata_types.h"
diff --git a/source/blender/gpu/intern/gpu_draw.c b/source/blender/gpu/intern/gpu_draw.c
index acc150ecc14..0937b6078fe 100644
--- a/source/blender/gpu/intern/gpu_draw.c
+++ b/source/blender/gpu/intern/gpu_draw.c
@@ -39,7 +39,6 @@
#include <string.h>
#include "BLI_blenlib.h"
-#include "BLI_hash.h"
#include "BLI_linklist.h"
#include "BLI_math.h"
#include "BLI_threads.h"
diff --git a/source/blender/gpu/intern/gpu_framebuffer.c b/source/blender/gpu/intern/gpu_framebuffer.c
index 6bb5d668e62..a3436b09093 100644
--- a/source/blender/gpu/intern/gpu_framebuffer.c
+++ b/source/blender/gpu/intern/gpu_framebuffer.c
@@ -28,11 +28,9 @@
#include "MEM_guardedalloc.h"
#include "BLI_blenlib.h"
-#include "BLI_threads.h"
#include "BLI_utildefines.h"
#include "BLI_math_base.h"
-#include "BKE_global.h"
#include "GPU_batch.h"
#include "GPU_draw.h"
diff --git a/source/blender/gpu/intern/gpu_select_pick.c b/source/blender/gpu/intern/gpu_select_pick.c
index 9b64d48fe50..363baa41a6d 100644
--- a/source/blender/gpu/intern/gpu_select_pick.c
+++ b/source/blender/gpu/intern/gpu_select_pick.c
@@ -41,7 +41,6 @@
#include "BLI_rect.h"
#include "BLI_listbase.h"
-#include "BLI_math_vector.h"
#include "BLI_utildefines.h"
#include "gpu_select_private.h"
diff --git a/source/blender/gpu/intern/gpu_texture.c b/source/blender/gpu/intern/gpu_texture.c
index 93ef6fca485..23e3519c6d9 100644
--- a/source/blender/gpu/intern/gpu_texture.c
+++ b/source/blender/gpu/intern/gpu_texture.c
@@ -32,8 +32,6 @@
#include "BLI_blenlib.h"
#include "BLI_utildefines.h"
#include "BLI_math_base.h"
-#include "BLI_listbase.h"
-#include "BLI_threads.h"
#include "BKE_global.h"
diff --git a/source/blender/gpu/intern/gpu_viewport.c b/source/blender/gpu/intern/gpu_viewport.c
index 7a3d020fe36..fa7e69c2712 100644
--- a/source/blender/gpu/intern/gpu_viewport.c
+++ b/source/blender/gpu/intern/gpu_viewport.c
@@ -35,7 +35,6 @@
#include "BLI_listbase.h"
#include "BLI_rect.h"
-#include "BLI_string.h"
#include "BLI_mempool.h"
#include "BIF_gl.h"
@@ -43,7 +42,6 @@
#include "DNA_vec_types.h"
#include "DNA_userdef_types.h"
-#include "BKE_global.h"
#include "GPU_framebuffer.h"
#include "GPU_glew.h"
diff --git a/source/blender/ikplugin/intern/ikplugin_api.c b/source/blender/ikplugin/intern/ikplugin_api.c
index 80de0beb9f4..57373d31c45 100644
--- a/source/blender/ikplugin/intern/ikplugin_api.c
+++ b/source/blender/ikplugin/intern/ikplugin_api.c
@@ -31,7 +31,6 @@
*/
#include "BIK_api.h"
-#include "BLI_blenlib.h"
#include "DNA_object_types.h"
#include "DNA_action_types.h"
diff --git a/source/blender/imbuf/intern/stereoimbuf.c b/source/blender/imbuf/intern/stereoimbuf.c
index 7c58815c216..61bb8da4f50 100644
--- a/source/blender/imbuf/intern/stereoimbuf.c
+++ b/source/blender/imbuf/intern/stereoimbuf.c
@@ -43,7 +43,6 @@
#include "MEM_guardedalloc.h"
-#include "BLI_threads.h"
#include "BLI_utildefines.h"
#include "BLI_math.h"
diff --git a/source/blender/imbuf/intern/thumbs_blend.c b/source/blender/imbuf/intern/thumbs_blend.c
index 5bdab03e57c..7ffdc0ac388 100644
--- a/source/blender/imbuf/intern/thumbs_blend.c
+++ b/source/blender/imbuf/intern/thumbs_blend.c
@@ -29,8 +29,6 @@
#include <string.h>
#include "BLI_utildefines.h"
-#include "BLI_endian_switch.h"
-#include "BLI_fileops.h"
#include "BLI_linklist.h"
#include "BLI_listbase.h" /* Needed due to import of BLO_readfile.h */
diff --git a/source/blender/imbuf/intern/util.c b/source/blender/imbuf/intern/util.c
index 38591adbaa2..3c08955e2b3 100644
--- a/source/blender/imbuf/intern/util.c
+++ b/source/blender/imbuf/intern/util.c
@@ -41,7 +41,6 @@
#include "BLI_utildefines.h"
#include "BLI_path_util.h"
#include "BLI_fileops.h"
-#include "BLI_string.h"
#include "imbuf.h"
#include "IMB_imbuf_types.h"
@@ -51,14 +50,16 @@
#include "IMB_anim.h"
#ifdef WITH_FFMPEG
-#include "BKE_global.h" /* G.debug */
-#include <libavcodec/avcodec.h>
-#include <libavformat/avformat.h>
-#include <libavdevice/avdevice.h>
-#include <libavutil/log.h>
+# include "BLI_string.h" /* BLI_vsnprintf */
-#include "ffmpeg_compat.h"
+# include "BKE_global.h" /* G.debug */
+# include <libavcodec/avcodec.h>
+# include <libavformat/avformat.h>
+# include <libavdevice/avdevice.h>
+# include <libavutil/log.h>
+
+# include "ffmpeg_compat.h"
#endif
#define UTIL_DEBUG 0
diff --git a/source/blender/makesrna/intern/rna_ID.c b/source/blender/makesrna/intern/rna_ID.c
index dbf436bd4bc..f83bc807138 100644
--- a/source/blender/makesrna/intern/rna_ID.c
+++ b/source/blender/makesrna/intern/rna_ID.c
@@ -33,7 +33,6 @@
#include "DNA_object_types.h"
#include "BLI_utildefines.h"
-#include "BLI_math_base.h"
#include "BKE_icons.h"
#include "BKE_library.h"
@@ -93,6 +92,7 @@ const EnumPropertyItem rna_enum_id_type_items[] = {
#include "DNA_anim_types.h"
#include "BLI_listbase.h"
+#include "BLI_math_base.h"
#include "BKE_font.h"
#include "BKE_idprop.h"
diff --git a/source/blender/makesrna/intern/rna_cloth.c b/source/blender/makesrna/intern/rna_cloth.c
index 53efbcb56fa..a2b6d188742 100644
--- a/source/blender/makesrna/intern/rna_cloth.c
+++ b/source/blender/makesrna/intern/rna_cloth.c
@@ -31,8 +31,6 @@
#include "DNA_object_types.h"
#include "DNA_scene_types.h"
-#include "BLI_math_base.h"
-
#include "RNA_define.h"
#include "rna_internal.h"
diff --git a/source/blender/makesrna/intern/rna_constraint.c b/source/blender/makesrna/intern/rna_constraint.c
index 4116dd5753f..aa22bd49460 100644
--- a/source/blender/makesrna/intern/rna_constraint.c
+++ b/source/blender/makesrna/intern/rna_constraint.c
@@ -27,7 +27,6 @@
#include <stdlib.h>
#include "BLI_math.h"
-#include "BLI_listbase.h"
#include "MEM_guardedalloc.h"
diff --git a/source/blender/makesrna/intern/rna_dynamicpaint.c b/source/blender/makesrna/intern/rna_dynamicpaint.c
index c15740305a8..eaa0ddca7d3 100644
--- a/source/blender/makesrna/intern/rna_dynamicpaint.c
+++ b/source/blender/makesrna/intern/rna_dynamicpaint.c
@@ -27,7 +27,6 @@
#include <stdlib.h>
#include <limits.h>
-#include "BLI_math_base.h"
#include "BKE_modifier.h"
#include "BKE_dynamicpaint.h"
diff --git a/source/blender/makesrna/intern/rna_fcurve.c b/source/blender/makesrna/intern/rna_fcurve.c
index 5062468387f..057cb9eba0d 100644
--- a/source/blender/makesrna/intern/rna_fcurve.c
+++ b/source/blender/makesrna/intern/rna_fcurve.c
@@ -33,7 +33,6 @@
#include "MEM_guardedalloc.h"
-#include "BLI_math.h"
#include "BLT_translation.h"
diff --git a/source/blender/makesrna/intern/rna_gpencil.c b/source/blender/makesrna/intern/rna_gpencil.c
index da322307454..a747429ad4b 100644
--- a/source/blender/makesrna/intern/rna_gpencil.c
+++ b/source/blender/makesrna/intern/rna_gpencil.c
@@ -36,7 +36,6 @@
#include "MEM_guardedalloc.h"
-#include "BLI_string_utils.h"
#include "BLI_utildefines.h"
#include "BLT_translation.h"
@@ -98,6 +97,7 @@ static EnumPropertyItem rna_enum_gpencil_caps_modes_items[] = {
#ifdef RNA_RUNTIME
#include "BLI_ghash.h"
+#include "BLI_string_utils.h"
#include "WM_api.h"
diff --git a/source/blender/makesrna/intern/rna_image.c b/source/blender/makesrna/intern/rna_image.c
index 0994d628778..84fb9d8f9bf 100644
--- a/source/blender/makesrna/intern/rna_image.c
+++ b/source/blender/makesrna/intern/rna_image.c
@@ -30,9 +30,7 @@
#include "DNA_scene_types.h"
#include "BLI_utildefines.h"
-#include "BLI_math_base.h"
-#include "BKE_context.h"
#include "BKE_image.h"
#include "DEG_depsgraph.h"
@@ -64,6 +62,8 @@ static const EnumPropertyItem image_source_items[] = {
#ifdef RNA_RUNTIME
+#include "BLI_math_base.h"
+
#include "BKE_global.h"
#include "GPU_draw.h"
diff --git a/source/blender/makesrna/intern/rna_key.c b/source/blender/makesrna/intern/rna_key.c
index 5181912f4eb..19550b8097f 100644
--- a/source/blender/makesrna/intern/rna_key.c
+++ b/source/blender/makesrna/intern/rna_key.c
@@ -33,7 +33,6 @@
#include "DNA_lattice_types.h"
#include "DNA_mesh_types.h"
-#include "BLI_string_utils.h"
#include "BLI_utildefines.h"
#include "BLI_math.h"
@@ -53,6 +52,8 @@
#include "DNA_object_types.h"
+#include "BLI_string_utils.h"
+
#include "BKE_animsys.h"
#include "BKE_key.h"
#include "BKE_main.h"
diff --git a/source/blender/makesrna/intern/rna_layer.c b/source/blender/makesrna/intern/rna_layer.c
index c84c59287a5..649b76f0390 100644
--- a/source/blender/makesrna/intern/rna_layer.c
+++ b/source/blender/makesrna/intern/rna_layer.c
@@ -28,8 +28,6 @@
#include "DNA_layer_types.h"
#include "DNA_view3d_types.h"
-#include "BLI_math.h"
-#include "BLI_string_utils.h"
#include "BLT_translation.h"
diff --git a/source/blender/makesrna/intern/rna_linestyle.c b/source/blender/makesrna/intern/rna_linestyle.c
index 5cee2fb90cb..ada7d1f9067 100644
--- a/source/blender/makesrna/intern/rna_linestyle.c
+++ b/source/blender/makesrna/intern/rna_linestyle.c
@@ -28,7 +28,6 @@
#include <stdlib.h>
#include "BLI_utildefines.h"
-#include "BLI_string_utils.h"
#include "RNA_define.h"
#include "RNA_enum_types.h"
@@ -99,6 +98,8 @@ const EnumPropertyItem rna_enum_linestyle_geometry_modifier_type_items[] = {
#ifdef RNA_RUNTIME
+#include "BLI_string_utils.h"
+
#include "BKE_linestyle.h"
#include "BKE_texture.h"
diff --git a/source/blender/makesrna/intern/rna_main_api.c b/source/blender/makesrna/intern/rna_main_api.c
index 806b1f6521b..f7e625b836e 100644
--- a/source/blender/makesrna/intern/rna_main_api.c
+++ b/source/blender/makesrna/intern/rna_main_api.c
@@ -39,7 +39,6 @@
#include "DNA_object_types.h"
#include "BLI_utildefines.h"
-#include "BLI_path_util.h"
#include "RNA_define.h"
#include "RNA_access.h"
diff --git a/source/blender/makesrna/intern/rna_mesh_api.c b/source/blender/makesrna/intern/rna_mesh_api.c
index 5f198d2e22e..98a8179576d 100644
--- a/source/blender/makesrna/intern/rna_mesh_api.c
+++ b/source/blender/makesrna/intern/rna_mesh_api.c
@@ -39,7 +39,6 @@
#include "BLI_sys_types.h"
#include "BLI_utildefines.h"
-#include "BLI_math.h"
#include "rna_internal.h" /* own include */
diff --git a/source/blender/makesrna/intern/rna_nodetree.c b/source/blender/makesrna/intern/rna_nodetree.c
index 422ef9d61e8..2999a8848b1 100644
--- a/source/blender/makesrna/intern/rna_nodetree.c
+++ b/source/blender/makesrna/intern/rna_nodetree.c
@@ -28,7 +28,6 @@
#include <string.h>
#include <limits.h>
-#include "BLI_listbase.h"
#include "BLI_math.h"
#include "BLI_utildefines.h"
diff --git a/source/blender/makesrna/intern/rna_object.c b/source/blender/makesrna/intern/rna_object.c
index e7f603b6c9d..36083296779 100644
--- a/source/blender/makesrna/intern/rna_object.c
+++ b/source/blender/makesrna/intern/rna_object.c
@@ -42,7 +42,6 @@
#include "DNA_shader_fx_types.h"
#include "BLI_utildefines.h"
-#include "BLI_listbase.h"
#include "BKE_camera.h"
#include "BKE_collection.h"
diff --git a/source/blender/makesrna/intern/rna_particle.c b/source/blender/makesrna/intern/rna_particle.c
index 6850285057e..c5ace465cba 100644
--- a/source/blender/makesrna/intern/rna_particle.c
+++ b/source/blender/makesrna/intern/rna_particle.c
@@ -48,7 +48,6 @@
#include "BKE_mesh.h"
-#include "BLI_string_utils.h"
#include "BLT_translation.h"
@@ -133,6 +132,7 @@ static const EnumPropertyItem part_hair_ren_as_items[] = {
#ifdef RNA_RUNTIME
#include "BLI_math.h"
+#include "BLI_string_utils.h"
#include "BKE_boids.h"
#include "BKE_context.h"
diff --git a/source/blender/makesrna/intern/rna_pose.c b/source/blender/makesrna/intern/rna_pose.c
index e08b87877ae..8a0bb372628 100644
--- a/source/blender/makesrna/intern/rna_pose.c
+++ b/source/blender/makesrna/intern/rna_pose.c
@@ -40,7 +40,6 @@
#include "DNA_scene_types.h"
#include "BLI_math.h"
-#include "BLI_string_utils.h"
#include "BLT_translation.h"
@@ -77,6 +76,9 @@ const EnumPropertyItem rna_enum_color_sets_items[] = {
#ifdef RNA_RUNTIME
+#include "BLI_ghash.h"
+#include "BLI_string_utils.h"
+
#include "BIK_api.h"
#include "BKE_action.h"
#include "BKE_armature.h"
@@ -85,8 +87,6 @@ const EnumPropertyItem rna_enum_color_sets_items[] = {
#include "MEM_guardedalloc.h"
-#include "BLI_ghash.h"
-
#include "BKE_context.h"
#include "BKE_constraint.h"
#include "BKE_global.h"
diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c
index db44260f4b5..8dfea3c2a0f 100644
--- a/source/blender/makesrna/intern/rna_scene.c
+++ b/source/blender/makesrna/intern/rna_scene.c
@@ -43,7 +43,6 @@
#include "IMB_imbuf_types.h"
#include "BLI_math.h"
-#include "BLI_string_utils.h"
#include "BLT_translation.h"
@@ -484,6 +483,8 @@ const EnumPropertyItem rna_enum_transform_orientation_items[] = {
#ifdef RNA_RUNTIME
+#include "BLI_string_utils.h"
+
#include "DNA_anim_types.h"
#include "DNA_color_types.h"
#include "DNA_node_types.h"
diff --git a/source/blender/makesrna/intern/rna_sculpt_paint.c b/source/blender/makesrna/intern/rna_sculpt_paint.c
index 950ed047532..b1603aa6532 100644
--- a/source/blender/makesrna/intern/rna_sculpt_paint.c
+++ b/source/blender/makesrna/intern/rna_sculpt_paint.c
@@ -42,7 +42,6 @@
#include "DNA_screen_types.h"
#include "DNA_space_types.h"
-#include "BKE_main.h"
#include "BKE_material.h"
#include "BKE_paint.h"
#include "BKE_brush.h"
diff --git a/source/blender/makesrna/intern/rna_smoke.c b/source/blender/makesrna/intern/rna_smoke.c
index 49e014910f3..3dcbb612470 100644
--- a/source/blender/makesrna/intern/rna_smoke.c
+++ b/source/blender/makesrna/intern/rna_smoke.c
@@ -30,7 +30,6 @@
#include <limits.h>
#include "BLI_sys_types.h"
-#include "BLI_threads.h"
#include "RNA_define.h"
#include "RNA_enum_types.h"
@@ -52,6 +51,8 @@
#ifdef RNA_RUNTIME
+#include "BLI_threads.h"
+
#include "BKE_colorband.h"
#include "BKE_context.h"
#include "BKE_particle.h"
diff --git a/source/blender/makesrna/intern/rna_texture_api.c b/source/blender/makesrna/intern/rna_texture_api.c
index 1d513a494d7..556d40bf7ac 100644
--- a/source/blender/makesrna/intern/rna_texture_api.c
+++ b/source/blender/makesrna/intern/rna_texture_api.c
@@ -29,7 +29,6 @@
#include <string.h>
#include "BLI_utildefines.h"
-#include "BLI_path_util.h"
#include "RNA_define.h"
diff --git a/source/blender/makesrna/intern/rna_tracking.c b/source/blender/makesrna/intern/rna_tracking.c
index ed41d209f6a..4c7c943de23 100644
--- a/source/blender/makesrna/intern/rna_tracking.c
+++ b/source/blender/makesrna/intern/rna_tracking.c
@@ -31,7 +31,6 @@
#include "MEM_guardedalloc.h"
-#include "BLI_math.h"
#include "BKE_movieclip.h"
#include "BKE_tracking.h"
@@ -48,6 +47,8 @@
#ifdef RNA_RUNTIME
+#include "BLI_math.h"
+
#include "DNA_anim_types.h"
#include "BKE_animsys.h"
diff --git a/source/blender/makesrna/intern/rna_userdef.c b/source/blender/makesrna/intern/rna_userdef.c
index 391c2c87d50..fb7aad2b3c7 100644
--- a/source/blender/makesrna/intern/rna_userdef.c
+++ b/source/blender/makesrna/intern/rna_userdef.c
@@ -36,7 +36,6 @@
#include "BLI_utildefines.h"
#include "BLI_math_base.h"
-#include "BLI_math_vector.h"
#include "BKE_appdir.h"
#include "BKE_sound.h"
@@ -97,6 +96,8 @@ static const EnumPropertyItem rna_enum_studio_light_type_items[] = {
#ifdef RNA_RUNTIME
+#include "BLI_math_vector.h"
+
#include "DNA_object_types.h"
#include "DNA_screen_types.h"
diff --git a/source/blender/makesrna/intern/rna_wm.c b/source/blender/makesrna/intern/rna_wm.c
index 475f53d9ef1..45bce714303 100644
--- a/source/blender/makesrna/intern/rna_wm.c
+++ b/source/blender/makesrna/intern/rna_wm.c
@@ -32,7 +32,6 @@
#include "DNA_windowmanager_types.h"
#include "BLI_utildefines.h"
-#include "BLI_string_utils.h"
#include "BLT_translation.h"
@@ -48,6 +47,7 @@
#include "WM_types.h"
#ifdef RNA_RUNTIME
+
static const EnumPropertyItem event_keymouse_value_items[] = {
{KM_ANY, "ANY", 0, "Any", ""},
{KM_PRESS, "PRESS", 0, "Press", ""},
@@ -483,6 +483,8 @@ const EnumPropertyItem rna_enum_wm_report_items[] = {
#include <assert.h>
+#include "BLI_string_utils.h"
+
#include "WM_api.h"
#include "DNA_object_types.h"
diff --git a/source/blender/makesrna/intern/rna_wm_gizmo.c b/source/blender/makesrna/intern/rna_wm_gizmo.c
index f7b0fa03c39..cdad88d2862 100644
--- a/source/blender/makesrna/intern/rna_wm_gizmo.c
+++ b/source/blender/makesrna/intern/rna_wm_gizmo.c
@@ -31,7 +31,6 @@
#include "DNA_windowmanager_types.h"
#include "BLI_utildefines.h"
-#include "BLI_string_utils.h"
#include "BLT_translation.h"
@@ -51,6 +50,8 @@
#include <assert.h>
+#include "BLI_string_utils.h"
+
#include "WM_api.h"
#include "DNA_workspace_types.h"
diff --git a/source/blender/modifiers/intern/MOD_armature.c b/source/blender/modifiers/intern/MOD_armature.c
index fcd54639f9f..d410de17046 100644
--- a/source/blender/modifiers/intern/MOD_armature.c
+++ b/source/blender/modifiers/intern/MOD_armature.c
@@ -40,7 +40,6 @@
#include "DNA_mesh_types.h"
#include "BLI_utildefines.h"
-#include "BLI_string.h"
#include "BKE_editmesh.h"
#include "BKE_lattice.h"
diff --git a/source/blender/modifiers/intern/MOD_bevel.c b/source/blender/modifiers/intern/MOD_bevel.c
index 568cdcf6707..89608f33344 100644
--- a/source/blender/modifiers/intern/MOD_bevel.c
+++ b/source/blender/modifiers/intern/MOD_bevel.c
@@ -40,9 +40,7 @@
#include "DNA_scene_types.h"
#include "BLI_utildefines.h"
-#include "BLI_linklist_stack.h"
#include "BLI_math.h"
-#include "BLI_string.h"
#include "BKE_deform.h"
#include "BKE_mesh.h"
diff --git a/source/blender/modifiers/intern/MOD_decimate.c b/source/blender/modifiers/intern/MOD_decimate.c
index c7adedeae25..fe274b53cc7 100644
--- a/source/blender/modifiers/intern/MOD_decimate.c
+++ b/source/blender/modifiers/intern/MOD_decimate.c
@@ -43,7 +43,6 @@
#include "BKE_deform.h"
#include "BKE_mesh.h"
-#include "BKE_library.h"
#include "DEG_depsgraph_query.h"
diff --git a/source/blender/modifiers/intern/MOD_dynamicpaint.c b/source/blender/modifiers/intern/MOD_dynamicpaint.c
index c23a65ec23c..c7360051109 100644
--- a/source/blender/modifiers/intern/MOD_dynamicpaint.c
+++ b/source/blender/modifiers/intern/MOD_dynamicpaint.c
@@ -37,7 +37,6 @@
#include "BKE_dynamicpaint.h"
#include "BKE_layer.h"
-#include "BKE_library.h"
#include "BKE_library_query.h"
#include "BKE_mesh.h"
#include "BKE_modifier.h"
diff --git a/source/blender/modifiers/intern/MOD_edgesplit.c b/source/blender/modifiers/intern/MOD_edgesplit.c
index 8db8da3fc81..465e07c7bd4 100644
--- a/source/blender/modifiers/intern/MOD_edgesplit.c
+++ b/source/blender/modifiers/intern/MOD_edgesplit.c
@@ -40,7 +40,6 @@
#include "BLI_utildefines.h"
#include "BLI_math.h"
-#include "BKE_library.h"
#include "BKE_mesh.h"
#include "BKE_modifier.h"
diff --git a/source/blender/modifiers/intern/MOD_fluidsim_util.c b/source/blender/modifiers/intern/MOD_fluidsim_util.c
index 23a62f88f77..4d79a84b157 100644
--- a/source/blender/modifiers/intern/MOD_fluidsim_util.c
+++ b/source/blender/modifiers/intern/MOD_fluidsim_util.c
@@ -42,16 +42,16 @@
#include "DNA_meshdata_types.h"
#include "DNA_object_fluidsim_types.h"
-#include "BLI_blenlib.h"
-#include "BLI_math.h"
#include "BLI_utildefines.h"
#include "BKE_fluidsim.h" /* ensure definitions here match */
#ifdef WITH_MOD_FLUID
+# include "BLI_blenlib.h"
+# include "BLI_math.h"
+
# include "BKE_global.h"
+# include "BKE_library.h"
#endif
-#include "BKE_library.h"
-#include "BKE_main.h"
#include "BKE_mesh.h"
#include "DEG_depsgraph.h"
diff --git a/source/blender/modifiers/intern/MOD_mask.c b/source/blender/modifiers/intern/MOD_mask.c
index 555fe29978f..e054973b376 100644
--- a/source/blender/modifiers/intern/MOD_mask.c
+++ b/source/blender/modifiers/intern/MOD_mask.c
@@ -47,7 +47,6 @@
#include "BKE_action.h" /* BKE_pose_channel_find_name */
#include "BKE_customdata.h"
-#include "BKE_library.h"
#include "BKE_library_query.h"
#include "BKE_mesh.h"
#include "BKE_modifier.h"
diff --git a/source/blender/modifiers/intern/MOD_meshcache.c b/source/blender/modifiers/intern/MOD_meshcache.c
index e3aa239a713..2545b636bed 100644
--- a/source/blender/modifiers/intern/MOD_meshcache.c
+++ b/source/blender/modifiers/intern/MOD_meshcache.c
@@ -36,8 +36,6 @@
#include "BLI_path_util.h"
#include "BLI_math.h"
-#include "BKE_global.h"
-#include "BKE_library.h"
#include "BKE_main.h"
#include "BKE_mesh.h"
#include "BKE_scene.h"
diff --git a/source/blender/modifiers/intern/MOD_meshsequencecache.c b/source/blender/modifiers/intern/MOD_meshsequencecache.c
index f0cdd2b2899..15303b87c21 100644
--- a/source/blender/modifiers/intern/MOD_meshsequencecache.c
+++ b/source/blender/modifiers/intern/MOD_meshsequencecache.c
@@ -32,7 +32,6 @@
#include "DNA_scene_types.h"
#include "BKE_cachefile.h"
-#include "BKE_library.h"
#include "BKE_library_query.h"
#include "BKE_scene.h"
@@ -44,6 +43,7 @@
#ifdef WITH_ALEMBIC
# include "ABC_alembic.h"
# include "BKE_global.h"
+# include "BKE_library.h"
#endif
static void initData(ModifierData *md)
diff --git a/source/blender/modifiers/intern/MOD_multires.c b/source/blender/modifiers/intern/MOD_multires.c
index a18fd6a4c5e..98f455e186c 100644
--- a/source/blender/modifiers/intern/MOD_multires.c
+++ b/source/blender/modifiers/intern/MOD_multires.c
@@ -42,7 +42,6 @@
#include "BLI_utildefines.h"
#include "BKE_cdderivedmesh.h"
-#include "BKE_global.h"
#include "BKE_mesh.h"
#include "BKE_multires.h"
#include "BKE_modifier.h"
diff --git a/source/blender/modifiers/intern/MOD_ocean.c b/source/blender/modifiers/intern/MOD_ocean.c
index 8231745aa12..2b2fa2ff2df 100644
--- a/source/blender/modifiers/intern/MOD_ocean.c
+++ b/source/blender/modifiers/intern/MOD_ocean.c
@@ -36,14 +36,8 @@
#include "DNA_modifier_types.h"
#include "DNA_scene_types.h"
-#include "BLI_math.h"
-#include "BLI_math_inline.h"
-#include "BLI_task.h"
#include "BLI_utildefines.h"
-#include "BKE_global.h"
-#include "BKE_library.h"
-#include "BKE_main.h"
#include "BKE_mesh.h"
#include "BKE_modifier.h"
#include "BKE_ocean.h"
diff --git a/source/blender/modifiers/intern/MOD_particleinstance.c b/source/blender/modifiers/intern/MOD_particleinstance.c
index fa305f4c8a7..0317ec8e26b 100644
--- a/source/blender/modifiers/intern/MOD_particleinstance.c
+++ b/source/blender/modifiers/intern/MOD_particleinstance.c
@@ -43,7 +43,6 @@
#include "BLI_utildefines.h"
#include "BKE_effect.h"
-#include "BKE_global.h"
#include "BKE_lattice.h"
#include "BKE_library_query.h"
#include "BKE_mesh.h"
diff --git a/source/blender/modifiers/intern/MOD_remesh.c b/source/blender/modifiers/intern/MOD_remesh.c
index 6d0f88df492..8de5a9c0e1f 100644
--- a/source/blender/modifiers/intern/MOD_remesh.c
+++ b/source/blender/modifiers/intern/MOD_remesh.c
@@ -27,7 +27,6 @@
#include "MEM_guardedalloc.h"
#include "BLI_math_base.h"
-#include "BLI_math_vector.h"
#include "BLI_utildefines.h"
#include "DNA_meshdata_types.h"
@@ -45,6 +44,8 @@
#include <string.h>
#ifdef WITH_MOD_REMESH
+# include "BLI_math_vector.h"
+
# include "dualcon.h"
#endif
diff --git a/source/blender/modifiers/intern/MOD_screw.c b/source/blender/modifiers/intern/MOD_screw.c
index 9629b0924ad..a88310a121f 100644
--- a/source/blender/modifiers/intern/MOD_screw.c
+++ b/source/blender/modifiers/intern/MOD_screw.c
@@ -44,7 +44,6 @@
#include "BLI_alloca.h"
#include "BLI_utildefines.h"
-#include "BKE_library.h"
#include "BKE_library_query.h"
#include "BKE_mesh.h"
diff --git a/source/blender/modifiers/intern/MOD_shrinkwrap.c b/source/blender/modifiers/intern/MOD_shrinkwrap.c
index 92cbbaa78ca..ef950e35441 100644
--- a/source/blender/modifiers/intern/MOD_shrinkwrap.c
+++ b/source/blender/modifiers/intern/MOD_shrinkwrap.c
@@ -38,7 +38,6 @@
#include "DNA_mesh_types.h"
#include "DNA_object_types.h"
-#include "BLI_math.h"
#include "BLI_utildefines.h"
#include "BKE_editmesh.h"
diff --git a/source/blender/modifiers/intern/MOD_smoke.c b/source/blender/modifiers/intern/MOD_smoke.c
index 8fac27272b0..efced596bea 100644
--- a/source/blender/modifiers/intern/MOD_smoke.c
+++ b/source/blender/modifiers/intern/MOD_smoke.c
@@ -48,9 +48,7 @@
#include "BKE_cdderivedmesh.h"
#include "BKE_layer.h"
-#include "BKE_library.h"
#include "BKE_library_query.h"
-#include "BKE_main.h"
#include "BKE_modifier.h"
#include "BKE_smoke.h"
diff --git a/source/blender/modifiers/intern/MOD_surfacedeform.c b/source/blender/modifiers/intern/MOD_surfacedeform.c
index a208055d9cf..902224f8243 100644
--- a/source/blender/modifiers/intern/MOD_surfacedeform.c
+++ b/source/blender/modifiers/intern/MOD_surfacedeform.c
@@ -27,7 +27,6 @@
#include "DNA_object_types.h"
#include "DNA_scene_types.h"
-#include "BLI_alloca.h"
#include "BLI_math.h"
#include "BLI_math_geom.h"
#include "BLI_task.h"
diff --git a/source/blender/modifiers/intern/MOD_uvproject.c b/source/blender/modifiers/intern/MOD_uvproject.c
index 0da96ba1a38..c47b0a06215 100644
--- a/source/blender/modifiers/intern/MOD_uvproject.c
+++ b/source/blender/modifiers/intern/MOD_uvproject.c
@@ -46,7 +46,6 @@
#include "BKE_camera.h"
-#include "BKE_library.h"
#include "BKE_library_query.h"
#include "BKE_material.h"
#include "BKE_mesh.h"
diff --git a/source/blender/modifiers/intern/MOD_weighted_normal.c b/source/blender/modifiers/intern/MOD_weighted_normal.c
index 0e116b2e021..faa947c914c 100644
--- a/source/blender/modifiers/intern/MOD_weighted_normal.c
+++ b/source/blender/modifiers/intern/MOD_weighted_normal.c
@@ -32,7 +32,6 @@
#include "BKE_cdderivedmesh.h"
#include "BKE_deform.h"
#include "BKE_library.h"
-#include "BKE_library_query.h"
#include "BKE_mesh.h"
#include "BLI_math.h"
diff --git a/source/blender/modifiers/intern/MOD_weightvgedit.c b/source/blender/modifiers/intern/MOD_weightvgedit.c
index bf7517ee634..5a1bc907b89 100644
--- a/source/blender/modifiers/intern/MOD_weightvgedit.c
+++ b/source/blender/modifiers/intern/MOD_weightvgedit.c
@@ -41,7 +41,6 @@
#include "BKE_colortools.h" /* CurveMapping. */
#include "BKE_deform.h"
-#include "BKE_library.h"
#include "BKE_library_query.h"
#include "BKE_modifier.h"
#include "BKE_texture.h" /* Texture masking. */
diff --git a/source/blender/modifiers/intern/MOD_weightvgmix.c b/source/blender/modifiers/intern/MOD_weightvgmix.c
index 674ef106737..d4ec3cf7004 100644
--- a/source/blender/modifiers/intern/MOD_weightvgmix.c
+++ b/source/blender/modifiers/intern/MOD_weightvgmix.c
@@ -39,7 +39,6 @@
#include "BKE_customdata.h"
#include "BKE_deform.h"
-#include "BKE_library.h"
#include "BKE_library_query.h"
#include "BKE_modifier.h"
#include "BKE_texture.h" /* Texture masking. */
diff --git a/source/blender/nodes/composite/nodes/node_composite_keying.c b/source/blender/nodes/composite/nodes/node_composite_keying.c
index 6dd2bcc9002..8d7edce3b16 100644
--- a/source/blender/nodes/composite/nodes/node_composite_keying.c
+++ b/source/blender/nodes/composite/nodes/node_composite_keying.c
@@ -35,7 +35,6 @@
#include "DNA_movieclip_types.h"
#include "BLI_math_base.h"
-#include "BLI_math_color.h"
#include "node_composite_util.h"
diff --git a/source/blender/physics/intern/implicit_blender.c b/source/blender/physics/intern/implicit_blender.c
index 61b6d0670f4..31ff22220ab 100644
--- a/source/blender/physics/intern/implicit_blender.c
+++ b/source/blender/physics/intern/implicit_blender.c
@@ -42,7 +42,6 @@
#include "DNA_texture_types.h"
#include "BLI_math.h"
-#include "BLI_linklist.h"
#include "BLI_utildefines.h"
#include "BKE_cloth.h"
diff --git a/source/blender/python/generic/idprop_py_api.c b/source/blender/python/generic/idprop_py_api.c
index d6e4a3ac291..76cc8bf7c6b 100644
--- a/source/blender/python/generic/idprop_py_api.c
+++ b/source/blender/python/generic/idprop_py_api.c
@@ -30,7 +30,6 @@
#include "MEM_guardedalloc.h"
#include "BLI_utildefines.h"
-#include "BLI_string.h"
#include "idprop_py_api.h"
diff --git a/source/blender/python/gpu/gpu_py_batch.c b/source/blender/python/gpu/gpu_py_batch.c
index a50ea32b5dd..e59f8f30ff0 100644
--- a/source/blender/python/gpu/gpu_py_batch.c
+++ b/source/blender/python/gpu/gpu_py_batch.c
@@ -36,7 +36,6 @@
#include "BLI_utildefines.h"
-#include "BKE_global.h"
#include "GPU_batch.h"
diff --git a/source/blender/python/gpu/gpu_py_offscreen.c b/source/blender/python/gpu/gpu_py_offscreen.c
index 5dc6e36ca56..3438f953ea0 100644
--- a/source/blender/python/gpu/gpu_py_offscreen.c
+++ b/source/blender/python/gpu/gpu_py_offscreen.c
@@ -36,7 +36,6 @@
#include "BLI_utildefines.h"
-#include "BKE_global.h"
#include "BKE_library.h"
#include "BKE_scene.h"
diff --git a/source/blender/python/intern/bpy_app_translations.c b/source/blender/python/intern/bpy_app_translations.c
index acb44f86f75..0f5f72328be 100644
--- a/source/blender/python/intern/bpy_app_translations.c
+++ b/source/blender/python/intern/bpy_app_translations.c
@@ -33,8 +33,6 @@
#include <structmember.h>
#include "BLI_utildefines.h"
-#include "BLI_string.h"
-#include "BLI_ghash.h"
#include "BPY_extern.h"
#include "bpy_app_translations.h"
@@ -48,6 +46,11 @@
#include "../generic/python_utildefines.h"
+#ifdef WITH_INTERNATIONAL
+# include "BLI_string.h"
+# include "BLI_ghash.h"
+#endif
+
typedef struct {
PyObject_HEAD
/* The string used to separate context from actual message in PY_TRANSLATE RNA props. */
diff --git a/source/blender/python/intern/bpy_driver.c b/source/blender/python/intern/bpy_driver.c
index f098a28d679..cd6a06556cf 100644
--- a/source/blender/python/intern/bpy_driver.c
+++ b/source/blender/python/intern/bpy_driver.c
@@ -37,7 +37,6 @@
#include "BLI_listbase.h"
#include "BLI_math_base.h"
-#include "BLI_string.h"
#include "BKE_fcurve.h"
#include "BKE_global.h"
diff --git a/source/blender/python/intern/bpy_operator.c b/source/blender/python/intern/bpy_operator.c
index 56db0a604aa..5637c081435 100644
--- a/source/blender/python/intern/bpy_operator.c
+++ b/source/blender/python/intern/bpy_operator.c
@@ -37,7 +37,6 @@
#include "BLI_utildefines.h"
#include "BLI_listbase.h"
-#include "BLI_string.h"
#include "BPY_extern.h"
#include "bpy_operator.h"
diff --git a/source/blender/python/intern/bpy_rna_array.c b/source/blender/python/intern/bpy_rna_array.c
index 9a184df8054..a93f75f87d4 100644
--- a/source/blender/python/intern/bpy_rna_array.c
+++ b/source/blender/python/intern/bpy_rna_array.c
@@ -35,7 +35,6 @@
#include "RNA_types.h"
#include "bpy_rna.h"
-#include "BKE_global.h"
#include "MEM_guardedalloc.h"
diff --git a/source/blender/python/intern/bpy_rna_callback.c b/source/blender/python/intern/bpy_rna_callback.c
index ed29aa795e6..450d39e84ed 100644
--- a/source/blender/python/intern/bpy_rna_callback.c
+++ b/source/blender/python/intern/bpy_rna_callback.c
@@ -33,7 +33,6 @@
#include "RNA_types.h"
#include "BLI_utildefines.h"
-#include "BLI_listbase.h"
#include "bpy_rna.h"
#include "bpy_rna_callback.h"
diff --git a/source/blender/python/intern/bpy_rna_gizmo.c b/source/blender/python/intern/bpy_rna_gizmo.c
index 8189431dfc9..b7db459279b 100644
--- a/source/blender/python/intern/bpy_rna_gizmo.c
+++ b/source/blender/python/intern/bpy_rna_gizmo.c
@@ -32,7 +32,6 @@
#include "BLI_utildefines.h"
#include "BLI_alloca.h"
-#include "BKE_main.h"
#include "WM_api.h"
#include "WM_types.h"
diff --git a/source/blender/render/intern/source/pipeline.c b/source/blender/render/intern/source/pipeline.c
index 6e6bbe6332d..13240c66658 100644
--- a/source/blender/render/intern/source/pipeline.c
+++ b/source/blender/render/intern/source/pipeline.c
@@ -56,7 +56,6 @@
#include "BLI_timecode.h"
#include "BLI_fileops.h"
#include "BLI_threads.h"
-#include "BLI_rand.h"
#include "BLI_callbacks.h"
#include "BLT_translation.h"
diff --git a/source/blender/render/intern/source/pointdensity.c b/source/blender/render/intern/source/pointdensity.c
index f51c472da8f..ce69c394fa7 100644
--- a/source/blender/render/intern/source/pointdensity.c
+++ b/source/blender/render/intern/source/pointdensity.c
@@ -52,7 +52,6 @@
#include "BKE_colorband.h"
#include "BKE_deform.h"
#include "BKE_lattice.h"
-#include "BKE_main.h"
#include "BKE_object.h"
#include "BKE_particle.h"
#include "BKE_scene.h"
diff --git a/source/blender/render/intern/source/render_texture.c b/source/blender/render/intern/source/render_texture.c
index b41e2d7fae4..0f4f2895628 100644
--- a/source/blender/render/intern/source/render_texture.c
+++ b/source/blender/render/intern/source/render_texture.c
@@ -55,8 +55,6 @@
#include "BKE_animsys.h"
#include "BKE_colorband.h"
-#include "BKE_global.h"
-#include "BKE_main.h"
#include "BKE_material.h"
#include "BKE_scene.h"
diff --git a/source/blender/shader_fx/intern/FX_shader_flip.c b/source/blender/shader_fx/intern/FX_shader_flip.c
index 404e2f8160e..2ab311aa6dc 100644
--- a/source/blender/shader_fx/intern/FX_shader_flip.c
+++ b/source/blender/shader_fx/intern/FX_shader_flip.c
@@ -34,7 +34,6 @@
#include "DNA_object_types.h"
#include "DNA_gpencil_types.h"
-#include "BLI_math_base.h"
#include "BLI_utildefines.h"
#include "FX_shader_types.h"
diff --git a/source/blender/shader_fx/intern/FX_shader_glow.c b/source/blender/shader_fx/intern/FX_shader_glow.c
index cd513ed1f0a..07d0e1f4350 100644
--- a/source/blender/shader_fx/intern/FX_shader_glow.c
+++ b/source/blender/shader_fx/intern/FX_shader_glow.c
@@ -34,10 +34,8 @@
#include "DNA_object_types.h"
#include "DNA_gpencil_types.h"
-#include "BLI_math_base.h"
#include "BLI_utildefines.h"
-#include "BKE_library_query.h"
#include "BKE_modifier.h"
#include "BKE_shader_fx.h"
diff --git a/source/blender/shader_fx/intern/FX_shader_light.c b/source/blender/shader_fx/intern/FX_shader_light.c
index 86715e1a1a7..cb71a81cb7d 100644
--- a/source/blender/shader_fx/intern/FX_shader_light.c
+++ b/source/blender/shader_fx/intern/FX_shader_light.c
@@ -34,7 +34,6 @@
#include "DNA_object_types.h"
#include "DNA_gpencil_types.h"
-#include "BLI_math_base.h"
#include "BLI_utildefines.h"
#include "BKE_library_query.h"
diff --git a/source/blender/shader_fx/intern/FX_shader_shadow.c b/source/blender/shader_fx/intern/FX_shader_shadow.c
index aa8808f268b..06a217b6f8f 100644
--- a/source/blender/shader_fx/intern/FX_shader_shadow.c
+++ b/source/blender/shader_fx/intern/FX_shader_shadow.c
@@ -34,7 +34,6 @@
#include "DNA_object_types.h"
#include "DNA_gpencil_types.h"
-#include "BLI_math_base.h"
#include "BLI_utildefines.h"
#include "BKE_library_query.h"
diff --git a/source/blender/shader_fx/intern/FX_shader_util.c b/source/blender/shader_fx/intern/FX_shader_util.c
index b74ff45b991..5eaf36237f1 100644
--- a/source/blender/shader_fx/intern/FX_shader_util.c
+++ b/source/blender/shader_fx/intern/FX_shader_util.c
@@ -32,7 +32,6 @@
#include "MEM_guardedalloc.h"
-#include "BLI_blenlib.h"
#include "BLI_utildefines.h"
#include "BKE_shader_fx.h"
diff --git a/source/blender/windowmanager/gizmo/intern/wm_gizmo.c b/source/blender/windowmanager/gizmo/intern/wm_gizmo.c
index 00586816933..bafc90202dd 100644
--- a/source/blender/windowmanager/gizmo/intern/wm_gizmo.c
+++ b/source/blender/windowmanager/gizmo/intern/wm_gizmo.c
@@ -31,8 +31,6 @@
#include "BLI_listbase.h"
#include "BLI_math.h"
-#include "BLI_string.h"
-#include "BLI_string_utils.h"
#include "BKE_context.h"
diff --git a/source/blender/windowmanager/gizmo/intern/wm_gizmo_group_type.c b/source/blender/windowmanager/gizmo/intern/wm_gizmo_group_type.c
index 655d38a5206..c0c850977ea 100644
--- a/source/blender/windowmanager/gizmo/intern/wm_gizmo_group_type.c
+++ b/source/blender/windowmanager/gizmo/intern/wm_gizmo_group_type.c
@@ -24,8 +24,6 @@
#include "BLI_utildefines.h"
#include "BLI_ghash.h"
-#include "BLI_string.h"
-#include "BLI_string_utils.h"
#include "BKE_context.h"
diff --git a/source/blender/windowmanager/gizmo/intern/wm_gizmo_map.c b/source/blender/windowmanager/gizmo/intern/wm_gizmo_map.c
index 26355151a40..f32fc6b2a9a 100644
--- a/source/blender/windowmanager/gizmo/intern/wm_gizmo_map.c
+++ b/source/blender/windowmanager/gizmo/intern/wm_gizmo_map.c
@@ -32,7 +32,6 @@
#include "BLI_listbase.h"
#include "BLI_math.h"
#include "BLI_rect.h"
-#include "BLI_string.h"
#include "BLI_ghash.h"
#include "BKE_context.h"
diff --git a/source/blender/windowmanager/gizmo/intern/wm_gizmo_target_props.c b/source/blender/windowmanager/gizmo/intern/wm_gizmo_target_props.c
index 12f9b529c15..0e2be074dad 100644
--- a/source/blender/windowmanager/gizmo/intern/wm_gizmo_target_props.c
+++ b/source/blender/windowmanager/gizmo/intern/wm_gizmo_target_props.c
@@ -24,8 +24,6 @@
#include "BLI_listbase.h"
#include "BLI_math.h"
-#include "BLI_string.h"
-#include "BLI_string_utils.h"
#include "BKE_context.h"
diff --git a/source/blender/windowmanager/gizmo/intern/wm_gizmo_type.c b/source/blender/windowmanager/gizmo/intern/wm_gizmo_type.c
index 2ff0148044c..174d82ee572 100644
--- a/source/blender/windowmanager/gizmo/intern/wm_gizmo_type.c
+++ b/source/blender/windowmanager/gizmo/intern/wm_gizmo_type.c
@@ -25,8 +25,6 @@
#include "BLI_utildefines.h"
#include "BLI_ghash.h"
#include "BLI_listbase.h"
-#include "BLI_string.h"
-#include "BLI_string_utils.h"
#include "BKE_context.h"
#include "BKE_main.h"
diff --git a/source/blender/windowmanager/intern/wm.c b/source/blender/windowmanager/intern/wm.c
index 80deca46a24..90252cabd69 100644
--- a/source/blender/windowmanager/intern/wm.c
+++ b/source/blender/windowmanager/intern/wm.c
@@ -43,7 +43,6 @@
#include "BLI_utildefines.h"
#include "BLI_blenlib.h"
-#include "BLI_ghash.h"
#include "BKE_context.h"
#include "BKE_global.h"
@@ -51,7 +50,6 @@
#include "BKE_library.h"
#include "BKE_main.h"
#include "BKE_report.h"
-#include "BKE_screen.h"
#include "BKE_workspace.h"
#include "WM_api.h"
diff --git a/source/blender/windowmanager/intern/wm_files_link.c b/source/blender/windowmanager/intern/wm_files_link.c
index d1a189ca44e..574edb98d32 100644
--- a/source/blender/windowmanager/intern/wm_files_link.c
+++ b/source/blender/windowmanager/intern/wm_files_link.c
@@ -30,7 +30,6 @@
* Functions for dealing with append/link operators and helpers.
*/
-
#include <float.h>
#include <string.h>
#include <ctype.h>
@@ -46,8 +45,6 @@
#include "DNA_scene_types.h"
#include "DNA_windowmanager_types.h"
-
-
#include "BLI_blenlib.h"
#include "BLI_bitmap.h"
#include "BLI_linklist.h"
diff --git a/source/blender/windowmanager/intern/wm_operators.c b/source/blender/windowmanager/intern/wm_operators.c
index 8351a62b760..2c955cc0d21 100644
--- a/source/blender/windowmanager/intern/wm_operators.c
+++ b/source/blender/windowmanager/intern/wm_operators.c
@@ -65,7 +65,6 @@
#include "BLI_dynstr.h" /*for WM_operator_pystring */
#include "BLI_math.h"
#include "BLI_utildefines.h"
-#include "BLI_ghash.h"
#include "BLO_readfile.h"
diff --git a/source/blender/windowmanager/intern/wm_playanim.c b/source/blender/windowmanager/intern/wm_playanim.c
index 17408dcd61d..ff0a8d50110 100644
--- a/source/blender/windowmanager/intern/wm_playanim.c
+++ b/source/blender/windowmanager/intern/wm_playanim.c
@@ -63,7 +63,6 @@
#include "BKE_image.h"
-#include "BIF_gl.h"
#include "BIF_glutil.h"
#include "GPU_matrix.h"
diff --git a/source/blender/windowmanager/intern/wm_stereo.c b/source/blender/windowmanager/intern/wm_stereo.c
index c6b751e8f59..f544ec3c470 100644
--- a/source/blender/windowmanager/intern/wm_stereo.c
+++ b/source/blender/windowmanager/intern/wm_stereo.c
@@ -39,7 +39,6 @@
#include "MEM_guardedalloc.h"
-#include "BLI_listbase.h"
#include "BLI_utildefines.h"
#include "BIF_gl.h"
diff --git a/source/blender/windowmanager/intern/wm_uilist_type.c b/source/blender/windowmanager/intern/wm_uilist_type.c
index f0ffa5905fc..94ea37b4bb2 100644
--- a/source/blender/windowmanager/intern/wm_uilist_type.c
+++ b/source/blender/windowmanager/intern/wm_uilist_type.c
@@ -33,7 +33,6 @@
#include "BLI_utildefines.h"
#include "BLI_ghash.h"
-#include "BKE_context.h"
#include "BKE_screen.h"
#include "WM_api.h"
diff --git a/source/blender/windowmanager/message_bus/intern/wm_message_bus_rna.c b/source/blender/windowmanager/message_bus/intern/wm_message_bus_rna.c
index deaac18ba70..fe37887be0b 100644
--- a/source/blender/windowmanager/message_bus/intern/wm_message_bus_rna.c
+++ b/source/blender/windowmanager/message_bus/intern/wm_message_bus_rna.c
@@ -22,7 +22,6 @@
* \ingroup wm
*/
-
#include <stdio.h>
#include "CLG_log.h"
@@ -40,7 +39,6 @@
#include "RNA_access.h"
-
/* -------------------------------------------------------------------------- */
BLI_INLINE uint void_hash_uint(const void *key)
diff --git a/source/creator/creator_signals.c b/source/creator/creator_signals.c
index 678617eb28f..6908bae2659 100644
--- a/source/creator/creator_signals.c
+++ b/source/creator/creator_signals.c
@@ -64,7 +64,6 @@
#include "BKE_main.h"
#include "BKE_report.h"
-
#include <signal.h>
#include "creator_intern.h" /* own include */