diff options
author | Campbell Barton <ideasman42@gmail.com> | 2010-10-18 10:41:16 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2010-10-18 10:41:16 +0400 |
commit | 4d37cf90b9d9d8ed2f0339c8ccd72481e29a4514 (patch) | |
tree | 8442faaffb762a79497a45d90f503ccedc4cd0b4 /source/blender/blenkernel/intern/writeavi.c | |
parent | b3afc3618db09942f83d4a3ac62834e7b925d5d7 (diff) |
remove G.sce, use G.main->name instead.
Both stored the filename of the blend file, but G.sce stored the last opened file.
This will make blender act differently in some cases since a relative path to the last opened file will no longer resolve (which is correct IMHO since that file isnt open and the path might not even be valid anymore).
Tested linking with durian files and rendering to relative paths when no files is loaded however we may need to have some operators give an error if they are used on the default startup.blend.
Diffstat (limited to 'source/blender/blenkernel/intern/writeavi.c')
-rw-r--r-- | source/blender/blenkernel/intern/writeavi.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/writeavi.c b/source/blender/blenkernel/intern/writeavi.c index 8363ff13ef9..de708f216fd 100644 --- a/source/blender/blenkernel/intern/writeavi.c +++ b/source/blender/blenkernel/intern/writeavi.c @@ -40,6 +40,7 @@ #include "BLI_blenlib.h" #include "BKE_global.h" +#include "BKE_main.h" #include "BKE_report.h" #include "BKE_utildefines.h" #include "BKE_writeavi.h" @@ -119,7 +120,7 @@ static void filepath_avi (char *string, RenderData *rd) if (string==NULL) return; strcpy(string, rd->pic); - BLI_path_abs(string, G.sce); + BLI_path_abs(string, G.main->name); BLI_make_existing_file(string); |