don't display relative paths button when loading files.

this was silly anyway since it always gave an error.
This commit is contained in:
Campbell Barton 2008-01-18 23:31:18 +00:00
parent 4ffd8d2a28
commit 31f14862f7
5 changed files with 17 additions and 10 deletions

@ -421,7 +421,7 @@ typedef struct SpaceImaSel {
/* filesel types */ /* filesel types */
#define FILE_UNIX 8 #define FILE_UNIX 8
#define FILE_BLENDER 8 #define FILE_BLENDER 8 /* dont display relative paths */
#define FILE_SPECIAL 9 #define FILE_SPECIAL 9
#define FILE_LOADLIB 1 #define FILE_LOADLIB 1

@ -195,7 +195,7 @@ static void activate_imageselect_(int type, char *title, char *file, short *menu
simasel->files = BIF_filelist_new(); simasel->files = BIF_filelist_new();
} }
if(G.relbase_valid && BLI_convertstringcode(name, G.sce, G.scene->r.cfra)) if(G.relbase_valid && U.flag & USER_RELPATHS && type != FILE_BLENDER)
simasel->flag |= FILE_STRINGCODE; simasel->flag |= FILE_STRINGCODE;
else else
simasel->flag &= ~FILE_STRINGCODE; simasel->flag &= ~FILE_STRINGCODE;

@ -1192,7 +1192,7 @@ static void activate_fileselect_(int type, char *title, char *file, short *menup
/* sfile->act is used for databrowse: double names of library objects */ /* sfile->act is used for databrowse: double names of library objects */
sfile->act= -1; sfile->act= -1;
if(G.relbase_valid && U.flag & USER_RELPATHS) if(G.relbase_valid && U.flag & USER_RELPATHS && type != FILE_BLENDER)
sfile->flag |= FILE_STRINGCODE; sfile->flag |= FILE_STRINGCODE;
else else
sfile->flag &= ~FILE_STRINGCODE; sfile->flag &= ~FILE_STRINGCODE;

@ -136,9 +136,12 @@ void file_buttons(void)
uiDefIconButBitS(block, TOG, FILE_HIDE_DOT, B_RELOADDIR, ICON_GHOST,xco+=XIC,0,XIC,YIC, &sfile->flag, 0, 0, 0, 0, "Hides dot files"); uiDefIconButBitS(block, TOG, FILE_HIDE_DOT, B_RELOADDIR, ICON_GHOST,xco+=XIC,0,XIC,YIC, &sfile->flag, 0, 0, 0, 0, "Hides dot files");
uiBlockEndAlign(block); uiBlockEndAlign(block);
uiDefButBitS(block, TOG, FILE_STRINGCODE, 0, "Relative Paths", xco+=XIC+20,0,100,YIC, &sfile->flag, 0, 0, 0, 0, "Makes sure returned paths are relative to the current .blend file"); if(sfile->type==FILE_BLENDER) {
xco+=20;
xco+=90; } else {
uiDefButBitS(block, TOG, FILE_STRINGCODE, 0, "Relative Paths", xco+=XIC+20,0,100,YIC, &sfile->flag, 0, 0, 0, 0, "Makes sure returned paths are relative to the current .blend file");
xco+=90;
}
if(sfile->type==FILE_LOADLIB) { if(sfile->type==FILE_LOADLIB) {
uiBlockBeginAlign(block); uiBlockBeginAlign(block);

@ -182,8 +182,12 @@ void imasel_buttons(void)
} }
} }
uiDefButBitS(block, TOG, FILE_STRINGCODE, 0, "Relative Paths", xco+=XIC+20,0,100,YIC, &simasel->flag, 0, 0, 0, 0, "Makes sure returned paths are relative to the current .blend file"); if(simasel->type==FILE_BLENDER) {
xco+=90; xco+=20;
} else {
uiDefButBitS(block, TOG, FILE_STRINGCODE, 0, "Relative Paths", xco+=XIC+20,0,100,YIC, &simasel->flag, 0, 0, 0, 0, "Makes sure returned paths are relative to the current .blend file");
xco+=90;
}
if(simasel->type==FILE_LOADLIB) { if(simasel->type==FILE_LOADLIB) {
uiBlockBeginAlign(block); uiBlockBeginAlign(block);