Add 'testbatchload' verb to assimp_cmd. It expects a list of input files and loads them all. This is intended to test reusability of a single importer. Not mentioned in doc.
git-svn-id: https://assimp.svn.sourceforge.net/svnroot/assimp/trunk@624 67173fc5-114c-0410-ac8e-9d2fd5bffc1fpull/1/head
parent
ef71f3dba7
commit
c58dcee5b9
|
@ -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. "
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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
|
Loading…
Reference in New Issue