change filepath limit from 240 to 1024

This commit is contained in:
Campbell Barton
2012-01-21 14:54:53 +00:00
parent 7add5e2bac
commit ae771e742b
29 changed files with 69 additions and 67 deletions

View File

@@ -53,7 +53,7 @@ typedef struct Global {
struct Main *main;
/* strings: lastsaved */
char ima[256], lib[256];
char ima[1024], lib[1024]; /* 1024 = FILE_MAX */
/* flag: if != 0 G.main->name contains valid relative base path */
int relbase_valid;

View File

@@ -50,7 +50,7 @@ struct Library;
typedef struct Main {
struct Main *next, *prev;
char name[240]; /* 240 = FILE_MAX */
char name[1024]; /* 1024 = FILE_MAX */
short versionfile, subversionfile;
short minversionfile, minsubversionfile;
int revision; /* svn revision of binary that saved file */

View File

@@ -43,9 +43,9 @@ extern "C" {
/* these values need to be hardcoded in structs, dna does not recognize defines */
/* also defined in DNA_space_types.h */
#ifndef FILE_MAXDIR
#define FILE_MAXDIR 160
#define FILE_MAXFILE 80
#define FILE_MAX 240
#define FILE_MAXDIR 768
#define FILE_MAXFILE 256
#define FILE_MAX 1024
#endif
/* this weirdo pops up in two places ... */

View File

@@ -65,7 +65,7 @@ typedef struct BlendFileData {
int fileflags;
int displaymode;
int globalf;
char filename[240]; /* 240 = FILE_MAX */
char filename[1024]; /* 1024 = FILE_MAX */
struct bScreen* curscreen;
struct Scene* curscene;

View File

@@ -63,7 +63,7 @@ typedef struct ImBuf {
int channels; /**< amount of channels in rect_float (0 = 4 channel default) */
float dither; /**< random dither value, for conversion from float -> byte rect */
short profile; /** color space/profile preset that the byte rect buffer represents */
char profile_filename[256]; /** to be implemented properly, specific filename for custom profiles */
char profile_filename[1024]; /** to be implemented properly, specific filename for custom profiles */
/* mipmapping */
struct ImBuf *mipmap[IB_MIPMAP_LEVELS]; /**< MipMap levels, a series of halved images */

View File

@@ -41,7 +41,7 @@ struct Material;
typedef struct IconFile {
struct IconFile *next, *prev;
char filename[80]; // FILE_MAXFILE size
char filename[256]; // FILE_MAXFILE size
int index;
} IconFile;

View File

@@ -50,7 +50,7 @@
struct ImMetaData;
#define IB_MIPMAP_LEVELS 20
#define IB_FILENAME_SIZE 1023
#define IB_FILENAME_SIZE 1024
/**
* \ingroup imbuf

View File

@@ -136,9 +136,9 @@ struct anim {
int x, y;
/* voor op nummer */
char name[256];
char name[1024];
/* voor sequence */
char first[256];
char first[1024];
/* movie */
void *movie;
@@ -189,7 +189,7 @@ struct anim {
struct redcode_handle * redcodeCtx;
#endif
char index_dir[256];
char index_dir[768];
int proxies_tried;
int indices_tried;

View File

@@ -62,7 +62,7 @@ typedef struct anim_index_entry {
} anim_index_entry;
struct anim_index {
char name[256];
char name[1024];
int num_entries;
struct anim_index_entry * entries;

View File

@@ -128,8 +128,8 @@ typedef struct Library {
ID id;
ID *idblock;
struct FileData *filedata;
char name[240]; /* path name used for reading, can be relative and edited in the outliner */
char filepath[240]; /* absolute filepath, this is only for convenience,
char name[1024]; /* path name used for reading, can be relative and edited in the outliner */
char filepath[1024]; /* absolute filepath, this is only for convenience,
* 'name' is the real path used on file read but in
* some cases its useful to access the absolute one,
* This is set on file read.

View File

@@ -59,7 +59,7 @@ typedef struct Brush {
struct ImBuf *icon_imbuf;
PreviewImage *preview;
char icon_filepath[240]; /* 240 = FILE_MAX */
char icon_filepath[1024]; /* 1024 = FILE_MAX */
float normal_weight;

View File

@@ -55,7 +55,7 @@ typedef struct CustomDataLayer {
#define MAX_CUSTOMDATA_LAYER_NAME 64
typedef struct CustomDataExternal {
char filename[240]; /* FILE_MAX */
char filename[1024]; /* FILE_MAX */
} CustomDataExternal;
/** structure which stores custom element data associated with mesh elements

View File

@@ -128,7 +128,7 @@ typedef struct DynamicPaintSurface {
float wave_damping, wave_speed, wave_timescale, wave_spring;
char uvlayer_name[64]; /* MAX_CUSTOMDATA_LAYER_NAME */
char image_output_path[240]; /* 240 = FILE_MAX */
char image_output_path[1024]; /* 1024 = FILE_MAX */
char output_name[64]; /* MAX_CUSTOMDATA_LAYER_NAME */
char output_name2[64]; /* MAX_CUSTOMDATA_LAYER_NAME */ /* some surfaces have 2 outputs */

View File

@@ -51,7 +51,7 @@ typedef struct FileGlobal {
int revision; /* svn revision from buildinfo */
int pad;
/* file path where this was saved, for recover */
char filename[240]; /* 240 = FILE_MAX */
char filename[1024]; /* 1024 = FILE_MAX */
} FileGlobal;

View File

@@ -69,7 +69,7 @@ typedef struct ImageUser {
typedef struct Image {
ID id;
char name[240]; /* file path, 240 = FILE_MAX */
char name[1024]; /* file path, 1024 = FILE_MAX */
ListBase ibufs; /* not written in file */
struct GPUTexture *gputexture; /* not written in file */

View File

@@ -773,7 +773,7 @@ typedef struct OceanModifierData {
int bakestart;
int bakeend;
char cachepath[240]; // FILE_MAX
char cachepath[1024]; // FILE_MAX
char foamlayername[64]; /* MAX_CUSTOMDATA_LAYER_NAME */
char cached;
char geometry_mode;

View File

@@ -51,7 +51,7 @@ typedef struct MovieClipUser {
} MovieClipUser;
typedef struct MovieClipProxy {
char dir[160]; /* 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) */
short tc; /* time code in use */
short quality; /* proxy build quality */
@@ -64,7 +64,7 @@ typedef struct MovieClipProxy {
typedef struct MovieClip {
ID id;
char name[240]; /* file path, 240 = FILE_MAX */
char name[1024]; /* file path, 1024 = FILE_MAX */
int source; /* sequence or movie */
int lastframe; /* last accessed frame number */

View File

@@ -349,7 +349,7 @@ typedef struct NodeHueSat {
} NodeHueSat;
typedef struct NodeImageFile {
char name[256];
char name[1024]; /* 1024 = FILE_MAX */
struct ImageFormatData im_format;
int sfra, efra;
} NodeImageFile;

View File

@@ -89,8 +89,8 @@ typedef struct FluidsimSettings {
struct Mesh *meshBB;
/* store output path, and file prefix for baked fluid surface */
/* strlens; 80= FILE_MAXFILE, 160= FILE_MAXDIR */
char surfdataPath[240];
/* strlens; 256= FILE_MAXFILE, 768= FILE_MAXDIR */
char surfdataPath[1024];
/* store start coords of axis aligned bounding box together with size */
/* values are inited during derived mesh display */

View File

@@ -195,7 +195,7 @@ typedef struct PointCache {
char name[64];
char prev_name[64];
char info[64];
char path[240]; /* file path, 240 = FILE_MAX */
char path[1024]; /* file path, 1024 = FILE_MAX */
char *cached_frames; /* array of length endframe-startframe+1 with flags to indicate cached frames */
/* can be later used for other per frame flags too if needed */
struct ListBase mem_cache;

View File

@@ -471,14 +471,14 @@ typedef struct RenderData {
float bake_maxdist, bake_biasdist, bake_pad;
/* path to render output */
char pic[240]; /* 240 = FILE_MAX */
char pic[1024]; /* 1024 = FILE_MAX */
/* stamps flags. */
int stamp;
short stamp_font_id, pad3; /* select one of blenders bitmap fonts */
/* stamp info user data. */
char stamp_udata[160];
char stamp_udata[768];
/* foreground/background color. */
float fg_stamp[4];

View File

@@ -41,10 +41,10 @@ struct Ipo;
struct Scene;
struct bSound;
/* strlens; 80= FILE_MAXFILE, 160= FILE_MAXDIR */
/* strlens; 256= FILE_MAXFILE, 768= FILE_MAXDIR */
typedef struct StripElem {
char name[80];
char name[256];
int orig_width, orig_height;
} StripElem;
@@ -71,10 +71,10 @@ typedef struct StripColorBalance {
} StripColorBalance;
typedef struct StripProxy {
char dir[160]; // custom directory for index and proxy files
char dir[768]; // custom directory for index and proxy files
// (defaults to BL_proxy)
char file[80]; // custom file
char file[256]; // custom file
struct anim *anim; // custom proxy anim file
short tc; // time code in use
@@ -91,7 +91,7 @@ typedef struct Strip {
int rt, len, us, done;
int startstill, endstill;
StripElem *stripdata;
char dir[160];
char dir[768];
StripProxy *proxy;
StripCrop *crop;
StripTransform *transform;
@@ -100,7 +100,7 @@ typedef struct Strip {
typedef struct PluginSeq {
char name[256];
char name[1024]; /* 1024 = FILE_MAX */
void *handle;
char *pname;
@@ -191,8 +191,8 @@ typedef struct Editing {
/* Context vars, used to be static */
Sequence *act_seq;
char act_imagedir[256];
char act_sounddir[256];
char act_imagedir[1024]; /* 1024 = FILE_MAX */
char act_sounddir[1024]; /* 1024 = FILE_MAX */
int over_ofs, over_cfra;
int over_flag, pad;

View File

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

View File

@@ -174,10 +174,11 @@ typedef struct SpaceSeq {
typedef struct FileSelectParams {
char title[32]; /* title, also used for the text of the execute button */
char dir[240]; /* directory */
char file[80]; /* file */
char renamefile[80];
char renameedit[80]; /* annoying but the first is only used for initialization */
char dir[1056]; /* directory, FILE_MAX_LIBEXTRA, 1024 + 32, this is for extreme case when 1023 length path
* needs to be linked in, where foo.blend/Armature need adding */
char file[256]; /* file */
char renamefile[256];
char renameedit[256]; /* annoying but the first is only used for initialization */
char filter_glob[64]; /* list of filetypes to filter */
@@ -343,8 +344,9 @@ typedef struct Script {
void *py_globaldict;
int flags, lastspace;
char scriptname[256]; /* store the script file here so we can re-run it on loading blender, if "Enable Scripts" is on */
char scriptarg[256];
/* store the script file here so we can re-run it on loading blender, if "Enable Scripts" is on */
char scriptname[1024]; /* 1024 = FILE_MAX */
char scriptarg[256]; /* 1024 = FILE_MAX */
} Script;
#define SCRIPT_SET_NULL(_script) _script->py_draw = _script->py_event = _script->py_button = _script->py_browsercallback = _script->py_globaldict = NULL; _script->flags = 0;
@@ -622,9 +624,11 @@ enum FileSortTypeE {
/* these values need to be hardcoded in structs, dna does not recognize defines */
/* also defined in BKE */
#define FILE_MAXDIR 160
#define FILE_MAXFILE 80
#define FILE_MAX 240
#define FILE_MAXDIR 768
#define FILE_MAXFILE 256
#define FILE_MAX 1024
#define FILE_MAX_LIBEXTRA (FILE_MAX + 32)
/* filesel types */
#define FILE_UNIX 8

View File

@@ -105,7 +105,7 @@ typedef unsigned short dna_ushort_fix;
#endif
typedef struct PluginTex {
char name[160];
char name[1024];
void *handle;
char *pname;
@@ -200,7 +200,7 @@ typedef struct VoxelData {
struct Object *object; /* for rendering smoke sims */
float int_multiplier;
int still_frame;
char source_path[240]; /* 240 = FILE_MAX */
char source_path[1024]; /* 1024 = FILE_MAX */
/* temporary data */
float *dataset;

View File

@@ -60,7 +60,7 @@ struct ColorBand;
/* first font is the default (index 0), others optional */
typedef struct uiFont {
struct uiFont *next, *prev;
char filename[256];
char filename[1024];/* 1024 = FILE_MAX */
short blf_id; /* from blfont lib */
short uifont_id; /* own id */
short r_to_l; /* fonts that read from left to right */
@@ -158,7 +158,7 @@ typedef struct ThemeUI {
uiPanelColors panel;
char iconfile[80]; // FILE_MAXFILE length
char iconfile[256]; // FILE_MAXFILE length
float icon_alpha;
float pad;
@@ -323,16 +323,16 @@ typedef struct SolidLight {
typedef struct UserDef {
int flag, dupflag;
int savetime;
char tempdir[160]; /* FILE_MAXDIR length */
char fontdir[160];
char renderdir[240]; /* FILE_MAX length */
char textudir[160];
char plugtexdir[160];
char plugseqdir[160];
char pythondir[160];
char sounddir[160];
char image_editor[240]; /* 240 = FILE_MAX */
char anim_player[240]; /* 240 = FILE_MAX */
char tempdir[768]; /* FILE_MAXDIR length */
char fontdir[768];
char renderdir[1024]; /* FILE_MAX length */
char textudir[768];
char plugtexdir[768];
char plugseqdir[768];
char pythondir[768];
char sounddir[768];
char image_editor[1024]; /* 1024 = FILE_MAX */
char anim_player[1024]; /* 1024 = FILE_MAX */
int anim_player_preset;
short v2d_min_gridsize; /* minimum spacing between gridlines in View2D grids */
@@ -401,8 +401,6 @@ typedef struct UserDef {
float ndof_sensitivity; /* overall sensitivity of 3D mouse */
int ndof_flag; /* flags for 3D mouse */
char versemaster[160];
char verseuser[160];
float glalphaclip;
short autokey_mode; /* autokeying mode */

View File

@@ -42,7 +42,7 @@ struct VFontData;
typedef struct VFont {
ID id;
char name[256];
char name[1024]; /* 1024 = FILE_MAX */
struct VFontData *data;
struct PackedFile * packedfile;

View File

@@ -526,14 +526,14 @@ typedef struct wmDrag {
int icon, type; /* type, see WM_DRAG defines above */
void *poin;
char path[240]; /* FILE_MAX */
char path[1024]; /* FILE_MAX */
double value;
struct ImBuf *imb; /* if no icon but imbuf should be drawn around cursor */
float scale;
int sx, sy;
char opname[240]; /* FILE_MAX */ /* if set, draws operator name*/
char opname[200]; /* if set, draws operator name*/
} wmDrag;
/* dropboxes are like keymaps, part of the screen/area/region definition */

View File

@@ -83,7 +83,7 @@
#include "BLI_blenlib.h"
#include "BLI_math_base.h"
#define FILE_MAX 240 // repeated here to avoid dependency from BKE_utildefines.h
#define FILE_MAX 1024 // repeated here to avoid dependency from BKE_utildefines.h
#include "KX_NetworkMessageActuator.h"