From 6a03199b50e02d57a50eb24441ef7be0b7e965ac Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 27 Feb 2019 15:07:50 +1100 Subject: Cleanup: use '_pad' convention for padding in all DNA structs Avoids mixing these in with regular variables in code-completion. Use char for pad members except for 'void *', to make size clearer. Removed/shrink a few redundant padding vars which were >= 8 bytes. --- source/blender/blenloader/intern/writefile.c | 4 +- source/blender/makesdna/DNA_ID.h | 10 +-- source/blender/makesdna/DNA_action_types.h | 19 ++--- source/blender/makesdna/DNA_anim_types.h | 18 ++--- source/blender/makesdna/DNA_armature_types.h | 2 +- source/blender/makesdna/DNA_brush_types.h | 9 ++- source/blender/makesdna/DNA_cachefile_types.h | 2 +- source/blender/makesdna/DNA_camera_types.h | 4 +- source/blender/makesdna/DNA_cloth_types.h | 8 +- source/blender/makesdna/DNA_collection_types.h | 3 +- source/blender/makesdna/DNA_color_types.h | 9 ++- source/blender/makesdna/DNA_constraint_types.h | 29 +++---- source/blender/makesdna/DNA_curve_types.h | 17 ++-- source/blender/makesdna/DNA_customdata_types.h | 2 +- source/blender/makesdna/DNA_dynamicpaint_types.h | 12 +-- source/blender/makesdna/DNA_effect_types.h | 3 +- source/blender/makesdna/DNA_fileglobal_types.h | 4 +- source/blender/makesdna/DNA_freestyle_types.h | 6 +- source/blender/makesdna/DNA_gpu_types.h | 4 +- source/blender/makesdna/DNA_image_types.h | 11 ++- source/blender/makesdna/DNA_ipo_types.h | 3 +- source/blender/makesdna/DNA_key_types.h | 6 +- source/blender/makesdna/DNA_lattice_types.h | 5 +- source/blender/makesdna/DNA_layer_types.h | 6 +- source/blender/makesdna/DNA_light_types.h | 4 +- source/blender/makesdna/DNA_lightprobe_types.h | 13 ++- source/blender/makesdna/DNA_linestyle_types.h | 56 +++++++------ source/blender/makesdna/DNA_mask_types.h | 8 +- source/blender/makesdna/DNA_material_types.h | 2 +- source/blender/makesdna/DNA_mesh_types.h | 8 +- source/blender/makesdna/DNA_meshdata_types.h | 15 ++-- source/blender/makesdna/DNA_meta_types.h | 5 +- source/blender/makesdna/DNA_modifier_types.h | 94 ++++++++++++---------- source/blender/makesdna/DNA_node_types.h | 80 +++++++++--------- .../blender/makesdna/DNA_object_fluidsim_types.h | 4 +- source/blender/makesdna/DNA_object_force_types.h | 16 ++-- source/blender/makesdna/DNA_particle_types.h | 28 ++++--- source/blender/makesdna/DNA_rigidbody_types.h | 8 +- source/blender/makesdna/DNA_scene_types.h | 67 +++++++-------- source/blender/makesdna/DNA_screen_types.h | 17 ++-- source/blender/makesdna/DNA_sequence_types.h | 12 +-- source/blender/makesdna/DNA_shader_fx_types.h | 14 ++-- source/blender/makesdna/DNA_smoke_types.h | 8 +- source/blender/makesdna/DNA_sound_types.h | 2 +- source/blender/makesdna/DNA_space_types.h | 56 +++++++------ source/blender/makesdna/DNA_texture_types.h | 21 ++--- source/blender/makesdna/DNA_tracking_types.h | 18 +++-- source/blender/makesdna/DNA_view2d_types.h | 2 +- source/blender/makesdna/DNA_view3d_types.h | 8 +- source/blender/makesdna/DNA_windowmanager_types.h | 9 ++- source/blender/makesdna/DNA_world_types.h | 11 ++- 51 files changed, 416 insertions(+), 366 deletions(-) (limited to 'source/blender') diff --git a/source/blender/blenloader/intern/writefile.c b/source/blender/blenloader/intern/writefile.c index 235f9b2a799..24784684f41 100644 --- a/source/blender/blenloader/intern/writefile.c +++ b/source/blender/blenloader/intern/writefile.c @@ -3783,10 +3783,10 @@ static void write_global(WriteData *wd, int fileflags, Main *mainvar) char subvstr[8]; /* prevent mem checkers from complaining */ - memset(fg.pad, 0, sizeof(fg.pad)); + memset(fg._pad, 0, sizeof(fg._pad)); memset(fg.filename, 0, sizeof(fg.filename)); memset(fg.build_hash, 0, sizeof(fg.build_hash)); - fg.pad1 = NULL; + fg._pad1 = NULL; current_screen_compat(mainvar, is_undo, &screen, &scene, &view_layer); diff --git a/source/blender/makesdna/DNA_ID.h b/source/blender/makesdna/DNA_ID.h index 1d9518f657e..fa519ec8011 100644 --- a/source/blender/makesdna/DNA_ID.h +++ b/source/blender/makesdna/DNA_ID.h @@ -73,7 +73,7 @@ typedef struct IDProperty { char name[64]; /* saved is used to indicate if this struct has been saved yet. - * seemed like a good idea as a pad var was needed anyway :) */ + * seemed like a good idea as a '_pad' var was needed anyway :) */ int saved; /** Note, alignment for 64 bits. */ IDPropertyData data; @@ -145,7 +145,7 @@ typedef struct IDOverrideStaticPropertyOperation { /* Type of override. */ short operation; short flag; - short pad_s1[2]; + char _pad0[4]; /* Sub-item references, if needed (for arrays or collections only). * We need both reference and local values to allow e.g. insertion into collections (constraints, modifiers...). @@ -208,7 +208,7 @@ typedef struct IDOverrideStatic { ListBase properties; short flag; - short pad[3]; + char _pad[6]; /* Read/write data. */ /* Temp ID storing extra override data (used for differential operations only currently). @@ -249,7 +249,7 @@ typedef struct ID { int us; int icon_id; int recalc; - int pad; + char _pad[4]; IDProperty *properties; /** Reference linked ID which this one overrides. */ @@ -329,7 +329,7 @@ typedef struct PreviewImage { /** Runtime data. */ short tag; - char pad[2]; + char _pad[2]; } PreviewImage; #define PRV_DEFERRED_DATA(prv) \ diff --git a/source/blender/makesdna/DNA_action_types.h b/source/blender/makesdna/DNA_action_types.h index a52145a0416..ddea6f64dba 100644 --- a/source/blender/makesdna/DNA_action_types.h +++ b/source/blender/makesdna/DNA_action_types.h @@ -86,7 +86,7 @@ typedef struct bMotionPath { struct GPUVertBuf *points_vbo; struct GPUBatch *batch_line; struct GPUBatch *batch_points; - void *pad; + void *_pad; } bMotionPath; /* bMotionPath->flag */ @@ -120,7 +120,7 @@ typedef struct bAnimVizSettings { short path_viewflag; /** #eMotionPaths_BakeFlag. */ short path_bakeflag; - char pad[6]; + char _pad[6]; /** Start and end frames of path-calculation range. */ int path_sf, path_ef; @@ -185,7 +185,7 @@ struct Mat4; typedef struct bPoseChannel_Runtime { int bbone_segments; - char pad[4]; + char _pad[4]; /* Rest and posed matrices for segments. */ struct Mat4 *bbone_rest_mats; @@ -231,7 +231,7 @@ typedef struct bPoseChannel { char selectflag; char drawflag; char bboneflag DNA_DEPRECATED; - char pad0[4]; + char _pad0[4]; /** Set on read file or rebuild pose. */ struct Bone *bone; @@ -257,7 +257,7 @@ typedef struct bPoseChannel { struct bPoseChannel *custom_tx; float custom_scale; - char pad1[4]; + char _pad1[4]; /** Transforms - written in by actions or transform. */ float loc[3]; @@ -275,7 +275,7 @@ typedef struct bPoseChannel { float rotAxis[3], rotAngle; /** #eRotationModes - rotation representation to use. */ short rotmode; - short pad; + char _pad[2]; /** Matrix result of loc/quat/size, and where we put deform in, see next line */ float chan_mat[4][4]; @@ -460,10 +460,11 @@ typedef struct bPose { */ bPoseChannel **chan_array; - short flag, pad; + short flag; + char _pad[2]; /** Proxy layer: copy from armature, gets synced. */ unsigned int proxy_layer; - int pad1; + char _pad1[4]; /** Local action time of this pose. */ float ctime; @@ -660,7 +661,7 @@ typedef struct bAction { * (if 0, will be set to whatever ID first evaluates it). */ int idroot; - int pad; + char _pad[4]; } bAction; diff --git a/source/blender/makesdna/DNA_anim_types.h b/source/blender/makesdna/DNA_anim_types.h index a05b52d0f49..1ea4f15b8d5 100644 --- a/source/blender/makesdna/DNA_anim_types.h +++ b/source/blender/makesdna/DNA_anim_types.h @@ -247,7 +247,7 @@ typedef struct FMod_Limits { rctf rect; /** Settings for limiting. */ int flag; - int pad; + char _pad[4]; } FMod_Limits; /* limiting flags */ @@ -538,7 +538,7 @@ typedef struct FPoint { float vec[2]; /** Selection info. */ int flag; - int pad; + char _pad[4]; } FPoint; /* 'Function-Curve' - defines values over time for a given setting (fcu) */ @@ -567,7 +567,7 @@ typedef struct FCurve { /* value cache + settings */ /** Value stored from last time curve was evaluated (not threadsafe, debug display only!). */ float curval; - char pad2[4]; + char _pad2[4]; /** User-editable settings for this curve. */ short flag; /** Value-extending mode for this curve (does not cover). */ @@ -575,7 +575,7 @@ typedef struct FCurve { /** Auto-handle smoothing mode. */ char auto_smoothing; - char pad[3]; + char _pad[3]; /* RNA - data link */ /** If applicable, the index of the RNA-array item to get. */ @@ -707,7 +707,7 @@ typedef struct NlaStrip { /** Strip extrapolation mode (time-based mixing). */ short extendmode; - short pad1; + char _pad1[2]; /** Type of NLA strip. */ short type; @@ -717,7 +717,7 @@ typedef struct NlaStrip { /** Settings. */ int flag; - int pad2; + char _pad2[4]; } NlaStrip; /* NLA Strip Blending Mode */ @@ -812,7 +812,7 @@ typedef struct NlaTrack { /** Settings for this track. */ int flag; /** Index of the track in the stack - * \note not really useful, but we need a pad var anyways! */ + * \note not really useful, but we need a '_pad' var anyways! */ int index; /** Short user-description of this track - MAX_ID_NAME-2. */ @@ -935,7 +935,7 @@ typedef struct KeyingSet { /** (eInsertKeyFlags) for each flag set, the relevant keyingflag bit overrides the default. */ short keyingoverride; - char pad[6]; + char _pad[6]; } KeyingSet; /* KeyingSet settings */ @@ -1050,7 +1050,7 @@ typedef struct AnimData { /* settings for animation evaluation */ /** User-defined settings. */ int flag; - int pad; + char _pad[4]; /* settings for active action evaluation (based on NLA strip settings) */ /** Accumulation mode for active action. */ diff --git a/source/blender/makesdna/DNA_armature_types.h b/source/blender/makesdna/DNA_armature_types.h index 8c8552400ac..b6016c3748d 100644 --- a/source/blender/makesdna/DNA_armature_types.h +++ b/source/blender/makesdna/DNA_armature_types.h @@ -122,7 +122,7 @@ typedef struct bArmature { int drawtype; /** How vertex deformation is handled in the ge. */ int gevertdeformer; - int pad; + char _pad[4]; short deformflag; short pathflag; diff --git a/source/blender/makesdna/DNA_brush_types.h b/source/blender/makesdna/DNA_brush_types.h index 584a43aad35..e0d39fe72a4 100644 --- a/source/blender/makesdna/DNA_brush_types.h +++ b/source/blender/makesdna/DNA_brush_types.h @@ -44,7 +44,8 @@ typedef struct BrushClone { /** Offset of clone image from canvas. */ float offset[2]; /** Transparency for drawing of clone image. */ - float alpha, pad; + float alpha; + char _pad[4]; } BrushClone; @@ -82,7 +83,7 @@ typedef struct BrushGpencilSettings { float fill_threshold; /** Number of pixel to consider the leak is too small (x 2). */ short fill_leak; - char pad_1[6]; + char _pad1[6]; /** Number of simplify steps. */ int fill_simplylvl; @@ -249,7 +250,7 @@ typedef struct Brush { /** Source for fill tool color gradient application. */ char gradient_fill_mode; - char pad; + char _pad; /** Projection shape (sphere, circle). */ char falloff_shape; float falloff_angle; @@ -321,7 +322,7 @@ typedef struct Palette { ListBase colors; int active_color; - int pad; + char _pad[4]; } Palette; typedef struct PaintCurvePoint { diff --git a/source/blender/makesdna/DNA_cachefile_types.h b/source/blender/makesdna/DNA_cachefile_types.h index d0152d1d4e2..e226519bba0 100644 --- a/source/blender/makesdna/DNA_cachefile_types.h +++ b/source/blender/makesdna/DNA_cachefile_types.h @@ -77,7 +77,7 @@ typedef struct CacheFile { short flag; short draw_flag; - char padding[4]; + char _pad[4]; } CacheFile; #ifdef __cplusplus diff --git a/source/blender/makesdna/DNA_camera_types.h b/source/blender/makesdna/DNA_camera_types.h index b28f5d1b262..0af69384c54 100644 --- a/source/blender/makesdna/DNA_camera_types.h +++ b/source/blender/makesdna/DNA_camera_types.h @@ -46,7 +46,7 @@ typedef struct CameraStereoSettings { short convergence_mode; short pivot; short flag; - short pad; + char _pad[2]; /* Cut-off angle at which interocular distance start to fade down. */ float pole_merge_angle_from; /* Cut-off angle at which interocular distance stops to fade down. */ @@ -103,7 +103,7 @@ typedef struct Camera { struct ListBase bg_images; char sensor_fit; - char pad[7]; + char _pad[7]; /* Stereo settings */ struct CameraStereoSettings stereo; diff --git a/source/blender/makesdna/DNA_cloth_types.h b/source/blender/makesdna/DNA_cloth_types.h index 5f4a124ea04..9ab873e1264 100644 --- a/source/blender/makesdna/DNA_cloth_types.h +++ b/source/blender/makesdna/DNA_cloth_types.h @@ -105,7 +105,7 @@ typedef struct ClothSimSettings { float bending_damping; /** Size of voxel grid cells for continuum dynamics. */ float voxel_cell_size; - int pad; + char _pad[4]; /** Number of time steps per frame. */ int stepsPerFrame; @@ -131,7 +131,7 @@ typedef struct ClothSimSettings { short presets; short reset; - char pad0[4]; + char _pad0[4]; struct EffectorWeights *effector_weights; short bending_model; @@ -171,12 +171,12 @@ typedef struct ClothCollSettings { short self_loop_count DNA_DEPRECATED; /** How many iterations for the collision loop. */ short loop_count; - int pad; + char _pad[4]; /** Only use colliders from this group of objects. */ struct Collection *group; /** Vgroup to paint which vertices are used for self collisions. */ short vgroup_selfcol; - short pad2[3]; + char _pad2[6]; /** Impulse clamp for object collisions. */ float clamp; /** Impulse clamp for self collisions. */ diff --git a/source/blender/makesdna/DNA_collection_types.h b/source/blender/makesdna/DNA_collection_types.h index 7b47523baa7..56f3d6ff290 100644 --- a/source/blender/makesdna/DNA_collection_types.h +++ b/source/blender/makesdna/DNA_collection_types.h @@ -58,7 +58,8 @@ typedef struct Collection { unsigned int layer DNA_DEPRECATED; float instance_offset[3]; - short flag, pad[3]; + short flag; + char _pad[6]; /* Runtime. Cache of objects in this collection and all its * children. This is created on demand when e.g. some physics diff --git a/source/blender/makesdna/DNA_color_types.h b/source/blender/makesdna/DNA_color_types.h index 9c00ec2f726..76746ef2759 100644 --- a/source/blender/makesdna/DNA_color_types.h +++ b/source/blender/makesdna/DNA_color_types.h @@ -90,7 +90,7 @@ typedef struct CurveMapping { float sample[3]; short tone; - short pad[3]; + char _pad[6]; } CurveMapping; /* cumapping->flag */ @@ -170,7 +170,7 @@ typedef struct Scopes { float *waveform_3; float *vecscope; int waveform_tot; - int pad; + char _pad[4]; } Scopes; /* scopes->wavefrm_mode */ @@ -182,7 +182,8 @@ typedef struct Scopes { #define SCOPES_WAVEFRM_RGB 5 typedef struct ColorManagedViewSettings { - int flag, pad; + int flag; + char _pad[4]; /** Look which is being applied when displaying buffer on the screen * (prior to view transform). */ char look[64]; @@ -194,7 +195,7 @@ typedef struct ColorManagedViewSettings { float gamma; /** Pre-display RGB curves transform. */ struct CurveMapping *curve_mapping; - void *pad2; + void *_pad2; } ColorManagedViewSettings; typedef struct ColorManagedDisplaySettings { diff --git a/source/blender/makesdna/DNA_constraint_types.h b/source/blender/makesdna/DNA_constraint_types.h index a5413b8ce70..b6fd57d1663 100644 --- a/source/blender/makesdna/DNA_constraint_types.h +++ b/source/blender/makesdna/DNA_constraint_types.h @@ -61,7 +61,7 @@ typedef struct bConstraint { /** Constraint name, MAX_NAME. */ char name[64]; - short pad; + char _pad[2]; /** Amount of influence exherted by constraint (0.0-1.0). */ float enforce; @@ -108,7 +108,7 @@ typedef struct bConstraintTarget { short rotOrder; /** Weight for armature deform. */ float weight; - char pad[4]; + char _pad[4]; } bConstraintTarget; /* bConstraintTarget -> flag */ @@ -243,7 +243,7 @@ typedef struct bSplineIKConstraint { typedef struct bArmatureConstraint { /** General settings/state indicators accessed by bitmapping. */ int flag; - char pad[4]; + char _pad[4]; /** A list of targets that this constraint has (bConstraintTarget-s). */ ListBase targets; @@ -263,7 +263,7 @@ typedef struct bTrackToConstraint { int reserved1; int reserved2; int flags; - int pad; + char _pad[4]; /** MAX_ID_NAME-2. */ char subtarget[64]; } bTrackToConstraint; @@ -315,7 +315,8 @@ typedef struct bMinMaxConstraint { float offset; int flag; /** For backward compatibility. */ - short sticky, stuck, pad1, pad2; + short sticky, stuck; + char _pad[4]; float cache[3]; /** MAX_ID_NAME-2. */ char subtarget[64]; @@ -351,7 +352,7 @@ typedef struct bLockTrackConstraint { typedef struct bDampTrackConstraint { struct Object *tar; int trackflag; - int pad; + char _pad[4]; /** MAX_ID_NAME-2. */ char subtarget[64]; } bDampTrackConstraint; @@ -402,9 +403,7 @@ typedef struct bRigidBodyJointConstraint { float maxLimit[6]; float extraFz; short flag; - short pad; - short pad1; - short pad2; + char _pad[6]; } bRigidBodyJointConstraint; /* Clamp-To Constraint */ @@ -423,7 +422,7 @@ typedef struct bChildOfConstraint { struct Object *tar; /** Settings. */ int flag; - int pad; + char _pad[4]; /** Parent-inverse matrix to use. */ float invmat[4][4]; /** String to specify a subobject target, MAX_ID_NAME-2. */ @@ -535,7 +534,7 @@ typedef struct bDistLimitConstraint { short flag; /** How to limit in relation to clamping sphere. */ short mode; - int pad; + char _pad[4]; } bDistLimitConstraint; /* ShrinkWrap Constraint */ @@ -557,7 +556,7 @@ typedef struct bShrinkwrapConstraint { char flag; /** Axis to align to normal. */ char trackAxis; - char pad; + char _pad; } bShrinkwrapConstraint; /* Follow Track constraints */ @@ -576,13 +575,15 @@ typedef struct bFollowTrackConstraint { /* Camera Solver constraints */ typedef struct bCameraSolverConstraint { struct MovieClip *clip; - int flag, pad; + int flag; + char _pad[4]; } bCameraSolverConstraint; /* Camera Solver constraints */ typedef struct bObjectSolverConstraint { struct MovieClip *clip; - int flag, pad; + int flag; + char _pad[4]; /** MAX_NAME. */ char object[64]; /** Parent-inverse matrix to use. */ diff --git a/source/blender/makesdna/DNA_curve_types.h b/source/blender/makesdna/DNA_curve_types.h index ba7daf4d45e..5d1404028dc 100644 --- a/source/blender/makesdna/DNA_curve_types.h +++ b/source/blender/makesdna/DNA_curve_types.h @@ -128,7 +128,7 @@ typedef struct BezTriple { /** F5: used for auto handle to distinguish between normal handle and exception (extrema). */ char f5; - char pad[3]; + char _pad[3]; } BezTriple; /* note; alfa location in struct is abused by Key system */ @@ -139,7 +139,8 @@ typedef struct BPoint { /** F1: selection status, hide: is point hidden or not. */ short f1, hide; /** User-set radius per point for beveling etc. */ - float radius, pad; + float radius; + char _pad[4]; } BPoint; /** @@ -155,7 +156,7 @@ typedef struct Nurb { short hide, flag; /** Number of points in the U or V directions. */ int pntsu, pntsv; - short pad[2]; + char _pad[4]; /** Tessellation resolution in the U or V directions. */ short resolu, resolv; short orderu, orderv; @@ -178,8 +179,7 @@ typedef struct CharInfo { /** Index start at 1, unlike mesh & nurbs. */ short mat_nr; char flag; - char pad; - short pad2; + char _pad[3]; } CharInfo; typedef struct TextBox { @@ -196,7 +196,7 @@ typedef struct EditNurb { /* shape key being edited */ int shapenr; - char pad[4]; + char _pad[4]; } EditNurb; typedef struct Curve { @@ -248,7 +248,7 @@ typedef struct Curve { char overflow; char spacemode, align_y; - char pad[3]; + char _pad[3]; /* font part */ short lines; @@ -288,9 +288,8 @@ typedef struct Curve { float bevfac1, bevfac2; char bevfac1_mapping, bevfac2_mapping; - char pad2[2]; + char _pad2[6]; float fsize_realtime; - float pad3; void *batch_cache; } Curve; diff --git a/source/blender/makesdna/DNA_customdata_types.h b/source/blender/makesdna/DNA_customdata_types.h index 5e63ab5052e..4bacfd15751 100644 --- a/source/blender/makesdna/DNA_customdata_types.h +++ b/source/blender/makesdna/DNA_customdata_types.h @@ -73,7 +73,7 @@ typedef struct CustomData { * Correct size is ensured in CustomData_update_typemap assert(). */ int typemap[42]; - int pad_i1; + char _pad0[4]; /** Number of layers, size of layers array. */ int totlayer, maxlayer; /** In editmode, total size of all data layers. */ diff --git a/source/blender/makesdna/DNA_dynamicpaint_types.h b/source/blender/makesdna/DNA_dynamicpaint_types.h index 4d0083c215b..9f585ac21af 100644 --- a/source/blender/makesdna/DNA_dynamicpaint_types.h +++ b/source/blender/makesdna/DNA_dynamicpaint_types.h @@ -114,11 +114,13 @@ typedef struct DynamicPaintSurface { short effect_ui; /** Surface output id to preview. */ short preview_id; - short init_color_type, pad_s; + short init_color_type; + char _pad0[2]; int flags, effect; int image_resolution, substeps; - int start_frame, end_frame, pad; + int start_frame, end_frame; + char _pad[4]; /* initial color */ float init_color[4]; @@ -138,7 +140,7 @@ typedef struct DynamicPaintSurface { /* wave settings */ float wave_damping, wave_speed, wave_timescale, wave_spring, wave_smoothness; - int pad2; + char _pad2[4]; /** MAX_CUSTOMDATA_LAYER_NAME. */ char uvlayer_name[64]; @@ -171,7 +173,7 @@ typedef struct DynamicPaintCanvasSettings { struct ListBase surfaces; short active_sur, flags; - int pad; + char _pad[4]; /** Bake error description. */ char error[64]; @@ -267,7 +269,7 @@ typedef struct DynamicPaintBrushSettings { short proximity_falloff; short wave_type; short ray_dir; - short pad; + char _pad[2]; float wave_factor, wave_clamp; float max_velocity, smudge_strength; diff --git a/source/blender/makesdna/DNA_effect_types.h b/source/blender/makesdna/DNA_effect_types.h index 2617fc09994..e9260f54237 100644 --- a/source/blender/makesdna/DNA_effect_types.h +++ b/source/blender/makesdna/DNA_effect_types.h @@ -102,7 +102,8 @@ typedef struct PartEff { float force[3]; float damp; - float nabla, vectsize, maxlen, pad, defvec[3]; + float nabla, vectsize, maxlen, defvec[3]; + char _pad[4]; float mult[4], life[4]; short child[4], mat[4]; diff --git a/source/blender/makesdna/DNA_fileglobal_types.h b/source/blender/makesdna/DNA_fileglobal_types.h index 6f7eb6fcfc3..6daa0f5aeb3 100644 --- a/source/blender/makesdna/DNA_fileglobal_types.h +++ b/source/blender/makesdna/DNA_fileglobal_types.h @@ -34,11 +34,11 @@ typedef struct FileGlobal { short subversion; short minversion, minsubversion; - char pad[6]; + char _pad[6]; struct bScreen *curscreen; struct Scene *curscene; struct ViewLayer *cur_view_layer; - void *pad1; + void *_pad1; int fileflags; int globalf; diff --git a/source/blender/makesdna/DNA_freestyle_types.h b/source/blender/makesdna/DNA_freestyle_types.h index 6a8609fe57f..731bc590117 100644 --- a/source/blender/makesdna/DNA_freestyle_types.h +++ b/source/blender/makesdna/DNA_freestyle_types.h @@ -116,11 +116,11 @@ typedef struct FreestyleLineSet { int selection; /** Quantitative invisibility. */ short qi; - short pad1; + char _pad1[2]; int qi_start, qi_end; /** Feature edge types. */ int edge_types, exclude_edge_types; - int pad2; + char _pad2[4]; /** Group of target objects. */ struct Collection *group; @@ -132,7 +132,7 @@ typedef struct FreestyleModuleConfig { struct Text *script; short is_displayed; - short pad[3]; + char _pad[6]; } FreestyleModuleConfig; typedef struct FreestyleConfig { diff --git a/source/blender/makesdna/DNA_gpu_types.h b/source/blender/makesdna/DNA_gpu_types.h index cecb07e79cf..da5abf0a0eb 100644 --- a/source/blender/makesdna/DNA_gpu_types.h +++ b/source/blender/makesdna/DNA_gpu_types.h @@ -45,7 +45,7 @@ typedef struct GPUSSAOSettings { float attenuation; /** Ray samples, we use presets here for easy control instead of. */ int samples; - int pad; + char _pad[4]; } GPUSSAOSettings; typedef struct GPUFXSettings { @@ -53,7 +53,7 @@ typedef struct GPUFXSettings { GPUSSAOSettings *ssao; /** #eGPUFXFlags. */ char fx_flag; - char pad[7]; + char _pad[7]; } GPUFXSettings; /* shaderfx enables */ diff --git a/source/blender/makesdna/DNA_image_types.h b/source/blender/makesdna/DNA_image_types.h index b6ae324552f..bd0916c9b7e 100644 --- a/source/blender/makesdna/DNA_image_types.h +++ b/source/blender/makesdna/DNA_image_types.h @@ -48,13 +48,13 @@ typedef struct ImageUser { /** Offset within movie, start frame in global time. */ int offset, sfra; /** Cyclic flag. */ - char _pad, cycl; + char _pad0, cycl; char ok; /** Multiview current eye - for internal use of drawing routines. */ char multiview_eye; short pass; - short pad; + char _pad1[2]; /** Listbase indices, for menu browsing or retrieve buffer. */ short multi_index, view, layer; @@ -125,8 +125,7 @@ typedef struct Image { /* GPU texture flag. */ short gpuflag; - short pad2; - unsigned int pad3; + char _pad2[6]; /** Deprecated. */ struct PackedFile *packedfile DNA_DEPRECATED; @@ -135,7 +134,7 @@ typedef struct Image { int lastused; short ok; - short pad4[3]; + char _pad4[6]; /* for generated images */ int gen_x, gen_y; @@ -150,7 +149,7 @@ typedef struct Image { ColorManagedColorspaceSettings colorspace_settings; char alpha_mode; - char pad[5]; + char _pad[5]; /* Multiview */ /** For viewer node stereoscopy. */ diff --git a/source/blender/makesdna/DNA_ipo_types.h b/source/blender/makesdna/DNA_ipo_types.h index 2940171f5e1..b728e5081ba 100644 --- a/source/blender/makesdna/DNA_ipo_types.h +++ b/source/blender/makesdna/DNA_ipo_types.h @@ -105,7 +105,8 @@ typedef struct Ipo { * (show vertical yellow lines for editing). */ short blocktype, showkey; /** Muteipo: either 0 or 1 (whether ipo block is muted). */ - short muteipo, pad; + short muteipo; + char _pad[2]; } Ipo; /* ----------- adrcodes (for matching ipo-curves to data) ------------- */ diff --git a/source/blender/makesdna/DNA_key_types.h b/source/blender/makesdna/DNA_key_types.h index c916e45e764..d35ed7a755f 100644 --- a/source/blender/makesdna/DNA_key_types.h +++ b/source/blender/makesdna/DNA_key_types.h @@ -48,7 +48,7 @@ typedef struct KeyBlock { /** interpolation type (Key->type == KEY_NORMAL) only. */ short type; - short pad1; + char _pad1[2]; /** relative == 0 means first key is reference, otherwise the index of Key->blocks */ short relative; @@ -92,7 +92,7 @@ typedef struct Key { char elemstr[32]; /** Size of each element in #KeyBlock.data, use for allocation and stride. */ int elemsize; - int pad; + char _pad[4]; /** list of KeyBlock's */ ListBase block; @@ -106,7 +106,7 @@ typedef struct Key { short flag; /** absolute or relative shape key */ char type; - char pad2; + char _pad2; /** Only used when (Key->type == KEY_NORMAL), this value is used as a time slider, * rather then using the scenes time, this value can be animated to give greater control */ diff --git a/source/blender/makesdna/DNA_lattice_types.h b/source/blender/makesdna/DNA_lattice_types.h index 3ba9e27144b..ca0136522c1 100644 --- a/source/blender/makesdna/DNA_lattice_types.h +++ b/source/blender/makesdna/DNA_lattice_types.h @@ -46,8 +46,9 @@ typedef struct Lattice { struct AnimData *adt; short pntsu, pntsv, pntsw, flag; - short opntsu, opntsv, opntsw, pad2; - char typeu, typev, typew, pad3; + short opntsu, opntsv, opntsw; + char _pad2[3]; + char typeu, typev, typew; /** Active element index, unset with LT_ACTBP_NONE. */ int actbp; diff --git a/source/blender/makesdna/DNA_layer_types.h b/source/blender/makesdna/DNA_layer_types.h index d6c2c5fbdc0..1462d456563 100644 --- a/source/blender/makesdna/DNA_layer_types.h +++ b/source/blender/makesdna/DNA_layer_types.h @@ -51,7 +51,7 @@ typedef struct LayerCollection { struct SceneCollection *scene_collection DNA_DEPRECATED; short flag; short runtime_flag; - short pad[2]; + char _pad[4]; /** Synced with collection->children. */ ListBase layer_collections; } LayerCollection; @@ -62,7 +62,7 @@ typedef struct ViewLayer { char name[64]; short flag; short runtime_flag; - short pad[2]; + char _pad[4]; /** ObjectBase. */ ListBase object_bases; /** Default allocated now. */ @@ -158,7 +158,7 @@ typedef struct SceneCollection { int active_object_index; short flag; char type; - char pad; + char _pad; /** (Object *)LinkData->data. */ ListBase objects; /** Nested collections. */ diff --git a/source/blender/makesdna/DNA_light_types.h b/source/blender/makesdna/DNA_light_types.h index 2478ee24edf..034fc755d1f 100644 --- a/source/blender/makesdna/DNA_light_types.h +++ b/source/blender/makesdna/DNA_light_types.h @@ -55,7 +55,7 @@ typedef struct Light { float coeff_const, coeff_lin, coeff_quad, coeff_pad; struct CurveMapping *curfalloff; short falloff_type; - short pad2; + char _pad2[2]; float clipsta, clipend; float bias, soft, bleedbias, bleedexp; @@ -71,7 +71,7 @@ typedef struct Light { /** Old animation system, deprecated for 2.5. */ struct Ipo *ipo DNA_DEPRECATED; short pr_texture, use_nodes; - char pad6[4]; + char _pad6[4]; /* Eevee */ float cascade_max_dist; diff --git a/source/blender/makesdna/DNA_lightprobe_types.h b/source/blender/makesdna/DNA_lightprobe_types.h index 15322374532..d9fd22c51c8 100644 --- a/source/blender/makesdna/DNA_lightprobe_types.h +++ b/source/blender/makesdna/DNA_lightprobe_types.h @@ -66,7 +66,7 @@ typedef struct LightProbe { int grid_resolution_x; int grid_resolution_y; int grid_resolution_z; - int pad1; + char _pad1[4]; /** Object to use as a parallax origin. */ struct Object *parallax_ob; @@ -77,7 +77,7 @@ typedef struct LightProbe { /* Runtime display data */ float distfalloff, distgridinf; - float pad[2]; + char _pad[8]; } LightProbe; /* Probe->type */ @@ -119,7 +119,6 @@ typedef struct LightProbeCache { float position[3], parallax_type; float attenuation_fac; float attenuation_type; - float pad3[2]; float attenuationmat[4][4]; float parallaxmat[4][4]; } LightProbeCache; @@ -132,8 +131,8 @@ typedef struct LightGridCache { /** World space vector between 2 opposite cells. */ float increment_x[3], attenuation_bias; float increment_y[3], level_bias; - float increment_z[3], pad4; - float visibility_bias, visibility_bleed, visibility_range, pad5; + float increment_z[3]; + float visibility_bias, visibility_bleed, visibility_range; } LightGridCache; /* ------ Eevee Lightcache ------- */ @@ -145,7 +144,7 @@ typedef struct LightCacheTexture { int tex_size[3]; char data_type; char components; - char pad[2]; + char _pad[2]; } LightCacheTexture; typedef struct LightCache { @@ -157,7 +156,7 @@ typedef struct LightCache { int mips_len; /** Size of a visibility/reflection sample. */ int vis_res, ref_res; - int pad[2]; + char _pad[4][2]; /* In the future, we could create a bigger texture containing * multiple caches (for animation) and interpolate between the * caches overtime to another texture. */ diff --git a/source/blender/makesdna/DNA_linestyle_types.h b/source/blender/makesdna/DNA_linestyle_types.h index 9fd92d15197..34392016f27 100644 --- a/source/blender/makesdna/DNA_linestyle_types.h +++ b/source/blender/makesdna/DNA_linestyle_types.h @@ -115,7 +115,7 @@ typedef struct LineStyleAlphaModifier_AlongStroke { struct CurveMapping *curve; int flags; - int pad; + char _pad[4]; } LineStyleAlphaModifier_AlongStroke; typedef struct LineStyleThicknessModifier_AlongStroke { @@ -124,7 +124,7 @@ typedef struct LineStyleThicknessModifier_AlongStroke { struct CurveMapping *curve; int flags; float value_min, value_max; - int pad; + char _pad[4]; } LineStyleThicknessModifier_AlongStroke; /* Distance from Camera modifiers */ @@ -142,7 +142,7 @@ typedef struct LineStyleAlphaModifier_DistanceFromCamera { struct CurveMapping *curve; int flags; float range_min, range_max; - int pad; + char _pad[4]; } LineStyleAlphaModifier_DistanceFromCamera; typedef struct LineStyleThicknessModifier_DistanceFromCamera { @@ -152,7 +152,7 @@ typedef struct LineStyleThicknessModifier_DistanceFromCamera { int flags; float range_min, range_max; float value_min, value_max; - int pad; + char _pad[4]; } LineStyleThicknessModifier_DistanceFromCamera; /* Distance from Object modifiers */ @@ -172,7 +172,7 @@ typedef struct LineStyleAlphaModifier_DistanceFromObject { struct CurveMapping *curve; int flags; float range_min, range_max; - int pad; + char _pad[4]; } LineStyleAlphaModifier_DistanceFromObject; typedef struct LineStyleThicknessModifier_DistanceFromObject { @@ -183,7 +183,7 @@ typedef struct LineStyleThicknessModifier_DistanceFromObject { int flags; float range_min, range_max; float value_min, value_max; - int pad; + char _pad[4]; } LineStyleThicknessModifier_DistanceFromObject; /* 3D curvature modifiers */ @@ -202,14 +202,15 @@ typedef struct LineStyleAlphaModifier_Curvature_3D { struct CurveMapping *curve; int flags; float min_curvature, max_curvature; - int pad; + char _pad[4]; } LineStyleAlphaModifier_Curvature_3D; typedef struct LineStyleThicknessModifier_Curvature_3D { struct LineStyleModifier modifier; struct CurveMapping *curve; - int flags, pad; + int flags; + char _pad[4]; float min_curvature, max_curvature; float min_thickness, max_thickness; } LineStyleThicknessModifier_Curvature_3D; @@ -221,7 +222,8 @@ typedef struct LineStyleColorModifier_Noise { struct ColorBand *color_ramp; float period, amplitude; - int seed, pad; + int seed; + char _pad[4]; } LineStyleColorModifier_Noise; typedef struct LineStyleAlphaModifier_Noise { @@ -256,14 +258,15 @@ typedef struct LineStyleAlphaModifier_CreaseAngle { struct CurveMapping *curve; int flags; float min_angle, max_angle; - int pad; + char _pad[4]; } LineStyleAlphaModifier_CreaseAngle; typedef struct LineStyleThicknessModifier_CreaseAngle { struct LineStyleModifier modifier; struct CurveMapping *curve; - int flags, pad; + int flags; + char _pad[4]; float min_angle, max_angle; float min_thickness, max_thickness; } LineStyleThicknessModifier_CreaseAngle; @@ -281,7 +284,7 @@ typedef struct LineStyleAlphaModifier_Tangent { struct CurveMapping *curve; int flags; - int pad; + char _pad[4]; } LineStyleAlphaModifier_Tangent; typedef struct LineStyleThicknessModifier_Tangent { @@ -290,7 +293,7 @@ typedef struct LineStyleThicknessModifier_Tangent { struct CurveMapping *curve; int flags; float min_thickness, max_thickness; - int pad; + char _pad[4]; } LineStyleThicknessModifier_Tangent; /* Material modifiers */ @@ -343,21 +346,21 @@ typedef struct LineStyleGeometryModifier_Sampling { struct LineStyleModifier modifier; float sampling; - int pad; + char _pad[4]; } LineStyleGeometryModifier_Sampling; typedef struct LineStyleGeometryModifier_BezierCurve { struct LineStyleModifier modifier; float error; - int pad; + char _pad[4]; } LineStyleGeometryModifier_BezierCurve; typedef struct LineStyleGeometryModifier_SinusDisplacement { struct LineStyleModifier modifier; float wavelength, amplitude, phase; - int pad; + char _pad[4]; } LineStyleGeometryModifier_SinusDisplacement; /* LineStyleGeometryModifier_SpatialNoise::flags */ @@ -380,7 +383,7 @@ typedef struct LineStyleGeometryModifier_PerlinNoise1D { float angle; unsigned int octaves; int seed; - int pad1; + char _pad1[4]; } LineStyleGeometryModifier_PerlinNoise1D; typedef struct LineStyleGeometryModifier_PerlinNoise2D { @@ -391,35 +394,35 @@ typedef struct LineStyleGeometryModifier_PerlinNoise2D { float angle; unsigned int octaves; int seed; - int pad1; + char _pad1[4]; } LineStyleGeometryModifier_PerlinNoise2D; typedef struct LineStyleGeometryModifier_BackboneStretcher { struct LineStyleModifier modifier; float backbone_length; - int pad; + char _pad[4]; } LineStyleGeometryModifier_BackboneStretcher; typedef struct LineStyleGeometryModifier_TipRemover { struct LineStyleModifier modifier; float tip_length; - int pad; + char _pad[4]; } LineStyleGeometryModifier_TipRemover; typedef struct LineStyleGeometryModifier_Polygonalization { struct LineStyleModifier modifier; float error; - int pad; + char _pad[4]; } LineStyleGeometryModifier_Polygonalization; typedef struct LineStyleGeometryModifier_GuidingLines { struct LineStyleModifier modifier; float offset; - int pad; + char _pad[4]; } LineStyleGeometryModifier_GuidingLines; /* LineStyleGeometryModifier_BluePrintLines::shape */ @@ -461,14 +464,14 @@ typedef struct LineStyleGeometryModifier_2DTransform { float angle; float pivot_u; float pivot_x, pivot_y; - int pad; + char _pad[4]; } LineStyleGeometryModifier_2DTransform; typedef struct LineStyleGeometryModifier_Simplification { struct LineStyleModifier modifier; float tolerance; - int pad; + char _pad[4]; }LineStyleGeometryModifier_Simplification; /* Calligraphic thickness modifier */ @@ -479,7 +482,7 @@ typedef struct LineStyleThicknessModifier_Calligraphy { float min_thickness, max_thickness; /** In radians!. */ float orientation; - int pad; + char _pad[4]; } LineStyleThicknessModifier_Calligraphy; /* FreestyleLineStyle::panel */ @@ -558,7 +561,8 @@ typedef struct FreestyleLineStyle { int sort_key, integration_type; float texstep; short texact, pr_texture; - short use_nodes, pad[3]; + short use_nodes; + char _pad[6]; unsigned short dash1, gap1, dash2, gap2, dash3, gap3; /** For UI. */ int panel; diff --git a/source/blender/makesdna/DNA_mask_types.h b/source/blender/makesdna/DNA_mask_types.h index d52c94d87f0..58418738f3a 100644 --- a/source/blender/makesdna/DNA_mask_types.h +++ b/source/blender/makesdna/DNA_mask_types.h @@ -47,7 +47,7 @@ typedef struct Mask { /** For anim info. */ int flag; - int pad; + char _pad[4]; } Mask; typedef struct MaskParent { @@ -92,7 +92,7 @@ typedef struct MaskSplinePointUW { typedef struct MaskSplinePoint { /** Actual point coordinates and it's handles . */ BezTriple bezt; - int pad; + char _pad[4]; /** Number of uv feather values. */ int tot_uw; /** Feather UV values. */ @@ -134,7 +134,7 @@ typedef struct MaskLayerShape { int frame; /** Animation flag. */ char flag; - char pad[7]; + char _pad[7]; } MaskLayerShape; /* cast to this for convenience, not saved */ @@ -166,7 +166,7 @@ typedef struct MaskLayer { char blend; char blend_flag; char falloff; - char pad[7]; + char _pad[7]; /** For animation. */ char flag; diff --git a/source/blender/makesdna/DNA_material_types.h b/source/blender/makesdna/DNA_material_types.h index 8030a66cf3b..10834768c3f 100644 --- a/source/blender/makesdna/DNA_material_types.h +++ b/source/blender/makesdna/DNA_material_types.h @@ -96,7 +96,7 @@ typedef struct MaterialGPencilStyle { /** Type of gradient. */ int gradient_type; - char pad[4]; + char _pad[4]; } MaterialGPencilStyle; /* MaterialGPencilStyle->flag */ diff --git a/source/blender/makesdna/DNA_mesh_types.h b/source/blender/makesdna/DNA_mesh_types.h index b018710669b..956fee97d40 100644 --- a/source/blender/makesdna/DNA_mesh_types.h +++ b/source/blender/makesdna/DNA_mesh_types.h @@ -79,9 +79,9 @@ typedef struct Mesh_Runtime { void *batch_cache; struct SubdivCCG *subdiv_ccg; - void *pad1; + void *_pad1; int subdiv_ccg_tot_level; - int pad2; + char _pad2[4]; int64_t cd_dirty_vert; int64_t cd_dirty_edge; @@ -103,7 +103,7 @@ typedef struct Mesh_Runtime { * In the future we may leave the mesh-data empty * since its not needed if we can use edit-mesh data. */ char is_original; - char padding[6]; + char _pad[6]; } Mesh_Runtime; typedef struct Mesh { @@ -178,7 +178,7 @@ typedef struct Mesh { float smoothresh; /* customdata flag, for bevel-weight and crease, which are now optional */ - char cd_flag, pad; + char cd_flag, _pad; char subdiv DNA_DEPRECATED, subdivr DNA_DEPRECATED; /** Only kept for backwards compat, not used anymore. */ diff --git a/source/blender/makesdna/DNA_meshdata_types.h b/source/blender/makesdna/DNA_meshdata_types.h index cb28b1bfbdf..9ed879d10c5 100644 --- a/source/blender/makesdna/DNA_meshdata_types.h +++ b/source/blender/makesdna/DNA_meshdata_types.h @@ -75,7 +75,7 @@ typedef struct MPoly { /** Keep signed since we need to subtract when getting the previous loop. */ int totloop; short mat_nr; - char flag, pad; + char flag, _pad; } MPoly; /* the e here is because we want to move away from relying on edge hashes.*/ @@ -184,7 +184,7 @@ typedef struct MVertTri { } MVertTri; //typedef struct MTexPoly { -// void *pad; +// void *_pad; //} MTexPoly; typedef struct MLoopUV { @@ -290,7 +290,7 @@ typedef struct MultiresColFace { typedef struct MultiresFace { unsigned int v[4]; unsigned int mid; - char flag, mat_nr, pad[2]; + char flag, mat_nr, _pad[2]; } MultiresFace; typedef struct MultiresEdge { @@ -305,7 +305,8 @@ typedef struct MultiresLevel { MultiresColFace *colfaces; MultiresEdge *edges; - unsigned int totvert, totface, totedge, pad; + unsigned int totvert, totface, totedge; + char _pad[4]; /* Kept for compatibility with even older files */ MVert *verts; @@ -338,7 +339,7 @@ typedef struct GridPaintMask { /* The maximum multires level associated with this grid */ unsigned int level; - int pad; + char _pad[4]; } GridPaintMask; typedef enum eMVertSkinFlag { @@ -364,7 +365,7 @@ typedef struct MVertSkin { typedef struct FreestyleEdge { char flag; - char pad[3]; + char _pad[3]; } FreestyleEdge; /* FreestyleEdge->flag */ @@ -374,7 +375,7 @@ enum { typedef struct FreestyleFace { char flag; - char pad[3]; + char _pad[3]; } FreestyleFace; /* FreestyleFace->flag */ diff --git a/source/blender/makesdna/DNA_meta_types.h b/source/blender/makesdna/DNA_meta_types.h index 7ba66782cc0..f5bc9ef383a 100644 --- a/source/blender/makesdna/DNA_meta_types.h +++ b/source/blender/makesdna/DNA_meta_types.h @@ -41,7 +41,7 @@ typedef struct MetaElem { struct BoundBox *bb; short type, flag; - short pad[2]; + char _pad[4]; /** Position of center of MetaElem. */ float x, y, z; /** Rotation of MetaElem (MUST be kept normalized). */ @@ -81,7 +81,8 @@ typedef struct MetaBall { char flag, flag2; short totcol; /** Used to store MB_AUTOSPACE. */ - short texflag, pad; + short texflag; + char _pad[2]; /* texture space, copied as one block in editobject.c */ float loc[3]; diff --git a/source/blender/makesdna/DNA_modifier_types.h b/source/blender/makesdna/DNA_modifier_types.h index f3ef9683607..4139b5eb91c 100644 --- a/source/blender/makesdna/DNA_modifier_types.h +++ b/source/blender/makesdna/DNA_modifier_types.h @@ -108,7 +108,7 @@ typedef struct ModifierData { int type, mode; int stackindex; short flag; - short pad; + char _pad[2]; /** MAX_NAME. */ char name[64]; @@ -162,7 +162,7 @@ typedef struct SubsurfModifierData { short subdivType, levels, renderLevels, flags; short uv_smooth; short quality; - short pad[2]; + char _pad[4]; /* TODO(sergey): Get rid of those with the old CCG subdivision code. */ void *emCache, *mCache; @@ -177,7 +177,7 @@ typedef struct LatticeModifierData { /** Optional vertexgroup name, MAX_VGROUP_NAME. */ char name[64]; float strength; - char pad[4]; + char _pad[4]; } LatticeModifierData; typedef struct CurveModifierData { @@ -188,7 +188,7 @@ typedef struct CurveModifierData { char name[64]; /** Axis along which curve deforms. */ short defaxis; - char pad[6]; + char _pad[6]; } CurveModifierData; /* CurveModifierData->defaxis */ @@ -379,7 +379,7 @@ typedef struct BevelModifierData { /* patterns to use for mitering non-reflex and reflex miter edges */ short miter_inner; short miter_outer; - short pad2; + char _pad0[2]; /** Controls profile shape (0->1, .5 is round). */ float profile; /** if the MOD_BEVEL_ANGLE is set, @@ -508,13 +508,14 @@ typedef struct UVProjectModifierData { /* the objects which do the projecting */ /** MOD_UVPROJECT_MAXPROJECTORS. */ struct Object *projectors[10]; - int pad2; + char _pad2[4]; int num_projectors; float aspectx, aspecty; float scalex, scaley; /** MAX_CUSTOMDATA_LAYER_NAME. */ char uvlayer_name[64]; - int uvlayer_tmp, pad; + int uvlayer_tmp; + char _pad[4]; } UVProjectModifierData; #define MOD_UVPROJECT_MAXPROJECTORS 10 @@ -624,13 +625,14 @@ typedef struct WaveModifierData { /** MAX_VGROUP_NAME. */ char defgrp_name[64]; - short flag, pad; + short flag; + char _pad[2]; float startx, starty, height, width; float narrow, speed, damp, falloff; float timeoffs, lifetime; - float pad1; + char _pad1[4]; } WaveModifierData; /* WaveModifierData.flag */ @@ -650,7 +652,7 @@ typedef struct ArmatureModifierData { /** Deformflag replaces armature->deformflag. */ short deformflag, multi; - int pad2; + char _pad2[4]; struct Object *object; /** Stored input of previous modifier, for vertexgroup blending. */ float *prevCos; @@ -686,7 +688,7 @@ typedef struct HookModifierData { char flag; /** Use enums from WarpModifier (exact same functionality). */ char falloff_type; - char pad[6]; + char _pad[6]; /** Matrix making current transform unmodified. */ float parentinv[4][4]; /** Visualization of hook. */ @@ -759,7 +761,7 @@ typedef struct CollisionModifierData { float time_x, time_xnew; /** Collider doesn't move this frame, i.e. x[].co==xnew[].co. */ char is_static; - char pad[7]; + char _pad[7]; /** Bounding volume hierarchy for this cloth object. */ struct BVHTree *bvhtree; @@ -786,7 +788,7 @@ typedef struct BooleanModifierData { struct Object *object; char operation; - char pad[2]; + char _pad[2]; char bm_flag; float double_threshold; } BooleanModifierData; @@ -822,7 +824,8 @@ typedef struct MeshDeformModifierData { /** Optional vertexgroup name, MAX_VGROUP_NAME. */ char defgrp_name[64]; - short gridsize, flag, pad[2]; + short gridsize, flag; + char _pad[4]; /* result of static binding */ /** Influences. */ @@ -882,7 +885,8 @@ typedef struct ParticleSystemModifierData { /** Original mesh that particles are attached to. */ struct Mesh *mesh_original; int totdmvert, totdmedge, totdmface; - short flag, pad; + short flag; + char _pad[2]; } ParticleSystemModifierData; typedef enum { @@ -944,12 +948,12 @@ typedef struct MultiresModifierData { ModifierData modifier; char lvl, sculptlvl, renderlvl, totlvl; - char simple, flags, pad[2]; + char simple, flags, _pad[2]; short quality; short uv_smooth; - short pad2[2]; + char _pad2[4]; struct Subdiv *subdiv; - void *pad3; + void *_pad3; } MultiresModifierData; typedef enum { @@ -992,7 +996,7 @@ typedef struct ShrinkwrapModifierData { */ char subsurfLevels; - char pad[2]; + char _pad[2]; } ShrinkwrapModifierData; /* Shrinkwrap->shrinkType */ @@ -1109,7 +1113,7 @@ typedef struct SolidifyModifierData { float offset_fac_vg; /** Clamp offset based on surrounding geometry. */ float offset_clamp; - float pad; + char _pad[4]; float crease_inner; float crease_outer; float crease_rim; @@ -1142,7 +1146,7 @@ typedef struct ScrewModifierData { float merge_dist; short flag; char axis; - char pad[5]; + char _pad[5]; } ScrewModifierData; enum { @@ -1190,7 +1194,7 @@ typedef struct OceanModifierData { char geometry_mode; char flag; - char pad2; + char _pad2; short repeat_x; short repeat_y; @@ -1201,7 +1205,7 @@ typedef struct OceanModifierData { float foam_fade; - int pad; + char _pad[4]; } OceanModifierData; enum { @@ -1237,7 +1241,7 @@ typedef struct WarpModifierData { /** Not used yet. */ char flag; char falloff_type; - char pad[6]; + char _pad[6]; } WarpModifierData; #define MOD_WARP_VOLUME_PRESERVE 1 @@ -1294,7 +1298,7 @@ typedef struct WeightVGEditModifierData { char mask_tex_uvlayer_name[64]; /* Padding... */ - int pad_i1; + char _pad0[4]; } WeightVGEditModifierData; /* WeightVGEdit flags. */ @@ -1322,7 +1326,7 @@ typedef struct WeightVGMixModifierData { /** What vertices to affect. */ char mix_set; - char pad_c1[6]; + char _pad0[6]; /* Masking options. */ /** The global "influence", if no vgroup nor tex is used as mask. */ @@ -1343,7 +1347,7 @@ typedef struct WeightVGMixModifierData { char mask_tex_uvlayer_name[64]; /* Padding... */ - int pad_i1; + char _pad1[4]; } WeightVGMixModifierData; /* How second vgroup's weights affect first ones. */ @@ -1417,7 +1421,7 @@ typedef struct WeightVGProximityModifierData { short falloff_type; /* Padding... */ - short pad_s1; + char _pad0[2]; } WeightVGProximityModifierData; /* Modes of proximity weighting. */ @@ -1470,7 +1474,7 @@ typedef struct DynamicPaintModifierData { struct DynamicPaintBrushSettings *brush; /** UI display: canvas / brush. */ int type; - int pad; + char _pad[4]; } DynamicPaintModifierData; /* Dynamic paint modifier flags */ @@ -1510,7 +1514,7 @@ typedef struct RemeshModifierData { char flag; char mode; - char pad; + char _pad; } RemeshModifierData; /* Skin modifier */ @@ -1523,7 +1527,7 @@ typedef struct SkinModifierData { char symmetry_axes; - char pad[2]; + char _pad[2]; } SkinModifierData; /* SkinModifierData.symmetry_axes */ @@ -1545,7 +1549,7 @@ typedef struct TriangulateModifierData { int flag; int quad_method; int ngon_method; - int pad; + char _pad[4]; } TriangulateModifierData; #ifdef DNA_DEPRECATED @@ -1571,7 +1575,8 @@ enum { typedef struct LaplacianSmoothModifierData { ModifierData modifier; - float lambda, lambda_border, pad1; + float lambda, lambda_border; + char _pad1[4]; /** MAX_VGROUP_NAME. */ char defgrp_name[64]; short flag, repeat; @@ -1600,7 +1605,7 @@ typedef struct CorrectiveSmoothModifierData { float lambda; short repeat, flag; char smooth_type, rest_source; - char pad[2]; + char _pad[2]; /** MAX_VGROUP_NAME. */ char defgrp_name[64]; @@ -1609,7 +1614,7 @@ typedef struct CorrectiveSmoothModifierData { * delta's between the original positions and the smoothed positions */ float (*delta_cache)[3]; unsigned int delta_cache_num; - char pad2[4]; + char _pad2[4]; } CorrectiveSmoothModifierData; enum { @@ -1633,7 +1638,7 @@ typedef struct UVWarpModifierData { ModifierData modifier; char axis_u, axis_v; - char pad[6]; + char _pad[6]; /** Used for rotate/scale. */ float center[2]; @@ -1671,7 +1676,7 @@ typedef struct MeshCacheModifierData { float factor; char deform_mode; - char pad[7]; + char _pad[7]; /* play_mode == MOD_MESHCACHE_PLAY_CFEA */ float frame_start; @@ -1723,7 +1728,8 @@ typedef struct LaplacianDeformModifierData { float *vertexco; /** Runtime only. */ void *cache_system; - short flag, pad[3]; + short flag; + char _pad[6]; } LaplacianDeformModifierData; @@ -1742,7 +1748,7 @@ typedef struct WireframeModifierData { float offset_fac_vg; float crease_weight; short flag, mat_ofs; - short pad[2]; + char _pad[4]; } WireframeModifierData; enum { @@ -1773,7 +1779,7 @@ typedef struct DataTransferModifierData { float map_ray_radius; float islands_precision; - int pad_i1; + char _pad1[4]; /** DT_MULTILAYER_INDEX_MAX; See DT_FROMLAYERS_ enum in ED_object.h. */ int layers_select_src[4]; @@ -1812,11 +1818,11 @@ typedef struct NormalEditModifierData { short mode; short flag; short mix_mode; - char pad[2]; + char _pad[2]; float mix_factor; float mix_limit; float offset[3]; - float pad_f1; + char _pad0[4]; } NormalEditModifierData; /* NormalEditModifierData.mode */ @@ -1849,7 +1855,7 @@ typedef struct MeshSeqCacheModifierData { char object_path[1024]; char read_flag; - char pad[7]; + char _pad[7]; } MeshSeqCacheModifierData; /* MeshSeqCacheModifierData.read_flag */ @@ -1872,7 +1878,7 @@ typedef struct SDefBind { typedef struct SDefVert { SDefBind *binds; unsigned int numbinds; - char pad[4]; + char _pad[4]; } SDefVert; typedef struct SurfaceDeformModifierData { diff --git a/source/blender/makesdna/DNA_node_types.h b/source/blender/makesdna/DNA_node_types.h index 86bba29ef9a..a255646b734 100644 --- a/source/blender/makesdna/DNA_node_types.h +++ b/source/blender/makesdna/DNA_node_types.h @@ -66,7 +66,7 @@ typedef struct bNodeStack { short is_copy; /** Data is used by external nodes (no freeing). */ short external; - short pad[2]; + char _pad[4]; } bNodeStack; /* ns->datatype, shadetree only */ @@ -119,7 +119,8 @@ typedef struct bNodeSocket { short stack_index; /* XXX deprecated, kept for forward compatibility */ short stack_type DNA_DEPRECATED; - char draw_shape, pad[3]; + char draw_shape; + char _pad[3]; /** Cached data from execution. */ void *cache; @@ -206,7 +207,8 @@ typedef struct bNode { /** MAX_NAME. */ char name[64]; int flag; - short type, pad; + short type; + char _pad[2]; /** Both for dependency and sorting. */ short done, level; /** Lasty: check preview render status, menunr: browse ID blocks. */ @@ -273,7 +275,8 @@ typedef struct bNode { /** Reserved size of the preview rect. */ short preview_xsize, preview_ysize; /** Used at runtime when going through the tree. Initialize before use. */ - short tmp_flag, pad2; + short tmp_flag; + char _pad2[2]; /** Runtime during drawing. */ struct uiBlock *block; @@ -377,7 +380,7 @@ typedef struct bNodeLink { bNodeSocket *fromsock, *tosock; int flag; - int pad; + char _pad[4]; } bNodeLink; /* link->flag */ @@ -435,7 +438,7 @@ typedef struct bNodeTree { short is_updating; /** Generic temporary flag for recursion check (DFS/BFS). */ short done; - int pad2; + char _pad2[4]; /** Specific node type this tree is used for. */ int nodetype DNA_DEPRECATED; @@ -463,7 +466,7 @@ typedef struct bNodeTree { * in case multiple different editors are used and make context ambiguous. */ bNodeInstanceKey active_viewer_key; - int pad; + char _pad[4]; /* execution data */ /* XXX It would be preferable to completely move this data out of the underlying node tree, @@ -549,7 +552,7 @@ typedef struct bNodeSocketValueFloat { typedef struct bNodeSocketValueBoolean { char value; - char pad[3]; + char _pad[3]; } bNodeSocketValueBoolean; typedef struct bNodeSocketValueVector { @@ -565,7 +568,7 @@ typedef struct bNodeSocketValueRGBA { typedef struct bNodeSocketValueString { int subtype; - int pad; + char _pad[4]; /** 1024 = FILEMAX. */ char value[1024]; } bNodeSocketValueString; @@ -623,7 +626,7 @@ typedef struct NodeImageAnim { int nr DNA_DEPRECATED; char cyclic DNA_DEPRECATED; char movie DNA_DEPRECATED; - short pad; + char _pad[2]; } NodeImageAnim; typedef struct ColorCorrectionData { @@ -632,7 +635,7 @@ typedef struct ColorCorrectionData { float gamma; float gain; float lift; - int pad; + char _pad[4]; } ColorCorrectionData; typedef struct NodeColorCorrection { @@ -658,7 +661,7 @@ typedef struct NodeBoxMask { float rotation; float height; float width; - int pad; + char _pad[4]; } NodeBoxMask; typedef struct NodeEllipseMask { @@ -667,7 +670,7 @@ typedef struct NodeEllipseMask { float rotation; float height; float width; - int pad; + char _pad[4]; } NodeEllipseMask; /* layer info for image node outputs */ @@ -693,12 +696,13 @@ typedef struct NodeBlurData { typedef struct NodeDBlurData { float center_x, center_y, distance, angle, spin, zoom; short iter; - char wrap, pad; + char wrap, _pad; } NodeDBlurData; typedef struct NodeBilateralBlurData { float sigma_color, sigma_space; - short iter, pad; + short iter; + char _pad[2]; } NodeBilateralBlurData; /* NOTE: Only for do-version code. */ @@ -722,14 +726,14 @@ typedef struct NodeImageMultiFile { int sfra DNA_DEPRECATED, efra DNA_DEPRECATED; /** Selected input in details view list. */ int active_input; - int pad; + char _pad[4]; } NodeImageMultiFile; typedef struct NodeImageMultiFileSocket { /* single layer file output */ short use_render_format DNA_DEPRECATED; /** Use overall node image format. */ short use_node_format; - int pad1; + char _pad1[4]; /** 1024 = FILE_MAX. */ char path[1024]; ImageFormatData format; @@ -737,7 +741,7 @@ typedef struct NodeImageMultiFileSocket { /* multilayer output */ /** EXR_TOT_MAXNAME-2 ('.' and channel char are appended). */ char layer[30]; - char pad2[2]; + char _pad2[2]; } NodeImageMultiFileSocket; typedef struct NodeChroma { @@ -762,10 +766,11 @@ typedef struct NodeVertexCol { /* qdn: Defocus blur node */ typedef struct NodeDefocus { - char bktype, pad_c1, preview, gamco; + char bktype, _pad0, preview, gamco; short samples, no_zbuf; float fstop, maxblur, bthresh, scale; - float rotation, pad_f1; + float rotation; + char _pad1[4]; } NodeDefocus; typedef struct NodeScriptDict { @@ -780,9 +785,10 @@ typedef struct NodeGlare { char quality, type, iter; /* XXX angle is only kept for backward/forward compatibility, * was used for two different things, see T50736. */ - char angle DNA_DEPRECATED, pad_c1, size, star_45, streaks; + char angle DNA_DEPRECATED, _pad0, size, star_45, streaks; float colmod, mix, threshold, fade; - float angle_ofs, pad_f1; + float angle_ofs; + char _pad1[4]; } NodeGlare; /* qdn: tonemap node */ @@ -794,7 +800,8 @@ typedef struct NodeTonemap { /* qdn: lens distortion node */ typedef struct NodeLensDist { - short jit, proj, fit, pad; + short jit, proj, fit; + char _pad[2]; } NodeLensDist; typedef struct NodeColorBalance { @@ -819,7 +826,7 @@ typedef struct NodeColorspill { typedef struct NodeDilateErode { char falloff; - char pad[7]; + char _pad[7]; } NodeDilateErode; typedef struct NodeMask { @@ -847,7 +854,7 @@ typedef struct NodeTexImage { float projection_blend; int interpolation; int extension; - int pad; + char _pad[4]; } NodeTexImage; typedef struct NodeTexChecker { @@ -866,13 +873,13 @@ typedef struct NodeTexEnvironment { int color_space; int projection; int interpolation; - int pad; + char _pad[4]; } NodeTexEnvironment; typedef struct NodeTexGradient { NodeTexBase base; int gradient_type; - int pad; + char _pad[4]; } NodeTexGradient; typedef struct NodeTexNoise { @@ -884,13 +891,13 @@ typedef struct NodeTexVoronoi { int coloring; int distance; int feature; - int pad; + char _pad[4]; } NodeTexVoronoi; typedef struct NodeTexMusgrave { NodeTexBase base; int musgrave_type; - int pad; + char _pad[4]; } NodeTexMusgrave; typedef struct NodeTexWave { @@ -902,7 +909,7 @@ typedef struct NodeTexWave { typedef struct NodeTexMagic { NodeTexBase base; int depth; - int pad; + char _pad[4]; } NodeTexMagic; typedef struct NodeShaderAttribute { @@ -912,12 +919,13 @@ typedef struct NodeShaderAttribute { typedef struct NodeShaderVectTransform { int type; int convert_from, convert_to; - int pad; + char _pad[4]; } NodeShaderVectTransform; typedef struct NodeShaderTexPointDensity { NodeTexBase base; - short point_source, pad; + short point_source; + char _pad[2]; int particle_system; float radius; int resolution; @@ -930,7 +938,7 @@ typedef struct NodeShaderTexPointDensity { /* Used at runtime only by sampling RNA API. */ PointDensity pd; int cached_resolution; - int pad2; + char _pad2[4]; } NodeShaderTexPointDensity; /* TEX_output */ @@ -963,7 +971,7 @@ typedef struct NodeTrackPosData { typedef struct NodeTranslateData { char wrap_axis; char relative; - char pad[6]; + char _pad[6]; } NodeTranslateData; typedef struct NodePlaneTrackDeformData { @@ -971,7 +979,7 @@ typedef struct NodePlaneTrackDeformData { char plane_track_name[64]; char flag; char motion_blur_samples; - char pad[2]; + char _pad[2]; float motion_blur_shutter; } NodePlaneTrackDeformData; @@ -1019,7 +1027,7 @@ typedef struct NodeCryptomatte { float remove[3]; char *matte_id; int num_inputs; - int pad; + char _pad[4]; } NodeCryptomatte; /* script node mode */ diff --git a/source/blender/makesdna/DNA_object_fluidsim_types.h b/source/blender/makesdna/DNA_object_fluidsim_types.h index 6dd27ae68ea..534eaf3c780 100644 --- a/source/blender/makesdna/DNA_object_fluidsim_types.h +++ b/source/blender/makesdna/DNA_object_fluidsim_types.h @@ -43,7 +43,7 @@ typedef struct FluidsimSettings { struct FluidsimModifierData *fmd; /* threadcont the calculation is done with */ int threads; - int pad1; + char _pad1[4]; /* domain, fluid or obstacle */ short type; /* display advanced options in fluid sim tab (on=1, off=0)*/ @@ -71,7 +71,7 @@ typedef struct FluidsimSettings { int bakeStart, bakeEnd; /* offset for baked frames */ int frameOffset; - int pad2; + char _pad2[4]; /* g star param (LBM compressibility) */ float gstar; /* activate refinement? */ diff --git a/source/blender/makesdna/DNA_object_force_types.h b/source/blender/makesdna/DNA_object_force_types.h index de4026fddcd..c7bb3dad809 100644 --- a/source/blender/makesdna/DNA_object_force_types.h +++ b/source/blender/makesdna/DNA_object_force_types.h @@ -157,16 +157,18 @@ typedef struct PartDeflect { /** Runtime only : end of the curve. */ float drawvec2[4]; /** Runtime only. */ - float drawvec_falloff_min[3], pad1; + float drawvec_falloff_min[3]; + char _pad1[4]; /** Runtime only. */ - float drawvec_falloff_max[3], pad2; + float drawvec_falloff_max[3]; + char _pad2[4]; /** Force source object. */ struct Object *f_source; /** Friction of cloth collisions. */ float pdef_cfrict; - float pad; + char _pad[4]; } PartDeflect; typedef struct EffectorWeights { @@ -177,7 +179,7 @@ typedef struct EffectorWeights { float weight[14]; float global_gravity; short flag, rt[3]; - int pad; + char _pad[4]; } EffectorWeights; /* EffectorWeights->flag */ @@ -256,7 +258,7 @@ typedef struct PointCache { int last_exact; /** Used for editing cache - what is the last baked frame. */ int last_valid; - int pad; + char _pad[4]; /* for external cache files */ /** Number of cached points. */ @@ -302,7 +304,7 @@ typedef struct SoftBody { struct BodyPoint *bpoint; /** Not saved in file. */ struct BodySpring *bspring; - char pad; + char _pad; char msg_lock; short msg_value; @@ -389,7 +391,7 @@ typedef struct SoftBody { plastic, springpreload ; - /** Scratch pad/cache on live time not saved in file. */ + /** Scratchpad/cache on live time not saved in file. */ struct SBScratch *scratch; float shearstiff; float inpush; diff --git a/source/blender/makesdna/DNA_particle_types.h b/source/blender/makesdna/DNA_particle_types.h index 8ba6ba71a46..cc0c4cd6f4c 100644 --- a/source/blender/makesdna/DNA_particle_types.h +++ b/source/blender/makesdna/DNA_particle_types.h @@ -39,7 +39,7 @@ typedef struct HairKey { float weight; /** Saved particled edit mode flags. */ short editflag; - short pad; + char _pad[2]; float world_co[3]; } HairKey; @@ -141,7 +141,7 @@ typedef struct ParticleData { /** Density of sph particle. */ float sphdensity; - int pad; + char _pad[4]; int hair_index; short flag; @@ -159,7 +159,7 @@ typedef struct SPHFluidSettings { float buoyancy; int flag, spring_frames; short solver; - short pad[3]; + char _pad[6]; } SPHFluidSettings; /* fluid->flag */ @@ -191,7 +191,8 @@ typedef struct ParticleSettings { short phystype, rotmode, avemode, reactevent; int draw; float draw_size; - short draw_as, pad1, childtype, pad2; + short draw_as, childtype; + char _pad2[4]; short ren_as, subframes, draw_col; /* number of path segments, power of 2 except */ short draw_step, ren_step; @@ -230,7 +231,7 @@ typedef struct ParticleSettings { float randlength; /* children */ int child_flag; - int pad3; + char _pad3[4]; int child_nbr, ren_child_nbr; float parents, childsize, childrandsize; float childrad, childflat; @@ -239,7 +240,8 @@ typedef struct ParticleSettings { /* kink */ float kink_amp, kink_freq, kink_shape, kink_flat; float kink_amp_clump; - int kink_extra_steps, pad4; + int kink_extra_steps; + char _pad4[4]; float kink_axis_random, kink_amp_random; /* rough */ float rough1, rough1_size; @@ -280,20 +282,21 @@ typedef struct ParticleSettings { /* modified dm support */ short use_modifier_stack; - short pad5; + char _pad5[2]; /* hair shape */ short shape_flag; - short pad6; + char _pad6[2]; - float twist, pad8; + float twist; + char _pad8[4]; /* hair thickness shape */ float shape; float rad_root, rad_tip, rad_scale; struct CurveMapping *twistcurve; - void *pad7; + void *_pad7; } ParticleSettings; typedef struct ParticleSystem { @@ -354,9 +357,8 @@ typedef struct ParticleSystem { * TODO(sergey): Use part->id.recalc instead of this duplicated flag * somehow. */ int recalc; - int pad1; short target_psys, totkeyed, bakespace; - short pad2; + char _pad1[6]; /** Billboard uv name, MAX_CUSTOMDATA_LAYER_NAME. */ char bb_uvname[3][64]; @@ -364,7 +366,7 @@ typedef struct ParticleSystem { /* if you change these remember to update array lengths to PSYS_TOT_VG! */ /** Vertex groups, 0==disable, 1==starting index. */ short vgroup[13], vg_neg, rt3; - char pad[6]; + char _pad[6]; /* point cache */ struct PointCache *pointcache; diff --git a/source/blender/makesdna/DNA_rigidbody_types.h b/source/blender/makesdna/DNA_rigidbody_types.h index 8c1f675ead7..9985236aeb1 100644 --- a/source/blender/makesdna/DNA_rigidbody_types.h +++ b/source/blender/makesdna/DNA_rigidbody_types.h @@ -62,7 +62,7 @@ typedef struct RigidBodyWorld { /** Group containing objects to use for Rigid Body Constraint.s*/ struct Collection *constraints; - int pad; + char _pad[4]; /** Last frame world was evaluated for (internal). */ float ltime; @@ -132,7 +132,7 @@ typedef struct RigidBodyOb { int col_groups; /** (eRigidBody_MeshSource) mesh source for mesh based collision shapes. */ short mesh_source; - short pad; + char _pad[2]; /* Physics Parameters */ /** How much object 'weighs' (i.e. absolute 'amount of stuff' it holds). */ @@ -160,7 +160,7 @@ typedef struct RigidBodyOb { float orn[4]; /** Rigid body position. */ float pos[3]; - float pad1; + char _pad1[4]; /** This pointer is shared between all evaluated copies. */ struct RigidBodyOb_Shared *shared; @@ -252,7 +252,7 @@ typedef struct RigidBodyCon { float breaking_threshold; /** Spring implementation to use. */ char spring_type; - char pad[3]; + char _pad[3]; /* limits */ /* translation limits */ diff --git a/source/blender/makesdna/DNA_scene_types.h b/source/blender/makesdna/DNA_scene_types.h index f88f4b7efa6..6c99c74f055 100644 --- a/source/blender/makesdna/DNA_scene_types.h +++ b/source/blender/makesdna/DNA_scene_types.h @@ -92,7 +92,7 @@ typedef struct AviCodecData { unsigned int dwFlags; /** For non-video streams only. */ unsigned int dwInterleaveEvery; - unsigned int pad; + char _pad[4]; char avicodecname[128]; } AviCodecData; @@ -173,7 +173,7 @@ typedef struct FFMpegCodecData { int rc_buffer_size; int mux_packet_size; int mux_rate; - int pad1; + char _pad1[4]; IDProperty *properties; } FFMpegCodecData; @@ -188,9 +188,9 @@ typedef struct AudioData { float doppler_factor; int distance_model; short flag; - short pad; + char _pad[2]; float volume; - float pad2; + char _pad2[4]; } AudioData; /* *************************************************************** */ @@ -327,8 +327,7 @@ typedef struct SceneRenderView { char suffix[64]; int viewflag; - int pad[2]; - char pad2[4]; + char _pad2[4]; } SceneRenderView; @@ -356,7 +355,7 @@ typedef struct Stereo3dFormat { char anaglyph_type; /** Interlace type for the user display. */ char interlace_type; - char pad[3]; + char _pad[3]; } Stereo3dFormat; /* Stereo3dFormat.display_mode */ @@ -437,7 +436,7 @@ typedef struct ImageFormatData { /* TIFF */ char tiff_codec; - char pad[4]; + char _pad[4]; /* Multiview */ char views_format; @@ -548,7 +547,7 @@ typedef struct BakeData { char normal_space; char save_mode; - char pad[3]; + char _pad[3]; struct Object *cage_object; } BakeData; @@ -624,7 +623,7 @@ typedef struct RenderData { /** Size in %. */ short size; - short pad6; + char _pad6[2]; /* from buttons: */ /** @@ -651,7 +650,7 @@ typedef struct RenderData { */ short displaymode; char use_lock_interface; - char pad7; + char _pad7; /** * Flags for render settings. Use bit-masking to access the settings. @@ -674,7 +673,8 @@ typedef struct RenderData { */ short osa; - short frs_sec, pad[7]; + short frs_sec; + char _pad[6]; /* safety, border and display rect */ @@ -686,7 +686,7 @@ typedef struct RenderData { ListBase layers DNA_DEPRECATED; /** Converted to Scene->active_layer. */ short actlay DNA_DEPRECATED; - short pad1; + char _pad1[2]; /** * Adjustment factors for the aspect ratio in the x direction, was a short in 2.45 @@ -718,7 +718,8 @@ typedef struct RenderData { /* stamps flags. */ int stamp; /** Select one of blenders bitmap fonts. */ - short stamp_font_id, pad3; + short stamp_font_id; + char _pad3[2]; /* stamp info user data. */ char stamp_udata[768]; @@ -733,7 +734,7 @@ typedef struct RenderData { char seq_rend_type; /** Flag use for sequence render/draw. */ char seq_flag; - char pad5[5]; + char _pad5[5]; /* render simplify */ short simplify_subsurf; @@ -750,7 +751,7 @@ typedef struct RenderData { /* render engine */ char engine[32]; - int pad2; + char _pad2[4]; /* Cycles baking */ struct BakeData bake; @@ -794,9 +795,10 @@ typedef struct RenderProfile { short particle_perc; short subsurf_max; short shadbufsample_max; - short pad1; + char _pad1[2]; - float ao_error, pad2; + float ao_error; + char _pad2[4]; } RenderProfile; @@ -885,7 +887,7 @@ typedef struct Paint { int symmetry_flags; float tile_offset[3]; - int pad2; + char _pad2[4]; struct Paint_Runtime runtime; } Paint; @@ -920,7 +922,7 @@ typedef struct ImagePaintSettings { float dither; /** Display texture interpolation method. */ int interp; - int pad; + char _pad[4]; } ImagePaintSettings; /* ------------------------------------------- */ @@ -987,7 +989,7 @@ typedef struct Sculpt { /** Constant detail resolution (Blender unit / constant_detail). */ float constant_detail; float detail_percent; - float pad; + char _pad[4]; struct Object *gravity_object; } Sculpt; @@ -1008,7 +1010,7 @@ typedef struct GpPaint { typedef struct VPaint { Paint paint; char flag; - char pad[3]; + char _pad[3]; /** For mirrored painting. */ int radial_symm[3]; } VPaint; @@ -1123,7 +1125,7 @@ typedef struct GP_Sculpt_Settings { */ /** #eGP_Sculpt_Types (weight paint). */ int weighttype; - char pad[4]; + char _pad[4]; /** Multiframe edit falloff effect by frame. */ struct CurveMapping *cur_falloff; /** Curve used for primitve tools. */ @@ -1308,7 +1310,7 @@ typedef struct CurvePaintSettings { char depth_mode; char surface_plane; char fit_method; - char pad; + char _pad; short error_threshold; float radius_min, radius_max; float radius_taper_start, radius_taper_end; @@ -1502,7 +1504,8 @@ typedef struct ToolSettings { char uv_relax_method; /* XXX: these sculpt_paint_* fields are deprecated, use the * unified_paint_settings field instead! */ - short sculpt_paint_settings DNA_DEPRECATED; short pad5; + short sculpt_paint_settings DNA_DEPRECATED; + char _pad5[2]; int sculpt_paint_unified_size DNA_DEPRECATED; float sculpt_paint_unified_unprojected_radius DNA_DEPRECATED; float sculpt_paint_unified_alpha DNA_DEPRECATED; @@ -1539,7 +1542,7 @@ typedef struct UnitSettings { char mass_unit; char time_unit; - char pad[5]; + char _pad[5]; } UnitSettings; /* ------------------------------------------- */ @@ -1591,7 +1594,7 @@ typedef struct SceneEEVEE { float gi_irradiance_smoothing; float gi_glossy_clamp; float gi_filter_quality; - float pad; + char _pad[4]; float gi_cubemap_draw_size; float gi_irradiance_draw_size; @@ -1683,13 +1686,13 @@ typedef struct Scene { unsigned int lay DNA_DEPRECATED; /** Active layer (deprecated) */ int layact DNA_DEPRECATED; - unsigned int pad1; + char _pad2[4]; /** Various settings. */ short flag; char use_nodes; - char pad[1]; + char _pad3[1]; struct bNodeTree *nodetree; @@ -1698,7 +1701,7 @@ typedef struct Scene { /** Default allocated now. */ struct ToolSettings *toolsettings; - void *pad2; + void *_pad4; struct DisplaySafeAreas safe_areas; /* migrate or replace? depends on some internal things... */ @@ -1722,7 +1725,7 @@ typedef struct Scene { /* none of the dependency graph vars is mean to be saved */ struct GHash *depsgraph_hash; - int pad7; + char _pad7[4]; /* User-Defined KeyingSets */ /** @@ -1746,7 +1749,7 @@ typedef struct Scene { /* Physics simulation settings */ struct PhysicsSettings physics_settings; - void *pad8; + void *_pad8; /* XXX. runtime flag for drawing, actually belongs in the window, * only used by BKE_object_handle_update() */ uint64_t customdata_mask; diff --git a/source/blender/makesdna/DNA_screen_types.h b/source/blender/makesdna/DNA_screen_types.h index e0dca9cd646..c85042cbf2d 100644 --- a/source/blender/makesdna/DNA_screen_types.h +++ b/source/blender/makesdna/DNA_screen_types.h @@ -87,7 +87,7 @@ typedef struct bScreen { char skip_handling; /** Set when scrubbing to avoid some costly updates. */ char scrubbing; - char pad[1]; + char _pad[1]; /** Active region that has mouse focus. */ struct ARegion *active_region; @@ -116,7 +116,7 @@ typedef struct ScrEdge { /** 1 when at edge of screen. */ short border; short flag; - int pad; + char _pad[4]; } ScrEdge; typedef struct ScrAreaMap { @@ -149,7 +149,8 @@ typedef struct Panel { int sizex, sizey; /** Panel size excluding children. */ int blocksizex, blocksizey; - short labelofs, pad; + short labelofs; + char _pad[2]; short flag, runtime_flag; short control; short snap; @@ -260,7 +261,7 @@ typedef struct TransformOrientation { /** MAX_NAME. */ char name[64]; float mat[3][3]; - int pad; + char _pad[4]; } TransformOrientation; /** Some preview UI data need to be saved in file. */ @@ -270,7 +271,7 @@ typedef struct uiPreview { /** Defined as UI_MAX_NAME_STR. */ char preview_id[64]; short height; - short pad1[3]; + char _pad1[6]; } uiPreview; /* These two lines with # tell makesdna this struct can be excluded. @@ -292,7 +293,7 @@ typedef struct ScrGlobalAreaData { /** GlobalAreaFlag. */ short flag; - short pad; + char _pad[2]; } ScrGlobalAreaData; enum GlobalAreaFlag { @@ -346,7 +347,7 @@ typedef struct ScrArea { * runtime variable, updated by executing operators. */ short region_active_win; - char temp, pad; + char temp, _pad; /** Callbacks for this space type. */ struct SpaceType *type; @@ -414,7 +415,7 @@ typedef struct ARegion { short overlap; /** Temporary copy of flag settings for clean fullscreen. */ short flagfullscreen; - short pad1, pad2; + char _pad[4]; /** Callbacks for this region type. */ struct ARegionType *type; diff --git a/source/blender/makesdna/DNA_sequence_types.h b/source/blender/makesdna/DNA_sequence_types.h index 3de9a4f7046..629bfffb696 100644 --- a/source/blender/makesdna/DNA_sequence_types.h +++ b/source/blender/makesdna/DNA_sequence_types.h @@ -71,7 +71,7 @@ typedef struct StripColorBalance { float gamma[3]; float gain[3]; int flag; - int pad; + char _pad[4]; // float exposure; // float saturation; } StripColorBalance; @@ -92,7 +92,7 @@ typedef struct StripProxy { // to build short build_flags; char storage; - char pad[5]; + char _pad[5]; } StripProxy; typedef struct Strip { @@ -220,7 +220,7 @@ typedef struct Sequence { int sfra; char alpha_mode; - char pad[2]; + char _pad[2]; /* Multiview */ char views_format; @@ -294,7 +294,7 @@ typedef struct TransformVars { typedef struct SolidColorVars { float col[3]; - float pad; + char _pad[4]; } SolidColorVars; typedef struct SpeedControlVars { @@ -320,7 +320,7 @@ typedef struct TextVars { float wrap_width; char flag; char align, align_y; - char pad[1]; + char _pad[1]; } TextVars; /* TextVars.flag */ @@ -401,7 +401,7 @@ typedef struct WhiteBalanceModifierData { SequenceModifierData modifier; float white_value[3]; - float pad; + char _pad[4]; } WhiteBalanceModifierData; typedef struct SequencerTonemapModifierData { diff --git a/source/blender/makesdna/DNA_shader_fx_types.h b/source/blender/makesdna/DNA_shader_fx_types.h index 342c2be9d17..54922d78fae 100644 --- a/source/blender/makesdna/DNA_shader_fx_types.h +++ b/source/blender/makesdna/DNA_shader_fx_types.h @@ -63,7 +63,7 @@ typedef struct ShaderFxData { int type, mode; int stackindex; short flag; - short pad; + char _pad[2]; /** MAX_NAME. */ char name[64]; @@ -90,7 +90,7 @@ typedef struct BlurShaderFxData { float coc; /** Not visible in rna. */ int blur[2]; - char pad[4]; + char _pad[4]; ShaderFxData_Runtime runtime; } BlurShaderFxData; @@ -107,7 +107,7 @@ typedef struct ColorizeShaderFxData { float factor; /** Flags. */ int flag; - char pad[4]; + char _pad[4]; ShaderFxData_Runtime runtime; } ColorizeShaderFxData; @@ -165,7 +165,7 @@ typedef struct LightShaderFxData { float ambient; /** Internal, not visible in rna. */ float loc[4]; - char pad[4]; + char _pad[4]; ShaderFxData_Runtime runtime; } LightShaderFxData; @@ -193,7 +193,7 @@ typedef struct RimShaderFxData { int mode; int blur[2]; int samples; - char pad[4]; + char _pad[4]; ShaderFxData_Runtime runtime; } RimShaderFxData; @@ -221,7 +221,7 @@ typedef struct ShadowShaderFxData { float rotation; int blur[2]; int samples; - char pad[4]; + char _pad[4]; ShaderFxData_Runtime runtime; } ShadowShaderFxData; @@ -254,7 +254,7 @@ typedef struct WaveShaderFxData { int orientation; /** Flags. */ int flag; - char pad[4]; + char _pad[4]; ShaderFxData_Runtime runtime; } WaveShaderFxData; #endif /* __DNA_SHADER_FX_TYPES_H__ */ diff --git a/source/blender/makesdna/DNA_smoke_types.h b/source/blender/makesdna/DNA_smoke_types.h index c8bed5ca936..9f8d3449d39 100644 --- a/source/blender/makesdna/DNA_smoke_types.h +++ b/source/blender/makesdna/DNA_smoke_types.h @@ -217,7 +217,7 @@ typedef struct SmokeDomainSettings { int openvdb_comp; char cache_file_format; char data_depth; - char pad[2]; + char _pad[2]; /* Smoke uses only one cache from now on (index [0]), * but keeping the array for now for reading old files. */ @@ -255,7 +255,7 @@ typedef struct SmokeDomainSettings { char interp_method; float clipping; - float pad3; + char _pad3[4]; } SmokeDomainSettings; @@ -316,7 +316,7 @@ typedef struct SmokeFlowSettings { /* texture control */ float texture_size; float texture_offset; - int pad; + char _pad[4]; /** MAX_CUSTOMDATA_LAYER_NAME. */ char uvlayer_name[64]; short vgroup_density; @@ -342,7 +342,7 @@ typedef struct SmokeCollSettings { float *verts_old; int numverts; short type; // static = 0, rigid = 1, dynamic = 2 - short pad; + char _pad[2]; } SmokeCollSettings; #endif diff --git a/source/blender/makesdna/DNA_sound_types.h b/source/blender/makesdna/DNA_sound_types.h index a8bf4331623..d17852312d0 100644 --- a/source/blender/makesdna/DNA_sound_types.h +++ b/source/blender/makesdna/DNA_sound_types.h @@ -66,7 +66,7 @@ typedef struct bSound { short flags; /** Runtime only, always reset in readfile. */ short tags; - int pad; + char _pad[4]; /* unused currently int type; diff --git a/source/blender/makesdna/DNA_space_types.h b/source/blender/makesdna/DNA_space_types.h index efa1c0e5010..405b2b92d8c 100644 --- a/source/blender/makesdna/DNA_space_types.h +++ b/source/blender/makesdna/DNA_space_types.h @@ -97,7 +97,7 @@ typedef struct SpaceInfo { /* End 'SpaceLink' header. */ char rpt_mask; - char pad[7]; + char _pad[7]; } SpaceInfo; /* SpaceInfo.rpt_mask */ @@ -248,7 +248,7 @@ typedef struct SpaceOutliner { short flag, outlinevis, storeflag, search_flags; int filter; char filter_state; - char pad; + char _pad; short filter_id_type; /** @@ -401,7 +401,7 @@ typedef struct SpaceGraph { float cursorVal; /** Pivot point for transforms. */ int around; - int pad; + char _pad[4]; SpaceGraph_Runtime runtime; } SpaceGraph; @@ -478,7 +478,7 @@ typedef struct SpaceNla { /** This uses the same settings as autosnap for Action Editor. */ short autosnap; short flag; - int pad; + char _pad[4]; struct bDopeSheet *ads; /** Deprecated, copied to region. */ @@ -539,7 +539,7 @@ typedef struct SpaceSeq { int overlay_type; /** Overlay an image of the editing on below the strips. */ int draw_flag; - int pad; + char _pad[4]; /** Grease-pencil data. */ struct bGPdata *gpd; @@ -549,10 +549,10 @@ typedef struct SpaceSeq { /** Multiview current eye - for internal use. */ char multiview_eye; - char pad2[7]; + char _pad2[7]; struct GPUFX *compositor; - void *pad3; + void *_pad3; } SpaceSeq; @@ -613,7 +613,7 @@ typedef struct MaskSpaceInfo { char draw_flag; char draw_type; char overlay_mode; - char pad3[5]; + char _pad3[5]; } MaskSpaceInfo; /* SpaceSeq.mainb */ @@ -638,7 +638,7 @@ typedef struct FileSelectParams { * needs to be linked in, where foo.blend/Armature need adding */ char dir[1090]; - char pad_c1[2]; + char _pad0[2]; char file[256]; char renamefile[256]; /** Annoying but the first is only used for initialization. */ @@ -659,7 +659,7 @@ typedef struct FileSelectParams { int sel_first; int sel_last; unsigned short thumbnail_size; - short pad; + char _pad1[2]; /* short */ /** XXXXX for now store type here, should be moved to the operator. */ @@ -836,7 +836,8 @@ typedef struct AssetUUID { typedef struct AssetUUIDList { AssetUUID *uuids; - int nbr_uuids, pad; + int nbr_uuids; + char _pad[4]; } AssetUUIDList; /* Container for a revision, only relevant in asset context. */ @@ -844,7 +845,7 @@ typedef struct FileDirEntryRevision { struct FileDirEntryRevision *next, *prev; char *comment; - void *pad; + void *_pad; int uuid[4]; @@ -975,7 +976,7 @@ typedef struct SpaceImage { char mode_prev; char pin; - char _pad; + char _pad1; /** * The currently active tile of the image when tile is enabled, * is kept in sync with the active faces tile. @@ -992,7 +993,7 @@ typedef struct SpaceImage { int flag; char pixel_snap_mode; - char pad[3]; + char _pad2[3]; MaskSpaceInfo mask_info; } SpaceImage; @@ -1140,7 +1141,7 @@ typedef struct SpaceText { short margin_column; /** Actual lineheight, dpi controlled. */ short lheight_dpi; - char pad[4]; + char _pad[4]; /** Cache for faster drawing. */ void *drawcache; @@ -1209,7 +1210,7 @@ typedef struct SpaceScript { struct Script *script; short flags, menunr; - int pad1; + char _pad1[4]; void *but_refs; } SpaceScript; @@ -1226,7 +1227,7 @@ typedef struct bNodeTreePath { struct bNodeTree *nodetree; /** Base key for nodes in this tree instance. */ bNodeInstanceKey parent_key; - int pad; + char _pad[4]; /** V2d center point, so node trees can have different offsets in editors. */ float view_center[2]; @@ -1249,9 +1250,11 @@ typedef struct SpaceNode { /** Context, no need to save in file? well... pinning... */ struct ID *id, *from; /** Menunr: browse id block in header. */ - short flag, pad1; + short flag; + char _pad1[2]; /** Internal state variables. */ - float aspect, pad2; + float aspect; + char _pad2[4]; /** Offset for drawing the backdrop. */ float xof, yof; @@ -1273,7 +1276,7 @@ typedef struct SpaceNode { char tree_idname[64]; /** Treetype: as same nodetree->type. */ int treetype DNA_DEPRECATED; - int pad3; + char _pad3[4]; /** Texfrom object, world or brush. */ short texfrom; @@ -1284,7 +1287,7 @@ typedef struct SpaceNode { /** Direction for offsetting nodes on insertion. */ char insert_ofs_dir; - char pad4; + char _pad4; /** Temporary data for modal linking operator. */ ListBase linkdrag; @@ -1377,7 +1380,8 @@ typedef struct SpaceConsole { /* End 'SpaceLink' header. */ /* space vars */ - int lheight, pad; + int lheight; + char _pad[4]; /** ConsoleLine; output. */ ListBase scrollback; @@ -1457,7 +1461,7 @@ typedef struct SpaceClip { /* current stabilization data */ /** Pre-composed stabilization data. */ float loc[2], scale, angle; - int pad; + char _pad[4]; /** * Current stabilization matrix and the same matrix in unified space, * defined when drawing and used for mouse position calculation. @@ -1468,10 +1472,12 @@ typedef struct SpaceClip { int postproc_flag; /* grease pencil */ - short gpencil_src, pad2; + short gpencil_src; + char _pad2[2]; /** Pivot point for transforms. */ - int around, pad4; + int around; + char _pad4[4]; /** Mask editor 2d cursor. */ float cursor[2]; diff --git a/source/blender/makesdna/DNA_texture_types.h b/source/blender/makesdna/DNA_texture_types.h index b34d79a9600..3db9f2d7131 100644 --- a/source/blender/makesdna/DNA_texture_types.h +++ b/source/blender/makesdna/DNA_texture_types.h @@ -52,7 +52,7 @@ typedef struct MTex { char projx, projy, projz, mapping; char brush_map_mode, brush_angle_mode; - char pad[2]; + char _pad[2]; float ofs[3], size[3], rot, random_angle; char _pad0[2]; @@ -106,7 +106,7 @@ typedef struct ColorBand { short tot, cur; char ipotype, ipotype_hue; char color_mode; - char pad[1]; + char _pad[1]; CBData data[32]; } ColorBand; @@ -118,7 +118,7 @@ typedef struct PointDensity { float falloff_softness; float radius; short source; - short pad0; + char _pad0[2]; /** psys_color_source */ short color_source; @@ -146,10 +146,11 @@ typedef struct PointDensity { short noise_depth; short noise_influence; short noise_basis; - short pad1[3]; + char _pad1[6]; float noise_fac; - float speed_scale, falloff_speed_scale, pad2; + float speed_scale, falloff_speed_scale; + char _pad2[4]; /** For time -> color */ struct ColorBand *coba; @@ -164,7 +165,8 @@ typedef struct Tex { float noisesize, turbul; float bright, contrast, saturation, rfac, gfac, bfac; - float filtersize, pad2; + float filtersize; + char _pad2[4]; /* newnoise: musgrave parameters */ float mg_H, mg_lacunarity, mg_octaves, mg_offset, mg_gain; @@ -202,7 +204,7 @@ typedef struct Tex { int frames, offset, sfra; float checkerdist, nabla; - float pad1; + char _pad1[4]; struct ImageUser iuser; @@ -214,7 +216,7 @@ typedef struct Tex { struct PreviewImage *preview; char use_nodes; - char pad[7]; + char _pad[7]; } Tex; @@ -240,7 +242,8 @@ typedef struct ColorMapping { float blend_color[3]; float blend_factor; - int blend_type, pad[3]; + int blend_type; + char _pad[4]; } ColorMapping; /* texmap->flag */ diff --git a/source/blender/makesdna/DNA_tracking_types.h b/source/blender/makesdna/DNA_tracking_types.h index 3c4bd8420b3..6afabe20800 100644 --- a/source/blender/makesdna/DNA_tracking_types.h +++ b/source/blender/makesdna/DNA_tracking_types.h @@ -50,7 +50,7 @@ typedef struct MovieTrackingCamera { void *intrinsics; short distortion_model; - short pad; + char _pad[2]; /** Width of CCD sensor. */ float sensor_width; @@ -60,7 +60,7 @@ typedef struct MovieTrackingCamera { float focal; /** Units of focal length user is working with. */ short units; - short pad1; + char _pad1[2]; /** Principal point. */ float principal[2]; @@ -216,7 +216,8 @@ typedef struct MovieTrackingPlaneTrack { */ MovieTrackingTrack **point_tracks; /** Number of tracks in point_tracks array. */ - int point_tracksnr, pad; + int point_tracksnr; + char _pad[4]; /** Markers in the plane track. */ MovieTrackingPlaneMarker *markers; @@ -279,7 +280,8 @@ typedef struct MovieTrackingSettings { int reconstruction_flag; /* which camera intrinsics to refine. uses on the REFINE_* flags */ - short refine_camera_intrinsics, pad2; + short refine_camera_intrinsics; + char _pad2[2]; /* ** tool settings ** */ @@ -295,7 +297,7 @@ typedef struct MovieTrackingSettings { /** Distance between two bundles used for object scaling. */ float object_distance; - int pad3; + char _pad3[4]; } MovieTrackingSettings; typedef struct MovieTrackingStabilization { @@ -376,7 +378,7 @@ typedef struct MovieTrackingDopesheetChannel { /** Motion track for which channel is created. */ MovieTrackingTrack *track; - int pad; + char _pad[4]; /** Name of channel. */ char name[64]; @@ -396,7 +398,7 @@ typedef struct MovieTrackingDopesheetCoverageSegment { int start_frame; int end_frame; - int pad; + char _pad[4]; } MovieTrackingDopesheetCoverageSegment; typedef struct MovieTrackingDopesheet { @@ -417,7 +419,7 @@ typedef struct MovieTrackingDopesheet { ListBase channels; int tot_channel; - int pad; + char _pad[4]; } MovieTrackingDopesheet; typedef struct MovieTracking { diff --git a/source/blender/makesdna/DNA_view2d_types.h b/source/blender/makesdna/DNA_view2d_types.h index 702a6b670c1..d761cb7ff91 100644 --- a/source/blender/makesdna/DNA_view2d_types.h +++ b/source/blender/makesdna/DNA_view2d_types.h @@ -78,7 +78,7 @@ typedef struct View2D { /* Usually set externally (as in, not in view2d files). */ /** Alpha of vertical and horizontal scrollbars (range is [0, 255]). */ char alpha_vert, alpha_hor; - short pad[3]; + char _pad[6]; /* animated smooth view */ struct SmoothView2DStore *sms; diff --git a/source/blender/makesdna/DNA_view3d_types.h b/source/blender/makesdna/DNA_view3d_types.h index 78bebd0b654..2491e2cb0e0 100644 --- a/source/blender/makesdna/DNA_view3d_types.h +++ b/source/blender/makesdna/DNA_view3d_types.h @@ -115,7 +115,7 @@ typedef struct RegionView3D { char viewlock; /** Options for quadview (store while out of quad view). */ char viewlock_quad; - char pad[3]; + char _pad[3]; /** Normalized offset for locked view: (-1, -1) bottom left, (1, 1) upper right. */ float ofs_lock[2]; @@ -160,7 +160,7 @@ typedef struct View3DShading { char background_type; char cavity_type; char wire_color_type; - char pad[6]; + char _pad[6]; /** FILE_MAXFILE. */ char studio_light[256]; @@ -306,14 +306,14 @@ typedef struct View3D { /* Stereoscopy settings */ short stereo3d_flag; char stereo3d_camera; - char pad4; + char _pad4; float stereo3d_convergence_factor; float stereo3d_volume_alpha; float stereo3d_convergence_alpha; /* Display settings */ short drawtype DNA_DEPRECATED; - short pad5[3]; + char _pad5[6]; View3DShading shading; View3DOverlay overlay; diff --git a/source/blender/makesdna/DNA_windowmanager_types.h b/source/blender/makesdna/DNA_windowmanager_types.h index 42636ab43b9..753c9378797 100644 --- a/source/blender/makesdna/DNA_windowmanager_types.h +++ b/source/blender/makesdna/DNA_windowmanager_types.h @@ -105,7 +105,8 @@ typedef struct ReportList { int printlevel; /** ReportType. */ int storelevel; - int flag, pad; + int flag; + char _pad[4]; struct wmTimer *reporttimer; } ReportList; @@ -240,7 +241,6 @@ typedef struct wmWindow { /** Internal: tag this for extra mousemove event, * makes cursors/buttons active on UI switching. */ short addmousemove; - short pad[4]; /** Winid also in screens, is for retrieving this window after read. */ int winid; @@ -337,7 +337,7 @@ typedef struct wmKeyMapItem { short maptype; /** Unique identifier. Positive for kmi that override builtins, negative otherwise. */ short id; - short pad; + char _pad[2]; /** Rna pointer to access properties. */ struct PointerRNA *ptr; } wmKeyMapItem; @@ -474,7 +474,8 @@ typedef struct wmOperator { struct wmOperator *opm; /** Runtime for drawing. */ struct uiLayout *layout; - short flag, pad[3]; + short flag; + char _pad[6]; } wmOperator; /* operator type return flags: exec(), invoke() modal(), return values */ diff --git a/source/blender/makesdna/DNA_world_types.h b/source/blender/makesdna/DNA_world_types.h index daf51551b94..161109cdf2d 100644 --- a/source/blender/makesdna/DNA_world_types.h +++ b/source/blender/makesdna/DNA_world_types.h @@ -65,7 +65,7 @@ typedef struct World { * bit 0: Do mist */ short mode; - short pad2[3]; + char _pad2[6]; float misi, miststa, mistdist, misthi; @@ -73,11 +73,13 @@ typedef struct World { float aodist, aoenergy; /** Assorted settings. */ - short flag, pad3[3]; + short flag; + char _pad3[6]; /** Old animation system, deprecated for 2.5. */ struct Ipo *ipo DNA_DEPRECATED; - short pr_texture, use_nodes, pad[2]; + short pr_texture, use_nodes; + char _pad[4]; /* previews */ struct PreviewImage *preview; @@ -86,7 +88,8 @@ typedef struct World { struct bNodeTree *nodetree; /** Runtime : miststa + mistdist, used for drawing camera. */ - float mistend, pad1; + float mistend; + char _pad1[4]; /** Runtime. */ ListBase gpumaterial; } World; -- cgit v1.2.3