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:
authorAlfredo de Greef <eeshlo@yahoo.com>2004-12-30 04:34:42 +0300
committerAlfredo de Greef <eeshlo@yahoo.com>2004-12-30 04:34:42 +0300
commita970419d0ea2a2c6a8ba8de6046782367d054b87 (patch)
tree16abf3f5d9939bbeb517ef8f34a8ce4c07778c7d /source/blender/yafray/intern/export_File.cpp
parentfcb00bf294a0e0cda699bd85fd340087ed8e3180 (diff)
If YFexport directory is not set, it will now attempt to use the temp directory.
(/tmp or $TEMP for win.) Probably too early still, but now in plugin mode the floatbuffer will be used too, including postprocessing.
Diffstat (limited to 'source/blender/yafray/intern/export_File.cpp')
-rwxr-xr-xsource/blender/yafray/intern/export_File.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/source/blender/yafray/intern/export_File.cpp b/source/blender/yafray/intern/export_File.cpp
index 43b4f6298e9..b865096477a 100755
--- a/source/blender/yafray/intern/export_File.cpp
+++ b/source/blender/yafray/intern/export_File.cpp
@@ -119,8 +119,12 @@ bool yafrayFileRender_t::initExport()
// try the user setting setting first, export dir must be set and exist
if (strlen(U.yfexportdir)==0)
{
- cout << "No export directory set in user defaults!\n";
- dir_failed = true;
+ cout << "No export directory set in user defaults!" << endl;
+ char* temp = getenv("TEMP");
+ // if no envar, use /tmp
+ xmlpath = temp ? temp : "/tmp";
+ cout << "Will try TEMP instead: " << xmlpath << endl;
+ // no fail here, but might fail when opening file...
}
else
{
@@ -256,9 +260,6 @@ void yafrayFileRender_t::displayImage()
// although it is possible to load the image using blender,
// maybe it is best to just do a read here, for now the yafray output is always a raw tga anyway
- // rectot already freed in initrender
- R.rectot = (unsigned int *)MEM_callocN(sizeof(int)*R.rectx*R.recty, "rectot");
-
FILE* fp = fopen(imgout.c_str(), "rb");
if (fp==NULL) {
cout << "YAF_displayImage(): Could not open image file\n";