[Bf-blender-cvs] [4b2110fc86e] blender2.8: Cleanup: Remove 'BKE_library.h' include from 'BKE_main.h'

Bastien Montagne noreply at git.blender.org
Wed Nov 7 21:15:08 CET 2018


Commit: 4b2110fc86e59136efd7ea294453678e848b4b74
Author: Bastien Montagne
Date:   Wed Nov 7 15:37:31 2018 +0100
Branches: blender2.8
https://developer.blender.org/rB4b2110fc86e59136efd7ea294453678e848b4b74

Cleanup: Remove 'BKE_library.h' include from 'BKE_main.h'

That kind of implicit includes should really only be done when totally,
absolutely necessary, and ideally only with rather simple 'second-level'
headers.

Otherwise not being explicit with includes always end up biting in
unexpected ways...

===================================================================

M	source/blender/alembic/intern/abc_mball.cc
M	source/blender/alembic/intern/abc_mesh.cc
M	source/blender/blenkernel/BKE_main.h
M	source/blender/blenkernel/intern/blender_undo.c
M	source/blender/blenkernel/intern/customdata.c
M	source/blender/blenkernel/intern/dynamicpaint.c
M	source/blender/blenkernel/intern/lightprobe.c
M	source/blender/blenkernel/intern/packedFile.c
M	source/blender/blenkernel/intern/pointcache.c
M	source/blender/blenkernel/intern/smoke.c
M	source/blender/blenkernel/intern/undo_system.c
M	source/blender/blenkernel/intern/writeavi.c
M	source/blender/blenkernel/intern/writeffmpeg.c
M	source/blender/blenloader/intern/undofile.c
M	source/blender/blenloader/intern/versioning_280.c
M	source/blender/collada/ImageExporter.cpp
M	source/blender/collada/collada_utils.cpp
M	source/blender/editors/armature/pose_transform.c
M	source/blender/editors/interface/interface_ops.c
M	source/blender/editors/io/io_alembic.c
M	source/blender/editors/io/io_collada.c
M	source/blender/editors/mesh/editmesh_tools.c
M	source/blender/editors/object/object_modifier.c
M	source/blender/editors/physics/rigidbody_constraint.c
M	source/blender/editors/physics/rigidbody_object.c
M	source/blender/editors/render/render_opengl.c
M	source/blender/editors/scene/scene_edit.c
M	source/blender/editors/screen/screen_ops.c
M	source/blender/editors/screen/screendump.c
M	source/blender/editors/sculpt_paint/paint_ops.c
M	source/blender/editors/space_buttons/buttons_ops.c
M	source/blender/editors/space_file/file_draw.c
M	source/blender/editors/space_file/file_ops.c
M	source/blender/editors/space_file/filesel.c
M	source/blender/editors/space_outliner/outliner_collections.c
M	source/blender/editors/space_outliner/outliner_dragdrop.c
M	source/blender/editors/space_sequencer/sequencer_edit.c
M	source/blender/editors/util/ed_util.c
M	source/blender/freestyle/intern/blender_interface/BlenderFileLoader.h
M	source/blender/modifiers/intern/MOD_fluidsim_util.c
M	source/blender/modifiers/intern/MOD_meshcache.c
M	source/blender/modifiers/intern/MOD_ocean.c
M	source/blender/python/generic/bpy_internal_import.c
M	source/blender/python/intern/bpy_interface.c
M	source/blender/render/intern/source/bake_api.c
M	source/blender/render/intern/source/render_result.c

===================================================================

