[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [12020] branches/2-44-stable/blender/ source/blender/src: change from last commit.
Campbell Barton
cbarton at metavr.com
Wed Sep 12 07:13:59 CEST 2007
Revision: 12020
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=12020
Author: campbellbarton
Date: 2007-09-12 07:13:59 +0200 (Wed, 12 Sep 2007)
Log Message:
-----------
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.
Modified Paths:
--------------
branches/2-44-stable/blender/source/blender/src/filesel.c
branches/2-44-stable/blender/source/blender/src/header_filesel.c
Modified: branches/2-44-stable/blender/source/blender/src/filesel.c
===================================================================
--- branches/2-44-stable/blender/source/blender/src/filesel.c 2007-09-12 03:51:26 UTC (rev 12019)
+++ branches/2-44-stable/blender/source/blender/src/filesel.c 2007-09-12 05:13:59 UTC (rev 12020)
@@ -1358,7 +1358,7 @@
/* 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 @@
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;
Modified: branches/2-44-stable/blender/source/blender/src/header_filesel.c
===================================================================
--- branches/2-44-stable/blender/source/blender/src/header_filesel.c 2007-09-12 03:51:26 UTC (rev 12019)
+++ branches/2-44-stable/blender/source/blender/src/header_filesel.c 2007-09-12 05:13:59 UTC (rev 12020)
@@ -136,10 +136,11 @@
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");
+ 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;
+ }
- xco+=90;
-
if(sfile->type==FILE_LOADLIB) {
uiBlockBeginAlign(block);
uiDefButBitS(block, TOGN, FILE_LINK, B_REDR, "Append", xco+=XIC,0,100,YIC, &sfile->flag, 0, 0, 0, 0, "Copies selected data into current project");
More information about the Bf-blender-cvs
mailing list