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>2015-08-14 10:30:32 +0300
committerCampbell Barton <ideasman42@gmail.com>2015-08-14 10:40:55 +0300
commitfdfd87f2f4e656b2292683c923156dd9ea96512b (patch)
tree86d07941ef0b1111b477e60311b0193ba4f3fef4 /source/blender/blenloader/BLO_blend_defs.h
parent3fa0a1a5bc0ff28328930ee12608497262b25912 (diff)
Docs: comment BHead.code values
Diffstat (limited to 'source/blender/blenloader/BLO_blend_defs.h')
-rw-r--r--source/blender/blenloader/BLO_blend_defs.h49
1 files changed, 40 insertions, 9 deletions
diff --git a/source/blender/blenloader/BLO_blend_defs.h b/source/blender/blenloader/BLO_blend_defs.h
index 8005be158ce..34a881bd7cc 100644
--- a/source/blender/blenloader/BLO_blend_defs.h
+++ b/source/blender/blenloader/BLO_blend_defs.h
@@ -34,14 +34,45 @@
# define BLEND_MAKE_ID(a, b, c, d) ( (int)(d) << 24 | (int)(c) << 16 | (b) << 8 | (a) )
#endif
-#define DATA BLEND_MAKE_ID('D', 'A', 'T', 'A')
-#define GLOB BLEND_MAKE_ID('G', 'L', 'O', 'B')
-
-#define DNA1 BLEND_MAKE_ID('D', 'N', 'A', '1')
-#define TEST BLEND_MAKE_ID('T', 'E', 'S', 'T') /* used as preview between 'REND' and 'GLOB' */
-#define REND BLEND_MAKE_ID('R', 'E', 'N', 'D')
-#define USER BLEND_MAKE_ID('U', 'S', 'E', 'R')
-
-#define ENDB BLEND_MAKE_ID('E', 'N', 'D', 'B')
+/**
+ * Codes used for #BHead.code.
+ *
+ * These coexist with ID codes such as #ID_OB, #ID_SCE ... etc.
+ */
+enum {
+ /**
+ * Arbitrary allocated memory
+ * (owned by #ID's, or will leak on exit)
+ */
+ DATA = BLEND_MAKE_ID('D', 'A', 'T', 'A'),
+ /**
+ * Used for #Global struct.
+ */
+ GLOB = BLEND_MAKE_ID('G', 'L', 'O', 'B'),
+ /**
+ * Used for storing the encoded SDNA string
+ * (decoded into an #SDNA on load).
+ */
+ DNA1 = BLEND_MAKE_ID('D', 'N', 'A', '1'),
+ /**
+ * Used as preview between #REND and #GLOB,
+ * (ignored for regular file reading)
+ */
+ TEST = BLEND_MAKE_ID('T', 'E', 'S', 'T'),
+ /**
+ * Used for #RenderInfo, basic Scene and frame range info,
+ * can be easily read by other applications without writing a full blend file parser.
+ */
+ REND = BLEND_MAKE_ID('R', 'E', 'N', 'D'),
+ /**
+ * Used for #UserDef, (user-preferences data).
+ * (written to #BLENDER_STARTUP_FILE & #BLENDER_USERPREF_FILE).
+ */
+ USER = BLEND_MAKE_ID('U', 'S', 'E', 'R'),
+ /**
+ * Terminate reading (no data).
+ */
+ ENDB = BLEND_MAKE_ID('E', 'N', 'D', 'B'),
+};
#endif /* __BLO_BLEND_DEFS_H__ */