diff --git a/tools/assimp_cmd/Info.cpp b/tools/assimp_cmd/Info.cpp index 6e0ac577e..b7ae56279 100644 --- a/tools/assimp_cmd/Info.cpp +++ b/tools/assimp_cmd/Info.cpp @@ -205,7 +205,7 @@ void PrintHierarchy(const aiNode* root, unsigned int maxnest, unsigned int maxli // ----------------------------------------------------------------------------------- // Implementation of the assimp info utility to print basic file info -int Assimp_Info (const char** params, unsigned int num) +int Assimp_Info (const char* const* params, unsigned int num) { if (num < 1) { printf("assimp info: Invalid number of arguments. " diff --git a/tools/assimp_cmd/Main.cpp b/tools/assimp_cmd/Main.cpp index 3c8ab0ad3..9b1eb852f 100644 --- a/tools/assimp_cmd/Main.cpp +++ b/tools/assimp_cmd/Main.cpp @@ -154,6 +154,14 @@ int main (int argc, char* argv[]) return Assimp_Extract (&argv[2],argc-2); } + // assimp testbatchload + // Used by /test/other/streamload.py to load a list of files + // using the same importer instance to check for incompatible + // importers. + if (! strcmp(argv[1], "testbatchload")) { + return Assimp_TestBatchLoad (&argv[2],argc-2); + } + printf("Unrecognized command. Use \'assimp help\' for a detailed command list\n"); return 1; } @@ -372,3 +380,15 @@ int ProcessStandardArguments( return 0; } + +// ------------------------------------------------------------------------------ +int Assimp_TestBatchLoad ( + const char* const* params, + unsigned int num) +{ + for(unsigned int i = 0; i < num; ++i) { + globalImporter->ReadFile(params[i],aiProcessPreset_TargetRealtime_MaxQuality); + // we're totally silent. scene destructs automatically. + } + return 0; +} diff --git a/tools/assimp_cmd/Main.h b/tools/assimp_cmd/Main.h index ef2028a6e..02d51e5c9 100644 --- a/tools/assimp_cmd/Main.h +++ b/tools/assimp_cmd/Main.h @@ -146,13 +146,23 @@ int Assimp_CompareDump ( const char* const* params, unsigned int num); - // ------------------------------------------------------------------------------ /** @brief assimp info utility * @param params Command line parameters to 'assimp info' * @param Number of params - * @return 0 for success - */ -int Assimp_Info (const char** params, unsigned int num); + * @return 0 for success */ +int Assimp_Info ( + const char* const* params, + unsigned int num); + +// ------------------------------------------------------------------------------ +/** @brief assimp testbatchload utility + * @param params Command line parameters to 'assimp testbatchload' + * @param Number of params + * @return 0 for success */ +int Assimp_TestBatchLoad ( + const char* const* params, + unsigned int num); + #endif // !! AICMD_MAIN_INCLUDED \ No newline at end of file