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
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2010-10-18 10:41:16 +0400
committerCampbell Barton <ideasman42@gmail.com>2010-10-18 10:41:16 +0400
commit4d37cf90b9d9d8ed2f0339c8ccd72481e29a4514 (patch)
tree8442faaffb762a79497a45d90f503ccedc4cd0b4 /source/blender/collada
parentb3afc3618db09942f83d4a3ac62834e7b925d5d7 (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/collada')
-rw-r--r--source/blender/collada/ImageExporter.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/collada/ImageExporter.cpp b/source/blender/collada/ImageExporter.cpp
index ce40846ba59..3194b2269ea 100644
--- a/source/blender/collada/ImageExporter.cpp
+++ b/source/blender/collada/ImageExporter.cpp
@@ -32,6 +32,7 @@
#include "DNA_texture_types.h"
#include "BKE_global.h"
+#include "BKE_main.h"
#include "BKE_utildefines.h"
#include "BLI_fileops.h"
#include "BLI_path_util.h"
@@ -66,13 +67,13 @@ void ImagesExporter::operator()(Material *ma, Object *ob)
BLI_split_dirfile(mfilename, dir, NULL);
- BKE_rebase_path(abs, sizeof(abs), rel, sizeof(rel), G.sce, image->name, dir);
+ BKE_rebase_path(abs, sizeof(abs), rel, sizeof(rel), G.main->name, image->name, dir);
if (abs[0] != '\0') {
// make absolute source path
BLI_strncpy(src, image->name, sizeof(src));
- BLI_path_abs(src, G.sce);
+ BLI_path_abs(src, G.main->name);
// make dest directory if it doesn't exist
BLI_make_existing_file(abs);