Add usage of log macros, next files.

pull/1918/head
kimkulling 2018-04-19 17:21:21 +02:00
parent 066349f36b
commit b6f29bf54f
35 changed files with 128 additions and 129 deletions

View File

@ -2770,7 +2770,7 @@ void ColladaParser::ReadSceneNode( Node* pNode)
// Reference to a light, name given in 'url' attribute // Reference to a light, name given in 'url' attribute
int attrID = TestAttribute("url"); int attrID = TestAttribute("url");
if (-1 == attrID) if (-1 == attrID)
DefaultLogger::get()->warn("Collada: Expected url attribute in <instance_light> element"); ASSIMP_LOG_WARN("Collada: Expected url attribute in <instance_light> element");
else else
{ {
const char* url = mReader->getAttributeValue( attrID); const char* url = mReader->getAttributeValue( attrID);
@ -2786,7 +2786,7 @@ void ColladaParser::ReadSceneNode( Node* pNode)
// Reference to a camera, name given in 'url' attribute // Reference to a camera, name given in 'url' attribute
int attrID = TestAttribute("url"); int attrID = TestAttribute("url");
if (-1 == attrID) if (-1 == attrID)
DefaultLogger::get()->warn("Collada: Expected url attribute in <instance_camera> element"); ASSIMP_LOG_WARN("Collada: Expected url attribute in <instance_camera> element");
else else
{ {
const char* url = mReader->getAttributeValue( attrID); const char* url = mReader->getAttributeValue( attrID);
@ -2873,7 +2873,7 @@ void ColladaParser::ReadMaterialVertexInputBinding( Collada::SemanticMappingTabl
tbl.mMap[s] = vn; tbl.mMap[s] = vn;
} }
else if( IsElement( "bind")) { else if( IsElement( "bind")) {
DefaultLogger::get()->warn("Collada: Found unsupported <bind> element"); ASSIMP_LOG_WARN("Collada: Found unsupported <bind> element");
} }
} }
else if( mReader->getNodeType() == irr::io::EXN_ELEMENT_END) { else if( mReader->getNodeType() == irr::io::EXN_ELEMENT_END) {
@ -2992,10 +2992,9 @@ void ColladaParser::ReportWarning(const char* msg,...)
ai_assert(iLen > 0); ai_assert(iLen > 0);
va_end(args); va_end(args);
DefaultLogger::get()->warn("Validation warning: " + std::string(szBuffer,iLen)); ASSIMP_LOG_WARN_F("Validation warning: ", std::string(szBuffer,iLen));
} }
// ------------------------------------------------------------------------------------------------ // ------------------------------------------------------------------------------------------------
// Skips all data until the end node of the current element // Skips all data until the end node of the current element
void ColladaParser::SkipElement() void ColladaParser::SkipElement()
@ -3190,7 +3189,7 @@ aiMatrix4x4 ColladaParser::CalculateResultTransform( const std::vector<Transform
Collada::InputType ColladaParser::GetTypeForSemantic( const std::string& semantic) Collada::InputType ColladaParser::GetTypeForSemantic( const std::string& semantic)
{ {
if ( semantic.empty() ) { if ( semantic.empty() ) {
DefaultLogger::get()->warn( format() << "Vertex input type is empty." ); ASSIMP_LOG_WARN("Vertex input type is empty." );
return IT_Invalid; return IT_Invalid;
} }
@ -3209,7 +3208,7 @@ Collada::InputType ColladaParser::GetTypeForSemantic( const std::string& semanti
else if( semantic == "TANGENT" || semantic == "TEXTANGENT") else if( semantic == "TANGENT" || semantic == "TEXTANGENT")
return IT_Tangent; return IT_Tangent;
DefaultLogger::get()->warn( format() << "Unknown vertex input type \"" << semantic << "\". Ignoring." ); ASSIMP_LOG_WARN_F( "Unknown vertex input type \"", semantic, "\". Ignoring." );
return IT_Invalid; return IT_Invalid;
} }

View File

@ -146,7 +146,7 @@ public:
for(;splitter->length() && splitter->at(0) != '}'; splitter++, cnt++); for(;splitter->length() && splitter->at(0) != '}'; splitter++, cnt++);
splitter++; splitter++;
DefaultLogger::get()->debug((Formatter::format("DXF: skipped over control group ("),cnt," lines)")); ASSIMP_LOG_DEBUG((Formatter::format("DXF: skipped over control group ("),cnt," lines)"));
} }
} catch(std::logic_error&) { } catch(std::logic_error&) {
ai_assert(!splitter); ai_assert(!splitter);

View File

@ -485,7 +485,7 @@ void DXFImporter::ParseBlocks(DXF::LineReader& reader, DXF::FileData& output)
++reader; ++reader;
} }
DefaultLogger::get()->debug((Formatter::format("DXF: got "), ASSIMP_LOG_DEBUG((Formatter::format("DXF: got "),
output.blocks.size()," entries in BLOCKS" output.blocks.size()," entries in BLOCKS"
)); ));
} }
@ -567,7 +567,7 @@ void DXFImporter::ParseEntities(DXF::LineReader& reader, DXF::FileData& output)
++reader; ++reader;
} }
DefaultLogger::get()->debug((Formatter::format("DXF: got "), ASSIMP_LOG_DEBUG((Formatter::format("DXF: got "),
block.lines.size()," polylines and ", block.insertions.size() ," inserted blocks in ENTITIES" block.lines.size()," polylines and ", block.insertions.size() ," inserted blocks in ENTITIES"
)); ));
} }

View File

