Index: Binaries/Win32/ColladaConv.bat =================================================================== --- Binaries/Win32/ColladaConv.bat (revision 252) +++ Binaries/Win32/ColladaConv.bat (working copy) @@ -19,10 +19,16 @@ :dragndrop +SET outputDir=%~dp0..\Content +SET baseDir=%~dp0..\Content +IF NOT EXIST %outputDir%\models\%~n1 mkdir %outputDir%\models\%~n1 +copy %1 %outputDir%\models\%~n1 + %~d0 cd %~dp0 -ColladaConv %1 +ColladaConv models\%~n1\%~nx1 -base %baseDir% -dest %outputDir% +del %outputDir%\models\%~n1\%~nx1 :exit Index: Source/ColladaConverter/converter.cpp =================================================================== --- Source/ColladaConverter/converter.cpp (revision 252) +++ Source/ColladaConverter/converter.cpp (working copy) @@ -877,7 +877,7 @@ FILE *f = fopen( fileName.c_str(), "wb" ); if( f == 0x0 ) { - log( "Failed to write .geo file" ); + log( "Failed to write " + fileName + " file" ); return false; } @@ -1191,7 +1191,7 @@ outf.open( (_outPath + assetPath + assetName + ".scene.xml").c_str(), ios::out ); if( !outf.good() ) { - log( "Failed to write .scene file" ); + log( "Failed to write " + _outPath + assetPath + assetName + ".scene file" ); return false; } @@ -1355,7 +1355,7 @@ FILE *f = fopen( (_outPath + assetPath + assetName + ".anim").c_str(), "wb" ); if( f == 0x0 ) { - log( "Failed writing .anim file" ); + log( "Failed writing " + _outPath + assetPath + assetName + ".anim file" ); return false; } Index: Source/ColladaConverter/daeMain.cpp =================================================================== --- Source/ColladaConverter/daeMain.cpp (revision 252) +++ Source/ColladaConverter/daeMain.cpp (working copy) @@ -27,11 +27,19 @@ bool ColladaDocument::parseFile( const string &fileName ) { // Parse Collada file - XMLNode rootNode = XMLNode::parseFile( fileName.c_str(), "COLLADA" ); + XMLResults results; + XMLNode rootNode = XMLNode::parseFile( fileName.c_str(), "COLLADA", &results ); if( rootNode.isEmpty() ) { - log( "Error: File not found or invalid Collada document" ); - return false; + switch( results.error ) + { + case eXMLErrorFileNotFound: + log( "Error: File not found '" + fileName + "'" ); + return false; + default: + log( XMLNode::getError( results.error ) ); + return false; + } } if( strcmp( rootNode.getAttribute( "version", "" ), "1.4.0") != 0 && Index: Source/ColladaConverter/main.cpp =================================================================== --- Source/ColladaConverter/main.cpp (revision 252) +++ Source/ColladaConverter/main.cpp (working copy) @@ -23,6 +23,8 @@ # include # include #else +# include +# define _chdir chdir # include # include #endif @@ -203,6 +205,13 @@ // Check whether input is single file or directory and create asset input list if( input.length() > 4 && _stricmp( input.c_str() + (input.length() - 4), ".dae" ) == 0 ) { + // Check if it's an absolute path + if( input[0] == '/' || input[1] == ':' || input[0] == '\\' ) + { + int index = input.find_last_of( "\\/" ); + _chdir( input.substr( 0, index ).c_str() ); + input = input.substr( index + 1, input.length() - index ); + } assetList.push_back ( input ); } else