Cleanup: add inline array size comments and minor corrections
This commit is contained in:
@@ -49,9 +49,9 @@ struct KeyingSetInfo {
|
||||
|
||||
/* info */
|
||||
/** Identifier used for class name, which KeyingSet instances reference as "Type-info Name". */
|
||||
char idname[/* MAX_NAME */ 64];
|
||||
char idname[/*MAX_NAME*/ 64];
|
||||
/** identifier so that user can hook this up to a KeyingSet (used as label). */
|
||||
char name[/* MAX_NAME */ 64];
|
||||
char name[/*MAX_NAME*/ 64];
|
||||
/** Short help/description. */
|
||||
char description[1024]; /* #RNA_DYN_DESCR_MAX */
|
||||
/** Keying settings. */
|
||||
|
||||
@@ -1143,7 +1143,7 @@ void filelist_free_icons()
|
||||
|
||||
void filelist_file_get_full_path(const FileList *filelist,
|
||||
const FileDirEntry *file,
|
||||
char r_filepath[/*FILE_MAX_LIBEXTRA*/])
|
||||
char r_filepath[FILE_MAX_LIBEXTRA])
|
||||
{
|
||||
if (file->asset) {
|
||||
const std::string asset_path = file->asset->full_path();
|
||||
|
||||
@@ -81,7 +81,7 @@ void filelist_init_icons();
|
||||
void filelist_free_icons();
|
||||
void filelist_file_get_full_path(const FileList *filelist,
|
||||
const FileDirEntry *file,
|
||||
char r_filepath[/*FILE_MAX_LIBEXTRA*/]);
|
||||
char r_filepath[/*FILE_MAX_LIBEXTRA*/ 1090]);
|
||||
bool filelist_file_is_preview_pending(const FileList *filelist, const FileDirEntry *file);
|
||||
/**
|
||||
* \return True if a new preview request was pushed, false otherwise (e.g. because the preview is
|
||||
|
||||
@@ -809,8 +809,8 @@ struct TransInfo {
|
||||
/** Orientation matrix of the current space. */
|
||||
float spacemtx[3][3];
|
||||
float spacemtx_inv[3][3];
|
||||
/** Name of the current space, MAX_NAME. */
|
||||
char spacename[64];
|
||||
/** Name of the current space. */
|
||||
char spacename[/*MAX_NAME*/ 64];
|
||||
|
||||
/*************** NEW STUFF *********************/
|
||||
/** Event type used to launch transform. */
|
||||
|
||||
@@ -165,7 +165,7 @@ struct GPULayerAttr {
|
||||
|
||||
/* Meaningful part of the attribute set key. */
|
||||
char name[256]; /* Multiple MAX_CUSTOMDATA_LAYER_NAME */
|
||||
/** Hash of name[68]. */
|
||||
/** Hash of `name[68]`. */
|
||||
uint32_t hash_code;
|
||||
|
||||
/* Helper fields used by code generation. */
|
||||
@@ -208,9 +208,9 @@ enum eGPUDefaultValue {
|
||||
|
||||
struct GPUMaterialAttribute {
|
||||
GPUMaterialAttribute *next, *prev;
|
||||
int type; /* eCustomDataType */
|
||||
char name[68]; /* MAX_CUSTOMDATA_LAYER_NAME */
|
||||
char input_name[12 + 1]; /* GPU_MAX_SAFE_ATTR_NAME + 1 */
|
||||
int type; /* eCustomDataType */
|
||||
char name[/*MAX_CUSTOMDATA_LAYER_NAME*/ 68];
|
||||
char input_name[/*GPU_MAX_SAFE_ATTR_NAME + 1*/ 12 + 1];
|
||||
eGPUType gputype;
|
||||
eGPUDefaultValue default_value; /* Only for volumes attributes. */
|
||||
int id;
|
||||
@@ -247,8 +247,8 @@ struct GPUUniformAttr {
|
||||
GPUUniformAttr *next, *prev;
|
||||
|
||||
/* Meaningful part of the attribute set key. */
|
||||
char name[68]; /* MAX_CUSTOMDATA_LAYER_NAME */
|
||||
/** Hash of name[68] + use_dupli. */
|
||||
char name[/*MAX_CUSTOMDATA_LAYER_NAME*/ 68];
|
||||
/** Hash of `name[MAX_CUSTOMDATA_LAYER_NAME] + use_dupli`. */
|
||||
uint32_t hash_code;
|
||||
bool use_dupli;
|
||||
|
||||
|
||||
@@ -297,7 +297,7 @@ static bool get_proxy_filepath(const MovieReader *anim,
|
||||
|
||||
BLI_assert(i >= 0);
|
||||
|
||||
char proxy_name[256];
|
||||
char proxy_name[FILE_MAXFILE];
|
||||
char stream_suffix[20];
|
||||
const char *name = (temp) ? "proxy_%d%s_part.avi" : "proxy_%d%s.avi";
|
||||
|
||||
|
||||
@@ -234,7 +234,7 @@ struct USDImportParams {
|
||||
eUSDMtlNameCollisionMode mtl_name_collision_mode;
|
||||
eUSDTexImportMode import_textures_mode;
|
||||
|
||||
char import_textures_dir[768]; /* FILE_MAXDIR */
|
||||
char import_textures_dir[/*FILE_MAXDIR*/ 768];
|
||||
eUSDTexNameCollisionMode tex_name_collision_mode;
|
||||
eUSDAttrImportMode attr_import_mode;
|
||||
|
||||
|
||||
@@ -629,7 +629,7 @@ typedef struct FluidDomainSettings {
|
||||
char cache_data_format;
|
||||
char cache_particle_format;
|
||||
char cache_noise_format;
|
||||
char cache_directory[1024];
|
||||
char cache_directory[/*FILE_MAX*/ 1024];
|
||||
char error[64]; /* Bake error description. */
|
||||
short cache_type;
|
||||
char cache_id[4]; /* Run-time only */
|
||||
@@ -783,8 +783,7 @@ typedef struct FluidFlowSettings {
|
||||
float texture_size;
|
||||
float texture_offset;
|
||||
char _pad2[4];
|
||||
/* MAX_CUSTOMDATA_LAYER_NAME. */
|
||||
char uvlayer_name[68];
|
||||
char uvlayer_name[/*MAX_CUSTOMDATA_LAYER_NAME*/ 68];
|
||||
char _pad3[4];
|
||||
short vgroup_density;
|
||||
|
||||
|
||||
@@ -120,9 +120,9 @@ enum {
|
||||
/* Used to get the correct gpu texture from an Image datablock. */
|
||||
typedef enum eGPUTextureTarget {
|
||||
TEXTARGET_2D = 0,
|
||||
TEXTARGET_2D_ARRAY,
|
||||
TEXTARGET_TILE_MAPPING,
|
||||
TEXTARGET_COUNT,
|
||||
TEXTARGET_2D_ARRAY = 1,
|
||||
TEXTARGET_TILE_MAPPING = 2,
|
||||
TEXTARGET_COUNT = 3,
|
||||
} eGPUTextureTarget;
|
||||
|
||||
typedef struct Image {
|
||||
|
||||
@@ -52,7 +52,7 @@ typedef struct KeyBlock {
|
||||
* E.g. meshes use float3. */
|
||||
void *data;
|
||||
/** Unique name, user assigned. */
|
||||
char name[64];
|
||||
char name[/*MAX_NAME*/ 64];
|
||||
/** Optional vertex group, array gets allocated into 'weights' when set. */
|
||||
char vgroup[/*MAX_VGROUP_NAME*/ 64];
|
||||
|
||||
|
||||
@@ -213,7 +213,7 @@ typedef struct MappingInfoModifierData {
|
||||
|
||||
struct Tex *texture;
|
||||
struct Object *map_object;
|
||||
char map_bone[64];
|
||||
char map_bone[/*MAXBONENAME*/ 64];
|
||||
char uvlayer_name[/*MAX_CUSTOMDATA_LAYER_NAME*/ 68];
|
||||
char _pad1[4];
|
||||
int uvlayer_tmp;
|
||||
@@ -631,7 +631,7 @@ typedef struct DisplaceModifierData {
|
||||
|
||||
struct Tex *texture;
|
||||
struct Object *map_object;
|
||||
char map_bone[64];
|
||||
char map_bone[/*MAXBONENAME*/ 64];
|
||||
char uvlayer_name[/*MAX_CUSTOMDATA_LAYER_NAME*/ 68];
|
||||
char _pad1[4];
|
||||
int uvlayer_tmp;
|
||||
@@ -785,7 +785,7 @@ typedef struct WaveModifierData {
|
||||
|
||||
struct Tex *texture;
|
||||
struct Object *map_object;
|
||||
char map_bone[64];
|
||||
char map_bone[/*MAXBONENAME*/ 64];
|
||||
char uvlayer_name[/*MAX_CUSTOMDATA_LAYER_NAME*/ 68];
|
||||
char _pad1[4];
|
||||
int uvlayer_tmp;
|
||||
@@ -1460,7 +1460,7 @@ typedef struct WarpModifierData {
|
||||
|
||||
struct Tex *texture;
|
||||
struct Object *map_object;
|
||||
char map_bone[64];
|
||||
char map_bone[/*MAXBONENAME*/ 64];
|
||||
char uvlayer_name[/*MAX_CUSTOMDATA_LAYER_NAME*/ 68];
|
||||
char _pad1[4];
|
||||
int uvlayer_tmp;
|
||||
@@ -1539,7 +1539,7 @@ typedef struct WeightVGEditModifierData {
|
||||
/** Name of the map object. */
|
||||
struct Object *mask_tex_map_obj;
|
||||
/** Name of the map bone. */
|
||||
char mask_tex_map_bone[64];
|
||||
char mask_tex_map_bone[/*MAXBONENAME*/ 64];
|
||||
/** How to map the texture (using MOD_DISP_MAP_* enums). */
|
||||
int mask_tex_mapping;
|
||||
/** Name of the UV map. */
|
||||
@@ -1592,11 +1592,11 @@ typedef struct WeightVGMixModifierData {
|
||||
/** Name of the map object. */
|
||||
struct Object *mask_tex_map_obj;
|
||||
/** Name of the map bone. */
|
||||
char mask_tex_map_bone[64];
|
||||
char mask_tex_map_bone[/*MAXBONENAME*/ 64];
|
||||
/** How to map the texture. */
|
||||
int mask_tex_mapping;
|
||||
/** Name of the UV map. */
|
||||
char mask_tex_uvlayer_name[68];
|
||||
char mask_tex_uvlayer_name[/*MAX_CUSTOMDATA_LAYER_NAME*/ 68];
|
||||
char _pad1[4];
|
||||
|
||||
char flag;
|
||||
@@ -1681,7 +1681,7 @@ typedef struct WeightVGProximityModifierData {
|
||||
/** Name of the map object. */
|
||||
struct Object *mask_tex_map_obj;
|
||||
/** Name of the map bone. */
|
||||
char mask_tex_map_bone[64];
|
||||
char mask_tex_map_bone[/*MAXBONENAME*/ 64];
|
||||
/** How to map the texture. */
|
||||
int mask_tex_mapping;
|
||||
/** Name of the UV Map. */
|
||||
|
||||
@@ -1520,7 +1520,7 @@ typedef struct TexNodeOutput {
|
||||
} TexNodeOutput;
|
||||
|
||||
typedef struct NodeKeyingScreenData {
|
||||
char tracking_object[64];
|
||||
char tracking_object[/*MAX_NAME*/ 64];
|
||||
float smoothness DNA_DEPRECATED;
|
||||
} NodeKeyingScreenData;
|
||||
|
||||
@@ -1540,7 +1540,7 @@ typedef struct NodeKeyingData {
|
||||
} NodeKeyingData;
|
||||
|
||||
typedef struct NodeTrackPosData {
|
||||
char tracking_object[64];
|
||||
char tracking_object[/*MAX_NAME*/ 64];
|
||||
char track_name[64];
|
||||
} NodeTrackPosData;
|
||||
|
||||
@@ -1576,20 +1576,20 @@ typedef struct NodeShaderScript {
|
||||
typedef struct NodeShaderTangent {
|
||||
int direction_type;
|
||||
int axis;
|
||||
char uv_map[64];
|
||||
char uv_map[/*MAX_CUSTOMDATA_LAYER_NAME_NO_PREFIX*/ 64];
|
||||
} NodeShaderTangent;
|
||||
|
||||
typedef struct NodeShaderNormalMap {
|
||||
int space;
|
||||
char uv_map[64];
|
||||
char uv_map[/*MAX_CUSTOMDATA_LAYER_NAME_NO_PREFIX*/ 64];
|
||||
} NodeShaderNormalMap;
|
||||
|
||||
typedef struct NodeShaderUVMap {
|
||||
char uv_map[64];
|
||||
char uv_map[/*MAX_CUSTOMDATA_LAYER_NAME_NO_PREFIX*/ 64];
|
||||
} NodeShaderUVMap;
|
||||
|
||||
typedef struct NodeShaderVertexColor {
|
||||
char layer_name[64];
|
||||
char layer_name[/*MAX_CUSTOMDATA_LAYER_NAME_NO_PREFIX*/ 64];
|
||||
} NodeShaderVertexColor;
|
||||
|
||||
typedef struct NodeShaderTexIES {
|
||||
@@ -1599,7 +1599,7 @@ typedef struct NodeShaderTexIES {
|
||||
} NodeShaderTexIES;
|
||||
|
||||
typedef struct NodeShaderOutputAOV {
|
||||
char name[64];
|
||||
char name[/*MAX_NAME*/ 64];
|
||||
} NodeShaderOutputAOV;
|
||||
|
||||
typedef struct NodeSunBeams {
|
||||
|
||||
@@ -400,9 +400,9 @@ typedef struct FileSelectParams {
|
||||
* needs to be linked in, where `foo.blend/Armature` need adding.
|
||||
*/
|
||||
char dir[/*FILE_MAX_LIBEXTRA*/ 1090];
|
||||
char file[256];
|
||||
char file[/*FILE_MAXFILE*/ 256];
|
||||
|
||||
char renamefile[256];
|
||||
char renamefile[/*FILE_MAXFILE*/ 256];
|
||||
short rename_flag;
|
||||
char _pad[4];
|
||||
/** An ID that was just renamed. Used to identify a renamed asset file over re-reads, similar to
|
||||
|
||||
@@ -104,7 +104,7 @@ typedef struct bUserExtensionRepo {
|
||||
* 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[/*NAME_MAX-16*/ 48];
|
||||
char module[/*MAX_NAME - 16*/ 48];
|
||||
|
||||
/**
|
||||
* Secret access token for remote repositories (allocated).
|
||||
|
||||
@@ -286,7 +286,7 @@ typedef struct wmWindow {
|
||||
/** Temporary when switching. */
|
||||
struct Scene *new_scene;
|
||||
/** Active view layer displayed in this window. */
|
||||
char view_layer_name[64];
|
||||
char view_layer_name[/*MAX_NAME*/ 64];
|
||||
/** The workspace may temporarily override the window's scene with scene pinning. This is the
|
||||
* "overridden" or "default" scene to restore when entering a workspace with no scene pinned. */
|
||||
struct Scene *unpinned_scene;
|
||||
|
||||
@@ -60,7 +60,7 @@ struct LaplacianSystem {
|
||||
int anchors_num;
|
||||
int repeat;
|
||||
/** Vertex Group name */
|
||||
char anchor_grp_name[64];
|
||||
char anchor_grp_name[/*MAX_VGROUP_NAME*/ 64];
|
||||
/** Original vertex coordinates. */
|
||||
float (*co)[3];
|
||||
/** Original vertex normal. */
|
||||
|
||||
Reference in New Issue
Block a user