[Bf-blender-cvs] [fa7ee622f0f] master: Cleanup: includes in headers

Campbell Barton noreply at git.blender.org
Sat Sep 7 15:24:34 CEST 2019


Commit: fa7ee622f0fb2f7482dbae94df194a3b33a73a98
Author: Campbell Barton
Date:   Sat Sep 7 23:17:40 2019 +1000
Branches: master
https://developer.blender.org/rBfa7ee622f0fb2f7482dbae94df194a3b33a73a98

Cleanup: includes in headers

Forward declare structs where possible.

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

M	source/blender/blenkernel/BKE_camera.h
M	source/blender/blenkernel/BKE_gpencil_modifier.h
M	source/blender/blenkernel/BKE_mesh.h
M	source/blender/blenkernel/BKE_node.h
M	source/blender/blenkernel/BKE_pbvh.h
M	source/blender/blenkernel/BKE_studiolight.h
M	source/blender/blenkernel/intern/image.c
M	source/blender/blenkernel/intern/scene.c
M	source/blender/blenloader/intern/versioning_260.c
M	source/blender/blenloader/intern/versioning_270.c
M	source/blender/blenloader/intern/versioning_280.c
M	source/blender/blenloader/intern/versioning_defaults.c
M	source/blender/draw/engines/workbench/workbench_render.c

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

