diff options
author | Alfredo de Greef <eeshlo@yahoo.com> | 2004-09-21 03:59:09 +0400 |
---|---|---|
committer | Alfredo de Greef <eeshlo@yahoo.com> | 2004-09-21 03:59:09 +0400 |
commit | 7d65af235e08b5e785a6dc2ca76f0ae8727b39bf (patch) | |
tree | 8d5618def2b4cd6e432055bf56b1983f06ff6abc /source/blender/yafray/intern | |
parent | 273c8e08041111714e47dbb0d50604553fd5f854 (diff) |
test commit
Bugfix for anim crash with xml export and no export dir set.
Alternate relative path using blender function, but wouldn't be surprised
if it still is a problem in some cases for some (windows) users.
Diffstat (limited to 'source/blender/yafray/intern')
-rwxr-xr-x | source/blender/yafray/intern/export_File.cpp | 18 | ||||
-rw-r--r-- | source/blender/yafray/intern/export_Plugin.cpp | 18 | ||||
-rw-r--r-- | source/blender/yafray/intern/yafray_Render.cpp | 1 |
3 files changed, 19 insertions, 18 deletions
diff --git a/source/blender/yafray/intern/export_File.cpp b/source/blender/yafray/intern/export_File.cpp index 22f8f1f042a..5584ac47bd3 100755 --- a/source/blender/yafray/intern/export_File.cpp +++ b/source/blender/yafray/intern/export_File.cpp @@ -294,18 +294,18 @@ void yafrayFileRender_t::displayImage() } +#ifdef WIN32 +#define MAXPATHLEN MAX_PATH +#else +#include <sys/param.h> +#endif static void adjustPath(string &path) { // if relative, expand to full path - if ((path[0]=='/') && (path[1]=='/')) { - string basepath = G.sce; - // fwd slash valid for win32 as well - int ls = basepath.find_last_of("/"); -#ifdef WIN32 - if (ls==-1) ls = basepath.find_last_of("\\"); -#endif - path = basepath.substr(0, ls) + path.substr(1, path.length()); - } + char cpath[MAXPATHLEN]; + strcpy(cpath, path.c_str()); + BLI_convertstringcode(cpath, G.sce, 0); + path = cpath; #ifdef WIN32 // add drive char if not there addDrive(path); diff --git a/source/blender/yafray/intern/export_Plugin.cpp b/source/blender/yafray/intern/export_Plugin.cpp index a3d1624820b..960e65c13c2 100644 --- a/source/blender/yafray/intern/export_Plugin.cpp +++ b/source/blender/yafray/intern/export_Plugin.cpp @@ -298,18 +298,18 @@ void yafrayPluginRender_t::displayImage() } +#ifdef WIN32 +#define MAXPATHLEN MAX_PATH +#else +#include <sys/param.h> +#endif static void adjustPath(string &path) { // if relative, expand to full path - if ((path[0]=='/') && (path[1]=='/')) { - string basepath = G.sce; - // fwd slash valid for win32 as well - int ls = basepath.find_last_of("/"); -#ifdef WIN32 - if (ls==-1) ls = basepath.find_last_of("\\"); -#endif - path = basepath.substr(0, ls) + path.substr(1, path.length()); - } + char cpath[MAXPATHLEN]; + strcpy(cpath, path.c_str()); + BLI_convertstringcode(cpath, G.sce, 0); + path = cpath; #ifdef WIN32 // add drive char if not there addDrive(path); diff --git a/source/blender/yafray/intern/yafray_Render.cpp b/source/blender/yafray/intern/yafray_Render.cpp index e91b5bff707..461e5d5dfe5 100644 --- a/source/blender/yafray/intern/yafray_Render.cpp +++ b/source/blender/yafray/intern/yafray_Render.cpp @@ -42,6 +42,7 @@ bool yafrayRender_t::exportScene() if (!initExport()) { + G.afbreek = 1; clearAll(); return false; } |