mirror of
https://github.com/lucaspalomodevelop/meshlab.git
synced 2026-03-17 01:54:42 +00:00
using settings values for initPreOpen
This commit is contained in:
parent
b83e8e7b26
commit
dc5799039e
@ -2420,7 +2420,16 @@ bool MainWindow::importMesh(QString fileName)
|
||||
// the user does not want to see the parameter dialog
|
||||
// need to take the default values from the currentGlobalParams
|
||||
else {
|
||||
//TODO
|
||||
for (RichParameter& p : prePar){
|
||||
QString prefixName = "MeshLab::IO::" + extension.toUpper() + "::";
|
||||
if (currentGlobalParams.hasParameter(prefixName + p.name())){
|
||||
const RichParameter& cp = currentGlobalParams.getParameterByName(prefixName + p.name());
|
||||
p.setValue(cp.value());
|
||||
}
|
||||
else {
|
||||
qDebug() << "ERROR!!! " + prefixName + p.name() + " not found in global params.";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -136,7 +136,7 @@ void BaseMeshIOPlugin::initPreOpenParameter(const QString &formatName, RichParam
|
||||
parlst.addParam(RichFloat("angle", 85.0, "Angle limit for face culling", "short"));
|
||||
}
|
||||
if (formatName.toUpper() == tr("STL")) {
|
||||
parlst.addParam(RichBool(stlUnifyParName(), true, "Unify Duplicated Vertices in STL files", "The STL format is not an vertex-indexed format. Each triangle is composed by independent vertices, so, usually, duplicated vertices should be unified"));
|
||||
parlst.addParam(RichBool("unify_vertices", true, "Unify Duplicated Vertices in STL files", "The STL format is not an vertex-indexed format. Each triangle is composed by independent vertices, so, usually, duplicated vertices should be unified"));
|
||||
}
|
||||
}
|
||||
|
||||
@ -189,7 +189,7 @@ void BaseMeshIOPlugin::open(const QString &formatName, const QString &fileName,
|
||||
throw MLException(errorMsgFormat.arg(fileName, tri::io::ImporterSTL<CMeshO>::ErrorMsg(result)));
|
||||
}
|
||||
|
||||
bool stluinf = parlst.getBool(stlUnifyParName());
|
||||
bool stluinf = parlst.getBool("unify_vertices");
|
||||
if (stluinf)
|
||||
{
|
||||
tri::Clean<CMeshO>::RemoveDuplicateVertex(m.cm);
|
||||
|
||||
@ -76,8 +76,6 @@ public:
|
||||
|
||||
private:
|
||||
std::list<FileFormat> rasterFormatList;
|
||||
|
||||
static QString stlUnifyParName() { return QString("MeshLab::IO::STL::UnifyVertices"); }
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user