Fix: DNA struct alignment on 32 bit

Some of the dna structs were not properly
aligned for 32 bit builds causing issues
for some of the 32 platforms Debian builds
for.

Reviewed By: sergey, brecht
Differential Revision: https://developer.blender.org/D9389
This commit is contained in:
Ray molenkamp 2021-08-11 16:57:56 -06:00
parent cd1bb63159
commit 48c8f9fc9a
Notes: blender-bot 2023-02-14 10:35:28 +01:00
Referenced by issue #88449, Blender LTS: Maintenance Task 2.93
Referenced by issue #90639, Blender crashes upon opening video file.
5 changed files with 29 additions and 0 deletions

View File

@ -324,6 +324,7 @@ typedef struct bGPDstroke {
struct bGPDcurve *editcurve;
bGPDstroke_Runtime runtime;
void *_pad5;
} bGPDstroke;
/** #bGPDstroke.flag */

View File

@ -231,6 +231,7 @@ typedef struct Mesh {
* default and Face Sets can be used without affecting the color of the mesh. */
int face_sets_color_default;
void *_pad2;
Mesh_Runtime runtime;
} Mesh;

View File

@ -136,6 +136,7 @@ typedef struct ModifierData {
/* Runtime field which contains runtime data which is specific to a modifier type. */
void *runtime;
void *_pad1;
} ModifierData;
typedef enum {
@ -215,6 +216,7 @@ typedef struct LatticeModifierData {
float strength;
short flag;
char _pad[2];
void *_pad1;
} LatticeModifierData;
/* Lattice modifier flags. */
@ -232,6 +234,7 @@ typedef struct CurveModifierData {
short defaxis;
short flag;
char _pad[4];
void *_pad1;
} CurveModifierData;
/* Curve modifier flags */
@ -283,6 +286,7 @@ typedef struct MaskModifierData {
/** Flags for various things. */
short flag;
float threshold;
void *_pad1;
} MaskModifierData;
/* Mask Modifier -> mode */
@ -373,6 +377,7 @@ typedef struct MirrorModifierData {
float uv_offset[2];
float uv_offset_copy[2];
struct Object *mirror_ob;
void *_pad1;
} MirrorModifierData;
/* MirrorModifierData->flag */
@ -451,6 +456,7 @@ typedef struct BevelModifierData {
/** Curve info for the custom profile */
struct CurveProfile *custom_profile;
void *_pad2;
} BevelModifierData;
/* BevelModifierData->flags and BevelModifierData->lim_flags */
@ -535,6 +541,7 @@ typedef struct FluidModifierData {
float time;
/** Domain, inflow, outflow, .... */
int type;
void *_pad1;
} FluidModifierData;
/* Fluid modifier flags */
@ -680,6 +687,7 @@ typedef struct CastModifierData {
/** MAX_VGROUP_NAME. */
char defgrp_name[64];
short flag, type;
void *_pad1;
} CastModifierData;
/* Cast modifier flags */
@ -725,6 +733,7 @@ typedef struct WaveModifierData {
float timeoffs, lifetime;
char _pad1[4];
void *_pad2;
} WaveModifierData;
/* WaveModifierData.flag */
@ -797,6 +806,7 @@ typedef struct HookModifierData {
float force;
/** Optional vertexgroup name, MAX_VGROUP_NAME. */
char name[64];
void *_pad1;
} HookModifierData;
typedef struct SoftbodyModifierData {
@ -1001,6 +1011,7 @@ typedef struct ParticleSystemModifierData {
int totdmvert, totdmedge, totdmface;
short flag;
char _pad[2];
void *_pad1;
} ParticleSystemModifierData;
typedef enum {
@ -1037,6 +1048,7 @@ typedef struct ParticleInstanceModifierData {
char index_layer_name[64];
/** MAX_CUSTOMDATA_LAYER_NAME. */
char value_layer_name[64];
void *_pad1;
} ParticleInstanceModifierData;
typedef enum {
@ -1057,6 +1069,7 @@ typedef struct ExplodeModifierData {
float protect;
/** MAX_CUSTOMDATA_LAYER_NAME. */
char uvname[64];
void *_pad1;
} ExplodeModifierData;
typedef struct MultiresModifierData {
@ -1086,6 +1099,7 @@ typedef struct FluidsimModifierData {
/** Definition is in DNA_object_fluidsim_types.h. */
struct FluidsimSettings *fss;
void *_pad1;
} FluidsimModifierData;
/* DEPRECATED, only used for versioning. */
@ -1202,6 +1216,7 @@ typedef struct SimpleDeformModifierData {
char deform_axis;
char flag;
void *_pad1;
} SimpleDeformModifierData;
/* SimpleDeform->flag */
@ -1310,6 +1325,7 @@ typedef struct ScrewModifierData {
short flag;
char axis;
char _pad[5];
void *_pad1;
} ScrewModifierData;
enum {
@ -1434,6 +1450,7 @@ typedef struct WarpModifierData {
char flag;
char falloff_type;
char _pad[6];
void *_pad1;
} WarpModifierData;
/* WarpModifierData->flag */
@ -1497,6 +1514,7 @@ typedef struct WeightVGEditModifierData {
/* Padding... */
char _pad0[4];
void *_pad1;
} WeightVGEditModifierData;
/* WeightVGEdit flags. */
@ -2064,6 +2082,7 @@ typedef struct DataTransferModifierData {
char defgrp_name[64];
int flags;
void *_pad2;
} DataTransferModifierData;
/* DataTransferModifierData.flags */
@ -2094,6 +2113,7 @@ typedef struct NormalEditModifierData {
float mix_limit;
float offset[3];
char _pad0[4];
void *_pad1;
} NormalEditModifierData;
/* NormalEditModifierData.mode */
@ -2154,6 +2174,7 @@ typedef struct MeshSeqCacheModifierData {
float last_lookup_time;
int _pad1;
void *_pad2;
} MeshSeqCacheModifierData;
/* MeshSeqCacheModifierData.read_flag */
@ -2198,6 +2219,7 @@ typedef struct SurfaceDeformModifierData {
float mat[4][4];
float strength;
char defgrp_name[64];
void *_pad1;
} SurfaceDeformModifierData;
/* Surface Deform modifier flags */
@ -2259,6 +2281,7 @@ typedef struct NodesModifierData {
/* Contains logged information from the last evaluation. This can be used to help the user to
* debug a node tree. */
void *runtime_eval_log;
void *_pad1;
} NodesModifierData;
typedef struct MeshToVolumeModifierData {
@ -2286,6 +2309,7 @@ typedef struct MeshToVolumeModifierData {
float density;
char _pad2[4];
void *_pad3;
} MeshToVolumeModifierData;
/* MeshToVolumeModifierData->resolution_mode */
@ -2332,6 +2356,7 @@ typedef struct VolumeToMeshModifierData {
/** MAX_NAME */
char grid_name[64];
void *_pad1;
} VolumeToMeshModifierData;
/** VolumeToMeshModifierData->resolution_mode */

View File

@ -433,6 +433,7 @@ typedef struct Object {
ObjectLineArt lineart;
/** Runtime evaluation data (keep last). */
void *_pad9;
Object_Runtime runtime;
} Object;

View File

@ -296,6 +296,7 @@ typedef struct Editing {
int64_t disk_cache_timestamp;
EditingRuntime runtime;
void *_pad1;
} Editing;
/* ************* Effect Variable Structs ********* */