MCPcopy Create free account
hub / github.com/assimp/assimp / ProcessStandardArguments

Function ProcessStandardArguments

tools/assimp_cmd/Main.cpp:386–550  ·  view source on GitHub ↗

------------------------------------------------------------------------------ Process standard arguments

Source from the content-addressed store, hash-verified

384// ------------------------------------------------------------------------------
385// Process standard arguments
386int ProcessStandardArguments(
387 ImportData& fill,
388 const char* const * params,
389 unsigned int num)
390{
391 // -ptv --pretransform-vertices
392 // -gsn --gen-smooth-normals
393 // -gn --gen-normals
394 // -cts --calc-tangent-space
395 // -jiv --join-identical-vertices
396 // -rrm --remove-redundant-materials
397 // -fd --find-degenerates
398 // -slm --split-large-meshes
399 // -lbw --limit-bone-weights
400 // -vds --validate-data-structure
401 // -icl --improve-cache-locality
402 // -sbpt --sort-by-ptype
403 // -lh --convert-to-lh
404 // -fuv --flip-uv
405 // -fwo --flip-winding-order
406 // -tuv --transform-uv-coords
407 // -guv --gen-uvcoords
408 // -fid --find-invalid-data
409 // -fixn --fix normals
410 // -tri --triangulate
411 // -fi --find-instances
412 // -og --optimize-graph
413 // -om --optimize-meshes
414 // -db --debone
415 // -sbc --split-by-bone-count
416 // -gs --global-scale
417 //
418 // -c<file> --config-file=<file>
419
420 for (unsigned int i = 0; i < num;++i)
421 {
422 const char *param = params[ i ];
423 printf( "param = %s\n", param );
424 if (! strcmp( param, "-ptv") || ! strcmp( param, "--pretransform-vertices")) {
425 fill.ppFlags |= aiProcess_PreTransformVertices;
426 }
427 else if (! strcmp( param, "-gsn") || ! strcmp( param, "--gen-smooth-normals")) {
428 fill.ppFlags |= aiProcess_GenSmoothNormals;
429 }
430 else if (! strcmp( param, "-dn") || ! strcmp( param, "--drop-normals")) {
431 fill.ppFlags |= aiProcess_DropNormals;
432 }
433 else if (! strcmp( param, "-gn") || ! strcmp( param, "--gen-normals")) {
434 fill.ppFlags |= aiProcess_GenNormals;
435 }
436 else if (! strcmp( param, "-jiv") || ! strcmp( param, "--join-identical-vertices")) {
437 fill.ppFlags |= aiProcess_JoinIdenticalVertices;
438 }
439 else if (! strcmp( param, "-rrm") || ! strcmp( param, "--remove-redundant-materials")) {
440 fill.ppFlags |= aiProcess_RemoveRedundantMaterials;
441 }
442 else if (! strcmp( param, "-fd") || ! strcmp( param, "--find-degenerates")) {
443 fill.ppFlags |= aiProcess_FindDegenerates;

Callers 4

Assimp_InfoFunction · 0.85
Assimp_ExportFunction · 0.85
Assimp_ExtractFunction · 0.85
Assimp_DumpFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected