mirror of
https://github.com/lucaspalomodevelop/meshlab.git
synced 2026-03-15 09:04:36 +00:00
Added a check for writable folder in Screened Poisson and VCG Merging
As Screened Poisson and VCG Merging need to save temporary files, the current folder should be writable, If it is not so, fail, and give a proper error decription
This commit is contained in:
parent
b0d19aa929
commit
fb79c65e70
@ -121,6 +121,14 @@ bool PlyMCPlugin::applyFilter(QAction *filter, MeshDocument &md, RichParameterSe
|
||||
{
|
||||
srand(time(NULL));
|
||||
|
||||
//check if folder is writable
|
||||
QFileInfo fi(QDir::currentPath(),"file.tmp");
|
||||
if (!fi.isWritable())
|
||||
{
|
||||
Log("ERROR - current folder is not writable. VCG Merging need to save intermediate files in the current working folder. Project and meshes must be in a write-enabled folder");
|
||||
return false;
|
||||
}
|
||||
|
||||
tri::PlyMC<SMesh,SimpleMeshProvider<SMesh> > pmc;
|
||||
pmc.MP.setCacheSize(64);
|
||||
tri::PlyMC<SMesh,SimpleMeshProvider<SMesh> >::Parameter &p = pmc.p;
|
||||
|
||||
@ -581,6 +581,14 @@ bool FilterScreenedPoissonPlugin::applyFilter( const QString& filterName,MeshDoc
|
||||
{
|
||||
if (filterName == "Surface Reconstruction: Screened Poisson")
|
||||
{
|
||||
//check if folder is writable
|
||||
QFileInfo fi(QDir::currentPath(), "file.tmp");
|
||||
if (!fi.isWritable())
|
||||
{
|
||||
Log("ERROR - current folder is not writable. VCG Merging need to save intermediate files in the current working folder. Project and meshes must be in a write-enabled folder");
|
||||
return false;
|
||||
}
|
||||
|
||||
PoissonParam<Scalarm> pp;
|
||||
pp.MaxDepthVal = env.evalInt("depth");
|
||||
pp.FullDepthVal = env.evalInt("fullDepth");
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user