This command line optimizer work in a similar way than Polygon Cruncher Command Line end-user software.
This can be done using the class BatchCruncherOptions and CBatchOptimizer
The following code allows to perform the processing:
Code: Select all
// SDK initialization code should be called below
...
// the command line version turns off all by default
unsigned int flags = BatchCruncherOptions::BATCH_HANDLE_SCENE_DELETION | BatchCruncherOptions::BATCH_NO_DIALOG | BatchCruncherOptions::BATCH_NO_SPLASH;
CCustomData cmddata;
BatchCruncherOptions options(cmddata, flags);
options.InitFromCommandLine(argc, argv);
if (cmddata.HasData()) // We have some information on the command line
{
CBatchOptimizerCommandLine optimizer(options);
optimizer.Batch();
}
For example:
YourAppName.exe -input-dir "D:/sample" -input-recursedir -magic-similarity 0 -ouput-numberingmode 1 -uv-protect -uv-tolerance 0.001 -vc-protect -vc-tolerance 10 -normal-protect -normal-tolerance 3 -ouput-namesuffix " " -output-convertformat ".obj"