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>2011-12-24 00:30:23 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-12-24 00:30:23 +0400
commitddcf56366d47c08ebfb6bb9e6d1cbd54b1db706c (patch)
tree92000028ad4ef5eb22a214c8f496e8d91012fd72 /source/blender/makesdna
parent5df049f390047d6cf3badca0277b2724979db515 (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')
-rw-r--r--source/blender/makesdna/DNA_defs.h3
-rw-r--r--source/blender/makesdna/DNA_genfile.h7
-rw-r--r--source/blender/makesdna/DNA_object_types.h4
-rw-r--r--source/blender/makesdna/DNA_scene_types.h5
-rw-r--r--source/blender/makesdna/intern/dna_genfile.c10
-rw-r--r--source/blender/makesdna/intern/makesdna.c1
6 files changed, 22 insertions, 8 deletions
diff --git a/source/blender/makesdna/DNA_defs.h b/source/blender/makesdna/DNA_defs.h
index 88401d3d2d4..25d95419605 100644
--- a/source/blender/makesdna/DNA_defs.h
+++ b/source/blender/makesdna/DNA_defs.h
@@ -42,4 +42,7 @@
# endif
#endif
+/* hrmf, we need a better include then this */
+#include "../blenloader/BLO_sys_types.h" /* needed for int64_t only! */
+
#endif /* DNA_DEFS_H */
diff --git a/source/blender/makesdna/DNA_genfile.h b/source/blender/makesdna/DNA_genfile.h
index 83292d3d8f8..be13c8bba4f 100644
--- a/source/blender/makesdna/DNA_genfile.h
+++ b/source/blender/makesdna/DNA_genfile.h
@@ -48,12 +48,13 @@ typedef enum eSDNA_Type {
SDNA_TYPE_ULONG = 6,
SDNA_TYPE_FLOAT = 7,
SDNA_TYPE_DOUBLE = 8,
- SDNA_TYPE_INT64 = 9
- /* ,SDNA_TYPE_VOID = 10 */ /* nothing uses yet */
+ SDNA_TYPE_INT64 = 9,
+ SDNA_TYPE_UINT64 = 10
+ /* ,SDNA_TYPE_VOID = 11 */ /* nothing uses yet */
} eSDNA_Type;
/* define so switch statements don't complain */
-#define SDNA_TYPE_VOID 10
+#define SDNA_TYPE_VOID 11
struct SDNA *DNA_sdna_from_data(void *data, int datalen, int do_endian_swap);
void DNA_sdna_free(struct SDNA *sdna);
diff --git a/source/blender/makesdna/DNA_object_types.h b/source/blender/makesdna/DNA_object_types.h
index 8707ae038c3..fcce21c936d 100644
--- a/source/blender/makesdna/DNA_object_types.h
+++ b/source/blender/makesdna/DNA_object_types.h
@@ -250,8 +250,8 @@ typedef struct Object {
struct FluidsimSettings *fluidsimSettings; /* if fluidsim enabled, store additional settings */
struct DerivedMesh *derivedDeform, *derivedFinal;
- unsigned int lastDataMask; /* the custom data layer mask that was last used to calculate derivedDeform and derivedFinal */
- unsigned int customdata_mask; /* (extra) custom data layer mask to use for creating derivedmesh, set by depsgraph */
+ u_int64_t lastDataMask; /* the custom data layer mask that was last used to calculate derivedDeform and derivedFinal */
+ u_int64_t customdata_mask; /* (extra) custom data layer mask to use for creating derivedmesh, set by depsgraph */
unsigned int state; /* bit masks of game controllers that are active */
unsigned int init_state; /* bit masks of initial state as recorded by the users */
diff --git a/source/blender/makesdna/DNA_scene_types.h b/source/blender/makesdna/DNA_scene_types.h
index 345e78d70c9..1288e8a0cca 100644
--- a/source/blender/makesdna/DNA_scene_types.h
+++ b/source/blender/makesdna/DNA_scene_types.h
@@ -915,8 +915,6 @@ typedef struct Scene {
unsigned int lay; /* bitflags for layer visibility */
int layact; /* active layer */
unsigned int lay_updated; /* runtime flag, has layer ever been updated since load? */
- unsigned int customdata_mask; /* XXX. runtime flag for drawing, actually belongs in the window, only used by object_handle_update() */
- unsigned int customdata_mask_modal; /* XXX. same as above but for temp operator use (gl renders) */
short flag; /* various settings */
@@ -971,6 +969,9 @@ typedef struct Scene {
/* Movie Tracking */
struct MovieClip *clip; /* active movie clip */
+
+ u_int64_t customdata_mask; /* XXX. runtime flag for drawing, actually belongs in the window, only used by object_handle_update() */
+ u_int64_t customdata_mask_modal; /* XXX. same as above but for temp operator use (gl renders) */
} Scene;
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...