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/blenlib | |
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/blenlib')
-rw-r--r-- | source/blender/blenlib/BLI_bpath.h | 2 | ||||
-rw-r--r-- | source/blender/blenlib/intern/bpath.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/blenlib/BLI_bpath.h b/source/blender/blenlib/BLI_bpath.h index 72489a171b9..34b9e282061 100644 --- a/source/blender/blenlib/BLI_bpath.h +++ b/source/blender/blenlib/BLI_bpath.h @@ -50,7 +50,7 @@ struct BPathIterator { void (*setpath_callback)(struct BPathIterator *, char *); void (*getpath_callback)(struct BPathIterator *, char *); - char* base_path; /* base path, the directry the blend file is in - normally G.sce */ + char* base_path; /* base path, the directry the blend file is in - normally G.main->name */ /* only for seq data */ struct BPathIteratorSeqData seqdata; diff --git a/source/blender/blenlib/intern/bpath.c b/source/blender/blenlib/intern/bpath.c index cf7eb873409..862df4103a7 100644 --- a/source/blender/blenlib/intern/bpath.c +++ b/source/blender/blenlib/intern/bpath.c @@ -92,7 +92,7 @@ void BLI_bpathIterator_init( struct BPathIterator *bpi, char *base_path ) { bpi->seqdata.seqar = NULL; bpi->seqdata.scene = NULL; - bpi->base_path= base_path ? base_path : G.sce; + bpi->base_path= base_path ? base_path : G.main->name; BLI_bpathIterator_step(bpi); } |