diff --git a/src/meshlabserver/mainserver.cpp b/src/meshlabserver/mainserver.cpp index 568ada07c..ad9ef225f 100644 --- a/src/meshlabserver/mainserver.cpp +++ b/src/meshlabserver/mainserver.cpp @@ -551,7 +551,7 @@ namespace commandline { const char inproject('p'); const char outproject('w'); - const char overwrite('v'); + const char overwrite('x'); const char inputmeshes('i'); const char outputmesh('o'); const char mask('m'); @@ -594,7 +594,7 @@ namespace commandline { QString logstring("(" + optionValueExpression(log) + "\\s+" + optionValueExpression(dump) + "|" + optionValueExpression(dump) + "\\s+" + optionValueExpression(log) + "|" + optionValueExpression(dump) + "|" + optionValueExpression(log) + ")"); //QString remainstring("(" + optionValueExpression(inproject) + "|" + optionValueExpression(inputmeshes,true) + ")" + "(\\s+" + optionValueExpression(inproject) + "|\\s+" + optionValueExpression(inputmeshes,true) + ")*(\\s+" + optionValueExpression(outproject) + "|\\s+" + optionValueExpression(script) + "|\\s+" + outputmeshExpression() + ")*"); - QString arg("(" + optionValueExpression(inproject) + "|" + optionValueExpression(inputmeshes) + "|" + optionValueExpression(outproject) + "(\\s+-v)?" + "|" + optionValueExpression(script) + "|" + outputmeshExpression() + ")"); + QString arg("(" + optionValueExpression(inproject) + "|" + optionValueExpression(inputmeshes) + "|" + optionValueExpression(outproject) + "(\\s+-" + overwrite + ")?" + "|" + optionValueExpression(script) + "|" + outputmeshExpression() + ")"); QString args("(" + arg + ")(\\s+" + arg + ")*"); QString completecommandline("(" + logstring + "|" + logstring + "\\s+" + args + "|" + args + ")"); QRegExp completecommandlineexp(completecommandline); @@ -720,7 +720,9 @@ int main(int argc, char *argv[]) pr.filename += ".mlp"; } ++i; - if (((i + 1) < argc) && (QString(argv[i+1]) == QString("-" + commandline::overwrite))) + QString overtmp('-'); + overtmp += commandline::overwrite; + if (((i + 1) < argc) && (QString(argv[i+1]) == overtmp)) { pr.overwrite = true; ++i; diff --git a/src/meshlabserver/meshlabserver.txt b/src/meshlabserver/meshlabserver.txt index cddffe83f..7827b74cc 100644 --- a/src/meshlabserver/meshlabserver.txt +++ b/src/meshlabserver/meshlabserver.txt @@ -5,8 +5,8 @@ meshlabserver [logargs] [args] -l filename log of the filters is ouput on a file where args can be: -p filename meshlab project (.mlp) to be loaded - -w filename [-v] output meshlab project (.mlp) to be saved. - If -v flag is specified a 3D model meshfile.ext + -w filename [-x] output meshlab project (.mlp) to be saved. + If -x flag is specified a 3D model meshfile.ext contained in the input project will be overwritten, otherwise it will be saved in the same directory of input mesh as a new file called meshfile_out.ext. @@ -35,7 +35,7 @@ meshlabserver [logargs] [args] per-vertex-color, the per-face-quality and the per-wedge-texture attributes will be saved into the output.ply file - 'meshlabserver -i input0.obj -i input1.ply -o outproj.mlp -v -s meshclean.mlx' + 'meshlabserver -i input0.obj -i input1.ply -w outproj.mlp -x -s meshclean.mlx' the script file meshclean.mlx will be applied to the document composed by input0.obj and input1.ply meshes. The mesh input1.ply will become the current mesh of the document