diff --git a/source/blender/blenkernel/BKE_camera.h b/source/blender/blenkernel/BKE_camera.h
index da80b3d5032..d1c133c79b5 100644
--- a/source/blender/blenkernel/BKE_camera.h
+++ b/source/blender/blenkernel/BKE_camera.h
@@ -28,8 +28,6 @@
 extern "C" {
 #endif
 
-#include "DNA_vec_types.h"
-
 struct Camera;
 struct Depsgraph;
 struct Main;
diff --git a/source/blender/blenkernel/BKE_gpencil_modifier.h b/source/blender/blenkernel/BKE_gpencil_modifier.h
index 36f38996c36..ba2e1e85d23 100644
--- a/source/blender/blenkernel/BKE_gpencil_modifier.h
+++ b/source/blender/blenkernel/BKE_gpencil_modifier.h
@@ -21,8 +21,6 @@
  */
 
 #include "DNA_gpencil_modifier_types.h" /* needed for all enum typdefs */
-#include "BLI_compiler_attrs.h"
-#include "BKE_customdata.h"
 
 struct Depsgraph;
 struct GpencilModifierData;
diff --git a/source/blender/blenkernel/BKE_mesh.h b/source/blender/blenkernel/BKE_mesh.h
index 12978e46327..a260621ac2c 100644
--- a/source/blender/blenkernel/BKE_mesh.h
+++ b/source/blender/blenkernel/BKE_mesh.h
@@ -26,9 +26,6 @@
 /* defines BLI_INLINE */
 #include "BLI_compiler_compat.h"
 
-/* defines CustomDataMask */
-//#include "BKE_customdata.h"
-
 struct BLI_Stack;
 struct BMEditMesh;
 struct BMesh;
diff --git a/source/blender/blenkernel/BKE_node.h b/source/blender/blenkernel/BKE_node.h
index cbfc8ffc7d0..98710394079 100644
--- a/source/blender/blenkernel/BKE_node.h
+++ b/source/blender/blenkernel/BKE_node.h
@@ -30,13 +30,7 @@
 #include "DNA_listBase.h"
 
 /* for FOREACH_NODETREE_BEGIN */
-#include "DNA_light_types.h"
-#include "DNA_material_types.h"
 #include "DNA_node_types.h"
-#include "DNA_scene_types.h"
-#include "DNA_texture_types.h"
-#include "DNA_world_types.h"
-#include "DNA_linestyle_types.h"
 
 #include "RNA_types.h"
 
@@ -46,19 +40,23 @@
 struct ARegion;
 struct ColorManagedDisplaySettings;
 struct ColorManagedViewSettings;
+struct FreestyleLineStyle;
 struct GPUMaterial;
 struct GPUNodeStack;
 struct ID;
 struct ImBuf;
 struct ImageFormatData;
+struct Light;
 struct ListBase;
 struct MTex;
 struct Main;
+struct Material;
 struct PointerRNA;
 struct RenderData;
 struct Scene;
 struct SpaceNode;
 struct Tex;
+struct World;
 struct bContext;
 struct bNode;
 struct bNodeExecContext;
@@ -832,11 +830,11 @@ void BKE_node_tree_unlink_id(ID *id, struct bNodeTree *ntree);
 struct NodeTreeIterStore {
   bNodeTree *ngroup;
   Scene *scene;
-  Material *mat;
+  struct Material *mat;
   Tex *tex;
-  Light *light;
-  World *world;
-  FreestyleLineStyle *linestyle;
+  struct Light *light;
+  struct World *world;
+  struct FreestyleLineStyle *linestyle;
 };
 
 void BKE_node_tree_iter_init(struct NodeTreeIterStore *ntreeiter, struct Main *bmain);
diff --git a/source/blender/blenkernel/BKE_pbvh.h b/source/blender/blenkernel/BKE_pbvh.h
index f02d41d3c65..899dddf31e8 100644
--- a/source/blender/blenkernel/BKE_pbvh.h
+++ b/source/blender/blenkernel/BKE_pbvh.h
@@ -24,7 +24,6 @@
 
 #include "BLI_bitmap.h"
 #include "BLI_ghash.h"
-#include "BLI_utildefines.h"
 
 struct BMLog;
 struct BMesh;
diff --git a/source/blender/blenkernel/BKE_studiolight.h b/source/blender/blenkernel/BKE_studiolight.h
index 108e93d9caa..c6d1e61fb47 100644
--- a/source/blender/blenkernel/BKE_studiolight.h
+++ b/source/blender/blenkernel/BKE_studiolight.h
@@ -26,14 +26,13 @@
  * Studio lighting for the 3dview
  */
 
-#include "BKE_context.h"
-
 #include "BLI_sys_types.h"
 
-#include "DNA_space_types.h"
+#include "BLI_path_util.h"
+
 #include "DNA_userdef_types.h"
 
-#include "IMB_imbuf_types.h"
+struct ImBuf;
 
 /*
  * These defines are the indexes in the StudioLight.diffuse_light
@@ -103,7 +102,7 @@ enum StudioLightFlag {
 typedef void StudioLightFreeFunction(struct StudioLight *, void *data);
 
 typedef struct StudioLightImage {
-  ImBuf *ibuf;
+  struct ImBuf *ibuf;
   struct GPUTexture *gputexture;
 } StudioLightImage;
 
@@ -124,9 +123,9 @@ typedef struct StudioLight {
   float light_direction[3];
   StudioLightImage matcap_diffuse;
   StudioLightImage matcap_specular;
-  ImBuf *equirect_radiance_buffer;
-  ImBuf *equirect_irradiance_buffer;
-  ImBuf *radiance_cubemap_buffers[6];
+  struct ImBuf *equirect_radiance_buffer;
+  struct ImBuf *equirect_irradiance_buffer;
+  struct ImBuf *radiance_cubemap_buffers[6];
   struct GPUTexture *equirect_radiance_gputexture;
   struct GPUTexture *equirect_irradiance_gputexture;
   SolidLight light[STUDIOLIGHT_MAX_LIGHT];
diff --git a/source/blender/blenkernel/intern/image.c b/source/blender/blenkernel/intern/image.c
index a99407b9bf9..523c0199daa 100644
--- a/source/blender/blenkernel/intern/image.c
+++ b/source/blender/blenkernel/intern/image.c
@@ -55,6 +55,8 @@
 #include "DNA_brush_types.h"
 #include "DNA_mesh_types.h"
 #include "DNA_meshdata_types.h"
+#include "DNA_light_types.h"
+#include "DNA_world_types.h"
 
 #include "BLI_blenlib.h"
 #include "BLI_math_vector.h"
diff --git a/source/blender/blenkernel/intern/scene.c b/source/blender/blenkernel/intern/scene.c
index b36e5a276e2..605f9b5b39e 100644
--- a/source/blender/blenkernel/intern/scene.c
+++ b/source/blender/blenkernel/intern/scene.c
@@ -43,6 +43,7 @@
 #include "DNA_windowmanager_types.h"
 #include "DNA_workspace_types.h"
 #include "DNA_gpencil_types.h"
+#include "DNA_world_types.h"
 
 #include "BLI_math.h"
 #include "BLI_blenlib.h"
diff --git a/source/blender/blenloader/intern/versioning_260.c b/source/blender/blenloader/intern/versioning_260.c
index 6f5c37d716e..31f6f93e856 100644
--- a/source/blender/blenloader/intern/versioning_260.c
+++ b/source/blender/blenloader/intern/versioning_260.c
@@ -41,6 +41,8 @@
 #include "DNA_sdna_types.h"
 #include "DNA_smoke_types.h"
 #include "DNA_space_types.h"
+#include "DNA_world_types.h"
+#include "DNA_light_types.h"
 
 #include "MEM_guardedalloc.h"
 
diff --git a/source/blender/blenloader/intern/versioning_270.c b/source/blender/blenloader/intern/versioning_270.c
index 5010cc8071d..3d55891bb0a 100644
--- a/source/blender/blenloader/intern/versioning_270.c
+++ b/source/blender/blenloader/intern/versioning_270.c
@@ -48,6 +48,7 @@
 #include "DNA_view3d_types.h"
 #include "DNA_smoke_types.h"
 #include "DNA_rigidbody_types.h"
+#include "DNA_light_types.h"
 
 #include "DNA_genfile.h"
 
diff --git a/source/blender/blenloader/intern/versioning_280.c b/source/blender/blenloader/intern/versioning_280.c
index ca00e7cc62f..ddab3972106 100644
--- a/source/blender/blenloader/intern/versioning_280.c
+++ b/source/blender/blenloader/intern/versioning_280.c
@@ -55,6 +55,7 @@
 #include "DNA_curve_types.h"
 #include "DNA_armature_types.h"
 #include "DNA_text_types.h"
+#include "DNA_world_types.h"
 
 #include "BKE_action.h"
 #include "BKE_animsys.h"
diff --git a/source/blender/blenloader/intern/versioning_defaults.c b/source/blender/blenloader/intern/versioning_defaults.c
index 657e79f718a..1c91871694f 100644
--- a/source/blender/blenloader/intern/versioning_defaults.c
+++ b/source/blender/blenloader/intern/versioning_defaults.c
@@ -38,6 +38,7 @@
 #include "DNA_workspace_types.h"
 #include "DNA_mesh_types.h"
 #include "DNA_meshdata_types.h"
+#include "DNA_light_types.h"
 
 #include "BKE_appdir.h"
 #include "BKE_colortools.h"
diff --git a/source/blender/draw/engines/workbench/workbench_render.c b/source/blender/draw/engines/workbench/workbench_render.c
index b4e5e98c92b..899fbdc9b71 100644
--- a/source/blender/draw/engines/workbench/workbench_render.c
+++ b/source/blender/draw/engines/workbench/workbench_render.c
@@ -24,6 +24,8 @@
 
 #include "BLI_rect.h"
 
+#include "DNA_node_types.h"
+
 #include "BKE_report.h"
 
 #include "DRW_render.h"



More information about the Bf-blender-cvs mailing list