diff options
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/blenkernel/BKE_customdata.h | 4 | ||||
-rw-r--r-- | source/blender/blenkernel/depsgraph_private.h | 2 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/customdata.c | 14 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/mesh_validate.c | 2 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/object.c | 2 | ||||
-rw-r--r-- | source/blender/editors/include/ED_view3d.h | 4 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_defs.h | 3 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_genfile.h | 7 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_object_types.h | 4 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_scene_types.h | 5 | ||||
-rw-r--r-- | source/blender/makesdna/intern/dna_genfile.c | 10 | ||||
-rw-r--r-- | source/blender/makesdna/intern/makesdna.c | 1 | ||||
-rw-r--r-- | source/blender/modifiers/intern/MOD_multires.c | 4 | ||||
-rw-r--r-- | source/blender/modifiers/intern/MOD_shrinkwrap.c | 4 | ||||
-rw-r--r-- | source/blender/windowmanager/intern/wm_event_system.c | 2 |
15 files changed, 42 insertions, 26 deletions
diff --git a/source/blender/blenkernel/BKE_customdata.h b/source/blender/blenkernel/BKE_customdata.h index 1d344c6e810..fea706c45a5 100644 --- a/source/blender/blenkernel/BKE_customdata.h +++ b/source/blender/blenkernel/BKE_customdata.h @@ -41,7 +41,7 @@ extern "C" { struct ID; struct CustomData; struct CustomDataLayer; -typedef unsigned int CustomDataMask; +typedef u_int64_t CustomDataMask; extern const CustomDataMask CD_MASK_BAREMESH; extern const CustomDataMask CD_MASK_MESH; @@ -65,6 +65,8 @@ extern const CustomDataMask CD_MASK_FACECORNERS; #define CD_DUPLICATE 4 /* do a full copy of all layers, only allowed if source has same number of elements */ +#define CD_TYPE_AS_MASK(_type) (CustomDataMask)(1 << (CustomDataMask)(_type)) + /* initialises a CustomData object with the same layer setup as source. * mask is a bitfield where (mask & (1 << (layer type))) indicates * if a layer should be copied or not. alloctype must be one of the above. */ diff --git a/source/blender/blenkernel/depsgraph_private.h b/source/blender/blenkernel/depsgraph_private.h index 2dd14281253..1c4d423131f 100644 --- a/source/blender/blenkernel/depsgraph_private.h +++ b/source/blender/blenkernel/depsgraph_private.h @@ -69,7 +69,7 @@ typedef struct DagNode int ancestor_count; unsigned int lay; // accumulated layers of its relations + itself unsigned int scelay; // layers due to being in scene - unsigned int customdata_mask; // customdata mask + u_int64_t customdata_mask; // customdata mask int lasttime; // if lasttime != DagForest->time, this node was not evaluated yet for flushing int BFS_dist; // BFS distance int DFS_dist; // DFS distance diff --git a/source/blender/blenkernel/intern/customdata.c b/source/blender/blenkernel/intern/customdata.c index 5305372402b..289faaa0095 100644 --- a/source/blender/blenkernel/intern/customdata.c +++ b/source/blender/blenkernel/intern/customdata.c @@ -943,7 +943,7 @@ void CustomData_merge(const struct CustomData *source, struct CustomData *dest, number++; if(lastflag & CD_FLAG_NOCOPY) continue; - else if(!((int)mask & (int)(1 << (int)type))) continue; + else if(!(mask & CD_TYPE_AS_MASK(type))) continue; else if(number < CustomData_number_of_layers(dest, type)) continue; if((alloctype == CD_ASSIGN) && (lastflag & CD_FLAG_NOFREE)) @@ -1500,7 +1500,7 @@ void CustomData_set_only_copy(const struct CustomData *data, int i; for(i = 0; i < data->totlayer; ++i) - if(!((int)mask & (int)(1 << (int)data->layers[i].type))) + if(!(mask & CD_TYPE_AS_MASK(data->layers[i].type))) data->layers[i].flag |= CD_FLAG_NOCOPY; } @@ -2441,7 +2441,7 @@ void CustomData_external_reload(CustomData *data, ID *UNUSED(id), CustomDataMask layer = &data->layers[i]; typeInfo = layerType_getInfo(layer->type); - if(!(mask & (1<<layer->type))); + if(!(mask & CD_TYPE_AS_MASK(layer->type))); else if((layer->flag & CD_FLAG_EXTERNAL) && (layer->flag & CD_FLAG_IN_MEMORY)) { if(typeInfo->free) typeInfo->free(layer->data, totelem, typeInfo->size); @@ -2467,7 +2467,7 @@ void CustomData_external_read(CustomData *data, ID *id, CustomDataMask mask, int layer = &data->layers[i]; typeInfo = layerType_getInfo(layer->type); - if(!(mask & (1<<layer->type))); + if(!(mask & CD_TYPE_AS_MASK(layer->type))); else if(layer->flag & CD_FLAG_IN_MEMORY); else if((layer->flag & CD_FLAG_EXTERNAL) && typeInfo->read) update= 1; @@ -2488,7 +2488,7 @@ void CustomData_external_read(CustomData *data, ID *id, CustomDataMask mask, int layer = &data->layers[i]; typeInfo = layerType_getInfo(layer->type); - if(!(mask & (1<<layer->type))); + if(!(mask & CD_TYPE_AS_MASK(layer->type))); else if(layer->flag & CD_FLAG_IN_MEMORY); else if((layer->flag & CD_FLAG_EXTERNAL) && typeInfo->read) { blay= cdf_layer_find(cdf, layer->type, layer->name); @@ -2527,7 +2527,7 @@ void CustomData_external_write(CustomData *data, ID *id, CustomDataMask mask, in layer = &data->layers[i]; typeInfo = layerType_getInfo(layer->type); - if(!(mask & (1<<layer->type))); + if(!(mask & CD_TYPE_AS_MASK(layer->type))); else if((layer->flag & CD_FLAG_EXTERNAL) && typeInfo->write) update= 1; } @@ -2641,7 +2641,7 @@ void CustomData_external_remove(CustomData *data, ID *id, int type, int totelem) if(layer->flag & CD_FLAG_EXTERNAL) { if(!(layer->flag & CD_FLAG_IN_MEMORY)) - CustomData_external_read(data, id, (1<<layer->type), totelem); + CustomData_external_read(data, id, CD_TYPE_AS_MASK(layer->type), totelem); layer->flag &= ~CD_FLAG_EXTERNAL; diff --git a/source/blender/blenkernel/intern/mesh_validate.c b/source/blender/blenkernel/intern/mesh_validate.c index 5a53d953f1b..a1bf9cb9481 100644 --- a/source/blender/blenkernel/intern/mesh_validate.c +++ b/source/blender/blenkernel/intern/mesh_validate.c @@ -395,7 +395,7 @@ static int mesh_validate_customdata(CustomData *data, short do_verbose, const sh while(i<data->totlayer) { CustomDataLayer *layer= &data->layers[i]; - int mask= 1 << layer->type; + CustomDataMask mask= CD_TYPE_AS_MASK(layer->type); int ok= 1; if((mask&CD_MASK_MESH)==0) { diff --git a/source/blender/blenkernel/intern/object.c b/source/blender/blenkernel/intern/object.c index 28c1aacdec5..76f11b7e87f 100644 --- a/source/blender/blenkernel/intern/object.c +++ b/source/blender/blenkernel/intern/object.c @@ -2563,7 +2563,7 @@ void object_handle_update(Scene *scene, Object *ob) #else /* ensure CD_MASK_BAREMESH for now */ EditMesh *em = (ob == scene->obedit)? BKE_mesh_get_editmesh(ob->data): NULL; - unsigned int data_mask= scene->customdata_mask | ob->customdata_mask | CD_MASK_BAREMESH; + u_int64_t data_mask= scene->customdata_mask | ob->customdata_mask | CD_MASK_BAREMESH; if(em) { makeDerivedMesh(scene, ob, em, data_mask); /* was CD_MASK_BAREMESH */ BKE_mesh_end_editmesh(ob->data, em); diff --git a/source/blender/editors/include/ED_view3d.h b/source/blender/editors/include/ED_view3d.h index 476cf2ac109..fb41b2f7fb6 100644 --- a/source/blender/editors/include/ED_view3d.h +++ b/source/blender/editors/include/ED_view3d.h @@ -286,8 +286,8 @@ Base *ED_view3d_give_base_under_cursor(struct bContext *C, const int mval[2]); void ED_view3d_quadview_update(struct ScrArea *sa, struct ARegion *ar, short do_clip); int ED_view3d_lock(struct RegionView3D *rv3d); -unsigned int ED_view3d_datamask(struct Scene *scene, struct View3D *v3d); -unsigned int ED_viewedit_datamask(struct bScreen *screen); +u_int64_t ED_view3d_datamask(struct Scene *scene, struct View3D *v3d); +u_int64_t ED_viewedit_datamask(struct bScreen *screen); /* camera lock functions */ int ED_view3d_camera_lock_check(struct View3D *v3d, struct RegionView3D *rv3d); 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... diff --git a/source/blender/modifiers/intern/MOD_multires.c b/source/blender/modifiers/intern/MOD_multires.c index 8bcaf8802b5..55f29137eb9 100644 --- a/source/blender/modifiers/intern/MOD_multires.c +++ b/source/blender/modifiers/intern/MOD_multires.c @@ -35,14 +35,14 @@ #include <stddef.h> +#include "DNA_mesh_types.h" + #include "BKE_cdderivedmesh.h" #include "BKE_multires.h" #include "BKE_modifier.h" #include "BKE_paint.h" #include "BKE_particle.h" -#include "DNA_mesh_types.h" - #include "MOD_util.h" static void initData(ModifierData *md) diff --git a/source/blender/modifiers/intern/MOD_shrinkwrap.c b/source/blender/modifiers/intern/MOD_shrinkwrap.c index 6c047a81fa5..e8f099785f9 100644 --- a/source/blender/modifiers/intern/MOD_shrinkwrap.c +++ b/source/blender/modifiers/intern/MOD_shrinkwrap.c @@ -35,6 +35,8 @@ #include <string.h> +#include "DNA_object_types.h" + #include "BLI_string.h" #include "BLI_utildefines.h" @@ -42,8 +44,6 @@ #include "BKE_modifier.h" #include "BKE_shrinkwrap.h" -#include "DNA_object_types.h" - #include "depsgraph_private.h" #include "MOD_util.h" diff --git a/source/blender/windowmanager/intern/wm_event_system.c b/source/blender/windowmanager/intern/wm_event_system.c index 1593f14a76c..064c98b7f8a 100644 --- a/source/blender/windowmanager/intern/wm_event_system.c +++ b/source/blender/windowmanager/intern/wm_event_system.c @@ -186,7 +186,7 @@ void wm_event_do_notifiers(bContext *C) wmWindowManager *wm= CTX_wm_manager(C); wmNotifier *note, *next; wmWindow *win; - unsigned int win_combine_v3d_datamask= 0; + u_int64_t win_combine_v3d_datamask= 0; if(wm==NULL) return; |