@ -209,7 +209,7 @@ bool DeboneProcess::ConsiderMesh(const aiMesh* pMesh)
if(vertexBones[vid]!=cUnowned) { if(vertexBones[vid]!=cUnowned) {
if(vertexBones[vid]==i) //double entry if(vertexBones[vid]==i) //double entry
{ {
DefaultLogger::get()->warn("Encountered double entry in bone weights"); ASSIMP_LOG_WARN("Encountered double entry in bone weights");
} }
else //TODO: track attraction in order to break tie else //TODO: track attraction in order to break tie
{ {
@ -281,7 +281,7 @@ void DeboneProcess::SplitMesh( const aiMesh* pMesh, std::vector< std::pair< aiMe
if(vertexBones[vid]!=cUnowned) { if(vertexBones[vid]!=cUnowned) {
if(vertexBones[vid]==i) //double entry if(vertexBones[vid]==i) //double entry
{ {
//DefaultLogger::get()->warn("Encountered double entry in bone weights"); ASSIMP_LOG_WARN("Encountered double entry in bone weights");
} }
else //TODO: track attraction in order to break tie else //TODO: track attraction in order to break tie
{ {

View File

@ -170,7 +170,7 @@ inline static void MakeAbsolutePath (const char* in, char* _out)
if (!ret) { if (!ret) {
// preserve the input path, maybe someone else is able to fix // preserve the input path, maybe someone else is able to fix
// the path before it is accessed (e.g. our file system filter) // the path before it is accessed (e.g. our file system filter)
DefaultLogger::get()->warn("Invalid path: " + std::string(in)); ASSIMP_LOG_WARN_F("Invalid path: ", std::string(in));
strcpy(_out, in); strcpy(_out, in);
} }
@ -179,7 +179,7 @@ inline static void MakeAbsolutePath (const char* in, char* _out)
if (!ret) { if (!ret) {
// preserve the input path, maybe someone else is able to fix // preserve the input path, maybe someone else is able to fix
// the path before it is accessed (e.g. our file system filter) // the path before it is accessed (e.g. our file system filter)
DefaultLogger::get()->warn("Invalid path: " + std::string(in)); ASSIMP_LOG_WARN("Invalid path: ", std::string(in));
strcpy(_out, in); strcpy(_out, in);
} }
} }
@ -189,7 +189,7 @@ inline static void MakeAbsolutePath (const char* in, char* _out)
if(!ret) { if(!ret) {
// preserve the input path, maybe someone else is able to fix // preserve the input path, maybe someone else is able to fix
// the path before it is accessed (e.g. our file system filter) // the path before it is accessed (e.g. our file system filter)
DefaultLogger::get()->warn("Invalid path: "+std::string(in)); ASSIMP_LOG_WARN("Invalid path: ", std::string(in));
strcpy(_out,in); strcpy(_out,in);
} }
#endif #endif

View File

@ -332,7 +332,7 @@ void FindInvalidDataProcess::ProcessAnimationChannel (aiNodeAnim* anim)
i = 1; i = 1;
} }
if (1 == i) if (1 == i)
DefaultLogger::get()->warn("Simplified dummy tracks with just one key"); ASSIMP_LOG_WARN("Simplified dummy tracks with just one key");
} }
// ------------------------------------------------------------------------------------------------ // ------------------------------------------------------------------------------------------------

View File

@ -141,21 +141,21 @@ void HMPImporter::InternReadFile( const std::string& pFile,
if (AI_HMP_MAGIC_NUMBER_LE_4 == iMagic || if (AI_HMP_MAGIC_NUMBER_LE_4 == iMagic ||
AI_HMP_MAGIC_NUMBER_BE_4 == iMagic) AI_HMP_MAGIC_NUMBER_BE_4 == iMagic)
{ {
DefaultLogger::get()->debug("HMP subtype: 3D GameStudio A4, magic word is HMP4"); ASSIMP_LOG_DEBUG("HMP subtype: 3D GameStudio A4, magic word is HMP4");
InternReadFile_HMP4(); InternReadFile_HMP4();
} }
// HMP5 format // HMP5 format
else if (AI_HMP_MAGIC_NUMBER_LE_5 == iMagic || else if (AI_HMP_MAGIC_NUMBER_LE_5 == iMagic ||
AI_HMP_MAGIC_NUMBER_BE_5 == iMagic) AI_HMP_MAGIC_NUMBER_BE_5 == iMagic)
{ {
DefaultLogger::get()->debug("HMP subtype: 3D GameStudio A5, magic word is HMP5"); ASSIMP_LOG_DEBUG("HMP subtype: 3D GameStudio A5, magic word is HMP5");
InternReadFile_HMP5(); InternReadFile_HMP5();
} }
// HMP7 format // HMP7 format
else if (AI_HMP_MAGIC_NUMBER_LE_7 == iMagic || else if (AI_HMP_MAGIC_NUMBER_LE_7 == iMagic ||
AI_HMP_MAGIC_NUMBER_BE_7 == iMagic) AI_HMP_MAGIC_NUMBER_BE_7 == iMagic)
{ {
DefaultLogger::get()->debug("HMP subtype: 3D GameStudio A7, magic word is HMP7"); ASSIMP_LOG_DEBUG("HMP subtype: 3D GameStudio A7, magic word is HMP7");
InternReadFile_HMP7(); InternReadFile_HMP7();
} }
else else

View File

@ -205,7 +205,7 @@ aiReturn Importer::RegisterPPStep(BaseProcess* pImp)
ASSIMP_BEGIN_EXCEPTION_REGION(); ASSIMP_BEGIN_EXCEPTION_REGION();
pimpl->mPostProcessingSteps.push_back(pImp); pimpl->mPostProcessingSteps.push_back(pImp);
DefaultLogger::get()->info("Registering custom post-processing step"); ASSIMP_LOG_INFO("Registering custom post-processing step");
ASSIMP_END_EXCEPTION_REGION(aiReturn); ASSIMP_END_EXCEPTION_REGION(aiReturn);
return AI_SUCCESS; return AI_SUCCESS;
@ -232,7 +232,7 @@ aiReturn Importer::RegisterLoader(BaseImporter* pImp)
#ifdef ASSIMP_BUILD_DEBUG #ifdef ASSIMP_BUILD_DEBUG
if (IsExtensionSupported(*it)) { if (IsExtensionSupported(*it)) {
DefaultLogger::get()->warn("The file extension " + *it + " is already in use"); ASSIMP_LOG_WARN_F("The file extension ", *it, " is already in use");
} }
#endif #endif
baked += *it; baked += *it;
@ -240,7 +240,7 @@ aiReturn Importer::RegisterLoader(BaseImporter* pImp)
// add the loader // add the loader
pimpl->mImporter.push_back(pImp); pimpl->mImporter.push_back(pImp);
DefaultLogger::get()->info("Registering custom importer for these file extensions: " + baked); ASSIMP_LOG_INFO_F("Registering custom importer for these file extensions: ", baked);
ASSIMP_END_EXCEPTION_REGION(aiReturn); ASSIMP_END_EXCEPTION_REGION(aiReturn);
return AI_SUCCESS; return AI_SUCCESS;
} }
@ -260,10 +260,10 @@ aiReturn Importer::UnregisterLoader(BaseImporter* pImp)
if (it != pimpl->mImporter.end()) { if (it != pimpl->mImporter.end()) {
pimpl->mImporter.erase(it); pimpl->mImporter.erase(it);
DefaultLogger::get()->info("Unregistering custom importer: "); ASSIMP_LOG_INFO("Unregistering custom importer: ");
return AI_SUCCESS; return AI_SUCCESS;
} }
DefaultLogger::get()->warn("Unable to remove custom importer: I can't find you ..."); ASSIMP_LOG_WARN("Unable to remove custom importer: I can't find you ...");
ASSIMP_END_EXCEPTION_REGION(aiReturn); ASSIMP_END_EXCEPTION_REGION(aiReturn);
return AI_FAILURE; return AI_FAILURE;
} }
@ -283,10 +283,10 @@ aiReturn Importer::UnregisterPPStep(BaseProcess* pImp)
if (it != pimpl->mPostProcessingSteps.end()) { if (it != pimpl->mPostProcessingSteps.end()) {
pimpl->mPostProcessingSteps.erase(it); pimpl->mPostProcessingSteps.erase(it);
DefaultLogger::get()->info("Unregistering custom post-processing step"); ASSIMP_LOG_INFO("Unregistering custom post-processing step");
return AI_SUCCESS; return AI_SUCCESS;
} }
DefaultLogger::get()->warn("Unable to remove custom post-processing step: I can't find you .."); ASSIMP_LOG_WARN("Unable to remove custom post-processing step: I can't find you ..");
ASSIMP_END_EXCEPTION_REGION(aiReturn); ASSIMP_END_EXCEPTION_REGION(aiReturn);
return AI_FAILURE; return AI_FAILURE;
} }
@ -586,7 +586,7 @@ const aiScene* Importer::ReadFile( const char* _pFile, unsigned int pFlags)
// a scene. In this case we need to delete the old one // a scene. In this case we need to delete the old one
if (pimpl->mScene) { if (pimpl->mScene) {
DefaultLogger::get()->debug("(Deleting previous scene)"); ASSIMP_LOG_DEBUG("(Deleting previous scene)");
FreeScene(); FreeScene();
} }
@ -617,7 +617,7 @@ const aiScene* Importer::ReadFile( const char* _pFile, unsigned int pFlags)
// not so bad yet ... try format auto detection. // not so bad yet ... try format auto detection.
const std::string::size_type s = pFile.find_last_of('.'); const std::string::size_type s = pFile.find_last_of('.');
if (s != std::string::npos) { if (s != std::string::npos) {
DefaultLogger::get()->info("File extension not known, trying signature-based detection"); ASSIMP_LOG_INFO("File extension not known, trying signature-based detection");
for( unsigned int a = 0; a < pimpl->mImporter.size(); a++) { for( unsigned int a = 0; a < pimpl->mImporter.size(); a++) {
if( pimpl->mImporter[a]->CanRead( pFile, pimpl->mIOHandler, true)) { if( pimpl->mImporter[a]->CanRead( pFile, pimpl->mIOHandler, true)) {
imp = pimpl->mImporter[a]; imp = pimpl->mImporter[a];
@ -648,7 +648,7 @@ const aiScene* Importer::ReadFile( const char* _pFile, unsigned int pFlags)
if ( NULL != desc ) { if ( NULL != desc ) {
ext = desc->mName; ext = desc->mName;
} }
DefaultLogger::get()->info("Found a matching importer for this file format: " + ext + "." ); ASSIMP_LOG_INFO("Found a matching importer for this file format: " + ext + "." );
pimpl->mProgressHandler->UpdateFileRead( 0, fileSize ); pimpl->mProgressHandler->UpdateFileRead( 0, fileSize );
if (profiler) { if (profiler) {
@ -744,7 +744,7 @@ const aiScene* Importer::ApplyPostProcessing(unsigned int pFlags)
// In debug builds: run basic flag validation // In debug builds: run basic flag validation
ai_assert(_ValidateFlags(pFlags)); ai_assert(_ValidateFlags(pFlags));
DefaultLogger::get()->info("Entering post processing pipeline"); ASSIMP_LOG_INFO("Entering post processing pipeline");
#ifndef ASSIMP_BUILD_NO_VALIDATEDS_PROCESS #ifndef ASSIMP_BUILD_NO_VALIDATEDS_PROCESS
// The ValidateDS process plays an exceptional role. It isn't contained in the global // The ValidateDS process plays an exceptional role. It isn't contained in the global
@ -768,7 +768,7 @@ const aiScene* Importer::ApplyPostProcessing(unsigned int pFlags)
} }
#else #else
if (pimpl->bExtraVerbose) { if (pimpl->bExtraVerbose) {
DefaultLogger::get()->warn("Not a debug build, ignoring extra verbose setting"); ASSIMP_LOG_WARN("Not a debug build, ignoring extra verbose setting");
} }
#endif // ! DEBUG #endif // ! DEBUG
@ -800,7 +800,7 @@ const aiScene* Importer::ApplyPostProcessing(unsigned int pFlags)
// If the extra verbose mode is active, execute the ValidateDataStructureStep again - after each step // If the extra verbose mode is active, execute the ValidateDataStructureStep again - after each step
if (pimpl->bExtraVerbose) { if (pimpl->bExtraVerbose) {
DefaultLogger::get()->debug("Verbose Import: re-validating data structures"); ASSIMP_LOG_DEBUG("Verbose Import: re-validating data structures");
ValidateDSProcess ds; ValidateDSProcess ds;
ds.ExecuteOnScene (this); ds.ExecuteOnScene (this);
@ -820,7 +820,7 @@ const aiScene* Importer::ApplyPostProcessing(unsigned int pFlags)
// clear any data allocated by post-process steps // clear any data allocated by post-process steps
pimpl->mPPShared->Clean(); pimpl->mPPShared->Clean();
DefaultLogger::get()->info("Leaving post processing pipeline"); ASSIMP_LOG_INFO("Leaving post processing pipeline");
ASSIMP_END_EXCEPTION_REGION(const aiScene*); ASSIMP_END_EXCEPTION_REGION(const aiScene*);
return pimpl->mScene; return pimpl->mScene;
@ -841,7 +841,7 @@ const aiScene* Importer::ApplyCustomizedPostProcessing( BaseProcess *rootProcess
} }
// In debug builds: run basic flag validation // In debug builds: run basic flag validation
DefaultLogger::get()->info( "Entering customized post processing pipeline" ); ASSIMP_LOG_INFO( "Entering customized post processing pipeline" );
#ifndef ASSIMP_BUILD_NO_VALIDATEDS_PROCESS #ifndef ASSIMP_BUILD_NO_VALIDATEDS_PROCESS
// The ValidateDS process plays an exceptional role. It isn't contained in the global // The ValidateDS process plays an exceptional role. It isn't contained in the global
@ -864,7 +864,7 @@ const aiScene* Importer::ApplyCustomizedPostProcessing( BaseProcess *rootProcess
} }
#else #else
if ( pimpl->bExtraVerbose ) { if ( pimpl->bExtraVerbose ) {
DefaultLogger::get()->warn( "Not a debug build, ignoring extra verbose setting" ); ASSIMP_LOG_WARN( "Not a debug build, ignoring extra verbose setting" );
} }
#endif // ! DEBUG #endif // ! DEBUG
@ -882,7 +882,7 @@ const aiScene* Importer::ApplyCustomizedPostProcessing( BaseProcess *rootProcess
// If the extra verbose mode is active, execute the ValidateDataStructureStep again - after each step // If the extra verbose mode is active, execute the ValidateDataStructureStep again - after each step
if ( pimpl->bExtraVerbose || requestValidation ) { if ( pimpl->bExtraVerbose || requestValidation ) {
DefaultLogger::get()->debug( "Verbose Import: revalidating data structures" ); ASSIMP_LOG_DEBUG( "Verbose Import: revalidating data structures" );
ValidateDSProcess ds; ValidateDSProcess ds;
ds.ExecuteOnScene( this ); ds.ExecuteOnScene( this );
@ -893,7 +893,7 @@ const aiScene* Importer::ApplyCustomizedPostProcessing( BaseProcess *rootProcess
// clear any data allocated by post-process steps // clear any data allocated by post-process steps
pimpl->mPPShared->Clean(); pimpl->mPPShared->Clean();
DefaultLogger::get()->info( "Leaving customized post processing pipeline" ); ASSIMP_LOG_INFO( "Leaving customized post processing pipeline" );
ASSIMP_END_EXCEPTION_REGION( const aiScene* ); ASSIMP_END_EXCEPTION_REGION( const aiScene* );
@ -904,7 +904,7 @@ const aiScene* Importer::ApplyCustomizedPostProcessing( BaseProcess *rootProcess
// Helper function to check whether an extension is supported by ASSIMP // Helper function to check whether an extension is supported by ASSIMP
bool Importer::IsExtensionSupported(const char* szExtension) const bool Importer::IsExtensionSupported(const char* szExtension) const
{ {
return NULL != GetImporter(szExtension); return nullptr != GetImporter(szExtension);
} }
// ------------------------------------------------------------------------------------------------ // ------------------------------------------------------------------------------------------------

View File

@ -296,7 +296,7 @@ void STEP::ReadFile(DB& db,const EXPRESS::ConversionSchema& scheme,
} }
if ( !DefaultLogger::isNullLogger()){ if ( !DefaultLogger::isNullLogger()){
DefaultLogger::get()->debug((Formatter::format(),"STEP: got ",map.size()," object records with ", ASSIMP_LOG_DEBUG((Formatter::format(),"STEP: got ",map.size()," object records with ",
db.GetRefs().size()," inverse index entries")); db.GetRefs().size()," inverse index entries"));
} }
} }

View File

@ -186,7 +186,7 @@ float ImproveCacheLocalityProcess::ProcessMesh( aiMesh* pMesh, unsigned int mesh
// mesh, otherwise this value would normally be at least minimally // mesh, otherwise this value would normally be at least minimally
// smaller than 3.0 ... // smaller than 3.0 ...
ai_snprintf(szBuff,128,"Mesh %u: Not suitable for vcache optimization",meshNum); ai_snprintf(szBuff,128,"Mesh %u: Not suitable for vcache optimization",meshNum);
DefaultLogger::get()->warn(szBuff); ASSIMP_LOG_WARN(szBuff);
return 0.f; return 0.f;
} }
} }

View File

@ -409,7 +409,7 @@ int JoinVerticesProcess::ProcessMesh( aiMesh* pMesh, unsigned int meshIndex)
} }
--a; --a;
DefaultLogger::get()->warn("Removing bone -> no weights remaining"); ASSIMP_LOG_WARN("Removing bone -> no weights remaining");
} }
} }
return pMesh->mNumVertices; return pMesh->mNumVertices;

