Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2007-09-12 09:13:59 +0400
committerCampbell Barton <ideasman42@gmail.com>2007-09-12 09:13:59 +0400
commit58ba2f8f1c4b07820f0659f4d9681c726f76cada (patch)
tree99c0fdd39692fae736434e7d982f8cc8a51848cb
parent603716e470850a3c63aa7a075151ebeb4b50f5cb (diff)
change from last commit. dont show the relative button in the file selector if the Blend file is unsaved. otherwise functionality is the same as it was.
-rw-r--r--source/blender/src/filesel.c5
-rw-r--r--source/blender/src/header_filesel.c7
2 files changed, 6 insertions, 6 deletions
diff --git a/source/blender/src/filesel.c b/source/blender/src/filesel.c
index 2b04f303f2f..5c9fd847f53 100644
--- a/source/blender/src/filesel.c
+++ b/source/blender/src/filesel.c
@@ -1358,7 +1358,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= -1;
- if(!strstr(G.main->name, ".B.blend") && BLI_convertstringcode(name, G.sce, G.scene->r.cfra))
+ if(G.relbase_valid && BLI_convertstringcode(name, G.sce, G.scene->r.cfra))
sfile->flag |= FILE_STRINGCODE;
else
sfile->flag &= ~FILE_STRINGCODE;
@@ -1443,8 +1443,7 @@ void activate_imageselect(int type, char *title, char *file, void (*func)(char *
simasel= curarea->spacedata.first;
simasel->returnfunc= func;
-
- if(!strstr(G.main->name, ".B.blend") && BLI_convertstringcode(name, G.sce, G.scene->r.cfra))
+ if(G.relbase_valid && BLI_convertstringcode(name, G.sce, G.scene->r.cfra))
simasel->mode |= IMS_STRINGCODE;
else
simasel->mode &= ~IMS_STRINGCODE;
diff --git a/source/blender/src/header_filesel.c b/source/blender/src/header_filesel.c
index 3424c4b7c3d..4677202d8ae 100644
--- a/source/blender/src/header_filesel.c
+++ b/source/blender/src/header_filesel.c
@@ -136,9 +136,10 @@ 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");
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");
-
- xco+=90;
+ if (G.relbase_valid) {
+ 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) {
uiBlockBeginAlign(block);