diff options
-rw-r--r-- | source/blender/makesdna/DNA_object_types.h | 1 | ||||
-rw-r--r-- | source/blender/makesdna/intern/makesdna.c | 6 |
2 files changed, 6 insertions, 1 deletions
diff --git a/source/blender/makesdna/DNA_object_types.h b/source/blender/makesdna/DNA_object_types.h index 83bfec3cc52..2e774e4ea84 100644 --- a/source/blender/makesdna/DNA_object_types.h +++ b/source/blender/makesdna/DNA_object_types.h @@ -258,6 +258,7 @@ typedef struct Object { struct FluidsimSettings *fluidsimSettings; /* if fluidsim enabled, store additional settings */ struct DerivedMesh *derivedDeform, *derivedFinal; + int *pad; uint64_t lastDataMask; /* the custom data layer mask that was last used to calculate derivedDeform and derivedFinal */ uint64_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 */ diff --git a/source/blender/makesdna/intern/makesdna.c b/source/blender/makesdna/intern/makesdna.c index b0f8f02ae9f..09cb22683a7 100644 --- a/source/blender/makesdna/intern/makesdna.c +++ b/source/blender/makesdna/intern/makesdna.c @@ -798,7 +798,11 @@ static int calculate_structlens(int firststruct) } } - /* 2-4 aligned/ */ + /* 2-4-8 aligned/ */ + if (type < firststruct && typelens[type] > 4 && (len % 8)) { + printf("Align 8 error in struct: %s %s (add %d padding bytes)\n", types[structtype], cp, len % 8); + dna_error = 1; + } if (typelens[type] > 3 && (len % 4) ) { printf("Align 4 error in struct: %s %s (add %d padding bytes)\n", types[structtype], cp, len % 4); dna_error = 1; |