Cleanup: includes in headers

Forward declare structs where possible.
This commit is contained in:
Campbell Barton 2019-09-07 23:17:40 +10:00
parent 1b0dd5a215
commit fa7ee622f0
13 changed files with 25 additions and 26 deletions

View File

@ -28,8 +28,6 @@
extern "C" {
#endif
#include "DNA_vec_types.h"
struct Camera;
struct Depsgraph;
struct Main;

View File

@ -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;

View File

@ -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;

View File

@ -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);

View File

@ -24,7 +24,6 @@
#include "BLI_bitmap.h"
#include "BLI_ghash.h"
#include "BLI_utildefines.h"
struct BMLog;
struct BMesh;

View File

@ -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];

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -24,6 +24,8 @@
#include "BLI_rect.h"
#include "DNA_node_types.h"
#include "BKE_report.h"
#include "DRW_render.h"