[Bf-blender-cvs] [9ae750a] ui-preview-buttons: DNA; document how to ignore a struct

Campbell Barton noreply at git.blender.org
Fri May 8 19:54:31 CEST 2015


Commit: 9ae750a2e41c21ae21c94530f839e684845ee520
Author: Campbell Barton
Date:   Fri May 8 06:46:16 2015 +1000
Branches: ui-preview-buttons
https://developer.blender.org/rB9ae750a2e41c21ae21c94530f839e684845ee520

DNA; document how to ignore a struct

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

M	source/blender/makesdna/DNA_documentation.h

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

diff --git a/source/blender/makesdna/DNA_documentation.h b/source/blender/makesdna/DNA_documentation.h
index 0dd7f37..0a0d46d 100644
--- a/source/blender/makesdna/DNA_documentation.h
+++ b/source/blender/makesdna/DNA_documentation.h
@@ -48,6 +48,24 @@
  *   be badly defined. The reason for this is that it is called with
  *   different types of arguments. It takes a char* at this moment...
  *
+ * - Ignoring structs:
+ *
+ *   Sometimes we need to define structs in DNA which aren't written
+ *   to disk, and can be excluded from blend file DNA string.
+ *   in this case, add two '#' chars directly before the struct. eg.
+ *
+ *   \code{.c}
+ *   #
+ *   #
+ *   typedef struct MyStruct {
+ *       int value;
+ *   } MyStruct;
+ *   \endcode
+ *
+ *   Ignored structs can only be referred to from non-ignored structs
+ *   when referred to as a pointer (where they're usually allocated
+ *   and cleared in ``readfile.c``).
+ *
  * - %Path to the header files
  *
  *   Also because of historical reasons, there is a path prefix to the




More information about the Bf-blender-cvs mailing list