View File

@ -164,7 +164,7 @@ bool LWOImporter::HandleTextures(aiMaterial* pcMat, const TextureList& in, aiTex
static_assert(sizeof(aiUVTransform)/sizeof(ai_real) == 5, "sizeof(aiUVTransform)/sizeof(ai_real) == 5"); static_assert(sizeof(aiUVTransform)/sizeof(ai_real) == 5, "sizeof(aiUVTransform)/sizeof(ai_real) == 5");
pcMat->AddProperty(&trafo,1,AI_MATKEY_UVTRANSFORM(type,cur)); pcMat->AddProperty(&trafo,1,AI_MATKEY_UVTRANSFORM(type,cur));
} }
DefaultLogger::get()->debug("LWO2: Setting up non-UV mapping"); ASSIMP_LOG_DEBUG("LWO2: Setting up non-UV mapping");
} }
// The older LWOB format does not use indirect references to clips. // The older LWOB format does not use indirect references to clips.

View File

@ -105,7 +105,7 @@ void LWS::Element::Parse (const char*& buffer)
if (children.back().tokens[0] == "Plugin") if (children.back().tokens[0] == "Plugin")
{ {
DefaultLogger::get()->debug("LWS: Skipping over plugin-specific data"); ASSIMP_LOG_DEBUG("LWS: Skipping over plugin-specific data");
// strange stuff inside Plugin/Endplugin blocks. Needn't // strange stuff inside Plugin/Endplugin blocks. Needn't
// follow LWS syntax, so we skip over it // follow LWS syntax, so we skip over it

View File

@ -890,7 +890,7 @@ void MD3Importer::InternReadFile( const std::string& pFile,
if (it != skins.textures.end()) { if (it != skins.textures.end()) {
texture_name = &*( _texture_name = (*it).second).begin(); texture_name = &*( _texture_name = (*it).second).begin();
DefaultLogger::get()->debug("MD3: Assigning skin texture " + (*it).second + " to surface " + pcSurfaces->NAME); ASSIMP_LOG_DEBUG_F("MD3: Assigning skin texture ", (*it).second, " to surface ", pcSurfaces->NAME);
(*it).resolved = true; // mark entry as resolved (*it).resolved = true; // mark entry as resolved
} }

View File

@ -70,7 +70,7 @@ MD5Parser::MD5Parser(char* _buffer, unsigned int _fileSize )
fileSize = _fileSize; fileSize = _fileSize;
lineNumber = 0; lineNumber = 0;
DefaultLogger::get()->debug("MD5Parser begin"); ASSIMP_LOG_DEBUG("MD5Parser begin");
// parse the file header // parse the file header
ParseHeader(); ParseHeader();
@ -88,7 +88,7 @@ MD5Parser::MD5Parser(char* _buffer, unsigned int _fileSize )
if ( !DefaultLogger::isNullLogger()) { if ( !DefaultLogger::isNullLogger()) {
char szBuffer[128]; // should be sufficiently large char szBuffer[128]; // should be sufficiently large
::ai_snprintf(szBuffer,128,"MD5Parser end. Parsed %i sections",(int)mSections.size()); ::ai_snprintf(szBuffer,128,"MD5Parser end. Parsed %i sections",(int)mSections.size());
DefaultLogger::get()->debug(szBuffer); ASSIMP_LOG_DEBUG(szBuffer);
} }
} }
@ -243,7 +243,7 @@ bool MD5Parser::ParseSection(Section& out)
// .MD5MESH parsing function // .MD5MESH parsing function
MD5MeshParser::MD5MeshParser(SectionList& mSections) MD5MeshParser::MD5MeshParser(SectionList& mSections)
{ {
DefaultLogger::get()->debug("MD5MeshParser begin"); ASSIMP_LOG_DEBUG("MD5MeshParser begin");
// now parse all sections // now parse all sections
for (SectionList::const_iterator iter = mSections.begin(), iterEnd = mSections.end();iter != iterEnd;++iter){ for (SectionList::const_iterator iter = mSections.begin(), iterEnd = mSections.end();iter != iterEnd;++iter){
@ -354,14 +354,14 @@ MD5MeshParser::MD5MeshParser(SectionList& mSections)
} }
} }
} }
DefaultLogger::get()->debug("MD5MeshParser end"); ASSIMP_LOG_DEBUG("MD5MeshParser end");
} }
// ------------------------------------------------------------------------------------------------ // ------------------------------------------------------------------------------------------------
// .MD5ANIM parsing function // .MD5ANIM parsing function
MD5AnimParser::MD5AnimParser(SectionList& mSections) MD5AnimParser::MD5AnimParser(SectionList& mSections)
{ {
DefaultLogger::get()->debug("MD5AnimParser begin"); ASSIMP_LOG_DEBUG("MD5AnimParser begin");
fFrameRate = 24.0f; fFrameRate = 24.0f;
mNumAnimatedComponents = UINT_MAX; mNumAnimatedComponents = UINT_MAX;
@ -445,14 +445,14 @@ MD5AnimParser::MD5AnimParser(SectionList& mSections)
fast_atoreal_move<float>((*iter).mGlobalValue.c_str(),fFrameRate); fast_atoreal_move<float>((*iter).mGlobalValue.c_str(),fFrameRate);
} }
} }
DefaultLogger::get()->debug("MD5AnimParser end"); ASSIMP_LOG_DEBUG("MD5AnimParser end");
} }
// ------------------------------------------------------------------------------------------------ // ------------------------------------------------------------------------------------------------
// .MD5CAMERA parsing function // .MD5CAMERA parsing function
MD5CameraParser::MD5CameraParser(SectionList& mSections) MD5CameraParser::MD5CameraParser(SectionList& mSections)
{ {
DefaultLogger::get()->debug("MD5CameraParser begin"); ASSIMP_LOG_DEBUG("MD5CameraParser begin");
fFrameRate = 24.0f; fFrameRate = 24.0f;
for (SectionList::const_iterator iter = mSections.begin(), iterEnd = mSections.end();iter != iterEnd;++iter) { for (SectionList::const_iterator iter = mSections.begin(), iterEnd = mSections.end();iter != iterEnd;++iter) {

View File

@ -187,37 +187,37 @@ void MDLImporter::InternReadFile( const std::string& pFile,
// Original Quake1 format // Original Quake1 format
if (AI_MDL_MAGIC_NUMBER_BE == iMagicWord || AI_MDL_MAGIC_NUMBER_LE == iMagicWord) { if (AI_MDL_MAGIC_NUMBER_BE == iMagicWord || AI_MDL_MAGIC_NUMBER_LE == iMagicWord) {
DefaultLogger::get()->debug("MDL subtype: Quake 1, magic word is IDPO"); ASSIMP_LOG_DEBUG("MDL subtype: Quake 1, magic word is IDPO");
iGSFileVersion = 0; iGSFileVersion = 0;
InternReadFile_Quake1(); InternReadFile_Quake1();
} }
// GameStudio A<old> MDL2 format - used by some test models that come with 3DGS // GameStudio A<old> MDL2 format - used by some test models that come with 3DGS
else if (AI_MDL_MAGIC_NUMBER_BE_GS3 == iMagicWord || AI_MDL_MAGIC_NUMBER_LE_GS3 == iMagicWord) { else if (AI_MDL_MAGIC_NUMBER_BE_GS3 == iMagicWord || AI_MDL_MAGIC_NUMBER_LE_GS3 == iMagicWord) {
DefaultLogger::get()->debug("MDL subtype: 3D GameStudio A2, magic word is MDL2"); ASSIMP_LOG_DEBUG("MDL subtype: 3D GameStudio A2, magic word is MDL2");
iGSFileVersion = 2; iGSFileVersion = 2;
InternReadFile_Quake1(); InternReadFile_Quake1();
} }
// GameStudio A4 MDL3 format // GameStudio A4 MDL3 format
else if (AI_MDL_MAGIC_NUMBER_BE_GS4 == iMagicWord || AI_MDL_MAGIC_NUMBER_LE_GS4 == iMagicWord) { else if (AI_MDL_MAGIC_NUMBER_BE_GS4 == iMagicWord || AI_MDL_MAGIC_NUMBER_LE_GS4 == iMagicWord) {
DefaultLogger::get()->debug("MDL subtype: 3D GameStudio A4, magic word is MDL3"); ASSIMP_LOG_DEBUG("MDL subtype: 3D GameStudio A4, magic word is MDL3");
iGSFileVersion = 3; iGSFileVersion = 3;
InternReadFile_3DGS_MDL345(); InternReadFile_3DGS_MDL345();
} }
// GameStudio A5+ MDL4 format // GameStudio A5+ MDL4 format
else if (AI_MDL_MAGIC_NUMBER_BE_GS5a == iMagicWord || AI_MDL_MAGIC_NUMBER_LE_GS5a == iMagicWord) { else if (AI_MDL_MAGIC_NUMBER_BE_GS5a == iMagicWord || AI_MDL_MAGIC_NUMBER_LE_GS5a == iMagicWord) {
DefaultLogger::get()->debug("MDL subtype: 3D GameStudio A4, magic word is MDL4"); ASSIMP_LOG_DEBUG("MDL subtype: 3D GameStudio A4, magic word is MDL4");
iGSFileVersion = 4; iGSFileVersion = 4;
InternReadFile_3DGS_MDL345(); InternReadFile_3DGS_MDL345();
} }
// GameStudio A5+ MDL5 format // GameStudio A5+ MDL5 format
else if (AI_MDL_MAGIC_NUMBER_BE_GS5b == iMagicWord || AI_MDL_MAGIC_NUMBER_LE_GS5b == iMagicWord) { else if (AI_MDL_MAGIC_NUMBER_BE_GS5b == iMagicWord || AI_MDL_MAGIC_NUMBER_LE_GS5b == iMagicWord) {
DefaultLogger::get()->debug("MDL subtype: 3D GameStudio A5, magic word is MDL5"); ASSIMP_LOG_DEBUG("MDL subtype: 3D GameStudio A5, magic word is MDL5");
iGSFileVersion = 5; iGSFileVersion = 5;
InternReadFile_3DGS_MDL345(); InternReadFile_3DGS_MDL345();
} }
// GameStudio A7 MDL7 format // GameStudio A7 MDL7 format
else if (AI_MDL_MAGIC_NUMBER_BE_GS7 == iMagicWord || AI_MDL_MAGIC_NUMBER_LE_GS7 == iMagicWord) { else if (AI_MDL_MAGIC_NUMBER_BE_GS7 == iMagicWord || AI_MDL_MAGIC_NUMBER_LE_GS7 == iMagicWord) {
DefaultLogger::get()->debug("MDL subtype: 3D GameStudio A7, magic word is MDL7"); ASSIMP_LOG_DEBUG("MDL subtype: 3D GameStudio A7, magic word is MDL7");
iGSFileVersion = 7; iGSFileVersion = 7;
InternReadFile_3DGS_MDL7(); InternReadFile_3DGS_MDL7();
} }
@ -225,7 +225,7 @@ void MDLImporter::InternReadFile( const std::string& pFile,
else if (AI_MDL_MAGIC_NUMBER_BE_HL2a == iMagicWord || AI_MDL_MAGIC_NUMBER_LE_HL2a == iMagicWord || else if (AI_MDL_MAGIC_NUMBER_BE_HL2a == iMagicWord || AI_MDL_MAGIC_NUMBER_LE_HL2a == iMagicWord ||
AI_MDL_MAGIC_NUMBER_BE_HL2b == iMagicWord || AI_MDL_MAGIC_NUMBER_LE_HL2b == iMagicWord) AI_MDL_MAGIC_NUMBER_BE_HL2b == iMagicWord || AI_MDL_MAGIC_NUMBER_LE_HL2b == iMagicWord)
{ {
DefaultLogger::get()->debug("MDL subtype: Source(tm) Engine, magic word is IDST/IDSQ"); ASSIMP_LOG_DEBUG("MDL subtype: Source(tm) Engine, magic word is IDST/IDSQ");
iGSFileVersion = 0; iGSFileVersion = 0;
InternReadFile_HL2(); InternReadFile_HL2();
} }
@ -258,7 +258,7 @@ void MDLImporter::SizeCheck(const void* szPos)
} }
// ------------------------------------------------------------------------------------------------ // ------------------------------------------------------------------------------------------------
// Just for debgging purposes // Just for debugging purposes
void MDLImporter::SizeCheck(const void* szPos, const char* szFile, unsigned int iLine) void MDLImporter::SizeCheck(const void* szPos, const char* szFile, unsigned int iLine)
{ {
ai_assert(NULL != szFile); ai_assert(NULL != szFile);
@ -298,20 +298,20 @@ void MDLImporter::ValidateHeader_Quake1(const MDL::Header* pcHeader)
if (!this->iGSFileVersion) if (!this->iGSFileVersion)
{ {
if (pcHeader->num_verts > AI_MDL_MAX_VERTS) if (pcHeader->num_verts > AI_MDL_MAX_VERTS)
DefaultLogger::get()->warn("Quake 1 MDL model has more than AI_MDL_MAX_VERTS vertices"); ASSIMP_LOG_WARN("Quake 1 MDL model has more than AI_MDL_MAX_VERTS vertices");
if (pcHeader->num_tris > AI_MDL_MAX_TRIANGLES) if (pcHeader->num_tris > AI_MDL_MAX_TRIANGLES)
DefaultLogger::get()->warn("Quake 1 MDL model has more than AI_MDL_MAX_TRIANGLES triangles"); ASSIMP_LOG_WARN("Quake 1 MDL model has more than AI_MDL_MAX_TRIANGLES triangles");
if (pcHeader->num_frames > AI_MDL_MAX_FRAMES) if (pcHeader->num_frames > AI_MDL_MAX_FRAMES)
DefaultLogger::get()->warn("Quake 1 MDL model has more than AI_MDL_MAX_FRAMES frames"); ASSIMP_LOG_WARN("Quake 1 MDL model has more than AI_MDL_MAX_FRAMES frames");
// (this does not apply for 3DGS MDLs) // (this does not apply for 3DGS MDLs)
if (!this->iGSFileVersion && pcHeader->version != AI_MDL_VERSION) if (!this->iGSFileVersion && pcHeader->version != AI_MDL_VERSION)
DefaultLogger::get()->warn("Quake 1 MDL model has an unknown version: AI_MDL_VERSION (=6) is " ASSIMP_LOG_WARN("Quake 1 MDL model has an unknown version: AI_MDL_VERSION (=6) is "
"the expected file format version"); "the expected file format version");
if(pcHeader->num_skins && (!pcHeader->skinwidth || !pcHeader->skinheight)) if(pcHeader->num_skins && (!pcHeader->skinwidth || !pcHeader->skinheight))
DefaultLogger::get()->warn("Skin width or height are 0"); ASSIMP_LOG_WARN("Skin width or height are 0");
} }
} }
@ -692,7 +692,7 @@ void MDLImporter::InternReadFile_3DGS_MDL345( )
unsigned int iIndex = pcTriangles->index_xyz[c]; unsigned int iIndex = pcTriangles->index_xyz[c];
if (iIndex >= (unsigned int)pcHeader->num_verts) { if (iIndex >= (unsigned int)pcHeader->num_verts) {
iIndex = pcHeader->num_verts-1; iIndex = pcHeader->num_verts-1;
DefaultLogger::get()->warn("Index overflow in MDLn vertex list"); ASSIMP_LOG_WARN("Index overflow in MDLn vertex list");
} }
aiVector3D& vec = pcMesh->mVertices[iCurrent]; aiVector3D& vec = pcMesh->mVertices[iCurrent];
@ -747,7 +747,7 @@ void MDLImporter::InternReadFile_3DGS_MDL345( )
unsigned int iIndex = pcTriangles->index_xyz[c]; unsigned int iIndex = pcTriangles->index_xyz[c];
if (iIndex >= (unsigned int)pcHeader->num_verts) { if (iIndex >= (unsigned int)pcHeader->num_verts) {
iIndex = pcHeader->num_verts-1; iIndex = pcHeader->num_verts-1;
DefaultLogger::get()->warn("Index overflow in MDLn vertex list"); ASSIMP_LOG_WARN("Index overflow in MDLn vertex list");
} }
aiVector3D& vec = pcMesh->mVertices[iCurrent]; aiVector3D& vec = pcMesh->mVertices[iCurrent];
@ -798,7 +798,7 @@ void MDLImporter::ImportUVCoordinate_3DGS_MDL345(
// validate UV indices // validate UV indices
if (iIndex >= (unsigned int) pcHeader->synctype) { if (iIndex >= (unsigned int) pcHeader->synctype) {
iIndex = pcHeader->synctype-1; iIndex = pcHeader->synctype-1;
DefaultLogger::get()->warn("Index overflow in MDLn UV coord list"); ASSIMP_LOG_WARN("Index overflow in MDLn UV coord list");
} }
float s = (float)pcSrc[iIndex].u; float s = (float)pcSrc[iIndex].u;
@ -835,7 +835,7 @@ void MDLImporter::CalculateUVCoordinates_MDL5()
iWidth = (unsigned int)*piPtr; iWidth = (unsigned int)*piPtr;
if (!iHeight || !iWidth) if (!iHeight || !iWidth)
{ {
DefaultLogger::get()->warn("Either the width or the height of the " ASSIMP_LOG_WARN("Either the width or the height of the "
"embedded DDS texture is zero. Unable to compute final texture " "embedded DDS texture is zero. Unable to compute final texture "
"coordinates. The texture coordinates remain in their original " "coordinates. The texture coordinates remain in their original "
"0-x/0-y (x,y = texture size) range."); "0-x/0-y (x,y = texture size) range.");
@ -988,7 +988,7 @@ MDL::IntBone_MDL7** MDLImporter::LoadBones_3DGS_MDL7()
AI_MDL7_BONE_STRUCT_SIZE__NAME_IS_32_CHARS != pcHeader->bone_stc_size && AI_MDL7_BONE_STRUCT_SIZE__NAME_IS_32_CHARS != pcHeader->bone_stc_size &&
AI_MDL7_BONE_STRUCT_SIZE__NAME_IS_NOT_THERE != pcHeader->bone_stc_size) AI_MDL7_BONE_STRUCT_SIZE__NAME_IS_NOT_THERE != pcHeader->bone_stc_size)
{ {
DefaultLogger::get()->warn("Unknown size of bone data structure"); ASSIMP_LOG_WARN("Unknown size of bone data structure");
return NULL; return NULL;
} }
@ -1026,7 +1026,7 @@ void MDLImporter::ReadFaces_3DGS_MDL7(const MDL::IntGroupInfo_MDL7& groupInfo,
if(iIndex > (unsigned int)groupInfo.pcGroup->numverts) { if(iIndex > (unsigned int)groupInfo.pcGroup->numverts) {
// (we might need to read this section a second time - to process frame vertices correctly) // (we might need to read this section a second time - to process frame vertices correctly)
pcGroupTris->v_index[c] = iIndex = groupInfo.pcGroup->numverts-1; pcGroupTris->v_index[c] = iIndex = groupInfo.pcGroup->numverts-1;
DefaultLogger::get()->warn("Index overflow in MDL7 vertex list"); DASSIMP_LOG_WARN("Index overflow in MDL7 vertex list");
} }
// write the output face index // write the output face index
@ -1071,7 +1071,7 @@ void MDLImporter::ReadFaces_3DGS_MDL7(const MDL::IntGroupInfo_MDL7& groupInfo,
iIndex = pcGroupTris->skinsets[0].st_index[c]; iIndex = pcGroupTris->skinsets[0].st_index[c];
if(iIndex > (unsigned int)groupInfo.pcGroup->num_stpts) { if(iIndex > (unsigned int)groupInfo.pcGroup->num_stpts) {
iIndex = groupInfo.pcGroup->num_stpts-1; iIndex = groupInfo.pcGroup->num_stpts-1;
DefaultLogger::get()->warn("Index overflow in MDL7 UV coordinate list (#1)"); ASSIMP_LOG_WARN("Index overflow in MDL7 UV coordinate list (#1)");
} }
float u = groupInfo.pcGroupUVs[iIndex].u; float u = groupInfo.pcGroupUVs[iIndex].u;
@ -1098,7 +1098,7 @@ void MDLImporter::ReadFaces_3DGS_MDL7(const MDL::IntGroupInfo_MDL7& groupInfo,
iIndex = pcGroupTris->skinsets[1].st_index[c]; iIndex = pcGroupTris->skinsets[1].st_index[c];
if(iIndex > (unsigned int)groupInfo.pcGroup->num_stpts) { if(iIndex > (unsigned int)groupInfo.pcGroup->num_stpts) {
iIndex = groupInfo.pcGroup->num_stpts-1; iIndex = groupInfo.pcGroup->num_stpts-1;
DefaultLogger::get()->warn("Index overflow in MDL7 UV coordinate list (#2)"); ASSIMP_LOG_WARN("Index overflow in MDL7 UV coordinate list (#2)");
} }
float u = groupInfo.pcGroupUVs[ iIndex ].u; float u = groupInfo.pcGroupUVs[ iIndex ].u;
@ -1153,7 +1153,7 @@ bool MDLImporter::ProcessFrames_3DGS_MDL7(const MDL::IntGroupInfo_MDL7& groupInf
frame.pcFrame->transmatrix_count * pcHeader->bonetrans_stc_size; frame.pcFrame->transmatrix_count * pcHeader->bonetrans_stc_size;
if (((const char*)szCurrent - (const char*)pcHeader) + iAdd > (unsigned int)pcHeader->data_size) { if (((const char*)szCurrent - (const char*)pcHeader) + iAdd > (unsigned int)pcHeader->data_size) {
DefaultLogger::get()->warn("Index overflow in frame area. " ASSIMP_LOG_WARN("Index overflow in frame area. "
"Ignoring all frames and all further mesh groups, too."); "Ignoring all frames and all further mesh groups, too.");
// don't parse more groups if we can't even read one // don't parse more groups if we can't even read one
@ -1171,7 +1171,7 @@ bool MDLImporter::ProcessFrames_3DGS_MDL7(const MDL::IntGroupInfo_MDL7& groupInf
uint16_t iIndex = _AI_MDL7_ACCESS(pcFrameVertices,qq,pcHeader->framevertex_stc_size,MDL::Vertex_MDL7).vertindex; uint16_t iIndex = _AI_MDL7_ACCESS(pcFrameVertices,qq,pcHeader->framevertex_stc_size,MDL::Vertex_MDL7).vertindex;
AI_SWAP2(iIndex); AI_SWAP2(iIndex);
if (iIndex >= groupInfo.pcGroup->numverts) { if (iIndex >= groupInfo.pcGroup->numverts) {
DefaultLogger::get()->warn("Invalid vertex index in frame vertex section"); ASSIMP_LOG_WARN("Invalid vertex index in frame vertex section");
continue; continue;
} }
@ -1257,7 +1257,7 @@ void MDLImporter::SortByMaterials_3DGS_MDL7(
// sometimes MED writes -1, but normally only if there is only // sometimes MED writes -1, but normally only if there is only
// one skin assigned. No warning in this case // one skin assigned. No warning in this case
if(0xFFFFFFFF != groupData.pcFaces[iFace].iMatIndex[0]) if(0xFFFFFFFF != groupData.pcFaces[iFace].iMatIndex[0])
DefaultLogger::get()->warn("Index overflow in MDL7 material list [#0]"); ASSIMP_LOG_WARN("Index overflow in MDL7 material list [#0]");
} }
else splitGroupData.aiSplit[groupData.pcFaces[iFace]. else splitGroupData.aiSplit[groupData.pcFaces[iFace].
iMatIndex[0]]->push_back(iFace); iMatIndex[0]]->push_back(iFace);
@ -1282,7 +1282,7 @@ void MDLImporter::SortByMaterials_3DGS_MDL7(
// sometimes MED writes -1, but normally only if there is only // sometimes MED writes -1, but normally only if there is only
// one skin assigned. No warning in this case // one skin assigned. No warning in this case
if(UINT_MAX != iMatIndex) if(UINT_MAX != iMatIndex)
DefaultLogger::get()->warn("Index overflow in MDL7 material list [#1]"); ASSIMP_LOG_WARN("Index overflow in MDL7 material list [#1]");
iMatIndex = iNumMaterials-1; iMatIndex = iNumMaterials-1;
} }
unsigned int iMatIndex2 = groupData.pcFaces[iFace].iMatIndex[1]; unsigned int iMatIndex2 = groupData.pcFaces[iFace].iMatIndex[1];
@ -1292,7 +1292,7 @@ void MDLImporter::SortByMaterials_3DGS_MDL7(
if (iMatIndex2 >= iNumMaterials) { if (iMatIndex2 >= iNumMaterials) {
// sometimes MED writes -1, but normally only if there is only // sometimes MED writes -1, but normally only if there is only
// one skin assigned. No warning in this case // one skin assigned. No warning in this case
DefaultLogger::get()->warn("Index overflow in MDL7 material list [#2]"); ASSIMP_LOG_WARN("Index overflow in MDL7 material list [#2]");
iMatIndex2 = iNumMaterials-1; iMatIndex2 = iNumMaterials-1;
} }
@ -1414,7 +1414,7 @@ void MDLImporter::InternReadFile_3DGS_MDL7( )
if (1 != groupInfo.pcGroup->typ) { if (1 != groupInfo.pcGroup->typ) {
// Not a triangle-based mesh // Not a triangle-based mesh
DefaultLogger::get()->warn("[3DGS MDL7] Not a triangle mesh group. Continuing happily"); ASSIMP_LOG_WARN("[3DGS MDL7] Not a triangle mesh group. Continuing happily");
} }
// store the name of the group // store the name of the group
@ -1516,7 +1516,7 @@ void MDLImporter::InternReadFile_3DGS_MDL7( )
sharedData.abNeedMaterials[qq] = true; sharedData.abNeedMaterials[qq] = true;
} }
} }
else DefaultLogger::get()->warn("[3DGS MDL7] Mesh group consists of 0 " else ASSIMP_LOG_WARN("[3DGS MDL7] Mesh group consists of 0 "
"vertices or faces. It will be skipped."); "vertices or faces. It will be skipped.");
// process all frames and generate output meshes // process all frames and generate output meshes
@ -1664,7 +1664,7 @@ void MDLImporter::ParseBoneTrafoKeys_3DGS_MDL7(
// read all transformation matrices // read all transformation matrices
for (unsigned int iTrafo = 0; iTrafo < frame.pcFrame->transmatrix_count;++iTrafo) { for (unsigned int iTrafo = 0; iTrafo < frame.pcFrame->transmatrix_count;++iTrafo) {
if(pcBoneTransforms->bone_index >= pcHeader->bones_num) { if(pcBoneTransforms->bone_index >= pcHeader->bones_num) {
DefaultLogger::get()->warn("Index overflow in frame area. " ASSIMP_LOG_WARN("Index overflow in frame area. "
"Unable to parse this bone transformation"); "Unable to parse this bone transformation");
} }
else { else {
@ -1676,7 +1676,7 @@ void MDLImporter::ParseBoneTrafoKeys_3DGS_MDL7(
} }
} }
else { else {
DefaultLogger::get()->warn("Ignoring animation keyframes in groups != 0"); ASSIMP_LOG_WARN("Ignoring animation keyframes in groups != 0");
} }
} }
} }

View File

@ -531,7 +531,7 @@ void MDLImporter::ParseSkinLump_3DGS_MDL7(
// ***** REFERENCE TO EXTERNAL FILE ***** // ***** REFERENCE TO EXTERNAL FILE *****
if (1 != iHeight) if (1 != iHeight)
{ {
DefaultLogger::get()->warn("Found a reference to an external texture, " ASSIMP_LOG_WARN("Found a reference to an external texture, "
"but texture height is not equal to 1, which is not supported by MED"); "but texture height is not equal to 1, which is not supported by MED");
} }
@ -552,7 +552,7 @@ void MDLImporter::ParseSkinLump_3DGS_MDL7(
pcNew.reset(new aiTexture()); pcNew.reset(new aiTexture());
if (!iHeight || !iWidth) if (!iHeight || !iWidth)
{ {
DefaultLogger::get()->warn("Found embedded texture, but its width " ASSIMP_LOG_WARN("Found embedded texture, but its width "
"an height are both 0. Is this a joke?"); "an height are both 0. Is this a joke?");
// generate an empty chess pattern // generate an empty chess pattern

View File

@ -142,7 +142,7 @@ void MS3DImporter :: ReadComments(StreamReaderLE& stream, std::vector<T>& outp)
stream >> index >> clength; stream >> index >> clength;
if(index >= outp.size()) { if(index >= outp.size()) {
DefaultLogger::get()->warn("MS3D: Invalid index in comment section"); ASSIMP_LOG_WARN("MS3D: Invalid index in comment section");
} }
else if (clength > stream.GetRemainingSize()) { else if (clength > stream.GetRemainingSize()) {
throw DeadlyImportError("MS3D: Failure reading comment, length field is out of range"); throw DeadlyImportError("MS3D: Failure reading comment, length field is out of range");
@ -408,7 +408,7 @@ void MS3DImporter::InternReadFile( const std::string& pFile,
// 2 ------------ convert to proper aiXX data structures ----------------------------------- // 2 ------------ convert to proper aiXX data structures -----------------------------------
if (need_default && materials.size()) { if (need_default && materials.size()) {
DefaultLogger::get()->warn("MS3D: Found group with no material assigned, spawning default material"); ASSIMP_LOG_WARN("MS3D: Found group with no material assigned, spawning default material");
// if one of the groups has no material assigned, but there are other // if one of the groups has no material assigned, but there are other
// groups with materials, a default material needs to be added ( // groups with materials, a default material needs to be added (
// scenepreprocessor adds a default material only if nummat==0). // scenepreprocessor adds a default material only if nummat==0).

View File

@ -141,7 +141,7 @@ void NDOImporter::InternReadFile( const std::string& pFile,
DefaultLogger::get()->info("NDO file format is 1.2"); DefaultLogger::get()->info("NDO file format is 1.2");
} }
else { else {
DefaultLogger::get()->warn(std::string("Unrecognized nendo file format version, continuing happily ... :") + (head+6)); ASSIMP_LOG_WARN(std::string("Unrecognized nendo file format version, continuing happily ... :") + (head+6));
} }
reader.IncPtr(2); /* skip flags */ reader.IncPtr(2); /* skip flags */

View File

@ -125,7 +125,7 @@ const aiImporterDesc* NFFImporter::GetInfo () const
do \ do \
{ \ { \
if (!GetNextLine(buffer,line)) \ if (!GetNextLine(buffer,line)) \
{DefaultLogger::get()->warn("NFF2: Unexpected EOF, can't read next token");break;} \ {ASSIMP_LOG_WARN("NFF2: Unexpected EOF, can't read next token");break;} \
SkipSpaces(line,&sz); \ SkipSpaces(line,&sz); \
} \ } \
while(IsLineEnd(*sz)) while(IsLineEnd(*sz))
@ -346,7 +346,7 @@ void NFFImporter::InternReadFile( const std::string& pFile,
sz3 = sz; sz3 = sz;
while (!IsSpaceOrNewLine(*sz))++sz; while (!IsSpaceOrNewLine(*sz))++sz;
const unsigned int diff = (unsigned int)(sz-sz3); const unsigned int diff = (unsigned int)(sz-sz3);
if (!diff)DefaultLogger::get()->warn("NFF2: Found empty mtable token"); if (!diff)ASSIMP_LOG_WARN("NFF2: Found empty mtable token");
else else
{ {
// The material table has the file extension .mat. // The material table has the file extension .mat.
@ -551,11 +551,11 @@ void NFFImporter::InternReadFile( const std::string& pFile,
case 'u': case 'u':
case 'U': case 'U':
DefaultLogger::get()->warn("Unsupported NFF2 texture attribute: trans"); ASSIMP_LOG_WARN("Unsupported NFF2 texture attribute: trans");
}; };
if (!sz[1] || '_' != sz[2]) if (!sz[1] || '_' != sz[2])
{ {
DefaultLogger::get()->warn("NFF2: Expected underscore after texture attributes"); ASSIMP_LOG_WARN("NFF2: Expected underscore after texture attributes");
continue; continue;
} }
const char* sz2 = sz+3; const char* sz2 = sz+3;

View File

@ -603,7 +603,7 @@ void ObjFileParser::getMaterialLib() {
// Check if directive is valid. // Check if directive is valid.
if ( 0 == strMatName.length() ) { if ( 0 == strMatName.length() ) {
DefaultLogger::get()->warn( "OBJ: no name for material library specified." ); ASSIMP_LOG_WARN( "OBJ: no name for material library specified." );
return; return;
} }
@ -660,7 +660,7 @@ void ObjFileParser::getNewMaterial() {
std::map<std::string, ObjFile::Material*>::iterator it = m_pModel->m_MaterialMap.find( strMat ); std::map<std::string, ObjFile::Material*>::iterator it = m_pModel->m_MaterialMap.find( strMat );
if ( it == m_pModel->m_MaterialMap.end() ) { if ( it == m_pModel->m_MaterialMap.end() ) {
// Show a warning, if material was not found // Show a warning, if material was not found
DefaultLogger::get()->warn("OBJ: Unsupported material requested: " + strMat); ASSIMP_LOG_WARN("OBJ: Unsupported material requested: " + strMat);
m_pModel->m_pCurrentMaterial = m_pModel->m_pDefaultMaterial; m_pModel->m_pCurrentMaterial = m_pModel->m_pDefaultMaterial;
} else { } else {
// Set new material // Set new material

View File

@ -186,7 +186,7 @@ aiMaterial* OgreImporter::ReadMaterial(const std::string &pFile, Assimp::IOSyste
std::unique_ptr<IOStream> stream(materialFile); std::unique_ptr<IOStream> stream(materialFile);
if (stream->FileSize() == 0) if (stream->FileSize() == 0)
{ {
DefaultLogger::get()->warn(Formatter::format() << "Source file for material '" << materialName << "' is empty (size is 0 bytes)"); ASSIMP_LOG_WARN(Formatter::format() << "Source file for material '" << materialName << "' is empty (size is 0 bytes)");
return 0; return 0;
} }
@ -569,12 +569,12 @@ bool OgreImporter::ReadTextureUnit(const std::string &textureUnitName, stringstr
if (textureRef.empty()) if (textureRef.empty())
{ {
DefaultLogger::get()->warn("Texture reference is empty, ignoring texture_unit."); ASSIMP_LOG_WARN("Texture reference is empty, ignoring texture_unit.");
return false; return false;
} }
if (textureType == aiTextureType_NONE) if (textureType == aiTextureType_NONE)
{ {
DefaultLogger::get()->warn("Failed to detect texture type for '" + textureRef + "', ignoring texture_unit."); ASSIMP_LOG_WARN("Failed to detect texture type for '" + textureRef + "', ignoring texture_unit.");
return false; return false;
} }

View File

@ -611,7 +611,7 @@ aiMesh *SubMesh::ConvertToAssimpMesh(Mesh *parent)
} }
else else
{ {
DefaultLogger::get()->warn(Formatter::format() << "Ogre imported UV0 type " << uv1Element->TypeToString() << " is not compatible with Assimp. Ignoring UV."); ASSIMP_LOG_WARN(Formatter::format() << "Ogre imported UV0 type " << uv1Element->TypeToString() << " is not compatible with Assimp. Ignoring UV.");
uv1 = 0; uv1 = 0;
} }
} }
@ -624,7 +624,7 @@ aiMesh *SubMesh::ConvertToAssimpMesh(Mesh *parent)
} }
else else
{ {
DefaultLogger::get()->warn(Formatter::format() << "Ogre imported UV0 type " << uv2Element->TypeToString() << " is not compatible with Assimp. Ignoring UV."); ASSIMP_LOG_WARN(Formatter::format() << "Ogre imported UV0 type " << uv2Element->TypeToString() << " is not compatible with Assimp. Ignoring UV.");
uv2 = 0; uv2 = 0;
} }
} }

View File

@ -787,7 +787,7 @@ bool PLY::ElementInstance::ParseInstance(const char* &pCur,
{ {
if (!(PLY::PropertyInstance::ParseInstance(pCur, &(*a), &(*i)))) if (!(PLY::PropertyInstance::ParseInstance(pCur, &(*a), &(*i))))
{ {
DefaultLogger::get()->warn("Unable to parse property instance. " ASSIMP_LOG_WARN("Unable to parse property instance. "
"Skipping this element instance"); "Skipping this element instance");
PLY::PropertyInstance::ValueUnion v = PLY::PropertyInstance::DefaultValue((*a).eType); PLY::PropertyInstance::ValueUnion v = PLY::PropertyInstance::DefaultValue((*a).eType);
@ -819,7 +819,7 @@ bool PLY::ElementInstance::ParseInstanceBinary(
{ {
if (!(PLY::PropertyInstance::ParseInstanceBinary(streamBuffer, buffer, pCur, bufferSize, &(*a), &(*i), p_bBE))) if (!(PLY::PropertyInstance::ParseInstanceBinary(streamBuffer, buffer, pCur, bufferSize, &(*a), &(*i), p_bBE)))
{ {
DefaultLogger::get()->warn("Unable to parse binary property instance. " ASSIMP_LOG_WARN("Unable to parse binary property instance. "
"Skipping this element instance"); "Skipping this element instance");
(*i).avList.push_back(PLY::PropertyInstance::DefaultValue((*a).eType)); (*i).avList.push_back(PLY::PropertyInstance::DefaultValue((*a).eType));

View File

@ -433,7 +433,7 @@ outer:
{ {
if ((*fit).mat >= materials.size()) if ((*fit).mat >= materials.size())
{ {
DefaultLogger::get()->warn("Quick3D: Material index overflow"); ASSIMP_LOG_WARN("Quick3D: Material index overflow");
(*fit).mat = 0; (*fit).mat = 0;
} }
if (fidx[(*fit).mat].empty())++pScene->mNumMeshes; if (fidx[(*fit).mat].empty())++pScene->mNumMeshes;
@ -528,7 +528,7 @@ outer:
{ {
if (face.indices[n] >= m.verts.size()) if (face.indices[n] >= m.verts.size())
{ {
DefaultLogger::get()->warn("Quick3D: Vertex index overflow"); ASSIMP_LOG_WARN("Quick3D: Vertex index overflow");
face.indices[n] = 0; face.indices[n] = 0;
} }
@ -561,7 +561,7 @@ outer:
{ {
if (face.uvindices[n] >= m.uv.size()) if (face.uvindices[n] >= m.uv.size())
{ {
DefaultLogger::get()->warn("Quick3D: Texture coordinate index overflow"); ASSIMP_LOG_WARN("Quick3D: Texture coordinate index overflow");
face.uvindices[n] = 0; face.uvindices[n] = 0;
} }
*uv = m.uv[face.uvindices[n]]; *uv = m.uv[face.uvindices[n]];

View File

@ -242,7 +242,7 @@ void RemoveVCProcess::SetupProperties(const Importer* pImp)
configDeleteFlags = pImp->GetPropertyInteger(AI_CONFIG_PP_RVC_FLAGS,0x0); configDeleteFlags = pImp->GetPropertyInteger(AI_CONFIG_PP_RVC_FLAGS,0x0);
if (!configDeleteFlags) if (!configDeleteFlags)
{ {
DefaultLogger::get()->warn("RemoveVCProcess: AI_CONFIG_PP_RVC_FLAGS is zero."); ASSIMP_LOG_WARN("RemoveVCProcess: AI_CONFIG_PP_RVC_FLAGS is zero.");
} }
} }

View File

@ -173,7 +173,7 @@ static void UnknownChunk(StreamReaderLE* /*stream*/, const SIBChunk& chunk)
static_cast<char>(chunk.Tag & 0xff), '\0' static_cast<char>(chunk.Tag & 0xff), '\0'
}; };
DefaultLogger::get()->warn((Formatter::format(), "SIB: Skipping unknown '",temp,"' chunk.")); ASSIMP_LOG_WARN((Formatter::format(), "SIB: Skipping unknown '",temp,"' chunk."));
} }
// Reads a UTF-16LE string and returns it at UTF-8. // Reads a UTF-16LE string and returns it at UTF-8.

View File

@ -182,7 +182,7 @@ void SMDImporter::InternReadFile( const std::string& pFile, aiScene* pScene, IOS
{ {
if (!(*i).mName.length()) if (!(*i).mName.length())
{ {
DefaultLogger::get()->warn("SMD: Not all bones have been initialized"); ASSIMP_LOG_WARN("SMD: Not all bones have been initialized");
break; break;
} }
} }
@ -230,7 +230,7 @@ void SMDImporter::LogWarning(const char* msg)
char szTemp[1024]; char szTemp[1024];
ai_assert(strlen(msg) < 1000); ai_assert(strlen(msg) < 1000);
ai_snprintf(szTemp,1024,"Line %u: %s",iLineNumber,msg); ai_snprintf(szTemp,1024,"Line %u: %s",iLineNumber,msg);
DefaultLogger::get()->warn(szTemp); ASSIMP_LOG_WARN(szTemp);
} }
// ------------------------------------------------------------------------------------------------ // ------------------------------------------------------------------------------------------------
@ -715,7 +715,7 @@ void SMDImporter::ParseFile()
if(!SkipSpaces(szCurrent,&szCurrent)) break; if(!SkipSpaces(szCurrent,&szCurrent)) break;
if (1 != strtoul10(szCurrent,&szCurrent)) if (1 != strtoul10(szCurrent,&szCurrent))
{ {
DefaultLogger::get()->warn("SMD.version is not 1. This " ASSIMP_LOG_WARN("SMD.version is not 1. This "
"file format is not known. Continuing happily ..."); "file format is not known. Continuing happily ...");
} }
continue; continue;

View File

@ -75,7 +75,7 @@ void PrefixString(aiString& string,const char* prefix, unsigned int len) {
return; return;
if (len+string.length>=MAXLEN-1) { if (len+string.length>=MAXLEN-1) {
DefaultLogger::get()->debug("Can't add an unique prefix because the string is too long"); ASSIMP_LOG_DEBUG("Can't add an unique prefix because the string is too long");
ai_assert(false); ai_assert(false);
return; return;
} }
@ -727,7 +727,7 @@ void SceneCombiner::MergeBones(aiMesh* out,std::vector<aiMesh*>::const_iterator
// NOTE: different offset matrices for bones with equal names // NOTE: different offset matrices for bones with equal names
// are - at the moment - not handled correctly. // are - at the moment - not handled correctly.
if (wmit != (*it).pSrcBones.begin() && pc->mOffsetMatrix != (*wmit).first->mOffsetMatrix) { if (wmit != (*it).pSrcBones.begin() && pc->mOffsetMatrix != (*wmit).first->mOffsetMatrix) {
DefaultLogger::get()->warn("Bones with equal names but different offset matrices can't be joined at the moment"); ASSIMP_LOG_WARN("Bones with equal names but different offset matrices can't be joined at the moment");
continue; continue;
} }
pc->mOffsetMatrix = (*wmit).first->mOffsetMatrix; pc->mOffsetMatrix = (*wmit).first->mOffsetMatrix;
@ -796,7 +796,7 @@ void SceneCombiner::MergeMeshes(aiMesh** _out, unsigned int /*flags*/,
if ((*it)->mVertices) { if ((*it)->mVertices) {
::memcpy(pv2,(*it)->mVertices,(*it)->mNumVertices*sizeof(aiVector3D)); ::memcpy(pv2,(*it)->mVertices,(*it)->mNumVertices*sizeof(aiVector3D));
} }
else DefaultLogger::get()->warn("JoinMeshes: Positions expected but input mesh contains no positions"); else ASSIMP_LOG_WARN("JoinMeshes: Positions expected but input mesh contains no positions");
pv2 += (*it)->mNumVertices; pv2 += (*it)->mNumVertices;
} }
} }
@ -808,7 +808,7 @@ void SceneCombiner::MergeMeshes(aiMesh** _out, unsigned int /*flags*/,
if ((*it)->mNormals) { if ((*it)->mNormals) {
::memcpy(pv2,(*it)->mNormals,(*it)->mNumVertices*sizeof(aiVector3D)); ::memcpy(pv2,(*it)->mNormals,(*it)->mNumVertices*sizeof(aiVector3D));
} else { } else {
DefaultLogger::get()->warn( "JoinMeshes: Normals expected but input mesh contains no normals" ); ASSIMP_LOG_WARN( "JoinMeshes: Normals expected but input mesh contains no normals" );
} }
pv2 += (*it)->mNumVertices; pv2 += (*it)->mNumVertices;
} }
@ -824,7 +824,7 @@ void SceneCombiner::MergeMeshes(aiMesh** _out, unsigned int /*flags*/,
::memcpy(pv2, (*it)->mTangents, (*it)->mNumVertices*sizeof(aiVector3D)); ::memcpy(pv2, (*it)->mTangents, (*it)->mNumVertices*sizeof(aiVector3D));
::memcpy(pv2b,(*it)->mBitangents,(*it)->mNumVertices*sizeof(aiVector3D)); ::memcpy(pv2b,(*it)->mBitangents,(*it)->mNumVertices*sizeof(aiVector3D));
} else { } else {
DefaultLogger::get()->warn( "JoinMeshes: Tangents expected but input mesh contains no tangents" ); ASSIMP_LOG_WARN( "JoinMeshes: Tangents expected but input mesh contains no tangents" );
} }
pv2 += (*it)->mNumVertices; pv2 += (*it)->mNumVertices;
pv2b += (*it)->mNumVertices; pv2b += (*it)->mNumVertices;
@ -840,7 +840,7 @@ void SceneCombiner::MergeMeshes(aiMesh** _out, unsigned int /*flags*/,
if ((*it)->mTextureCoords[n]) { if ((*it)->mTextureCoords[n]) {
::memcpy(pv2,(*it)->mTextureCoords[n],(*it)->mNumVertices*sizeof(aiVector3D)); ::memcpy(pv2,(*it)->mTextureCoords[n],(*it)->mNumVertices*sizeof(aiVector3D));
} else { } else {
DefaultLogger::get()->warn( "JoinMeshes: UVs expected but input mesh contains no UVs" ); ASSIMP_LOG_WARN( "JoinMeshes: UVs expected but input mesh contains no UVs" );
} }
pv2 += (*it)->mNumVertices; pv2 += (*it)->mNumVertices;
} }
@ -854,7 +854,7 @@ void SceneCombiner::MergeMeshes(aiMesh** _out, unsigned int /*flags*/,
if ((*it)->mColors[n]) { if ((*it)->mColors[n]) {
::memcpy(pv2,(*it)->mColors[n],(*it)->mNumVertices*sizeof(aiColor4D)); ::memcpy(pv2,(*it)->mColors[n],(*it)->mNumVertices*sizeof(aiColor4D));
} else { } else {
DefaultLogger::get()->warn( "JoinMeshes: VCs expected but input mesh contains no VCs" ); ASSIMP_LOG_WARN( "JoinMeshes: VCs expected but input mesh contains no VCs" );
} }
pv2 += (*it)->mNumVertices; pv2 += (*it)->mNumVertices;
} }

View File

@ -81,7 +81,7 @@ void ScenePreprocessor::ProcessScene ()
name.Set(AI_DEFAULT_MATERIAL_NAME); name.Set(AI_DEFAULT_MATERIAL_NAME);
helper->AddProperty(&name,AI_MATKEY_NAME); helper->AddProperty(&name,AI_MATKEY_NAME);
DefaultLogger::get()->debug("ScenePreprocessor: Adding default material \'" AI_DEFAULT_MATERIAL_NAME "\'"); ASSIMP_LOG_DEBUG("ScenePreprocessor: Adding default material \'" AI_DEFAULT_MATERIAL_NAME "\'");
for (unsigned int i = 0; i < scene->mNumMeshes;++i) { for (unsigned int i = 0; i < scene->mNumMeshes;++i) {
scene->mMeshes[i]->mMaterialIndex = scene->mNumMaterials; scene->mMeshes[i]->mMaterialIndex = scene->mNumMaterials;
@ -122,7 +122,7 @@ void ScenePreprocessor::ProcessMesh (aiMesh* mesh)
break; break;
} }
if (p == end) { if (p == end) {
DefaultLogger::get()->warn("ScenePreprocessor: UVs are declared to be 3D but they're obviously not. Reverting to 2D."); ASSIMP_LOG_WARN("ScenePreprocessor: UVs are declared to be 3D but they're obviously not. Reverting to 2D.");
mesh->mNumUVComponents[i] = 2; mesh->mNumUVComponents[i] = 2;
} }
} }
@ -224,7 +224,7 @@ void ScenePreprocessor::ProcessAnimation (aiAnimation* anim)
q.mTime = 0.; q.mTime = 0.;
q.mValue = rotation; q.mValue = rotation;
DefaultLogger::get()->debug("ScenePreprocessor: Dummy rotation track has been generated"); ASSIMP_LOG_DEBUG("ScenePreprocessor: Dummy rotation track has been generated");
} }
// No scaling keys? Generate a dummy track // No scaling keys? Generate a dummy track
@ -236,7 +236,7 @@ void ScenePreprocessor::ProcessAnimation (aiAnimation* anim)
q.mTime = 0.; q.mTime = 0.;
q.mValue = scaling; q.mValue = scaling;
DefaultLogger::get()->debug("ScenePreprocessor: Dummy scaling track has been generated"); ASSIMP_LOG_DEBUG("ScenePreprocessor: Dummy scaling track has been generated");
} }
// No position keys? Generate a dummy track // No position keys? Generate a dummy track
@ -248,14 +248,14 @@ void ScenePreprocessor::ProcessAnimation (aiAnimation* anim)
q.mTime = 0.; q.mTime = 0.;
q.mValue = position; q.mValue = position;
DefaultLogger::get()->debug("ScenePreprocessor: Dummy position track has been generated"); ASSIMP_LOG_DEBUG("ScenePreprocessor: Dummy position track has been generated");
} }
} }
} }
} }
if (anim->mDuration == -1.) { if (anim->mDuration == -1.) {
DefaultLogger::get()->debug("ScenePreprocessor: Setting animation duration"); ASSIMP_LOG_DEBUG("ScenePreprocessor: Setting animation duration");
anim->mDuration = last - std::min( first, 0. ); anim->mDuration = last - std::min( first, 0. );
} }
} }

View File

@ -88,7 +88,7 @@ void SplitByBoneCountProcess::SetupProperties(const Importer* pImp)
// Executes the post processing step on the given imported data. // Executes the post processing step on the given imported data.
void SplitByBoneCountProcess::Execute( aiScene* pScene) void SplitByBoneCountProcess::Execute( aiScene* pScene)
{ {
DefaultLogger::get()->debug("SplitByBoneCountProcess begin"); ASSIMP_LOG_DEBUG("SplitByBoneCountProcess begin");
// early out // early out
bool isNecessary = false; bool isNecessary = false;
@ -98,7 +98,7 @@ void SplitByBoneCountProcess::Execute( aiScene* pScene)
if( !isNecessary ) if( !isNecessary )
{ {
DefaultLogger::get()->debug( format() << "SplitByBoneCountProcess early-out: no meshes with more than " << mMaxBoneCount << " bones." ); ASSIMP_LOG_DEBUG( format() << "SplitByBoneCountProcess early-out: no meshes with more than " << mMaxBoneCount << " bones." );
return; return;
} }
@ -146,7 +146,7 @@ void SplitByBoneCountProcess::Execute( aiScene* pScene)
// recurse through all nodes and translate the node's mesh indices to fit the new mesh array // recurse through all nodes and translate the node's mesh indices to fit the new mesh array
UpdateNode( pScene->mRootNode); UpdateNode( pScene->mRootNode);
DefaultLogger::get()->debug( format() << "SplitByBoneCountProcess end: split " << mSubMeshIndices.size() << " meshes into " << meshes.size() << " submeshes." ); ASSIMP_LOG_DEBUG( format() << "SplitByBoneCountProcess end: split " << mSubMeshIndices.size() << " meshes into " << meshes.size() << " submeshes." );
} }
// ------------------------------------------------------------------------------------------------ // ------------------------------------------------------------------------------------------------

View File

@ -346,7 +346,7 @@ void CatmullClarkSubdivider::InternSubdivide (
ai_snprintf(tmp, 512, "Catmull-Clark Subdivider: got %u bad edges touching only one face (totally %u edges). ", ai_snprintf(tmp, 512, "Catmull-Clark Subdivider: got %u bad edges touching only one face (totally %u edges). ",
bad_cnt,static_cast<unsigned int>(edges.size())); bad_cnt,static_cast<unsigned int>(edges.size()));
DefaultLogger::get()->debug(tmp); DASSIMP_LOG_DEBUG(tmp);
}} }}
// --------------------------------------------------------------------- // ---------------------------------------------------------------------
@ -404,7 +404,7 @@ void CatmullClarkSubdivider::InternSubdivide (
} }
ai_assert(haveit); ai_assert(haveit);
if (!haveit) { if (!haveit) {
DefaultLogger::get()->debug("Catmull-Clark Subdivider: Index not used"); ASSIMP_LOG_DEBUG("Catmull-Clark Subdivider: Index not used");
} }
break; break;
} }

