mirror of
https://github.com/lucaspalomodevelop/meshlab.git
synced 2026-03-15 00:54:38 +00:00
better error message for u3d converter
This commit is contained in:
parent
bb3c1a98a4
commit
9daefb4c89
2
src/external/u3d/src/IDTF/Converter.cpp
vendored
2
src/external/u3d/src/IDTF/Converter.cpp
vendored
@ -67,6 +67,7 @@ namespace IDTFConverter {
|
||||
bool IDTFToU3d(
|
||||
const std::string& inputFileName,
|
||||
const std::string& outputFileName,
|
||||
int& resCode,
|
||||
int positionQuality)
|
||||
{
|
||||
const char* argv[] = {
|
||||
@ -220,6 +221,7 @@ bool IDTFToU3d(
|
||||
|
||||
IFXDEBUG_SHUTDOWN();
|
||||
|
||||
resCode = result;
|
||||
return result == IFX_OK;
|
||||
}
|
||||
|
||||
|
||||
4
src/external/u3d/src/IDTF/Converter.h
vendored
4
src/external/u3d/src/IDTF/Converter.h
vendored
@ -22,9 +22,9 @@
|
||||
|
||||
namespace IDTFConverter {
|
||||
|
||||
bool IDTFToU3d(
|
||||
const std::string &inputFileName,
|
||||
bool IDTFToU3d(const std::string &inputFileName,
|
||||
const std::string &outputFileName,
|
||||
int &resCode,
|
||||
int positionQuality = 500);
|
||||
|
||||
}
|
||||
|
||||
@ -111,13 +111,11 @@ bool U3DIOPlugin::save(
|
||||
vcg::tri::io::ExporterIDTF<CMeshO>::Save(m.cm,qPrintable(tmp),mask);
|
||||
|
||||
//conversion from idtf to u3d
|
||||
bool result = IDTFConverter::IDTFToU3d(tmp.toStdString(), filename, _param.positionQuality);
|
||||
int resCode = 0;
|
||||
bool result = IDTFConverter::IDTFToU3d(tmp.toStdString(), filename, resCode, _param.positionQuality);
|
||||
|
||||
if(result==false) {
|
||||
QMessageBox::warning(
|
||||
parent,
|
||||
tr("Saving Error"),
|
||||
errorMsgFormat.arg(fileName, vcg::tri::io::ExporterU3D<CMeshO>::ErrorMsg(!result)));
|
||||
errorMessage = "Error saving " + QString::fromStdString(filename) + ": \n" + vcg::tri::io::ExporterU3D<CMeshO>::ErrorMsg(resCode) + " (" + QString::number(resCode) + ")";
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user