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
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2020-12-15 02:47:58 +0300
committerCampbell Barton <ideasman42@gmail.com>2020-12-15 04:34:14 +0300
commit525364be31aafa547f4b17b9947074ed5a5b2570 (patch)
tree1826a3cb8ae72f0f2c936c419366323c88b21215 /source/blender/makesdna
parent15f2f69694cb23d04989d3faea4853468a3b140a (diff)
Cleanup: reduce indirect DNA header inclusion
Remove DNA headers, using forward declarations where possible. Also removed duplicate header, header including it's self and unnecessary inclusion of libc system headers from BKE header.
Diffstat (limited to 'source/blender/makesdna')
-rw-r--r--source/blender/makesdna/DNA_movieclip_types.h4
-rw-r--r--source/blender/makesdna/DNA_node_types.h19
-rw-r--r--source/blender/makesdna/DNA_scene_types.h23
-rw-r--r--source/blender/makesdna/DNA_sequence_types.h8
-rw-r--r--source/blender/makesdna/DNA_windowmanager_types.h6
-rw-r--r--source/blender/makesdna/DNA_workspace_types.h2
6 files changed, 27 insertions, 35 deletions
diff --git a/source/blender/makesdna/DNA_movieclip_types.h b/source/blender/makesdna/DNA_movieclip_types.h
index 2b1fd546450..11cdb48edf0 100644
--- a/source/blender/makesdna/DNA_movieclip_types.h
+++ b/source/blender/makesdna/DNA_movieclip_types.h
@@ -24,8 +24,8 @@
#pragma once
#include "DNA_ID.h"
-#include "DNA_color_types.h" /* for color management */
-#include "DNA_tracking_types.h"
+#include "DNA_color_types.h" /* for color management */
+#include "DNA_tracking_types.h" /* for #MovieTracking */
#ifdef __cplusplus
extern "C" {
diff --git a/source/blender/makesdna/DNA_node_types.h b/source/blender/makesdna/DNA_node_types.h
index f6ceb2b8e6a..736ec8919b4 100644
--- a/source/blender/makesdna/DNA_node_types.h
+++ b/source/blender/makesdna/DNA_node_types.h
@@ -25,9 +25,8 @@
#include "DNA_ID.h"
#include "DNA_listBase.h"
-#include "DNA_scene_types.h"
-#include "DNA_texture_types.h"
-#include "DNA_vec_types.h"
+#include "DNA_scene_types.h" /* for #ImageFormatData */
+#include "DNA_vec_types.h" /* for #rctf */
#ifdef __cplusplus
extern "C" {
@@ -352,8 +351,8 @@ typedef struct bNode {
/* XXX NODE_UPDATE is a generic update flag. More fine-grained updates
* might be used in the future, but currently all work the same way.
*/
-#define NODE_UPDATE 0xFFFF /* generic update flag (includes all others) */
-#define NODE_UPDATE_ID 1 /* associated id data block has changed */
+#define NODE_UPDATE 0xFFFF /* generic update flag (includes all others) */
+#define NODE_UPDATE_ID 1 /* associated id data block has changed */
#define NODE_UPDATE_OPERATOR 2 /* node update triggered from update operator */
/* Unique hash key for identifying node instances
@@ -512,11 +511,11 @@ typedef struct bNodeTree {
#define NTREE_TYPE_INIT 1
/* ntree->flag */
-#define NTREE_DS_EXPAND (1 << 0) /* for animation editors */
-#define NTREE_COM_OPENCL (1 << 1) /* use opencl */
-#define NTREE_TWO_PASS (1 << 2) /* two pass */
+#define NTREE_DS_EXPAND (1 << 0) /* for animation editors */
+#define NTREE_COM_OPENCL (1 << 1) /* use opencl */
+#define NTREE_TWO_PASS (1 << 2) /* two pass */
#define NTREE_COM_GROUPNODE_BUFFER (1 << 3) /* use groupnode buffers */
-#define NTREE_VIEWER_BORDER (1 << 4) /* use a border for viewer nodes */
+#define NTREE_VIEWER_BORDER (1 << 4) /* use a border for viewer nodes */
/* NOTE: DEPRECATED, use (id->tag & LIB_TAG_LOCALIZED) instead. */
/* tree is localized copy, free when deleting node groups */
@@ -1097,7 +1096,7 @@ typedef struct NodeAttributeMix {
#define NODE_IES_EXTERNAL 1
/* frame node flags */
-#define NODE_FRAME_SHRINK 1 /* keep the bounding box minimal */
+#define NODE_FRAME_SHRINK 1 /* keep the bounding box minimal */
#define NODE_FRAME_RESIZEABLE 2 /* test flag, if frame can be resized by user */
/* proxy node flags */
diff --git a/source/blender/makesdna/DNA_scene_types.h b/source/blender/makesdna/DNA_scene_types.h
index 06f7f7aafb4..3d14cb4df96 100644
--- a/source/blender/makesdna/DNA_scene_types.h
+++ b/source/blender/makesdna/DNA_scene_types.h
@@ -33,15 +33,10 @@
#define USE_SETSCENE_CHECK
#include "DNA_ID.h"
-#include "DNA_collection_types.h"
-#include "DNA_color_types.h" /* color management */
-#include "DNA_curveprofile_types.h"
+#include "DNA_color_types.h" /* color management */
#include "DNA_customdata_types.h" /* Scene's runtime cddata masks. */
-#include "DNA_freestyle_types.h"
#include "DNA_layer_types.h"
#include "DNA_listBase.h"
-#include "DNA_material_types.h"
-#include "DNA_userdef_types.h"
#include "DNA_vec_types.h"
#include "DNA_view3d_types.h"
@@ -487,7 +482,7 @@ typedef struct ImageFormatData {
#define R_IMF_IMTYPE_INVALID 255
/* ImageFormatData.flag */
-#define R_IMF_FLAG_ZBUF (1 << 0) /* was R_OPENEXR_ZBUF */
+#define R_IMF_FLAG_ZBUF (1 << 0) /* was R_OPENEXR_ZBUF */
#define R_IMF_FLAG_PREVIEW_JPG (1 << 1) /* was R_PREVIEW_JPG */
/* return values from BKE_imtype_valid_depths, note this is depts per channel */
@@ -529,8 +524,8 @@ typedef enum eImageFormatDepth {
/* ImageFormatData.jp2_flag */
#define R_IMF_JP2_FLAG_YCC (1 << 0) /* when disabled use RGB */ /* was R_JPEG2K_YCC */
-#define R_IMF_JP2_FLAG_CINE_PRESET (1 << 1) /* was R_JPEG2K_CINE_PRESET */
-#define R_IMF_JP2_FLAG_CINE_48 (1 << 2) /* was R_JPEG2K_CINE_48FPS */
+#define R_IMF_JP2_FLAG_CINE_PRESET (1 << 1) /* was R_JPEG2K_CINE_PRESET */
+#define R_IMF_JP2_FLAG_CINE_48 (1 << 2) /* was R_JPEG2K_CINE_48FPS */
/* ImageFormatData.jp2_codec */
#define R_IMF_JP2_CODEC_JP2 0
@@ -1782,7 +1777,7 @@ typedef struct Scene {
ListBase view_layers;
/* Not an actual datablock, but memory owned by scene. */
- Collection *master_collection;
+ struct Collection *master_collection;
struct SceneCollection *collection DNA_DEPRECATED;
/** Settings to be override by workspaces. */
@@ -1829,12 +1824,12 @@ typedef struct Scene {
#define R_MODE_UNUSED_20 (1 << 20) /* cleared */
#define R_MODE_UNUSED_21 (1 << 21) /* cleared */
-#define R_NO_OVERWRITE (1 << 22) /* skip existing files */
-#define R_TOUCH (1 << 23) /* touch files before rendering */
+#define R_NO_OVERWRITE (1 << 22) /* skip existing files */
+#define R_TOUCH (1 << 23) /* touch files before rendering */
#define R_SIMPLIFY (1 << 24)
-#define R_EDGE_FRS (1 << 25) /* R_EDGE reserved for Freestyle */
+#define R_EDGE_FRS (1 << 25) /* R_EDGE reserved for Freestyle */
#define R_PERSISTENT_DATA (1 << 26) /* keep data around for re-render */
-#define R_MODE_UNUSED_27 (1 << 27) /* cleared */
+#define R_MODE_UNUSED_27 (1 << 27) /* cleared */
/** #RenderData.seq_flag */
enum {
diff --git a/source/blender/makesdna/DNA_sequence_types.h b/source/blender/makesdna/DNA_sequence_types.h
index e21f3e1e706..59e5e9df9ee 100644
--- a/source/blender/makesdna/DNA_sequence_types.h
+++ b/source/blender/makesdna/DNA_sequence_types.h
@@ -33,9 +33,8 @@
#include "DNA_color_types.h"
#include "DNA_defs.h"
#include "DNA_listBase.h"
-#include "DNA_session_uuid_types.h"
-#include "DNA_vec_types.h"
-#include "DNA_vfont_types.h"
+#include "DNA_session_uuid_types.h" /* for #SessionUUID */
+#include "DNA_vec_types.h" /* for #rctf */
#ifdef __cplusplus
extern "C" {
@@ -44,6 +43,7 @@ extern "C" {
struct Ipo;
struct MovieClip;
struct Scene;
+struct VFont;
struct bSound;
/* strlens; 256= FILE_MAXFILE, 768= FILE_MAXDIR */
@@ -338,7 +338,7 @@ typedef struct GaussianBlurVars {
typedef struct TextVars {
char text[512];
- VFont *text_font;
+ struct VFont *text_font;
int text_blf_id;
int text_size;
float color[4], shadow_color[4], box_color[4];
diff --git a/source/blender/makesdna/DNA_windowmanager_types.h b/source/blender/makesdna/DNA_windowmanager_types.h
index a7ad18d7cf3..f07af2c14a0 100644
--- a/source/blender/makesdna/DNA_windowmanager_types.h
+++ b/source/blender/makesdna/DNA_windowmanager_types.h
@@ -24,10 +24,8 @@
#pragma once
#include "DNA_listBase.h"
-#include "DNA_screen_types.h"
-#include "DNA_userdef_types.h"
-#include "DNA_vec_types.h"
-#include "DNA_xr_types.h"
+#include "DNA_screen_types.h" /* for #ScrAreaMap */
+#include "DNA_xr_types.h" /* for #XrSessionSettings */
#include "DNA_ID.h"
diff --git a/source/blender/makesdna/DNA_workspace_types.h b/source/blender/makesdna/DNA_workspace_types.h
index edca887639e..c5c2351c718 100644
--- a/source/blender/makesdna/DNA_workspace_types.h
+++ b/source/blender/makesdna/DNA_workspace_types.h
@@ -22,7 +22,7 @@
#pragma once
-#include "DNA_scene_types.h"
+#include "DNA_ID.h"
#ifdef __cplusplus
extern "C" {