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
path: root/source
diff options
context:
space:
mode:
authorMatt Ebb <matt@mke3.net>2010-04-07 13:07:06 +0400
committerMatt Ebb <matt@mke3.net>2010-04-07 13:07:06 +0400
commit9acba540dbc3114e7d2d236684d6cd8b308e0a37 (patch)
tree107ec942e9e06203c27fa41ee80d5766be25fe0e /source
parent45ce1c003d7d28b2beb5dbf465f523c5bc41bc55 (diff)
Fix [#21756] Texture paint "quick edit" sending wrong path on unsaved scenes
* Made it use the temp directory in user preferences when the .blend file hasn't been saved yet * Made bmain->name (wrapped as bpy.data.filename) contain an empty string when there's no .B25.blend and no file saved, rather than "<memory2>". This is a good candidate for consistent file path api, retrieving temp dirs / project- specific temp dirs / etc...
Diffstat (limited to 'source')
-rw-r--r--source/blender/blenkernel/intern/blender.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/source/blender/blenkernel/intern/blender.c b/source/blender/blenkernel/intern/blender.c
index d7f8d73e31f..48fe93af418 100644
--- a/source/blender/blenkernel/intern/blender.c
+++ b/source/blender/blenkernel/intern/blender.c
@@ -287,10 +287,14 @@ static void setup_app_data(bContext *C, BlendFileData *bfd, char *filename)
if(G.main->versionfile < 250)
do_versions_ipos_to_animato(G.main); // XXX fixme... complicated versionpatching
- /* in case of autosave or quit.blend, use original filename instead
- * use relbase_valid to make sure the file is saved, else we get <memory2> in the filename */
- if(recover && bfd->filename[0] && G.relbase_valid)
+ if(recover && bfd->filename[0] && G.relbase_valid) {
+ /* in case of autosave or quit.blend, use original filename instead
+ * use relbase_valid to make sure the file is saved, else we get <memory2> in the filename */
filename= bfd->filename;
+ } else if (!G.relbase_valid) {
+ /* otherwise, use an empty string as filename, rather than <memory2> */
+ filename="";
+ }
/* these are the same at times, should never copy to the same location */
if(G.sce != filename)