diff --git a/source/blender/alembic/intern/abc_mball.cc b/source/blender/alembic/intern/abc_mball.cc
index 62ab561274a..cfb0f2cfdb1 100644
--- a/source/blender/alembic/intern/abc_mball.cc
+++ b/source/blender/alembic/intern/abc_mball.cc
@@ -31,6 +31,7 @@ extern "C" {
 
 #include "BKE_curve.h"
 #include "BKE_displist.h"
+#include "BKE_library.h"
 #include "BKE_main.h"
 #include "BKE_mball.h"
 #include "BKE_mesh.h"
diff --git a/source/blender/alembic/intern/abc_mesh.cc b/source/blender/alembic/intern/abc_mesh.cc
index 728b7ede21f..50698ef728e 100644
--- a/source/blender/alembic/intern/abc_mesh.cc
+++ b/source/blender/alembic/intern/abc_mesh.cc
@@ -38,6 +38,7 @@ extern "C" {
 #include "BLI_math_geom.h"
 #include "BLI_string.h"
 
+#include "BKE_library.h"
 #include "BKE_main.h"
 #include "BKE_material.h"
 #include "BKE_mesh.h"
diff --git a/source/blender/blenkernel/BKE_main.h b/source/blender/blenkernel/BKE_main.h
index 0913cf208eb..492962f3b00 100644
--- a/source/blender/blenkernel/BKE_main.h
+++ b/source/blender/blenkernel/BKE_main.h
@@ -42,8 +42,6 @@
  */
 #include "DNA_listBase.h"
 
-#include "BKE_library.h"
-
 #ifdef __cplusplus
 extern "C" {
 #endif
diff --git a/source/blender/blenkernel/intern/blender_undo.c b/source/blender/blenkernel/intern/blender_undo.c
index 47e1def2aba..a00ad5ff05f 100644
--- a/source/blender/blenkernel/intern/blender_undo.c
+++ b/source/blender/blenkernel/intern/blender_undo.c
@@ -46,11 +46,12 @@
 #include "BLI_string.h"
 #include "BLI_utildefines.h"
 
+#include "BKE_appdir.h"
 #include "BKE_blender_undo.h"  /* own include */
 #include "BKE_blendfile.h"
-#include "BKE_appdir.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/customdata.c b/source/blender/blenkernel/intern/customdata.c
index 765c42b39b0..a0fa08708b1 100644
--- a/source/blender/blenkernel/intern/customdata.c
+++ b/source/blender/blenkernel/intern/customdata.c
@@ -53,6 +53,7 @@
 #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/dynamicpaint.c b/source/blender/blenkernel/intern/dynamicpaint.c
index 9f2ebab6bd9..8c39b50101b 100644
--- a/source/blender/blenkernel/intern/dynamicpaint.c
+++ b/source/blender/blenkernel/intern/dynamicpaint.c
@@ -65,6 +65,7 @@
 #include "BKE_effect.h"
 #include "BKE_global.h"
 #include "BKE_image.h"
+#include "BKE_library.h"
 #include "BKE_main.h"
 #include "BKE_material.h"
 #include "BKE_mesh.h"
diff --git a/source/blender/blenkernel/intern/lightprobe.c b/source/blender/blenkernel/intern/lightprobe.c
index baf0cdbe62f..4cb2b450afe 100644
--- a/source/blender/blenkernel/intern/lightprobe.c
+++ b/source/blender/blenkernel/intern/lightprobe.c
@@ -37,8 +37,9 @@
 
 #include "BKE_animsys.h"
 #include "BKE_global.h"
-#include "BKE_main.h"
+#include "BKE_library.h"
 #include "BKE_lightprobe.h"
+#include "BKE_main.h"
 
 void BKE_lightprobe_init(LightProbe *probe)
 {
diff --git a/source/blender/blenkernel/intern/packedFile.c b/source/blender/blenkernel/intern/packedFile.c
index 8d7a832671f..0446b697c68 100644
--- a/source/blender/blenkernel/intern/packedFile.c
+++ b/source/blender/blenkernel/intern/packedFile.c
@@ -54,6 +54,7 @@
 #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/pointcache.c b/source/blender/blenkernel/intern/pointcache.c
index 7fc36c423c1..99451a7b6c1 100644
--- a/source/blender/blenkernel/intern/pointcache.c
+++ b/source/blender/blenkernel/intern/pointcache.c
@@ -63,6 +63,7 @@
 #include "BKE_collection.h"
 #include "BKE_dynamicpaint.h"
 #include "BKE_global.h"
+#include "BKE_library.h"
 #include "BKE_main.h"
 #include "BKE_modifier.h"
 #include "BKE_object.h"
diff --git a/source/blender/blenkernel/intern/smoke.c b/source/blender/blenkernel/intern/smoke.c
index ced6cf0fe74..4a403d337b3 100644
--- a/source/blender/blenkernel/intern/smoke.c
+++ b/source/blender/blenkernel/intern/smoke.c
@@ -73,6 +73,7 @@
 #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"
diff --git a/source/blender/blenkernel/intern/undo_system.c b/source/blender/blenkernel/intern/undo_system.c
index ae98a765124..abc53bf031a 100644
--- a/source/blender/blenkernel/intern/undo_system.c
+++ b/source/blender/blenkernel/intern/undo_system.c
@@ -39,6 +39,7 @@
 
 #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/writeavi.c b/source/blender/blenkernel/intern/writeavi.c
index 1db239b3c6f..a1732b79ea3 100644
--- a/source/blender/blenkernel/intern/writeavi.c
+++ b/source/blender/blenkernel/intern/writeavi.c
@@ -43,6 +43,7 @@
 #include "BLI_utildefines.h"
 
 #include "BKE_global.h"
+#include "BKE_library.h"
 #include "BKE_main.h"
 #include "BKE_report.h"
 
diff --git a/source/blender/blenkernel/intern/writeffmpeg.c b/source/blender/blenkernel/intern/writeffmpeg.c
index d53cba184ad..06f11301acb 100644
--- a/source/blender/blenkernel/intern/writeffmpeg.c
+++ b/source/blender/blenkernel/intern/writeffmpeg.c
@@ -54,6 +54,7 @@
 #include "BKE_global.h"
 #include "BKE_idprop.h"
 #include "BKE_image.h"
+#include "BKE_library.h"
 #include "BKE_main.h"
 #include "BKE_report.h"
 #include "BKE_sound.h"
diff --git a/source/blender/blenloader/intern/undofile.c b/source/blender/blenloader/intern/undofile.c
index 614a3be559b..b38259f0f98 100644
--- a/source/blender/blenloader/intern/undofile.c
+++ b/source/blender/blenloader/intern/undofile.c
@@ -53,6 +53,7 @@
 #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_280.c b/source/blender/blenloader/intern/versioning_280.c
index 040c08eb63f..fc873e3a3a1 100644
--- a/source/blender/blenloader/intern/versioning_280.c
+++ b/source/blender/blenloader/intern/versioning_280.c
@@ -63,31 +63,32 @@
 #include "DNA_armature_types.h"
 
 #include "BKE_action.h"
+#include "BKE_cloth.h"
 #include "BKE_collection.h"
 #include "BKE_constraint.h"
-#include "BKE_customdata.h"
 #include "BKE_colortools.h"
+#include "BKE_customdata.h"
 #include "BKE_freestyle.h"
+#include "BKE_gpencil.h"
 #include "BKE_idprop.h"
 #include "BKE_image.h"
+#include "BKE_key.h"
+#include "BKE_library.h"
 #include "BKE_layer.h"
 #include "BKE_main.h"
 #include "BKE_material.h"
 #include "BKE_mesh.h"
 #include "BKE_node.h"
+#include "BKE_object.h"
+#include "BKE_paint.h"
 #include "BKE_pointcache.h"
 #include "BKE_report.h"
 #include "BKE_scene.h"
 #include "BKE_screen.h"
 #include "BKE_sequencer.h"
 #include "BKE_studiolight.h"
-#include "BKE_workspace.h"
-#include "BKE_gpencil.h"
-#include "BKE_paint.h"
-#include "BKE_object.h"
-#include "BKE_cloth.h"
-#include "BKE_key.h"
 #include "BKE_unit.h"
+#include "BKE_workspace.h"
 
 /* Only for IMB_BlendMode */
 #include "IMB_imbuf.h"
diff --git a/source/blender/collada/ImageExporter.cpp b/source/blender/collada/ImageExporter.cpp
index bb3cebf4cf0..23e67733e9c 100644
--- a/source/blender/collada/ImageExporter.cpp
+++ b/source/blender/collada/ImageExporter.cpp
@@ -37,6 +37,7 @@ extern "C" {
 #include "BKE_customdata.h"
 #include "BKE_global.h"
 #include "BKE_image.h"
+#include "BKE_library.h"
 #include "BKE_main.h"
 #include "BKE_mesh.h"
 #include "BLI_fileops.h"
diff --git a/source/blender/collada/collada_utils.cpp b/source/blender/collada/collada_utils.cpp
index 4fae65fab38..a70ff3a7c8f 100644
--- a/source/blender/collada/collada_utils.cpp
+++ b/source/blender/collada/collada_utils.cpp
@@ -49,11 +49,12 @@ extern "C" {
 #include "BKE_customdata.h"
 #include "BKE_object.h"
 #include "BKE_global.h"
+#include "BKE_library.h"
+#include "BKE_main.h"
 #include "BKE_layer.h"
 #include "BKE_mesh.h"
 #include "BKE_mesh_runtime.h"
 #include "BKE_scene.h"
-#include "BKE_main.h"
 
 #include "ED_armature.h"
 
diff --git a/source/blender/editors/armature/pose_transform.c b/source/blender/editors/armature/pose_transform.c
index b492cfacddb..92a3402fe04 100644
--- a/source/blender/editors/armature/pose_transform.c
+++ b/source/blender/editors/armature/pose_transform.c
@@ -47,6 +47,7 @@
 #include "BKE_deform.h"
 #include "BKE_global.h"
 #include "BKE_idprop.h"
+#include "BKE_library.h"
 #include "BKE_main.h"
 #include "BKE_object.h"
 #include "BKE_layer.h"
diff --git a/source/blender/editors/interface/interface_ops.c b/source/blender/editors/interface/interface_ops.c
index 8d241031ffd..0b7d92939a6 100644
--- a/source/blender/editors/interface/interface_ops.c
+++ b/source/blender/editors/interface/interface_ops.c
@@ -46,6 +46,7 @@
 #include "BKE_layer.h"
 #include "BKE_screen.h"
 #include "BKE_global.h"
+#include "BKE_library.h"
 #include "BKE_library_override.h"
 #include "BKE_node.h"
 #include "BKE_text.h" /* for UI_OT_reports_to_text */
diff --git a/source/blender/editors/io/io_alembic.c b/source/blender/editors/io/io_alembic.c
index 8e446c73eab..02d52d5bdd1 100644
--- a/source/blender/editors/io/io_alembic.c
+++ b/source/blender/editors/io/io_alembic.c
@@ -48,6 +48,7 @@
 
 #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/io/io_collada.c b/source/blender/editors/io/io_collada.c
index 8f05495bb7f..1ac3ca15c83 100644
--- a/source/blender/editors/io/io_collada.c
+++ b/source/blender/editors/io/io_collada.c
@@ -37,6 +37,7 @@
 
 #include "BKE_context.h"
 #include "BKE_global.h"
+#include "BKE_library.h"
 #include "BKE_main.h"
 #include "BKE_report.h"
 #include "BKE_object.h"
diff --git a/source/blender/editors/mesh/editmesh_tools.c b/source/blender/editors/mesh/editmesh_tools.c
index a442c76a65e..6300e7a6b2f 100644
--- a/source/blender/editors/mesh/editmesh

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list