View File

@ -331,7 +331,7 @@ void TextureTransformStep::Execute( aiScene* pScene)
} }
if (mesh->mNumUVComponents[info.uvIndex] >= 3){ if (mesh->mNumUVComponents[info.uvIndex] >= 3){
DefaultLogger::get()->warn("UV transformations on 3D mapping channels are not supported"); ASSIMP_LOG_WARN("UV transformations on 3D mapping channels are not supported");
continue; continue;
} }

View File

@ -106,7 +106,7 @@ void ValidateDSProcess::ReportWarning(const char* msg,...)
ai_assert(iLen > 0); ai_assert(iLen > 0);
va_end(args); va_end(args);
DefaultLogger::get()->warn("Validation warning: " + std::string(szBuffer,iLen)); ASSIMP_LOG_WARN("Validation warning: " + std::string(szBuffer,iLen));
} }
// ------------------------------------------------------------------------------------------------ // ------------------------------------------------------------------------------------------------

View File

@ -72,7 +72,7 @@ public:
/** Start a named timer */ /** Start a named timer */
void BeginRegion(const std::string& region) { void BeginRegion(const std::string& region) {
regions[region] = std::chrono::system_clock::now(); regions[region] = std::chrono::system_clock::now();
DefaultLogger::get()->debug((format("START `"),region,"`")); ASSIMP_LOG_DEBUG((format("START `"),region,"`"));
} }
@ -84,7 +84,7 @@ public:
} }
std::chrono::duration<double> elapsedSeconds = std::chrono::system_clock::now() - regions[region]; std::chrono::duration<double> elapsedSeconds = std::chrono::system_clock::now() - regions[region];
DefaultLogger::get()->debug((format("END `"),region,"`, dt= ", elapsedSeconds.count()," s")); ASSIMP_LOG_DEBUG((format("END `"),region,"`, dt= ", elapsedSeconds.count()," s"));
} }
private: private: