Collada(exporter): Added error message when export file can not be created for whichever reason

This commit is contained in:
Gaia Clary 2012-09-19 19:28:29 +00:00
parent b25bea036f
commit f3d261d795
2 changed files with 2 additions and 0 deletions

@ -76,6 +76,7 @@ int collada_export(Scene *sce,
if (!BLI_exists(filepath)) {
BLI_make_existing_file(filepath); /* makes the dir if its not there */
if (BLI_file_touch(filepath) == 0) {
fprintf(stdout, "Collada export: Can not create: %s\n", filepath);
return 0;
}
}

@ -143,6 +143,7 @@ static int wm_collada_export_exec(bContext *C, wmOperator *op)
return OPERATOR_FINISHED;
}
else {
BKE_report(op->reports, RPT_WARNING, "Export file not created.");
return OPERATOR_CANCELLED;
}
}