Cleanup: inline array sizes in code-comments

Use a similar convention for struct member identifiers,
(the identifiers without surrounding spaces). This allows the values
to be scanned and validated.
This commit is contained in:
Campbell Barton
2025-05-22 23:52:41 +10:00
parent ee619713f9
commit 99a4c93081
55 changed files with 361 additions and 477 deletions

View File

@@ -44,8 +44,7 @@ struct EditBone {
* normal bones when leaving edit-mode.
*/
EditBone *parent;
/** (64 == MAXBONENAME) */
char name[64];
char name[/*MAXBONENAME*/ 64];
/**
* Roll along axis. We'll ultimately use the axis/angle method
* for determining the transformation matrix of the bone. The axis
@@ -102,8 +101,8 @@ struct EditBone {
float disp_mat[4][4];
/** in Armature space, rest pos matrix */
float disp_tail_mat[4][4];
/** in Armature space, rest pos matrix (32 == MAX_BBONE_SUBDIV) */
float disp_bbone_mat[32][4][4];
/** in Armature space, rest pos matrix. */
float disp_bbone_mat[/*MAX_BBONE_SUBDIV*/ 32][4][4];
/** connected child temporary during drawing */
EditBone *bbone_child;

View File

@@ -25,7 +25,7 @@ struct ImageSaveOptions {
/* Format and absolute file path. */
ImageFormatData im_format;
char filepath[1024]; /* 1024 = FILE_MAX */
char filepath[/*FILE_MAX*/ 1024];
/* Options. */
bool relative;

View File

@@ -152,7 +152,7 @@ struct Main {
* to read data temporarily (preferences & startup) for e.g.
* where the `filepath` is not persistent or used as a basis for other paths.
*/
char filepath[1024]; /* 1024 = FILE_MAX */
char filepath[/*FILE_MAX*/ 1024];
short versionfile, subversionfile; /* see BLENDER_FILE_VERSION, BLENDER_FILE_SUBVERSION */
short minversionfile, minsubversionfile;
/**

View File

@@ -1416,8 +1416,7 @@ typedef struct bNodeSocketValueRGBA_404 {
typedef struct bNodeSocketValueString_404 {
int subtype;
char _pad[4];
/** 1024 = FILEMAX. */
char value[1024];
char value[/*FILE_MAX*/ 1024];
} bNodeSocketValueString_404;
typedef struct bNodeSocketValueObject_404 {

View File

@@ -67,7 +67,7 @@ struct BlendFileData : blender::NonCopyable, blender::NonMovable {
* generated the auto-saved one being recovered.
*
* NOTE: Currently expected to be the same path as #BlendFileData.filepath. */
char filepath[1024] = {}; /* 1024 = FILE_MAX */
char filepath[/*FILE_MAX*/ 1024] = {};
/** TODO: think this isn't needed anymore? */
bScreen *curscreen = nullptr;

View File

@@ -602,7 +602,7 @@ static void ui_item_array(uiLayout *layout,
}
}
else if (subtype == PROP_MATRIX) {
int totdim, dim_size[3]; /* 3 == RNA_MAX_ARRAY_DIMENSION */
int totdim, dim_size[/*RNA_MAX_ARRAY_DIMENSION*/ 3];
int row, col;
UI_block_layout_set_current(block, &layout->absolute(true));

View File

@@ -547,7 +547,7 @@ static void prefetch_data_fn(void *custom_data, wmJobWorkerStatus * /*worker_sta
#endif
}
char colorspace[64] = "\0"; /* 64 == MAX_COLORSPACE_NAME length. */
char colorspace[/*MAX_COLORSPACE_NAME*/ 64] = "\0";
MovieReader *anim = openanim(job_data->path, IB_byte_data, 0, colorspace);
if (anim != nullptr) {

View File

@@ -148,8 +148,7 @@ typedef struct IDProperty {
char subtype;
/** #IDP_FLAG_GHOST and others. */
short flag;
/** Size matches #MAX_IDPROP_NAME. */
char name[64];
char name[/*MAX_IDPROP_NAME*/ 64];
char _pad0[4];
@@ -410,8 +409,7 @@ typedef struct ID {
/** If the ID is an asset, this pointer is set. Owning pointer. */
struct AssetMetaData *asset_data;
/** MAX_ID_NAME. */
char name[66];
char name[/*MAX_ID_NAME*/ 66];
/**
* ID_FLAG_... flags report on status of the data-block this ID belongs to
* (persistent, saved to and read from .blend).
@@ -492,7 +490,7 @@ typedef struct Library {
ID id;
/** Path name used for reading, can be relative and edited in the outliner. */
char filepath[1024];
char filepath[/*FILE_MAX*/ 1024];
struct PackedFile *packedfile;
@@ -516,10 +514,10 @@ typedef struct Library {
*/
typedef struct LibraryWeakReference {
/** Expected to match a `Library.filepath`. */
char library_filepath[1024];
char library_filepath[/*FILE_MAX*/ 1024];
/** MAX_ID_NAME. May be different from the current local ID name. */
char library_id_name[66];
/** May be different from the current local ID name. */
char library_id_name[/*MAX_ID_NAME*/ 66];
char _pad[2];
} LibraryWeakReference;

View File

@@ -289,8 +289,7 @@ typedef struct bPoseChannel {
/** Constraints that act on this PoseChannel. */
ListBase constraints;
/** Need to match bone name length: MAXBONENAME. */
char name[64];
char name[/*MAXBONENAME*/ 64];
/** Dynamic, for detecting transform changes. */
short flag;
@@ -1117,8 +1116,8 @@ typedef struct bActionChannel {
/** Settings accessed via bitmapping. */
int flag;
/** Channel name, MAX_NAME. */
char name[64];
/** Channel name. */
char name[/*MAX_NAME*/ 64];
/** Temporary setting - may be used to indicate group that channel belongs to during syncing. */
int temp;
} bActionChannel;
@@ -1131,7 +1130,7 @@ typedef struct bActionChannel {
*/
typedef struct ActionLayer {
/** User-Visible identifier, unique within the Animation. */
char name[64]; /* MAX_NAME. */
char name[/*MAX_NAME*/ 64];
float influence; /* [0-1] */
@@ -1175,7 +1174,7 @@ typedef struct ActionSlot {
*
* \see #AnimData::slot_name
*/
char identifier[66]; /* MAX_ID_NAME */
char identifier[/*MAX_ID_NAME*/ 66];
/**
* Type of ID-block that this slot is intended for.

View File

@@ -42,7 +42,7 @@ typedef struct FModifier {
void *data;
/** User-defined description for the modifier. */
char name[/* MAX_NAME */ 64];
char name[/*MAX_NAME*/ 64];
/** Type of f-curve modifier. */
short type;
/** Settings for the modifier. */
@@ -207,7 +207,7 @@ typedef struct DriverTarget {
* Name of the pose-bone to use
* (for vars where DTAR_FLAG_STRUCT_REF is used).
*/
char pchan_name[/* MAX_NAME */ 64];
char pchan_name[/*MAX_NAME*/ 64];
/** Transform channel index (for #DVAR_TYPE_TRANSFORM_CHAN). */
short transChan;
@@ -251,7 +251,7 @@ typedef struct DriverVar {
* Name of the variable to use in py-expression
* (must be valid python identifier).
*/
char name[/* MAX_NAME */ 64];
char name[/*MAX_NAME*/ 64];
/** MAX_DRIVER_TARGETS, target slots. */
DriverTarget targets[8];
@@ -450,7 +450,7 @@ typedef struct NlaStrip {
ListBase modifiers;
/** User-Visible Identifier for Strip. */
char name[/* MAX_NAME */ 64];
char name[/*MAX_NAME*/ 64];
/** Influence of strip. */
float influence;
@@ -521,7 +521,7 @@ typedef struct NlaTrack {
int index;
/** Short user-description of this track. */
char name[/* MAX_NAME */ 64];
char name[/*MAX_NAME*/ 64];
} NlaTrack;
/* ************************************ */
@@ -542,7 +542,7 @@ typedef struct KS_Path {
/** ID block that keyframes are for. */
ID *id;
/** Name of the group to add to. */
char group[/* MAX_NAME */ 64];
char group[/*MAX_NAME*/ 64];
/** ID-type that path can be used on. */
int idtype;
@@ -583,13 +583,13 @@ typedef struct KeyingSet {
ListBase paths;
/** Unique name (for search, etc.). */
char idname[/* MAX_NAME */ 64];
char idname[/*MAX_NAME*/ 64];
/** User-viewable name for KeyingSet (for menus, etc.). */
char name[/* MAX_NAME */ 64];
char name[/*MAX_NAME*/ 64];
/** (#RNA_DYN_DESCR_MAX) help text. */
char description[1024];
/** Name of the typeinfo data used for the relative paths. */
char typeinfo[/* MAX_NAME */ 64];
char typeinfo[/*MAX_NAME*/ 64];
/** Index of the active path. */
int active_path;

View File

@@ -65,8 +65,8 @@ typedef struct Bone {
struct Bone *parent;
/** Children. */
ListBase childbase;
/** Name of the bone - must be unique within the armature, MAXBONENAME. */
char name[64];
/** Name of the bone - must be unique within the armature. */
char name[/*MAXBONENAME*/ 64];
/** Roll is input for edit-mode, length calculated. */
float roll;
@@ -214,7 +214,7 @@ typedef struct bArmature {
* This is stored as a string to make it possible for the library overrides system to understand
* when it actually changed (compared to a BoneCollection*, which would change on every load).
*/
char active_collection_name[64]; /* MAX_NAME. */
char active_collection_name[/*MAX_NAME*/ 64];
/** For UI, to show which layers are there. */
unsigned int layer_used DNA_DEPRECATED;
@@ -256,8 +256,7 @@ typedef struct bArmature {
typedef struct BoneCollection {
struct BoneCollection *next, *prev;
/** MAX_NAME. */
char name[64];
char name[/*MAX_NAME*/ 64];
/** BoneCollectionMember. */
ListBase bones;

View File

@@ -31,7 +31,7 @@ class AssetLibrary;
*/
typedef struct AssetTag {
struct AssetTag *next, *prev;
char name[64]; /* MAX_NAME */
char name[/*MAX_NAME*/ 64];
} AssetTag;
/**
@@ -60,7 +60,7 @@ typedef struct AssetMetaData {
* reconstruction of asset catalogs in the unfortunate case that the mapping from catalog UUID to
* catalog path is lost. The catalog's simple name is copied to #catalog_simple_name whenever
* #catalog_id is updated. */
char catalog_simple_name[64]; /* MAX_NAME */
char catalog_simple_name[/*MAX_NAME*/ 64];
/** Optional name of the author for display in the UI. Dynamic length. */
char *author;

View File

@@ -183,8 +183,7 @@ typedef struct Brush {
struct ColorBand *gradient;
struct PaintCurve *paint_curve;
/** 1024 = FILE_MAX. */
char icon_filepath[1024];
char icon_filepath[/*FILE_MAX*/ 1024];
float normal_weight;
/** Rake actual data (not texture), used for sculpt. */

View File

@@ -46,8 +46,7 @@ enum { CACHEFILE_LAYER_HIDDEN = (1 << 0) };
typedef struct CacheFileLayer {
struct CacheFileLayer *next, *prev;
/** 1024 = FILE_MAX. */
char filepath[1024];
char filepath[/*FILE_MAX*/ 1024];
int flag;
int _pad;
} CacheFileLayer;
@@ -73,8 +72,7 @@ typedef struct CacheFile {
ListBase layers;
/** 1024 = FILE_MAX. */
char filepath[1024];
char filepath[/*FILE_MAX*/ 1024];
char is_sequence;
char forward_axis;
@@ -121,6 +119,6 @@ typedef struct CacheFile {
/* Runtime */
struct CacheArchiveHandle *handle;
char handle_filepath[1024];
char handle_filepath[/*FILE_MAX*/ 1024];
struct GSet *handle_readers;
} CacheFile;

View File

@@ -118,8 +118,7 @@ typedef struct Camera {
/* Custom Camera properties. */
struct Text *custom_shader;
/** 1024 = FILE_MAX. */
char custom_filepath[1024];
char custom_filepath[/*FILE_MAX*/ 1024];
char custom_bytecode_hash[64];
char *custom_bytecode;

View File

@@ -214,8 +214,7 @@ typedef struct ColorManagedDisplaySettings {
} ColorManagedDisplaySettings;
typedef struct ColorManagedColorspaceSettings {
/** MAX_COLORSPACE_NAME. */
char name[64];
char name[/*MAX_COLORSPACE_NAME*/ 64];
} ColorManagedColorspaceSettings;
/** #ColorManagedViewSettings.flag */

View File

@@ -47,10 +47,10 @@ typedef struct bConstraint {
/** Object to use as target for Custom Space of owner. */
struct Object *space_object;
/** Sub-target for Custom Space of owner - pose-channel or vertex-group name. */
char space_subtarget[/* MAX_NAME */ 64];
char space_subtarget[/*MAX_NAME*/ 64];
/** Constraint name. */
char name[/* MAX_NAME */ 64];
char name[/*MAX_NAME*/ 64];
/** Amount of influence exerted by constraint (0.0-1.0). */
float enforce;
@@ -81,7 +81,7 @@ typedef struct bConstraintTarget {
/** Object to use as target. */
struct Object *tar;
/** Sub-target - pose-channel or vertex-group name. */
char subtarget[/* MAX_NAME */ 64];
char subtarget[/*MAX_NAME*/ 64];
/** Matrix used during constraint solving - should be cleared before each use. */
float matrix[4][4];
@@ -137,11 +137,11 @@ typedef struct bKinematicConstraint {
/** CopyPose: for auto-ik, maximum length of chain. */
short max_rootbone;
/** All: String to specify sub-object target. */
char subtarget[/* MAX_NAME */ 64];
char subtarget[/*MAX_NAME*/ 64];
/** All: Pole vector target. */
struct Object *poletar;
/** All: Pole vector sub-object target. */
char polesubtarget[/* MAX_NAME */ 64];
char polesubtarget[/*MAX_NAME*/ 64];
/** All: Pole vector rest angle. */
float poleangle;
/** All: Weight of constraint in IK tree. */
@@ -226,7 +226,7 @@ typedef struct bTrackToConstraint {
int reserved2;
int flags;
char _pad[4];
char subtarget[/* MAX_NAME */ 64];
char subtarget[/*MAX_NAME*/ 64];
} bTrackToConstraint;
/* Copy Rotation Constraint */
@@ -236,7 +236,7 @@ typedef struct bRotateLikeConstraint {
char euler_order;
char mix_mode;
char _pad[2];
char subtarget[/* MAX_NAME */ 64];
char subtarget[/*MAX_NAME*/ 64];
} bRotateLikeConstraint;
/* Copy Location Constraint */
@@ -244,7 +244,7 @@ typedef struct bLocateLikeConstraint {
struct Object *tar;
int flag;
int reserved1;
char subtarget[/* MAX_NAME */ 64];
char subtarget[/*MAX_NAME*/ 64];
} bLocateLikeConstraint;
/* Copy Scale Constraint */
@@ -252,7 +252,7 @@ typedef struct bSizeLikeConstraint {
struct Object *tar;
int flag;
float power;
char subtarget[/* MAX_NAME */ 64];
char subtarget[/*MAX_NAME*/ 64];
} bSizeLikeConstraint;
/* Maintain Volume Constraint */
@@ -269,7 +269,7 @@ typedef struct bTransLikeConstraint {
int flag;
char mix_mode;
char _pad[3];
char subtarget[/* MAX_NAME */ 64];
char subtarget[/*MAX_NAME*/ 64];
} bTransLikeConstraint;
/* Floor Constraint */
@@ -278,7 +278,7 @@ typedef struct bMinMaxConstraint {
int minmaxflag;
float offset;
int flag;
char subtarget[/* MAX_NAME */ 64];
char subtarget[/*MAX_NAME*/ 64];
int _pad;
} bMinMaxConstraint;
@@ -303,9 +303,9 @@ typedef struct bActionConstraint {
float eval_time; /* Only used when flag ACTCON_USE_EVAL_TIME is set. */
struct bAction *act;
int32_t action_slot_handle;
char last_slot_identifier[66]; /* MAX_ID_NAME */
char last_slot_identifier[/*MAX_ID_NAME*/ 66];
char _pad1[2];
char subtarget[/* MAX_NAME */ 64];
char subtarget[/*MAX_NAME*/ 64];
} bActionConstraint;
/* Locked Axis Tracking constraint */
@@ -313,7 +313,7 @@ typedef struct bLockTrackConstraint {
struct Object *tar;
int trackflag;
int lockflag;
char subtarget[/* MAX_NAME */ 64];
char subtarget[/*MAX_NAME*/ 64];
} bLockTrackConstraint;
/* Damped Tracking constraint */
@@ -321,7 +321,7 @@ typedef struct bDampTrackConstraint {
struct Object *tar;
int trackflag;
char _pad[4];
char subtarget[/* MAX_NAME */ 64];
char subtarget[/*MAX_NAME*/ 64];
} bDampTrackConstraint;
/* Follow Path constraints */
@@ -351,7 +351,7 @@ typedef struct bStretchToConstraint {
float bulge_min;
float bulge_max;
float bulge_smooth;
char subtarget[/* MAX_NAME */ 64];
char subtarget[/*MAX_NAME*/ 64];
} bStretchToConstraint;
/* DEPRECATED: Rigid Body constraint */
@@ -392,14 +392,14 @@ typedef struct bChildOfConstraint {
/** Parent-inverse matrix to use. */
float invmat[4][4];
/** String to specify a sub-object target. */
char subtarget[/* MAX_NAME */ 64];
char subtarget[/*MAX_NAME*/ 64];
} bChildOfConstraint;
/* Generic Transform->Transform Constraint */
typedef struct bTransformConstraint {
/** Target (i.e. 'driver' object/bone). */
struct Object *tar;
char subtarget[/* MAX_NAME */ 64];
char subtarget[/*MAX_NAME*/ 64];
/** Can be loc(0), rot(1) or size(2). */
short from, to;
@@ -453,7 +453,7 @@ typedef struct bPivotConstraint {
/** Target object (optional). */
struct Object *tar;
/** Subtarget name (optional). */
char subtarget[/* MAX_NAME */ 64];
char subtarget[/*MAX_NAME*/ 64];
/** Offset from the target to use, regardless of whether it exists. */
float offset[3];
@@ -501,7 +501,7 @@ typedef struct bSizeLimitConstraint {
/* Limit Distance Constraint */
typedef struct bDistLimitConstraint {
struct Object *tar;
char subtarget[/* MAX_NAME */ 64];
char subtarget[/*MAX_NAME*/ 64];
/** Distance (radius of clamping sphere) from target. */
float dist;
@@ -540,12 +540,10 @@ typedef struct bShrinkwrapConstraint {
/* Follow Track constraints */
typedef struct bFollowTrackConstraint {
struct MovieClip *clip;
/** MAX_NAME. */
char track[64];
char track[/*MAX_NAME*/ 64];
int flag;
int frame_method;
/** MAX_NAME. */
char object[64];
char object[/*MAX_NAME*/ 64];
struct Object *camera;
struct Object *depth_ob;
} bFollowTrackConstraint;
@@ -562,8 +560,7 @@ typedef struct bObjectSolverConstraint {
struct MovieClip *clip;
int flag;
char _pad[4];
/** MAX_NAME. */
char object[64];
char object[/*MAX_NAME*/ 64];
/** Parent-inverse matrix to use. */
float invmat[4][4];
struct Object *camera;
@@ -572,12 +569,11 @@ typedef struct bObjectSolverConstraint {
/* Transform matrix cache constraint */
typedef struct bTransformCacheConstraint {
struct CacheFile *cache_file;
/** FILE_MAX. */
char object_path[1024];
char object_path[/*FILE_MAX*/ 1024];
/* Runtime. */
struct CacheReader *reader;
char reader_object_path[1024];
char reader_object_path[/*FILE_MAX*/ 1024];
} bTransformCacheConstraint;
/* ------------------------------------------ */

View File

@@ -32,8 +32,8 @@ typedef struct CustomDataLayer {
int active_mask;
/** Shape key-block unique id reference. */
int uid;
/** Layer name, MAX_CUSTOMDATA_LAYER_NAME. */
char name[68];
/** Layer name. */
char name[/*MAX_CUSTOMDATA_LAYER_NAME*/ 68];
char _pad1[4];
/** Layer data. */
void *data;
@@ -48,8 +48,7 @@ typedef struct CustomDataLayer {
#define MAX_CUSTOMDATA_LAYER_NAME_NO_PREFIX 64
typedef struct CustomDataExternal {
/** FILE_MAX. */
char filepath[1024];
char filepath[/*FILE_MAX*/ 1024];
} CustomDataExternal;
/**

View File

@@ -110,8 +110,7 @@ typedef struct DynamicPaintSurface {
/* initial color */
float init_color[4];
struct Tex *init_texture;
/** MAX_CUSTOMDATA_LAYER_NAME. */
char init_layername[68];
char init_layername[/*MAX_CUSTOMDATA_LAYER_NAME*/ 68];
int dry_speed, diss_speed;
float color_dry_threshold;
@@ -127,14 +126,10 @@ typedef struct DynamicPaintSurface {
float wave_damping, wave_speed, wave_timescale, wave_spring, wave_smoothness;
char _pad2[4];
/** MAX_CUSTOMDATA_LAYER_NAME. */
char uvlayer_name[68];
/** 1024 = FILE_MAX. */
char image_output_path[1024];
/** MAX_CUSTOMDATA_LAYER_NAME. */
char output_name[68];
/** MAX_CUSTOMDATA_LAYER_NAME */ /* some surfaces have 2 outputs. */
char output_name2[68];
char uvlayer_name[/*MAX_CUSTOMDATA_LAYER_NAME*/ 68];
char image_output_path[/*FILE_MAX*/ 1024];
char output_name[/*MAX_CUSTOMDATA_LAYER_NAME*/ 68];
char output_name2[/*MAX_CUSTOMDATA_LAYER_NAME*/ 68];
} DynamicPaintSurface;

View File

@@ -116,8 +116,7 @@ typedef struct PartEff {
short staticstep, omat, timetex, speedtex, flag2, flag2neg;
short disp, vertgroup_v;
/** MAX_VGROUP_NAME. */
char vgroupname[64], vgroupname_v[64];
char vgroupname[/*MAX_VGROUP_NAME*/ 64], vgroupname_v[/*MAX_VGROUP_NAME*/ 64];
/** Inverse matrix of parent Object. */
float imat[4][4];

View File

@@ -32,8 +32,8 @@ typedef struct FileGlobal {
uint64_t build_commit_timestamp;
/** Hash from `buildinfo`. */
char build_hash[16];
/** File path where this was saved, for recover (1024 = FILE_MAX). */
char filepath[1024];
/** File path where this was saved, for recover. */
char filepath[/*FILE_MAX*/ 1024];
} FileGlobal;
/* minversion: in file, the oldest past blender version you can use compliant */

View File

@@ -89,8 +89,7 @@ enum {
typedef struct FreestyleLineSet {
struct FreestyleLineSet *next, *prev;
/** Line set name, MAX_NAME. */
char name[64];
char name[/*MAX_NAME*/ 64];
int flags;
/** Selection criteria. */

View File

@@ -456,7 +456,7 @@ typedef struct bGPDlayer {
/** Inverse matrix (only used if parented). */
float inverse[4][4];
/** String describing sub-object info. */
char parsubstr[/* MAX_NAME */ 64];
char parsubstr[/*MAX_NAME*/ 64];
short partype;
/** Thickness adjustment. */

View File

@@ -74,8 +74,7 @@ typedef struct GpencilModifierData {
short flag;
/* An "expand" bit for each of the modifier's (sub)panels (uiPanelDataExpansion). */
short ui_expand_flag;
/** MAX_NAME. */
char name[64];
char name[/*MAX_NAME*/ 64];
char *error;
} GpencilModifierData;
@@ -88,8 +87,8 @@ typedef struct NoiseGpencilModifierData {
char layername[64];
/** Material name. */
char materialname[64] DNA_DEPRECATED;
/** Optional vertex-group name, #MAX_VGROUP_NAME. */
char vgname[64];
/** Optional vertex-group name. */
char vgname[/*MAX_VGROUP_NAME*/ 64];
/** Custom index for passes. */
int pass_index;
/** Several flags. */
@@ -154,8 +153,8 @@ typedef struct ThickGpencilModifierData {
char layername[64];
/** Material name. */
char materialname[64] DNA_DEPRECATED;
/** Optional vertex-group name, #MAX_VGROUP_NAME. */
char vgname[64];
/** Optional vertex-group name. */
char vgname[/*MAX_VGROUP_NAME*/ 64];
/** Custom index for passes. */
int pass_index;
/** Flags. */
@@ -287,8 +286,8 @@ typedef struct OpacityGpencilModifierData {
char layername[64];
/** Material name. */
char materialname[64] DNA_DEPRECATED;
/** Optional vertex-group name, #MAX_VGROUP_NAME. */
char vgname[64];
/** Optional vertex-group name. */
char vgname[/*MAX_VGROUP_NAME*/ 64];
/** Custom index for passes. */
int pass_index;
/** Flags. */
@@ -441,8 +440,8 @@ typedef struct BuildGpencilModifierData {
/** Weight fading at the end of the stroke. */
float fade_fac;
/** Target vertex-group name, #MAX_VGROUP_NAME. */
char target_vgname[64];
/** Target vertex-group name. */
char target_vgname[/*MAX_VGROUP_NAME*/ 64];
/** Fading strength of opacity and thickness */
float fade_opacity_strength;
float fade_thickness_strength;
@@ -504,7 +503,7 @@ typedef struct LatticeGpencilModifierData {
char layername[64];
/** Material name. */
char materialname[64] DNA_DEPRECATED;
/** Optional vertex-group name, #MAX_VGROUP_NAME. */
/** Optional vertex-group name, . */
char vgname[64];
/** Custom index for passes. */
int pass_index;
@@ -633,13 +632,13 @@ typedef struct HookGpencilModifierData {
/** Material for filtering. */
struct Material *material;
/** Optional name of bone target. */
char subtarget[/* MAX_NAME */ 64];
char subtarget[/*MAX_NAME*/ 64];
/** Layer name. */
char layername[/* MAX_NAME */ 64];
char layername[/*MAX_NAME*/ 64];
/** Material name. */
char materialname[/* MAX_ID_NAME-2 */ 64] DNA_DEPRECATED;
/** Optional vertex-group name, #MAX_VGROUP_NAME. */
char vgname[64];
char materialname[/*MAX_ID_NAME - 2*/ 64] DNA_DEPRECATED;
/** Optional vertex-group name. */
char vgname[/*MAX_VGROUP_NAME*/ 64];
/** Custom index for passes. */
int pass_index;
/** Custom index for passes. */
@@ -743,8 +742,8 @@ typedef struct OffsetGpencilModifierData {
char layername[64];
/** Material name. */
char materialname[64] DNA_DEPRECATED;
/** Optional vertex-group name, #MAX_VGROUP_NAME. */
char vgname[64];
/** Optional vertex-group name. */
char vgname[/*MAX_VGROUP_NAME*/ 64];
/** Custom index for passes. */
int pass_index;
/** Flags. */
@@ -785,8 +784,8 @@ typedef struct SmoothGpencilModifierData {
char layername[64];
/** Material name. */
char materialname[64] DNA_DEPRECATED;
/** Optional vertex-group name, #MAX_VGROUP_NAME. */
char vgname[64];
/** Optional vertex-group name. */
char vgname[/*MAX_VGROUP_NAME*/ 64];
/** Custom index for passes. */
int pass_index;
/** Several flags. */
@@ -824,8 +823,7 @@ typedef struct ArmatureGpencilModifierData {
struct Object *object;
/** Stored input of previous modifier, for vertex-group blending. */
float (*vert_coords_prev)[3];
/** #MAX_VGROUP_NAME. */
char vgname[64];
char vgname[/*MAX_VGROUP_NAME*/ 64];
} ArmatureGpencilModifierData;
@@ -872,8 +870,8 @@ typedef struct TintGpencilModifierData {
char layername[64];
/** Material name. */
char materialname[64] DNA_DEPRECATED;
/** Optional vertex-group name, #MAX_VGROUP_NAME. */
char vgname[64];
/** Optional vertex-group name. */
char vgname[/*MAX_VGROUP_NAME*/ 64];
/** Custom index for passes. */
int pass_index;
/** Custom index for passes. */
@@ -918,8 +916,8 @@ typedef struct TextureGpencilModifierData {
char layername[64];
/** Material name. */
char materialname[64] DNA_DEPRECATED;
/** Optional vertex-group name, #MAX_VGROUP_NAME. */
char vgname[64];
/** Optional vertex-group name. */
char vgname[/*MAX_VGROUP_NAME*/ 64];
/** Custom index for passes. */
int pass_index;
/** Flags. */
@@ -957,14 +955,14 @@ typedef enum eTextureGpencil_Mode {
typedef struct WeightProxGpencilModifierData {
GpencilModifierData modifier;
/** Target vertex-group name, #MAX_VGROUP_NAME. */
char target_vgname[64];
/** Target vertex-group name. */
char target_vgname[/*MAX_VGROUP_NAME*/ 64];
/** Material for filtering. */
struct Material *material;
/** Layer name. */
char layername[64];
/** Optional vertex-group filter name, #MAX_VGROUP_NAME. */
char vgname[64];
/** Optional vertex-group filter name. */
char vgname[/*MAX_VGROUP_NAME*/ 64];
/** Custom index for passes. */
int pass_index;
/** Flags. */
@@ -983,14 +981,14 @@ typedef struct WeightProxGpencilModifierData {
typedef struct WeightAngleGpencilModifierData {
GpencilModifierData modifier;
/** Target vertex-group name, #MAX_VGROUP_NAME. */
char target_vgname[64];
/** Target vertex-group name. */
char target_vgname[/*MAX_VGROUP_NAME*/ 64];
/** Material for filtering. */
struct Material *material;
/** Layer name. */
char layername[64];
/** Optional vertex-group filter name, #MAX_VGROUP_NAME. */
char vgname[64];
/** Optional vertex-group filter name. */
char vgname[/*MAX_VGROUP_NAME*/ 64];
/** Custom index for passes. */
int pass_index;
/** Flags. */
@@ -1126,8 +1124,8 @@ typedef struct ShrinkwrapGpencilModifierData {
struct Material *material;
/** Layer name. */
char layername[64];
/** Optional vertex-group filter name, #MAX_VGROUP_NAME. */
char vgname[64];
/** Optional vertex-group filter name. */
char vgname[/*MAX_VGROUP_NAME*/ 64];
/** Custom index for passes. */
int pass_index;
/** Flags. */
@@ -1177,8 +1175,8 @@ typedef struct EnvelopeGpencilModifierData {
struct Material *material;
/** Layer name. */
char layername[64];
/** Optional vertex-group name, #MAX_VGROUP_NAME. */
char vgname[64];
/** Optional vertex-group name. */
char vgname[/*MAX_VGROUP_NAME*/ 64];
/** Custom index for passes. */
int pass_index;
/** Several flags. */

View File

@@ -63,10 +63,8 @@ typedef struct ImageAnim {
typedef struct ImageView {
struct ImageView *next, *prev;
/** MAX_NAME. */
char name[64];
/** 1024 = FILE_MAX. */
char filepath[1024];
char name[/*MAX_NAME*/ 64];
char filepath[/*FILE_MAX*/ 1024];
} ImageView;
typedef struct ImagePackedFile {
@@ -77,14 +75,12 @@ typedef struct ImagePackedFile {
* respectively when creating their ImagePackedFile. Must be provided for each packed image. */
int view;
int tile_number;
/** 1024 = FILE_MAX. */
char filepath[1024];
char filepath[/*FILE_MAX*/ 1024];
} ImagePackedFile;
typedef struct RenderSlot {
struct RenderSlot *next, *prev;
/** 64 = MAX_NAME. */
char name[64];
char name[/*MAX_NAME*/ 64];
struct RenderResult *render;
} RenderSlot;
@@ -138,13 +134,13 @@ typedef struct Image {
ID id;
struct AnimData *adt;
/** File path, 1024 = FILE_MAX. */
char filepath[1024];
/** File path. */
char filepath[/*FILE_MAX*/ 1024];
/** Not written in file. */
struct MovieCache *cache;
/** Not written in file 3 = TEXTARGET_COUNT, 2 = stereo eyes. */
struct GPUTexture *gputexture[3][2];
/** Not written in file, 2 = stereo eyes. */
struct GPUTexture *gputexture[/*TEXTARGET_COUNT*/ 3][2];
/* sources from: */
ListBase anims;

View File

@@ -51,10 +51,10 @@ typedef struct KeyBlock {
/** Array of shape key values, size is `(Key::elemsize * KeyBlock->totelem)`.
* E.g. meshes use float3. */
void *data;
/** MAX_NAME (unique name, user assigned). */
/** Unique name, user assigned. */
char name[64];
/** MAX_VGROUP_NAME (optional vertex group), array gets allocated into 'weights' when set. */
char vgroup[64];
/** Optional vertex group, array gets allocated into 'weights' when set. */
char vgroup[/*MAX_VGROUP_NAME*/ 64];
/** Ranges, for RNA and UI only to clamp 'curval'. */
float slidermin;

View File

@@ -60,8 +60,8 @@ typedef struct Lattice {
struct Key *key;
struct MDeformVert *dvert;
/** Multiply the influence, MAX_VGROUP_NAME. */
char vgroup[64];
/** Multiply the influence. */
char vgroup[/*MAX_VGROUP_NAME*/ 64];
/** List of bDeformGroup names and flag only. */
ListBase vertex_group_names;
int vertex_group_active_index;

View File

@@ -148,8 +148,7 @@ typedef struct LightgroupMembership {
typedef struct ViewLayer {
struct ViewLayer *next, *prev;
/** MAX_NAME. */
char name[64];
char name[/*MAX_NAME*/ 64];
short flag;
char _pad[6];
/** ObjectBase. */

View File

@@ -30,8 +30,7 @@ typedef struct LineStyleModifier {
struct LineStyleModifier *next, *prev;
/** MAX_NAME. */
char name[64];
char name[/*MAX_NAME*/ 64];
int type;
float influence;
int flags;
@@ -671,8 +670,7 @@ typedef struct FreestyleLineStyle {
unsigned short dash1, gap1, dash2, gap2, dash3, gap3;
/** For UI. */
int panel;
/** MAX_MTEX. */
struct MTex *mtex[18];
struct MTex *mtex[/*MAX_MTEX*/ 18];
/* nodes */
struct bNodeTree *nodetree;

View File

@@ -147,8 +147,8 @@ typedef struct MaskLayerShapeElem {
typedef struct MaskLayer {
struct MaskLayer *next, *prev;
/** Name of the mask layer (64 = MAD_ID_NAME - 2). */
char name[64];
/** Name of the mask layer. */
char name[/*MAX_ID_NAME - 2*/ 64];
/** List of splines which defines this mask layer. */
ListBase splines;

View File

@@ -175,8 +175,7 @@ typedef struct ModifierData {
* when it is added to an object.
*/
int persistent_uid;
/** MAX_NAME. */
char name[64];
char name[/*MAX_NAME*/ 64];
char *error;
@@ -215,8 +214,7 @@ typedef struct MappingInfoModifierData {
struct Tex *texture;
struct Object *map_object;
char map_bone[64];
/** MAX_CUSTOMDATA_LAYER_NAME. */
char uvlayer_name[68];
char uvlayer_name[/*MAX_CUSTOMDATA_LAYER_NAME*/ 68];
char _pad1[4];
int uvlayer_tmp;
int texmapping;
@@ -269,8 +267,8 @@ typedef struct LatticeModifierData {
ModifierData modifier;
struct Object *object;
/** Optional vertex-group name, #MAX_VGROUP_NAME. */
char name[64];
/** Optional vertex-group name. */
char name[/*MAX_VGROUP_NAME*/ 64];
float strength;
short flag;
char _pad[2];
@@ -286,8 +284,8 @@ typedef struct CurveModifierData {
ModifierData modifier;
struct Object *object;
/** Optional vertex-group name, #MAX_VGROUP_NAME. */
char name[64];
/** Optional vertex-group name. */
char name[/*MAX_VGROUP_NAME*/ 64];
/** Axis along which curve deforms. */
short defaxis;
short flag;
@@ -336,8 +334,8 @@ typedef struct MaskModifierData {
/** Armature to use to in place of hardcoded vgroup. */
struct Object *ob_arm;
/** Name of vertex group to use to mask, #MAX_VGROUP_NAME. */
char vgroup[64];
/** Name of vertex group to use to mask. */
char vgroup[/*MAX_VGROUP_NAME*/ 64];
/** Using armature or hardcoded vgroup. */
short mode;
@@ -520,9 +518,8 @@ typedef struct BevelModifierData {
* this will be how "sharp" an edge must be before it gets beveled */
float bevel_angle;
float spread;
/** if the MOD_BEVEL_VWEIGHT option is set,
* this will be the name of the vert group, #MAX_VGROUP_NAME */
char defgrp_name[64];
/** If the #MOD_BEVEL_VWEIGHT option is set, this will be the name of the vert group. */
char defgrp_name[/*MAX_VGROUP_NAME*/ 64];
char _pad1[4];
/** Curve info for the custom profile */
@@ -635,8 +632,7 @@ typedef struct DisplaceModifierData {
struct Tex *texture;
struct Object *map_object;
char map_bone[64];
/** MAX_CUSTOMDATA_LAYER_NAME. */
char uvlayer_name[68];
char uvlayer_name[/*MAX_CUSTOMDATA_LAYER_NAME*/ 68];
char _pad1[4];
int uvlayer_tmp;
int texmapping;
@@ -644,8 +640,7 @@ typedef struct DisplaceModifierData {
float strength;
int direction;
/** #MAX_VGROUP_NAME. */
char defgrp_name[64];
char defgrp_name[/*MAX_VGROUP_NAME*/ 64];
float midlevel;
int space;
short flag;
@@ -685,15 +680,13 @@ typedef struct UVProjectModifierData {
ModifierData modifier;
/**
* The objects which do the projecting.
* \note 10=MOD_UVPROJECT_MAXPROJECTORS.
*/
struct Object *projectors[10];
struct Object *projectors[/*MOD_UVPROJECT_MAXPROJECTORS*/ 10];
char _pad2[4];
int projectors_num;
float aspectx, aspecty;
float scalex, scaley;
/** MAX_CUSTOMDATA_LAYER_NAME. */
char uvlayer_name[68];
char uvlayer_name[/*MAX_CUSTOMDATA_LAYER_NAME*/ 68];
int uvlayer_tmp;
} UVProjectModifierData;
@@ -713,8 +706,7 @@ typedef struct DecimateModifierData {
/** (mode == MOD_DECIM_MODE_DISSOLVE). */
float angle;
/** #MAX_VGROUP_NAME. */
char defgrp_name[64];
char defgrp_name[/*MAX_VGROUP_NAME*/ 64];
float defgrp_factor;
short flag, mode;
@@ -741,8 +733,7 @@ enum {
typedef struct SmoothModifierData {
ModifierData modifier;
float fac;
/** #MAX_VGROUP_NAME. */
char defgrp_name[64];
char defgrp_name[/*MAX_VGROUP_NAME*/ 64];
short flag, repeat;
} SmoothModifierData;
@@ -762,8 +753,7 @@ typedef struct CastModifierData {
float fac;
float radius;
float size;
/** #MAX_VGROUP_NAME. */
char defgrp_name[64];
char defgrp_name[/*MAX_VGROUP_NAME*/ 64];
short flag;
/** Cast modifier projection type. */
short type;
@@ -796,16 +786,14 @@ typedef struct WaveModifierData {
struct Tex *texture;
struct Object *map_object;
char map_bone[64];
/** MAX_CUSTOMDATA_LAYER_NAME. */
char uvlayer_name[68];
char uvlayer_name[/*MAX_CUSTOMDATA_LAYER_NAME*/ 68];
char _pad1[4];
int uvlayer_tmp;
int texmapping;
/* End MappingInfoModifierData. */
struct Object *objectcenter;
/** #MAX_VGROUP_NAME. */
char defgrp_name[64];
char defgrp_name[/*MAX_VGROUP_NAME*/ 64];
short flag;
char _pad2[2];
@@ -839,8 +827,7 @@ typedef struct ArmatureModifierData {
struct Object *object;
/** Stored input of previous modifier, for vertex-group blending. */
float (*vert_coords_prev)[3];
/** #MAX_VGROUP_NAME. */
char defgrp_name[64];
char defgrp_name[/*MAX_VGROUP_NAME*/ 64];
} ArmatureModifierData;
enum {
@@ -867,7 +854,7 @@ typedef struct HookModifierData {
struct Object *object;
/** Optional name of bone target. */
char subtarget[/* MAX_NAME */ 64];
char subtarget[/*MAX_NAME*/ 64];
char flag;
/** Use enums from WarpModifier (exact same functionality). */
@@ -886,8 +873,8 @@ typedef struct HookModifierData {
int *indexar;
int indexar_num;
float force;
/** Optional vertex-group name, #MAX_VGROUP_NAME. */
char name[64];
/** Optional vertex-group name. */
char name[/*MAX_VGROUP_NAME*/ 64];
void *_pad1;
} HookModifierData;
@@ -1038,8 +1025,8 @@ typedef struct MeshDeformModifierData {
/** Mesh object. */
struct Object *object;
/** Optional vertex-group name, #MAX_VGROUP_NAME. */
char defgrp_name[64];
/** Optional vertex-group name. */
char defgrp_name[/*MAX_VGROUP_NAME*/ 64];
short gridsize, flag;
char _pad[4];
@@ -1142,10 +1129,8 @@ typedef struct ParticleInstanceModifierData {
float position, random_position;
float rotation, random_rotation;
float particle_amount, particle_offset;
/** MAX_CUSTOMDATA_LAYER_NAME. */
char index_layer_name[68];
/** MAX_CUSTOMDATA_LAYER_NAME. */
char value_layer_name[68];
char index_layer_name[/*MAX_CUSTOMDATA_LAYER_NAME*/ 68];
char value_layer_name[/*MAX_CUSTOMDATA_LAYER_NAME*/ 68];
void *_pad1;
} ParticleInstanceModifierData;
@@ -1165,8 +1150,7 @@ typedef struct ExplodeModifierData {
int *facepa;
short flag, vgroup;
float protect;
/** MAX_CUSTOMDATA_LAYER_NAME. */
char uvname[68];
char uvname[/*MAX_CUSTOMDATA_LAYER_NAME*/ 68];
char _pad1[4];
void *_pad2;
} ExplodeModifierData;
@@ -1219,8 +1203,8 @@ typedef struct ShrinkwrapModifierData {
struct Object *target;
/** Additional shrink target. */
struct Object *auxTarget;
/** Optional vertex-group name, #MAX_VGROUP_NAME. */
char vgroup_name[64];
/** Optional vertex-group name. */
char vgroup_name[/*MAX_VGROUP_NAME*/ 64];
/** Distance offset to keep from mesh/projection point. */
float keepDist;
/** Shrink type projection. */
@@ -1248,8 +1232,8 @@ typedef struct SimpleDeformModifierData {
/** Object to control the origin of modifier space coordinates. */
struct Object *origin;
/** Optional vertex-group name, #MAX_VGROUP_NAME. */
char vgroup_name[64];
/** Optional vertex-group name. */
char vgroup_name[/*MAX_VGROUP_NAME*/ 64];
/** Factors to control simple deforms. */
float factor;
/** Lower and upper limit. */
@@ -1291,8 +1275,8 @@ typedef struct ShapeKeyModifierData {
typedef struct SolidifyModifierData {
ModifierData modifier;
/** Name of vertex group to use, #MAX_VGROUP_NAME. */
char defgrp_name[64];
/** Name of vertex group to use. */
char defgrp_name[/*MAX_VGROUP_NAME*/ 64];
char shell_defgrp_name[64];
char rim_defgrp_name[64];
/** New surface offset level. */
@@ -1427,11 +1411,10 @@ typedef struct OceanModifierData {
int bakestart;
int bakeend;
/** FILE_MAX. */
char cachepath[1024];
/** MAX_CUSTOMDATA_LAYER_NAME. */
char foamlayername[68];
char spraylayername[68];
char cachepath[/*FILE_MAX*/ 1024];
char foamlayername[/*MAX_CUSTOMDATA_LAYER_NAME*/ 68];
char spraylayername[/*MAX_CUSTOMDATA_LAYER_NAME*/ 68];
char cached;
char geometry_mode;
@@ -1478,8 +1461,7 @@ typedef struct WarpModifierData {
struct Tex *texture;
struct Object *map_object;
char map_bone[64];
/** MAX_CUSTOMDATA_LAYER_NAME. */
char uvlayer_name[68];
char uvlayer_name[/*MAX_CUSTOMDATA_LAYER_NAME*/ 68];
char _pad1[4];
int uvlayer_tmp;
int texmapping;
@@ -1488,13 +1470,13 @@ typedef struct WarpModifierData {
struct Object *object_from;
struct Object *object_to;
/** Optional name of bone target. */
char bone_from[/* MAX_NAME */ 64];
char bone_from[/*MAX_NAME*/ 64];
/** Optional name of bone target. */
char bone_to[/* MAX_NAME */ 64];
char bone_to[/*MAX_NAME*/ 64];
struct CurveMapping *curfalloff;
/** Optional vertex-group name, #MAX_VGROUP_NAME. */
char defgrp_name[64];
/** Optional vertex-group name. */
char defgrp_name[/*MAX_VGROUP_NAME*/ 64];
float strength;
float falloff_radius;
char flag;
@@ -1526,8 +1508,8 @@ typedef enum {
typedef struct WeightVGEditModifierData {
ModifierData modifier;
/** Name of vertex group to edit. #MAX_VGROUP_NAME. */
char defgrp_name[64];
/** Name of vertex group to edit. */
char defgrp_name[/*MAX_VGROUP_NAME*/ 64];
/** Using MOD_WVG_EDIT_* flags. */
short edit_flags;
@@ -1546,8 +1528,8 @@ typedef struct WeightVGEditModifierData {
/* Masking options. */
/** The global "influence", if no vgroup nor tex is used as mask. */
float mask_constant;
/** Name of mask vertex group from which to get weight factors. #MAX_VGROUP_NAME. */
char mask_defgrp_name[64];
/** Name of mask vertex group from which to get weight factors. */
char mask_defgrp_name[/*MAX_VGROUP_NAME*/ 64];
/* Texture masking. */
/** Which channel to use as weight/mask. */
@@ -1560,8 +1542,8 @@ typedef struct WeightVGEditModifierData {
char mask_tex_map_bone[64];
/** How to map the texture (using MOD_DISP_MAP_* enums). */
int mask_tex_mapping;
/** Name of the UV map. MAX_CUSTOMDATA_LAYER_NAME. */
char mask_tex_uvlayer_name[68];
/** Name of the UV map. */
char mask_tex_uvlayer_name[/*MAX_CUSTOMDATA_LAYER_NAME*/ 68];
/* Padding... */
void *_pad1;
@@ -1581,10 +1563,10 @@ enum {
typedef struct WeightVGMixModifierData {
ModifierData modifier;
/** Name of vertex group to modify/weight. #MAX_VGROUP_NAME. */
char defgrp_name_a[64];
/** Name of other vertex group to mix in. #MAX_VGROUP_NAME. */
char defgrp_name_b[64];
/** Name of vertex group to modify/weight. */
char defgrp_name_a[/*MAX_VGROUP_NAME*/ 64];
/** Name of other vertex group to mix in. */
char defgrp_name_b[/*MAX_VGROUP_NAME*/ 64];
/** Default weight value for first vgroup. */
float default_weight_a;
/** Default weight value to mix in. */
@@ -1599,8 +1581,8 @@ typedef struct WeightVGMixModifierData {
/* Masking options. */
/** The global "influence", if no vgroup nor tex is used as mask. */
float mask_constant;
/** Name of mask vertex group from which to get weight factors. #MAX_VGROUP_NAME. */
char mask_defgrp_name[64];
/** Name of mask vertex group from which to get weight factors. */
char mask_defgrp_name[/*MAX_VGROUP_NAME*/ 64];
/* Texture masking. */
/** Which channel to use as weightf. */
@@ -1613,7 +1595,7 @@ typedef struct WeightVGMixModifierData {
char mask_tex_map_bone[64];
/** How to map the texture. */
int mask_tex_mapping;
/** Name of the UV map. MAX_CUSTOMDATA_LAYER_NAME. */
/** Name of the UV map. */
char mask_tex_uvlayer_name[68];
char _pad1[4];
@@ -1670,8 +1652,8 @@ enum {
typedef struct WeightVGProximityModifierData {
ModifierData modifier;
/** Name of vertex group to modify/weight. #MAX_VGROUP_NAME. */
char defgrp_name[64];
/** Name of vertex group to modify/weight. */
char defgrp_name[/*MAX_VGROUP_NAME*/ 64];
/* Mapping stuff. */
/** The custom mapping curve. */
@@ -1688,8 +1670,8 @@ typedef struct WeightVGProximityModifierData {
/* Masking options. */
/** The global "influence", if no vgroup nor tex is used as mask. */
float mask_constant;
/** Name of mask vertex group from which to get weight factors. #MAX_VGROUP_NAME. */
char mask_defgrp_name[64];
/** Name of mask vertex group from which to get weight factors. */
char mask_defgrp_name[/*MAX_VGROUP_NAME*/ 64];
/* Texture masking. */
/** Which channel to use as weightf. */
@@ -1702,8 +1684,8 @@ typedef struct WeightVGProximityModifierData {
char mask_tex_map_bone[64];
/** How to map the texture. */
int mask_tex_mapping;
/** Name of the UV Map. MAX_CUSTOMDATA_LAYER_NAME. */
char mask_tex_uvlayer_name[68];
/** Name of the UV Map. */
char mask_tex_uvlayer_name[/*MAX_CUSTOMDATA_LAYER_NAME*/ 68];
char _pad1[4];
/** Distances mapping to 0.0/1.0 weights. */
@@ -1883,8 +1865,7 @@ typedef struct LaplacianSmoothModifierData {
float lambda, lambda_border;
char _pad1[4];
/** #MAX_VGROUP_NAME. */
char defgrp_name[64];
char defgrp_name[/*MAX_VGROUP_NAME*/ 64];
short flag, repeat;
} LaplacianSmoothModifierData;
@@ -1930,8 +1911,7 @@ typedef struct CorrectiveSmoothModifierData {
char smooth_type, rest_source;
char _pad[6];
/** #MAX_VGROUP_NAME. */
char defgrp_name[64];
char defgrp_name[/*MAX_VGROUP_NAME*/ 64];
/* runtime-only cache */
CorrectiveSmoothDeltaCache delta_cache;
@@ -1969,16 +1949,15 @@ typedef struct UVWarpModifierData {
/** Source. */
struct Object *object_src;
/** Optional name of bone target. */
char bone_src[/* MAX_NAME */ 64];
char bone_src[/*MAX_NAME*/ 64];
/** Target. */
struct Object *object_dst;
/** Optional name of bone target. */
char bone_dst[/* MAX_NAME */ 64];
char bone_dst[/*MAX_NAME*/ 64];
/** Optional vertex-group name, #MAX_VGROUP_NAME. */
/** Optional vertex-group name. */
char vgroup_name[64];
/** MAX_CUSTOMDATA_LAYER_NAME. */
char uvlayer_name[68];
char uvlayer_name[/*MAX_CUSTOMDATA_LAYER_NAME*/ 68];
char _pad[4];
} UVWarpModifierData;
@@ -2019,8 +1998,7 @@ typedef struct MeshCacheModifierData {
float eval_time;
float eval_factor;
/** FILE_MAX. */
char filepath[1024];
char filepath[/*FILE_MAX*/ 1024];
} MeshCacheModifierData;
/** #MeshCacheModifierData.flag */
@@ -2063,8 +2041,7 @@ enum {
typedef struct LaplacianDeformModifierData {
ModifierData modifier;
/** #MAX_VGROUP_NAME. */
char anchor_grp_name[64];
char anchor_grp_name[/*MAX_VGROUP_NAME*/ 64];
int verts_num, repeat;
float *vertexco;
/** Runtime only. */
@@ -2085,8 +2062,7 @@ enum {
*/
typedef struct WireframeModifierData {
ModifierData modifier;
/** #MAX_VGROUP_NAME. */
char defgrp_name[64];
char defgrp_name[/*MAX_VGROUP_NAME*/ 64];
float offset;
float offset_fac;
float offset_fac_vg;
@@ -2109,8 +2085,8 @@ typedef struct WeldModifierData {
/* The limit below which to merge vertices. */
float merge_dist;
/** Name of vertex group to use to mask, #MAX_VGROUP_NAME. */
char defgrp_name[64];
/** Name of vertex group to use to mask. */
char defgrp_name[/*MAX_VGROUP_NAME*/ 64];
char mode;
char flag;
@@ -2149,16 +2125,15 @@ typedef struct DataTransferModifierData {
char _pad1[4];
/** DT_MULTILAYER_INDEX_MAX; See DT_FROMLAYERS_ enum in ED_object.hh. */
int layers_select_src[5];
/** DT_MULTILAYER_INDEX_MAX; See DT_TOLAYERS_ enum in ED_object.hh. */
int layers_select_dst[5];
/** See DT_FROMLAYERS_ enum in ED_object.hh. */
int layers_select_src[/*DT_MULTILAYER_INDEX_MAX*/ 5];
/** See DT_TOLAYERS_ enum in ED_object.hh. */
int layers_select_dst[/*DT_MULTILAYER_INDEX_MAX*/ 5];
/** See CDT_MIX_ enum in BKE_customdata.hh. */
int mix_mode;
float mix_factor;
/** #MAX_VGROUP_NAME. */
char defgrp_name[64];
char defgrp_name[/*MAX_VGROUP_NAME*/ 64];
int flags;
void *_pad2;
@@ -2180,8 +2155,7 @@ enum {
/** Set Split Normals modifier. */
typedef struct NormalEditModifierData {
ModifierData modifier;
/** #MAX_VGROUP_NAME. */
char defgrp_name[64];
char defgrp_name[/*MAX_VGROUP_NAME*/ 64];
/** Source of normals, or center of ellipsoid. */
struct Object *target;
short mode;
@@ -2220,8 +2194,7 @@ typedef struct MeshSeqCacheModifierData {
ModifierData modifier;
struct CacheFile *cache_file;
/** 1024 = FILE_MAX. */
char object_path[1024];
char object_path[/*FILE_MAX*/ 1024];
char read_flag;
char _pad[3];
@@ -2230,7 +2203,7 @@ typedef struct MeshSeqCacheModifierData {
/* Runtime. */
struct CacheReader *reader;
char reader_object_path[1024];
char reader_object_path[/*FILE_MAX*/ 1024];
} MeshSeqCacheModifierData;
/** #MeshSeqCacheModifierData.read_flag */
@@ -2306,8 +2279,7 @@ enum {
typedef struct WeightedNormalModifierData {
ModifierData modifier;
/** #MAX_VGROUP_NAME. */
char defgrp_name[64];
char defgrp_name[/*MAX_VGROUP_NAME*/ 64];
char mode, flag;
short weight;
float thresh;
@@ -2561,8 +2533,7 @@ typedef struct VolumeToMeshModifierData {
float voxel_size;
int voxel_amount;
/** MAX_NAME */
char grid_name[64];
char grid_name[/*MAX_NAME*/ 64];
void *_pad1;
} VolumeToMeshModifierData;
@@ -2594,8 +2565,7 @@ typedef struct GreasePencilModifierInfluenceData {
int layer_pass;
/** Filter by material pass. */
int material_pass;
/** #MAX_VGROUP_NAME. */
char vertex_group_name[64];
char vertex_group_name[/*MAX_VGROUP_NAME*/ 64];
struct CurveMapping *custom_curve;
void *_pad2;
} GreasePencilModifierInfluenceData;
@@ -2984,7 +2954,7 @@ typedef struct GreasePencilHookModifierData {
struct Object *object;
/** Optional name of bone target. */
char subtarget[/* MAX_NAME */ 64];
char subtarget[/*MAX_NAME*/ 64];
char _pad[4];
/** #GreasePencilHookFlag. */
@@ -3370,8 +3340,8 @@ typedef struct GreasePencilBuildModifierData {
/** Weight fading at the end of the stroke. */
float fade_fac;
/** Target vertex-group name, #MAX_VGROUP_NAME. */
char target_vgname[64];
/** Target vertex-group name. */
char target_vgname[/*MAX_VGROUP_NAME*/ 64];
/** Fading strength of opacity and thickness */
float fade_opacity_strength;
float fade_thickness_strength;

View File

@@ -28,8 +28,8 @@ typedef struct MovieClipUser {
} MovieClipUser;
typedef struct MovieClipProxy {
/** 768=FILE_MAXDIR custom directory for index and proxy files (defaults to BL_proxy). */
char dir[768];
/** Custom directory for index and proxy files (defaults to "BL_proxy"). */
char dir[/*FILE_MAXDIR*/ 768];
/** Time code in use. */
short tc;
@@ -44,8 +44,8 @@ typedef struct MovieClipProxy {
typedef struct MovieClip_RuntimeGPUTexture {
void *next, *prev;
MovieClipUser user;
/** Not written in file 3 = TEXTARGET_COUNT. */
struct GPUTexture *gputexture[3];
/** Not written in file. */
struct GPUTexture *gputexture[/*TEXTARGET_COUNT*/ 3];
} MovieClip_RuntimeGPUTexture;
typedef struct MovieClip_Runtime {
@@ -64,8 +64,7 @@ typedef struct MovieClip {
/** Animation data (must be immediately after id for utilities to use it). */
struct AnimData *adt;
/** File path, 1024 = FILE_MAX. */
char filepath[1024];
char filepath[/*FILE_MAX*/ 1024];
/** Sequence or movie. */
int source;

View File

@@ -126,8 +126,7 @@ typedef struct bNodeSocket {
/** Unique identifier for mapping. */
char identifier[64];
/** MAX_NAME. */
char name[64];
char name[/*MAX_NAME*/ 64];
/** Only used for the Image and OutputFile nodes, should be removed at some point. */
void *storage;
@@ -165,10 +164,10 @@ typedef struct bNodeSocket {
char _pad[4];
/** Custom dynamic defined label, MAX_NAME. */
char label[64];
char short_label[64];
char description[64];
/** Custom dynamic defined label. */
char label[/*MAX_NAME*/ 64];
char short_label[/*MAX_NAME*/ 64];
char description[/*MAX_NAME*/ 64];
/**
* The default attribute name to use for geometry nodes modifier output attribute sockets.
@@ -392,8 +391,8 @@ typedef struct bNode {
/* Input and output #bNodeSocket. */
ListBase inputs, outputs;
/** The node's name for unique identification and string lookup. MAX_NAME. */
char name[64];
/** The node's name for unique identification and string lookup. */
char name[/*MAX_NAME*/ 64];
/**
* A value that uniquely identifies a node in a node tree even when the name changes.
@@ -481,8 +480,8 @@ typedef struct bNode {
float locx_legacy, locy_legacy;
float offsetx_legacy, offsety_legacy;
/** Custom user-defined label, MAX_NAME. */
char label[64];
/** Custom user-defined label. */
char label[/*MAX_NAME*/ 64];
/** Custom user-defined color. */
float color[3];
@@ -982,8 +981,7 @@ typedef struct bNodeSocketValueRGBA {
typedef struct bNodeSocketValueString {
int subtype;
char _pad[4];
/** 1024 = FILEMAX. */
char value[1024];
char value[/*FILE_MAX*/ 1024];
} bNodeSocketValueString;
typedef struct bNodeSocketValueObject {
@@ -1198,8 +1196,7 @@ typedef struct NodeHueSat {
} NodeHueSat;
typedef struct NodeImageFile {
/** 1024 = FILE_MAX. */
char name[1024];
char name[/*FILE_MAX*/ 1024];
struct ImageFormatData im_format;
int sfra, efra;
} NodeImageFile;
@@ -1208,8 +1205,7 @@ typedef struct NodeImageFile {
* XXX: first struct fields should match #NodeImageFile to ensure forward compatibility.
*/
typedef struct NodeImageMultiFile {
/** 1024 = FILE_MAX. */
char base_path[1024];
char base_path[/*FILE_MAX*/ 1024];
ImageFormatData format;
/** XXX old frame rand values from NodeImageFile for forward compatibility. */
int sfra DNA_DEPRECATED, efra DNA_DEPRECATED;
@@ -1225,13 +1221,12 @@ typedef struct NodeImageMultiFileSocket {
short use_node_format;
char save_as_render;
char _pad1[3];
/** 1024 = FILE_MAX. */
char path[1024];
char path[/*FILE_MAX*/ 1024];
ImageFormatData format;
/* Multi-layer output. */
/** EXR_TOT_MAXNAME-2 ('.' and channel char are appended). */
char layer[30];
/** Subtract 2 because '.' and channel char are appended. */
char layer[/*EXR_TOT_MAXNAME - 2*/ 30];
char _pad2[2];
} NodeImageMultiFileSocket;
@@ -1504,8 +1499,8 @@ typedef struct NodeShaderTexPointDensity {
/** Used at runtime only by sampling RNA API. */
PointDensity pd;
int cached_resolution;
/** Vertex attribute layer for color source, MAX_CUSTOMDATA_LAYER_NAME. */
char vertex_attribute_name[68];
/** Vertex attribute layer for color source. */
char vertex_attribute_name[/*MAX_CUSTOMDATA_LAYER_NAME*/ 68];
} NodeShaderTexPointDensity;
typedef struct NodeShaderPrincipled {
@@ -1572,8 +1567,7 @@ typedef struct NodeShaderScript {
int mode;
int flag;
/** 1024 = FILE_MAX. */
char filepath[1024];
char filepath[/*FILE_MAX*/ 1024];
char bytecode_hash[64];
char *bytecode;
@@ -1601,8 +1595,7 @@ typedef struct NodeShaderVertexColor {
typedef struct NodeShaderTexIES {
int mode;
/** 1024 = FILE_MAX. */
char filepath[1024];
char filepath[/*FILE_MAX*/ 1024];
} NodeShaderTexIES;
typedef struct NodeShaderOutputAOV {
@@ -1617,8 +1610,7 @@ typedef struct NodeSunBeams {
typedef struct CryptomatteEntry {
struct CryptomatteEntry *next, *prev;
float encoded_hash;
/** MAX_NAME. */
char name[64];
char name[/*MAX_NAME*/ 64];
char _pad[4];
} CryptomatteEntry;
@@ -1646,8 +1638,7 @@ typedef struct NodeCryptomatte {
/** Contains #CryptomatteEntry. */
ListBase entries;
/* MAX_NAME */
char layer_name[64];
char layer_name[/*MAX_NAME*/ 64];
/** Stores `entries` as a string for opening in 2.80-2.91. */
char *matte_id;

View File

@@ -62,9 +62,8 @@ typedef struct FluidsimSettings {
/**
* Store output path, and file prefix for baked fluid surface.
* String length; 256= #FILE_MAXFILE, 768= #FILE_MAXDIR.
*/
char surfdataPath[1024];
char surfdataPath[/*FILE_MAX*/ 1024];
/* store start coords of axis aligned bounding box together with size */
/* values are initialized during derived mesh display. */

View File

@@ -203,9 +203,9 @@ typedef struct SoftBody {
float nodemass;
/**
* Along with it introduce mass painting starting to fix old bug .. nastiness that VG are indexes
* rather find them by name tag to find it -> jow20090613. #MAX_VGROUP_NAME size.
* rather find them by name tag to find it -> jow20090613.
*/
char namedVG_Mass[64];
char namedVG_Mass[/*MAX_VGROUP_NAME*/ 64];
/** Softbody amount of gravitation to apply. */
float grav;
/** Friction to env. */
@@ -229,9 +229,9 @@ typedef struct SoftBody {
short vertgroup;
/**
* Starting to fix old bug .. nastiness that VG are indexes
* rather find them by name tag to find it -> jow20090613. #MAX_VGROUP_NAME size.
* rather find them by name tag to find it -> jow20090613.
*/
char namedVG_Softgoal[64];
char namedVG_Softgoal[/*MAX_VGROUP_NAME*/ 64];
short fuzzyness;
@@ -244,9 +244,8 @@ typedef struct SoftBody {
* Along with it introduce Spring_K painting
* starting to fix old bug .. nastiness that VG are indexes
* rather find them by name tag to find it -> jow20090613.
* MAX_VGROUP_NAME
*/
char namedVG_Spring_K[64];
char namedVG_Spring_K[/*MAX_VGROUP_NAME*/ 64];
/* baking */
char _pad1[6];

View File

@@ -57,8 +57,7 @@ struct bGPdata;
/** Vertex Groups - Name Info */
typedef struct bDeformGroup {
struct bDeformGroup *next, *prev;
/** MAX_VGROUP_NAME. */
char name[64];
char name[/*MAX_VGROUP_NAME*/ 64];
/* need this flag for locking weights */
char flag, _pad0[7];
} bDeformGroup;
@@ -66,8 +65,7 @@ typedef struct bDeformGroup {
#ifdef DNA_DEPRECATED_ALLOW
typedef struct bFaceMap {
struct bFaceMap *next, *prev;
/** MAX_VGROUP_NAME. */
char name[64];
char name[/*MAX_VGROUP_NAME*/ 64];
char flag;
char _pad0[7];
} bFaceMap;
@@ -209,7 +207,7 @@ typedef struct Object {
/** Can be vertex indices. */
int par1, par2, par3;
/** String describing sub-object info. */
char parsubstr[/* MAX_NAME */ 64];
char parsubstr[/*MAX_NAME*/ 64];
struct Object *parent, *track;
/* Proxy pointer are deprecated, only kept for conversion to liboverrides. */
struct Object *proxy DNA_DEPRECATED;
@@ -422,8 +420,7 @@ typedef struct ObHook {
/** If not zero, falloff is distance where influence zero. */
float falloff;
/** MAX_NAME. */
char name[64];
char name[/*MAX_NAME*/ 64];
int *indexar;
/** Curindex is cache for fast lookup. */

View File

@@ -272,8 +272,7 @@ typedef struct ParticleSettings {
/* hair dynamics */
float bending_random;
/** MAX_MTEX. */
struct MTex *mtex[18];
struct MTex *mtex[/*MAX_MTEX*/ 18];
struct Collection *instance_collection;
struct ListBase instance_weights;
@@ -349,8 +348,8 @@ typedef struct ParticleSystem {
/** Used for keyed and boid physics. */
struct ListBase targets;
/** Particle system name, MAX_NAME. */
char name[64];
/** Particle system name. */
char name[/*MAX_NAME*/ 64];
/** Used for instancing. */
float imat[4][4];
@@ -364,8 +363,8 @@ typedef struct ParticleSystem {
short target_psys, totkeyed, bakespace;
char _pad1[6];
/** Billboard uv name, MAX_CUSTOMDATA_LAYER_NAME. */
char bb_uvname[3][68] DNA_DEPRECATED;
/** Billboard UV name. */
char bb_uvname[3][/*MAX_CUSTOMDATA_LAYER_NAME*/ 68] DNA_DEPRECATED;
char _pad2[4];
/* if you change these remember to update array lengths to PSYS_TOT_VG! */

View File

@@ -102,8 +102,8 @@ typedef struct PointCache {
char name[64];
char prev_name[64];
char info[128];
/** File path, 1024 = FILE_MAX. */
char path[1024];
/** File path. */
char path[/*FILE_MAX*/ 1024];
/**
* Array of length `endframe - startframe + 1` with flags to indicate cached frames.

View File

@@ -176,8 +176,7 @@ typedef struct AudioData {
typedef struct SceneRenderLayer {
struct SceneRenderLayer *next, *prev;
/** MAX_NAME. */
char name[64] DNA_DEPRECATED;
char name[/*MAX_NAME*/ 64] DNA_DEPRECATED;
/** Converted to ViewLayer setting. */
struct Material *mat_override DNA_DEPRECATED;
@@ -322,10 +321,8 @@ typedef enum eScenePassType {
typedef struct SceneRenderView {
struct SceneRenderView *next, *prev;
/** MAX_NAME. */
char name[64];
/** MAX_NAME. */
char suffix[64];
char name[/*MAX_NAME*/ 64];
char suffix[/*MAX_NAME*/ 64];
int viewflag;
char _pad2[4];
@@ -588,8 +585,7 @@ enum {
typedef struct BakeData {
struct ImageFormatData im_format;
/** FILE_MAX. */
char filepath[1024];
char filepath[/*FILE_MAX*/ 1024];
short width, height;
short margin, flag;
@@ -794,10 +790,11 @@ typedef struct RenderData {
char _pad9[6];
float bake_biasdist, bake_user_scale;
/* Path to render output. */
/** 1024 = FILE_MAX. */
/* NOTE: Excluded from `BKE_bpath_foreach_path_` / `scene_foreach_path` code. */
char pic[1024];
/**
* Path to render output.
* \note Excluded from `BKE_bpath_foreach_path_` / `scene_foreach_path` code.
*/
char pic[/*FILE_MAX*/ 1024];
/** Stamps flags. */
int stamp;
@@ -1675,7 +1672,7 @@ typedef struct ToolSettings {
* This isn't all that useful in practice, so use a "default" name instead.
* This approach may be reworked after gathering feedback from users.
*/
char uvcalc_weight_group[64]; /* MAX_VGROUP_NAME */
char uvcalc_weight_group[/*MAX_VGROUP_NAME*/ 64];
/* Auto-IK. */
/** Runtime only. */

View File

@@ -165,8 +165,7 @@ typedef struct Panel {
/** Runtime for drawing. */
struct uiLayout *layout;
/** Defined as #BKE_ST_MAXNAME. */
char panelname[64];
char panelname[/*BKE_ST_MAXNAME*/ 64];
/** Panel name is identifier for restoring location. */
char *drawname;
/** Offset within the region. */
@@ -315,8 +314,7 @@ typedef struct uiList { /* some list UI data need to be saved in file */
/** Runtime. */
struct uiListType *type;
/** Defined as UI_MAX_NAME_STR. */
char list_id[128];
char list_id[/*UI_MAX_NAME_STR*/ 128];
/** How items are laid out in the list. */
int layout_type;
@@ -328,8 +326,8 @@ typedef struct uiList { /* some list UI data need to be saved in file */
int list_last_activei;
/* Filtering data. */
/** Defined as UI_MAX_NAME_STR. */
char filter_byname[128];
/** Defined as . */
char filter_byname[/*UI_MAX_NAME_STR*/ 128];
int filter_flag;
int filter_sort_flag;
@@ -365,15 +363,14 @@ typedef struct uiViewState {
typedef struct uiViewStateLink {
struct uiViewStateLink *next, *prev;
char idname[64]; /* #BKE_ST_MAXNAME */
char idname[/*BKE_ST_MAXNAME*/ 64];
uiViewState state;
} uiViewStateLink;
typedef struct TransformOrientation {
struct TransformOrientation *next, *prev;
/** MAX_NAME. */
char name[64];
char name[/*MAX_NAME*/ 64];
float mat[3][3];
char _pad[4];
} TransformOrientation;
@@ -382,8 +379,7 @@ typedef struct TransformOrientation {
typedef struct uiPreview {
struct uiPreview *next, *prev;
/** Defined as #BKE_ST_MAXNAME. */
char preview_id[64];
char preview_id[/*BKE_ST_MAXNAME*/ 64];
short height;
/* Unset on file read. */
@@ -846,7 +842,7 @@ typedef struct AssetShelf {
/** Identifier that matches the #AssetShelfType.idname this shelf was created with. Used to
* restore the #AssetShelf.type pointer below on file read. */
char idname[64]; /* MAX_NAME */
char idname[/*MAX_NAME*/ 64];
/** Runtime. */
struct AssetShelfType *type;

View File

@@ -60,8 +60,6 @@ typedef struct StripLookup StripLookup;
/** \name Strip & Editing Structs
* \{ */
/* strlens; 256= FILE_MAXFILE, 768= FILE_MAXDIR */
typedef struct StripAnim {
struct StripAnim *next, *prev;
struct MovieReader *anim;
@@ -69,7 +67,7 @@ typedef struct StripAnim {
typedef struct StripElem {
/** File name concatenated onto #StripData::dirpath. */
char filename[256];
char filename[/*FILE_MAXFILE*/ 256];
/** Ignore when zeroed. */
int orig_width, orig_height;
float orig_fps;
@@ -109,9 +107,9 @@ typedef struct StripColorBalance {
typedef struct StripProxy {
/** Custom directory for index and proxy files (defaults to "BL_proxy"). */
char dirpath[768];
char dirpath[/*FILE_MAXDIR*/ 768];
/** Custom file. */
char filename[256];
char filename[/*FILE_MAXFILE*/ 256];
struct MovieReader *anim; /* custom proxy anim file */
short tc; /* time code in use */
@@ -136,7 +134,7 @@ typedef struct StripData {
* NULL for all other strip-types.
*/
StripElem *stripdata;
char dirpath[768];
char dirpath[/*FILE_MAXDIR*/ 768];
StripProxy *proxy;
StripCrop *crop;
StripTransform *transform;
@@ -183,8 +181,8 @@ typedef struct Strip {
void *_pad;
/** Needed (to be like ipo), else it will raise libdata warnings, this should never be used. */
void *lib;
/** STRIP_NAME_MAXSTR - name, set by default and needs to be unique, for RNA paths. */
char name[64];
/** Name, set by default and needs to be unique, for RNA paths. */
char name[/*STRIP_NAME_MAXSTR*/ 64];
/** Flags bitmap (see below) and the type of strip. */
int flag, type;
@@ -356,12 +354,9 @@ typedef struct Editing {
/* Context vars, used to be static */
Strip *act_strip;
/** 1024 = FILE_MAX. */
char act_imagedir[1024];
/** 1024 = FILE_MAX. */
char act_sounddir[1024];
/** 1024 = FILE_MAX. */
char proxy_dir[1024];
char act_imagedir[/*FILE_MAX*/ 1024];
char act_sounddir[/*FILE_MAX*/ 1024];
char proxy_dir[/*FILE_MAX*/ 1024];
int proxy_storage;
@@ -514,8 +509,7 @@ typedef struct ColorMixVars {
typedef struct StripModifierData {
struct StripModifierData *next, *prev;
int type, flag;
/** MAX_NAME. */
char name[64];
char name[/*MAX_NAME*/ 64];
/* mask input, either sequence or mask ID */
int mask_input_type;

View File

@@ -55,8 +55,7 @@ typedef struct ShaderFxData {
short flag;
/* An "expand" bit for each of the constraint's (sub)panels (uiPanelDataExpansion). */
short ui_expand_flag;
/** MAX_NAME. */
char name[64];
char name[/*MAX_NAME*/ 64];
char *error;
} ShaderFxData;

View File

@@ -24,8 +24,7 @@ typedef struct bSound {
/**
* The path to the sound file.
*/
/** 1024 = FILE_MAX. */
char filepath[1024];
char filepath[/*FILE_MAX*/ 1024];
/**
* The packed file.

View File

@@ -394,10 +394,12 @@ typedef struct FileSelectParams {
/** Title, also used for the text of the execute button. */
char title[96];
/**
* Directory, FILE_MAX_LIBEXTRA, 1024 + 66, this is for extreme case when 1023 length path
* needs to be linked in, where foo.blend/Armature need adding
* Directory.
*
* \note #FILE_MAX_LIBEXTRA == `1024 + 66`, this is for extreme case when 1023 length path
* needs to be linked in, where `foo.blend/Armature` need adding.
*/
char dir[1090];
char dir[/*FILE_MAX_LIBEXTRA*/ 1090];
char file[256];
char renamefile[256];
@@ -409,8 +411,8 @@ typedef struct FileSelectParams {
const ID *rename_id;
void *_pad3;
/** List of file-types to filter (#FILE_MAXFILE). */
char filter_glob[256];
/** List of file-types to filter. */
char filter_glob[/*FILE_MAXFILE*/ 256];
/** Text items name must match to be shown. */
char filter_search[64];
@@ -608,8 +610,7 @@ typedef struct FileDirEntryArr {
int entries_num;
int entries_filtered_num;
/** FILE_MAX. */
char root[1024];
char root[/*FILE_MAX*/ 1024];
} FileDirEntryArr;
/** \} */
@@ -737,10 +738,8 @@ typedef struct SpaceText {
char live_edit;
char _pad2[1];
/** ST_MAX_FIND_STR. */
char findstr[256];
/** ST_MAX_FIND_STR. */
char replacestr[256];
char findstr[/*ST_MAX_FIND_STR*/ 256];
char replacestr[/*ST_MAX_FIND_STR*/ 256];
/** Column number to show right margin at. */
short margin_column;
@@ -771,10 +770,8 @@ typedef struct Script {
* Store the script file here so we can re-run it on loading blender,
* if "Enable Scripts" is on
*/
/** 1024 = FILE_MAX. */
char scriptname[1024];
/** 1024 = FILE_MAX. */
char scriptarg[256];
char scriptname[/*FILE_MAX*/ 1024];
char scriptarg[/*FILE_MAXFILE*/ 256];
} Script;
#define SCRIPT_SET_NULL(_script) \
_script->py_draw = _script->py_event = _script->py_button = _script->py_browsercallback = \
@@ -815,9 +812,8 @@ typedef struct bNodeTreePath {
/** V2d center point, so node trees can have different offsets in editors. */
float view_center[2];
/** MAX_NAME. */
char node_name[64];
char display_name[64];
char node_name[/*MAX_NAME*/ 64];
char display_name[/*MAX_NAME*/ 64];
} bNodeTreePath;
typedef struct SpaceNodeOverlay {
@@ -1167,7 +1163,7 @@ typedef struct SpaceSpreadsheet {
typedef struct SpreadsheetRowFilter {
struct SpreadsheetRowFilter *next, *prev;
char column_name[64]; /* MAX_NAME. */
char column_name[/*MAX_NAME*/ 64];
/* eSpreadsheetFilterOperation. */
uint8_t operation;

View File

@@ -33,8 +33,7 @@ typedef struct MTex {
char _pad2[2];
struct Object *object;
struct Tex *tex;
/** MAX_CUSTOMDATA_LAYER_NAME. */
char uvname[68];
char uvname[/*MAX_CUSTOMDATA_LAYER_NAME*/ 68];
char projx, projy, projz, mapping;
char brush_map_mode, brush_angle_mode;
@@ -92,8 +91,8 @@ typedef struct PointDensity {
short psys_cache_space;
/** cache points in world-space, object space, ... ? */
short ob_cache_space;
/** vertex attribute layer for color source, MAX_CUSTOMDATA_LAYER_NAME */
char vertex_attribute_name[68];
/** Vertex attribute layer for color source. */
char vertex_attribute_name[/*MAX_CUSTOMDATA_LAYER_NAME*/ 68];
char _pad1[4];
/** The acceleration tree containing points. */

View File

@@ -47,8 +47,7 @@ typedef enum eUIFont_ID {
#
typedef struct uiFont {
struct uiFont *next, *prev;
/** 1024 = FILE_MAX. */
char filepath[1024];
char filepath[/*FILE_MAX*/ 1024];
/** From BLF library. */
short blf_id;
/** Own id (eUIFont_ID). */
@@ -82,8 +81,7 @@ typedef struct uiFontStyle {
typedef struct uiStyle {
struct uiStyle *next, *prev;
/** #MAX_NAME */
char name[64];
char name[/*MAX_NAME*/ 64];
uiFontStyle paneltitle;
uiFontStyle grouplabel;
@@ -494,8 +492,7 @@ typedef struct ThemeStripColor {
*/
typedef struct bTheme {
struct bTheme *next, *prev;
/** #MAX_NAME. */
char name[64];
char name[/*MAX_NAME*/ 64];
/* NOTE: Values after `name` are copied when resetting the default theme. */
@@ -504,10 +501,8 @@ typedef struct bTheme {
*
* This is needed so it's possible to know if updating or removing a theme preset
* should apply changes to the current theme.
*
* #FILE_MAX.
*/
char filepath[1024];
char filepath[/*FILE_MAX*/ 1024];
ThemeUI tui;

View File

@@ -109,8 +109,7 @@ typedef struct MovieTrackingMarker {
typedef struct MovieTrackingTrack {
struct MovieTrackingTrack *next, *prev;
/** MAX_NAME. */
char name[64];
char name[/*MAX_NAME*/ 64];
/* ** settings ** */
@@ -212,8 +211,7 @@ typedef struct MovieTrackingPlaneMarker {
typedef struct MovieTrackingPlaneTrack {
struct MovieTrackingPlaneTrack *next, *prev;
/** MAX_NAME. */
char name[64];
char name[/*MAX_NAME*/ 64];
/**
* Array of point tracks used to define this plane.
@@ -349,8 +347,8 @@ typedef struct MovieTrackingReconstruction {
typedef struct MovieTrackingObject {
struct MovieTrackingObject *next, *prev;
/** Name of tracking object, MAX_NAME. */
char name[64];
/** Name of tracking object. */
char name[/*MAX_NAME*/ 64];
int flag;
/** Scale of object solution in camera space. */
float scale;

View File

@@ -29,8 +29,7 @@ typedef struct bAddon {
typedef struct bPathCompare {
struct bPathCompare *next, *prev;
/** FILE_MAXDIR. */
char path[768];
char path[/*FILE_MAXDIR*/ 768];
char flag;
char _pad0[7];
} bPathCompare;
@@ -84,8 +83,8 @@ enum {
typedef struct bUserAssetLibrary {
struct bUserAssetLibrary *next, *prev;
char name[64]; /* MAX_NAME */
char dirpath[1024]; /* FILE_MAX */
char name[/*MAX_NAME*/ 64];
char dirpath[/*FILE_MAX*/ 1024];
short import_method; /* eAssetImportMethod */
short flag; /* eAssetLibrary_Flag */
@@ -98,14 +97,14 @@ typedef struct bUserExtensionRepo {
* Unique identifier, only for display in the UI list.
* The `module` is used for internal identifiers.
*/
char name[64]; /* MAX_NAME */
char name[/*MAX_NAME*/ 64];
/**
* The unique module name (sub-module) in fact.
*
* Use a shorter name than #NAME_MAX to leave room for a base module prefix.
* e.g. `bl_ext.{submodule}.{add_on}` to allow this string to fit into #bAddon::module.
*/
char module[48];
char module[/*NAME_MAX-16*/ 48];
/**
* Secret access token for remote repositories (allocated).
@@ -117,8 +116,8 @@ typedef struct bUserExtensionRepo {
* The "local" directory where extensions are stored.
* When unset, use `{BLENDER_USER_EXTENSIONS}/{bUserExtensionRepo::module}`.
*/
char custom_dirpath[1024]; /* FILE_MAX */
char remote_url[1024]; /* FILE_MAX */
char custom_dirpath[/*FILE_MAX*/ 1024];
char remote_url[/*FILE_MAX*/ 1024];
/** Options for the repository (#eUserExtensionRepo_Flag). */
uint8_t flag;
@@ -241,8 +240,8 @@ typedef struct bUserScriptDirectory {
struct bUserScriptDirectory *next, *prev;
/** Name must be unique. */
char name[64]; /* MAX_NAME */
char dir_path[768]; /* FILE_MAXDIR */
char name[/*MAX_NAME*/ 64];
char dir_path[/*FILE_MAXDIR*/ 768];
} bUserScriptDirectory;
/**
@@ -254,7 +253,7 @@ typedef struct bUserAssetShelfSettings {
struct bUserAssetShelfSettings *next, *prev;
/** Identifier that matches the #AssetShelfType.idname of the shelf these settings apply to. */
char shelf_idname[64]; /* MAX_NAME */
char shelf_idname[/*MAX_NAME*/ 64];
ListBase enabled_catalog_paths; /* #AssetCatalogPathLink */
} bUserAssetShelfSettings;
@@ -285,26 +284,21 @@ typedef struct UserDef {
* TODO: Remove this once this API is better supported by Wayland compositors, see #107676.
*/
char trackpad_scroll_direction;
/** FILE_MAXDIR length. */
char tempdir[768];
char fontdir[768];
/** FILE_MAX length. */
char renderdir[1024];
/** length. */
char tempdir[/*FILE_MAXDIR*/ 768];
char fontdir[/*FILE_MAXDIR*/ 768];
char renderdir[/*FILE_MAX*/ 1024];
/* EXR cache path */
/** 768 = FILE_MAXDIR. */
char render_cachedir[768];
char textudir[768];
char render_cachedir[/*FILE_MAXDIR*/ 768];
char textudir[/*FILE_MAXDIR*/ 768];
/* Deprecated, use #UserDef.script_directories instead. */
char pythondir_legacy[768] DNA_DEPRECATED;
char sounddir[768];
char i18ndir[768];
/** 1024 = FILE_MAX. */
char image_editor[1024];
/** 1024 = FILE_MAX. */
char text_editor[1024];
char pythondir_legacy[/*FILE_MAXDIR*/ 768] DNA_DEPRECATED;
char sounddir[/*FILE_MAXDIR*/ 768];
char i18ndir[/*FILE_MAXDIR*/ 768];
char image_editor[/*FILE_MAX*/ 1024];
char text_editor[/*FILE_MAX*/ 1024];
char text_editor_args[256];
/** 1024 = FILE_MAX. */
char anim_player[1024];
char anim_player[/*FILE_MAX*/ 1024];
int anim_player_preset;
/** Minimum spacing between grid-lines in View2D grids. */
@@ -563,8 +557,8 @@ typedef struct UserDef {
char drag_threshold;
char move_threshold;
char font_path_ui[1024];
char font_path_ui_mono[1024];
char font_path_ui[/*FILE_MAX*/ 1024];
char font_path_ui_mono[/*FILE_MAX*/ 1024];
/** Legacy, for backwards compatibility only. */
int compute_device_type;

View File

@@ -24,8 +24,7 @@ typedef struct VFont {
ID id;
/** 1024 = FILE_MAX. */
char filepath[1024];
char filepath[/*FILE_MAX*/ 1024];
struct VFontData *data;
struct PackedFile *packedfile;

View File

@@ -177,12 +177,9 @@ typedef struct View3DShading {
char _pad;
/** FILE_MAXFILE. */
char studio_light[256];
/** FILE_MAXFILE. */
char lookdev_light[256];
/** FILE_MAXFILE. */
char matcap[256];
char studio_light[/*FILE_MAXFILE*/ 256];
char lookdev_light[/*FILE_MAXFILE*/ 256];
char matcap[/*FILE_MAXFILE*/ 256];
float shadow_intensity;
float single_color[3];
@@ -328,8 +325,8 @@ typedef struct View3D {
/** Allocated backup of itself while in local-view. */
struct View3D *localvd;
/** Optional string for armature bone to define center, MAXBONENAME. */
char ob_center_bone[64];
/** Optional string for armature bone to define center. */
char ob_center_bone[/*MAXBONENAME*/ 64];
unsigned short local_view_uid;
char _pad6[2];

View File

@@ -49,7 +49,7 @@ typedef struct Volume {
struct AnimData *adt; /* animation data (must be immediately after id) */
/* File */
char filepath[1024]; /* FILE_MAX */
char filepath[/*FILE_MAX*/ 1024]; /* FILE_MAX */
struct PackedFile *packedfile;
/* Sequence */

View File

@@ -433,7 +433,7 @@ typedef struct wmOperatorTypeMacro {
struct wmOperatorTypeMacro *next, *prev;
/* operator id */
char idname[64]; /* OP_MAX_TYPENAME */
char idname[/*OP_MAX_TYPENAME*/ 64];
/* rna pointer to access properties, like keymap */
/** Operator properties, assigned to ptr->data and can be written to a file. */
struct IDProperty *properties;
@@ -638,7 +638,7 @@ typedef struct wmOperator {
/* saved */
/** Used to retrieve type pointer. */
char idname[64]; /* OP_MAX_TYPENAME */
char idname[/*OP_MAX_TYPENAME*/ 64];
/** Saved, user-settable properties. */
IDProperty *properties;

View File

@@ -130,8 +130,7 @@ typedef struct WorkSpaceLayout {
struct bScreen *screen;
/* The name of this layout, we override the RNA name of the screen with this
* (but not ID name itself) */
/** MAX_NAME. */
char name[64];
char name[/*MAX_NAME*/ 64];
} WorkSpaceLayout;
/** Optional tags, which features to use, aligned with #bAddon names by convention. */

View File

@@ -122,14 +122,14 @@ typedef enum eXrPoseFlag {
typedef struct XrComponentPath {
struct XrComponentPath *next, *prev;
char path[192]; /* XR_MAX_COMPONENT_PATH_LENGTH */
char path[/*XR_MAX_COMPONENT_PATH_LENGTH*/ 192];
} XrComponentPath;
typedef struct XrActionMapBinding {
struct XrActionMapBinding *next, *prev;
/** Unique name. */
char name[64]; /* MAX_NAME */
char name[/*MAX_NAME*/ 64];
/** OpenXR interaction profile path. */
char profile[256];
@@ -150,14 +150,14 @@ typedef struct XrActionMapBinding {
typedef struct XrUserPath {
struct XrUserPath *next, *prev;
char path[64]; /* XR_MAX_USER_PATH_LENGTH */
char path[/*XR_MAX_USER_PATH_LENGTH*/ 64];
} XrUserPath;
typedef struct XrActionMapItem {
struct XrActionMapItem *next, *prev;
/** Unique name. */
char name[64]; /* MAX_NAME */
char name[/*MAX_NAME*/ 64];
/** Type. */
char type; /** eXrActionType */
char _pad[7];
@@ -166,7 +166,7 @@ typedef struct XrActionMapItem {
ListBase user_paths; /* XrUserPath */
/** Operator to be called on XR events. */
char op[64]; /* OP_MAX_TYPENAME */
char op[/*OP_MAX_TYPENAME*/ 64];
/** Operator properties, assigned to ptr->data and can be written to a file. */
IDProperty *op_properties;
/** RNA pointer to access properties. */
@@ -180,7 +180,7 @@ typedef struct XrActionMapItem {
short pose_flag; /* eXrPoseFlag */
/** Haptic properties. */
char haptic_name[64]; /* MAX_NAME */
char haptic_name[/*MAX_NAME*/ 64];
float haptic_duration;
float haptic_frequency;
float haptic_amplitude;
@@ -196,7 +196,7 @@ typedef struct XrActionMap {
struct XrActionMap *next, *prev;
/** Unique name. */
char name[64]; /* MAX_NAME */
char name[/*MAX_NAME*/ 64];
ListBase items; /* XrActionMapItem */
short selitem;

View File

@@ -37,7 +37,7 @@ struct LoadData {
int channel;
char name[64]; /* Strip name. */
/** Typically a `filepath` but may reference any kind of path. */
char path[1024]; /* 1024 = FILE_MAX */
char path[/*FILE_MAX*/ 1024];
struct {
int len;
int end_frame;