diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-12-24 00:30:23 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-12-24 00:30:23 +0400 |
commit | ddcf56366d47c08ebfb6bb9e6d1cbd54b1db706c (patch) | |
tree | 92000028ad4ef5eb22a214c8f496e8d91012fd72 /source/blender/makesdna/intern | |
parent | 5df049f390047d6cf3badca0277b2724979db515 (diff) |
change customdata mask from an 'unsigned int' to an 'u_int64_t', since BMesh branch has run out of bits
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 db0c2bc0e2d..d493083db8b 100644 --- a/source/blender/makesdna/intern/dna_genfile.c +++ b/source/blender/makesdna/intern/dna_genfile.c @@ -667,6 +667,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, "u_int64_t")==0) return SDNA_TYPE_UINT64; else return -1; /* invalid! */ } @@ -711,6 +712,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= *( (u_int64_t *)olddata); break; } switch(ctypenr) { @@ -736,6 +739,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: + *( (u_int64_t *)curdata)= val; break; } olddata+= oldlen; @@ -1093,7 +1098,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--) { @@ -1170,6 +1177,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..31f52866367 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("u_int64_t", 8); /* SDNA_TYPE_UINT64 */ add_type("void", 0); /* SDNA_TYPE_VOID */ // the defines above shouldn't be output in the padding file... |