diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-12-26 01:31:19 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-12-26 01:31:19 +0400 |
commit | 2cd5436a81da5c15ac70bd2b80c2f062cce5d02e (patch) | |
tree | 2cc12476fb3fa653042eef99fa6b5d4d8cb290ec /source/blender/makesdna/intern | |
parent | 4ced91da47ec1e95d71beef07b218fd0290ff68a (diff) | |
parent | 02d72b5c076f4ae1b47da74fe7a60a916edad9f2 (diff) |
svn merge ^/trunk/blender -r42839:42871
Diffstat (limited to 'source/blender/makesdna/intern')
-rw-r--r-- | source/blender/makesdna/intern/dna_genfile.c | 10 | ||||
-rw-r--r-- | source/blender/makesdna/intern/makesdna.c | 1 |
2 files changed, 10 insertions, 1 deletions
diff --git a/source/blender/makesdna/intern/dna_genfile.c b/source/blender/makesdna/intern/dna_genfile.c index 432205b1b5d..9c2289b2edd 100644 --- a/source/blender/makesdna/intern/dna_genfile.c +++ b/source/blender/makesdna/intern/dna_genfile.c @@ -668,6 +668,7 @@ static eSDNA_Type sdna_type_nr(const char *dna_type) else if( strcmp(dna_type, "float")==0) return SDNA_TYPE_FLOAT; else if( strcmp(dna_type, "double")==0) return SDNA_TYPE_DOUBLE; else if( strcmp(dna_type, "int64_t")==0) return SDNA_TYPE_INT64; + else if( strcmp(dna_type, "uint64_t")==0) return SDNA_TYPE_UINT64; else return -1; /* invalid! */ } @@ -712,6 +713,8 @@ static void cast_elem(const char *ctype, const char *otype, const char *name, ch val= *( (double *)olddata); break; case SDNA_TYPE_INT64: val= *( (int64_t *)olddata); break; + case SDNA_TYPE_UINT64: + val= *( (uint64_t *)olddata); break; } switch(ctypenr) { @@ -737,6 +740,8 @@ static void cast_elem(const char *ctype, const char *otype, const char *name, ch *( (double *)curdata)= val; break; case SDNA_TYPE_INT64: *( (int64_t *)curdata)= val; break; + case SDNA_TYPE_UINT64: + *( (uint64_t *)curdata)= val; break; } olddata+= oldlen; @@ -1094,7 +1099,9 @@ void DNA_struct_switch_endian(SDNA *oldsdna, int oldSDNAnr, char *data) cpo+= 4; } } - else if ( (spc[0]==SDNA_TYPE_INT64)) { + else if ( (spc[0]==SDNA_TYPE_INT64) || + (spc[0]==SDNA_TYPE_UINT64)) + { mul= DNA_elem_array_size(name, strlen(name)); cpo= cur; while(mul--) { @@ -1171,6 +1178,7 @@ int DNA_elem_type_size(const eSDNA_Type elem_nr) return 4; case SDNA_TYPE_DOUBLE: case SDNA_TYPE_INT64: + case SDNA_TYPE_UINT64: return 8; } diff --git a/source/blender/makesdna/intern/makesdna.c b/source/blender/makesdna/intern/makesdna.c index 0c417e9f884..2fa52776453 100644 --- a/source/blender/makesdna/intern/makesdna.c +++ b/source/blender/makesdna/intern/makesdna.c @@ -939,6 +939,7 @@ static int make_structDNA(char *baseDirectory, FILE *file) add_type("float", 4); /* SDNA_TYPE_FLOAT */ add_type("double", 8); /* SDNA_TYPE_DOUBLE */ add_type("int64_t", 8); /* SDNA_TYPE_INT64 */ + add_type("uint64_t", 8); /* SDNA_TYPE_UINT64 */ add_type("void", 0); /* SDNA_TYPE_VOID */ // the defines above shouldn't be output in the padding file... |