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>2016-01-15 01:16:24 +0300
committerCampbell Barton <ideasman42@gmail.com>2016-01-15 01:18:50 +0300
commitfc8730d4c24027152c1a5c5bd1f2bbac7825578d (patch)
treeb5617348865689ea741a21eae734230a74d3e791 /source/blender/makesdna/DNA_genfile.h
parent5d45c2bf653c78928fb33548273219ef5caa5287 (diff)
DNA: partial revert of long removal
924c626 broke loading on systems with different endian. We could support reading values from SDNA, it isn't really worth the extra hassle. Long support is still removed, just keep enum values the same.
Diffstat (limited to 'source/blender/makesdna/DNA_genfile.h')
-rw-r--r--source/blender/makesdna/DNA_genfile.h22
1 files changed, 15 insertions, 7 deletions
diff --git a/source/blender/makesdna/DNA_genfile.h b/source/blender/makesdna/DNA_genfile.h
index 0448266330c..2858de74776 100644
--- a/source/blender/makesdna/DNA_genfile.h
+++ b/source/blender/makesdna/DNA_genfile.h
@@ -41,20 +41,28 @@ struct SDNA;
extern const unsigned char DNAstr[];
extern const int DNAlen; /* length of DNAstr */
-/* primitive (non-struct, non-pointer/function/array) types--do not change ordering! */
+/**
+ * Primitive (non-struct, non-pointer/function/array) types,
+ * \warning Don't change these values!
+ * Currently changes here here will work on native endianness,
+ * however #DNA_struct_switch_endian currently checks these
+ * hard-coded values against those from old files.
+ */
typedef enum eSDNA_Type {
SDNA_TYPE_CHAR = 0,
SDNA_TYPE_UCHAR = 1,
SDNA_TYPE_SHORT = 2,
SDNA_TYPE_USHORT = 3,
SDNA_TYPE_INT = 4,
- SDNA_TYPE_FLOAT = 5,
- SDNA_TYPE_DOUBLE = 6,
- /* ,SDNA_TYPE_VOID = 7 */
+ /* SDNA_TYPE_LONG = 5, */ /* deprecated (use as int) */
+ /* SDNA_TYPE_ULONG = 6, */ /* deprecated (use as int) */
+ SDNA_TYPE_FLOAT = 7,
+ SDNA_TYPE_DOUBLE = 8,
+ /* ,SDNA_TYPE_VOID = 9 */
/* define so switch statements don't complain */
-#define SDNA_TYPE_VOID 7
- SDNA_TYPE_INT64 = 8,
- SDNA_TYPE_UINT64 = 9,
+#define SDNA_TYPE_VOID 9
+ SDNA_TYPE_INT64 = 10,
+ SDNA_TYPE_UINT64 = 11
} eSDNA_Type;