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:
authorGaia Clary <gaia.clary@machinimatrix.org>2016-02-20 23:42:12 +0300
committerGaia Clary <gaia.clary@machinimatrix.org>2016-02-20 23:42:12 +0300
commit4e95807db3e17c647001ba4112371217d0d2506b (patch)
tree1b4e92587f2ce8d80d93806549f5a49bdba76e22 /source/blender/collada/DocumentExporter.cpp
parentedf9e8d4dc676ea0789297369d4d78be8234f4ef (diff)
fix T47484: Added proper error reporting for Collada Exporter
Diffstat (limited to 'source/blender/collada/DocumentExporter.cpp')
-rw-r--r--source/blender/collada/DocumentExporter.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/source/blender/collada/DocumentExporter.cpp b/source/blender/collada/DocumentExporter.cpp
index 71c9391c6ac..90e53fe5eb0 100644
--- a/source/blender/collada/DocumentExporter.cpp
+++ b/source/blender/collada/DocumentExporter.cpp
@@ -178,7 +178,7 @@ static COLLADABU::NativeString make_temp_filepath(const char *name, const char *
// COLLADA allows this through multiple <channel>s in <animation>.
// For this to work, we need to know objects that use a certain action.
-void DocumentExporter::exportCurrentScene(Scene *sce)
+int DocumentExporter::exportCurrentScene(Scene *sce)
{
PointerRNA sceneptr, unit_settings;
PropertyRNA *system; /* unused , *scale; */
@@ -331,8 +331,13 @@ void DocumentExporter::exportCurrentScene(Scene *sce)
// Finally move the created document into place
int status = BLI_rename(native_filename.c_str(), this->export_settings->filepath);
- fprintf(stdout, "Collada moved buffer : %s (Status: %d)\n", this->export_settings->filepath, status);
-
+ if (status != 0)
+ {
+ fprintf(stdout, "Collada: Can't move buffer %s\n", native_filename.c_str());
+ fprintf(stdout, " to its destination %s\n", this->export_settings->filepath);
+ fprintf(stdout, "Reason : %s\n", errno ? strerror(errno) : "unknown error");
+ }
+ return status;
}
void DocumentExporter::exportScenes(const char *filename)