Mesh: refactor mesh exporter classes

This commit is contained in:
wmayer
2022-08-31 10:07:57 +02:00
parent 60a230805c
commit f557920414
3 changed files with 98 additions and 72 deletions

View File

@@ -266,12 +266,14 @@ private:
meta[App::Application::Config()["ExeName"] + "-buildRevisionHash"] =
App::Application::Config()["BuildRevisionHash"];
exporter.reset( new AmfExporter(outputFileName, meta, exportAmfCompressed) );
exporter.reset( new ExporterAMF(outputFileName, meta, exportAmfCompressed) );
} else if (exportFormat != MeshIO::Undefined) {
}
else if (exportFormat != MeshIO::Undefined) {
exporter.reset( new MergeExporter(outputFileName, exportFormat) );
} else {
}
else {
std::string exStr("Can't determine mesh format from file name: '");
exStr += outputFileName + "'";
throw Py::ValueError(exStr.c_str());
@@ -280,6 +282,7 @@ private:
for (auto it : objectList) {
exporter->addObject(it, fTolerance);
}
exporter.reset(); // deletes Exporter, mesh file is written by destructor
return Py::None();