diff options
author | Andrea Weikert <elubie@gmx.net> | 2007-11-10 14:45:25 +0300 |
---|---|---|
committer | Andrea Weikert <elubie@gmx.net> | 2007-11-10 14:45:25 +0300 |
commit | 38d12b3c8de23acb7820b238523c9d28f83854d4 (patch) | |
tree | 9fae3ff09c225f376f11168209bb52b12d18aa54 /source/blender/src/editimasel.c | |
parent | f02a746f56fb351ea92bbf82b8efbd3c1d6faa3e (diff) |
Bugfix #6797: Relative paths load problem on new file (fix included)
- brought back the check for a valid relative base when selecting.
- kept the check for when file is saved too and warning message is printed to console instead of popping up.
Also fixed BLI_split_filedir overwriting parameter passed as const char*
Diffstat (limited to 'source/blender/src/editimasel.c')
-rw-r--r-- | source/blender/src/editimasel.c | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/source/blender/src/editimasel.c b/source/blender/src/editimasel.c index 8bf5b0f03cb..abc19b53671 100644 --- a/source/blender/src/editimasel.c +++ b/source/blender/src/editimasel.c @@ -546,15 +546,18 @@ static void imasel_execute(SpaceImaSel *simasel) strcat(name, simasel->file); if(simasel->flag & FILE_STRINGCODE) { - if (!G.relbase_valid) { - /* skip save */ - if(strncmp(simasel->title, "Save", 4)) { - okee("You have to save the .blend file before using relative paths! Using absolute path instead."); - simasel->flag &= ~FILE_STRINGCODE; - } - } - else { + /* still weak, but we don't want saving files to make relative paths */ + if(G.relbase_valid && strncmp(simasel->title, "Save", 4)) { BLI_makestringcode(G.sce, name); + } else { + /* if we don't have a valid relative base (.blend file hasn't been saved yet) + then we don't save the path as relative (for texture images, background image). + Warning message not shown when saving files (doesn't make sense there) + */ + if (strncmp(simasel->title, "Save", 4)) { + printf("Relative path setting has been ignored because .blend file hasn't been saved yet.\n"); + } + simasel->flag &= ~FILE_STRINGCODE; } } if(simasel->returnfunc) |