[Bf-blender-cvs] [c412a541234] master: Docs: clarify writefile.c file format info

Campbell Barton noreply at git.blender.org
Tue Oct 15 03:07:40 CEST 2019


Commit: c412a5412341d65cd8ce3391e298fe13ffa28943
Author: Campbell Barton
Date:   Tue Oct 15 12:02:40 2019 +1100
Branches: master
https://developer.blender.org/rBc412a5412341d65cd8ce3391e298fe13ffa28943

Docs: clarify writefile.c file format info

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

M	source/blender/blenloader/intern/writefile.c

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

diff --git a/source/blender/blenloader/intern/writefile.c b/source/blender/blenloader/intern/writefile.c
index aae5072c8de..d24fca4391a 100644
--- a/source/blender/blenloader/intern/writefile.c
+++ b/source/blender/blenloader/intern/writefile.c
@@ -26,35 +26,36 @@
  * FILE FORMAT
  * ===========
  *
- * IFF-style structure  (but not IFF compatible!)
+ * IFF-style structure (but not IFF compatible!)
  *
- * start file:
+ * Start file:
  * <pre>
- *     BLENDER_V100    12 bytes  (version 1.00)
- *                     V = big endian, v = little endian
- *                     _ = 4 byte pointer, - = 8 byte pointer
+ * `BLENDER_V100`  `12` bytes  (version 1.00 is just an example).
+ *                 `V` = big endian, `v` = little endian.
+ *                 `_` = 4 byte pointer, `-` = 8 byte pointer.
  * </pre>
  *
  * data-blocks: (also see struct #BHead).
  * <pre>
- *     <bh.code>           4 chars
- *     <bh.len>            int,  len data after BHead
- *     <bh.old>            void,  old pointer
- *     <bh.SDNAnr>         int
- *     <bh.nr>             int, in case of array: number of structs
- *     data
- *     ...
- *     ...
+ * `bh.code`       `char[4]` see `BLO_blend_defs.h` for a list of known types.
+ * `bh.len`        `int32` length data after #BHead in bytes.
+ * `bh.old`        `void *` old pointer (the address at the time of writing the file).
+ * `bh.SDNAnr`     `int32` struct index of structs stored in #DNA1 data.
+ * `bh.nr`         `int32` in case of array: number of structs.
+ * data
+ * ...
+ * ...
  * </pre>
  *
  * Almost all data in Blender are structures. Each struct saved
  * gets a BHead header.  With BHead the struct can be linked again
- * and compared with StructDNA .
+ * and compared with #StructDNA.
+
  * WRITE
  * =====
  *
  * Preferred writing order: (not really a must, but why would you do it random?)
- * Any case: direct data is ALWAYS after the lib block
+ * Any case: direct data is ALWAYS after the lib block.
  *
  * (Local file data)
  * - for each LibBlock



More information about the Bf-blender-cvs mailing list