Next log call changes.

This commit is contained in:
kimkulling
2018-04-20 16:23:24 +02:00
parent b6f29bf54f
commit 0e15b25cd1
28 changed files with 247 additions and 276 deletions

View File

@@ -74,7 +74,7 @@ inline aiTextureMapMode GetMapMode(LWO::Texture::Wrap in)
return aiTextureMapMode_Mirror;
case LWO::Texture::RESET:
DefaultLogger::get()->warn("LWO2: Unsupported texture map mode: RESET");
ASSIMP_LOG_WARN("LWO2: Unsupported texture map mode: RESET");
// fall though here
case LWO::Texture::EDGE:
@@ -117,7 +117,7 @@ bool LWOImporter::HandleTextures(aiMaterial* pcMat, const TextureList& in, aiTex
mapping = aiTextureMapping_BOX;
break;
case LWO::Texture::FrontProjection:
DefaultLogger::get()->error("LWO2: Unsupported texture mapping: FrontProjection");
ASSIMP_LOG_ERROR("LWO2: Unsupported texture mapping: FrontProjection");
mapping = aiTextureMapping_OTHER;
break;
case LWO::Texture::UV:
@@ -181,7 +181,7 @@ bool LWOImporter::HandleTextures(aiMaterial* pcMat, const TextureList& in, aiTex
}
if (candidate == end) {
DefaultLogger::get()->error("LWO2: Clip index is out of bounds");
ASSIMP_LOG_ERROR("LWO2: Clip index is out of bounds");
temp = 0;
// fixme: apparently some LWO files shipping with Doom3 don't
@@ -194,7 +194,7 @@ bool LWOImporter::HandleTextures(aiMaterial* pcMat, const TextureList& in, aiTex
}
else {
if (Clip::UNSUPPORTED == (*candidate).type) {
DefaultLogger::get()->error("LWO2: Clip type is not supported");
ASSIMP_LOG_ERROR("LWO2: Clip type is not supported");
continue;
}
AdjustTexturePath((*candidate).path);
@@ -212,7 +212,7 @@ bool LWOImporter::HandleTextures(aiMaterial* pcMat, const TextureList& in, aiTex
{
std::string ss = texture.mFileName;
if (!ss.length()) {
DefaultLogger::get()->error("LWOB: Empty file name");
ASSIMP_LOG_WARN("LWOB: Empty file name");
continue;
}
AdjustTexturePath(ss);
@@ -246,7 +246,7 @@ bool LWOImporter::HandleTextures(aiMaterial* pcMat, const TextureList& in, aiTex
default:
temp = (unsigned int)aiTextureOp_Multiply;
DefaultLogger::get()->warn("LWO2: Unsupported texture blend mode: alpha or displacement");
ASSIMP_LOG_WARN("LWO2: Unsupported texture blend mode: alpha or displacement");
}
// Setup texture operation
@@ -347,20 +347,20 @@ void LWOImporter::ConvertMaterial(const LWO::Surface& surf,aiMaterial* pcMat)
// the surface and search for a name which we know ...
for (const auto &shader : surf.mShaders) {
if (shader.functionName == "LW_SuperCelShader" || shader.functionName == "AH_CelShader") {
DefaultLogger::get()->info("LWO2: Mapping LW_SuperCelShader/AH_CelShader to aiShadingMode_Toon");
ASSIMP_LOG_INFO("LWO2: Mapping LW_SuperCelShader/AH_CelShader to aiShadingMode_Toon");
m = aiShadingMode_Toon;
break;
}
else if (shader.functionName == "LW_RealFresnel" || shader.functionName == "LW_FastFresnel") {
DefaultLogger::get()->info("LWO2: Mapping LW_RealFresnel/LW_FastFresnel to aiShadingMode_Fresnel");
ASSIMP_LOG_INFO("LWO2: Mapping LW_RealFresnel/LW_FastFresnel to aiShadingMode_Fresnel");
m = aiShadingMode_Fresnel;
break;
}
else
{
DefaultLogger::get()->warn("LWO2: Unknown surface shader: " + shader.functionName);
ASSIMP_LOG_WARN_F("LWO2: Unknown surface shader: ", shader.functionName);
}
}
if (surf.mMaximumSmoothAngle <= 0.0)
@@ -398,7 +398,7 @@ char LWOImporter::FindUVChannels(LWO::TextureList& list,
}
else {
// channel mismatch. need to duplicate the material.
DefaultLogger::get()->warn("LWO: Channel mismatch, would need to duplicate surface [design bug]");
ASSIMP_LOG_WARN("LWO: Channel mismatch, would need to duplicate surface [design bug]");
// TODO
}
@@ -429,7 +429,7 @@ void LWOImporter::FindUVChannels(LWO::Surface& surf,
if (extra >= AI_MAX_NUMBER_OF_TEXTURECOORDS) {
DefaultLogger::get()->error("LWO: Maximum number of UV channels for "
ASSIMP_LOG_ERROR("LWO: Maximum number of UV channels for "
"this mesh reached. Skipping channel \'" + uv.name + "\'");
}
@@ -502,7 +502,7 @@ void LWOImporter::FindVCChannels(const LWO::Surface& surf, LWO::SortedRep& sorte
if (vc.abAssigned[idx] && ((aiColor4D*)&vc.rawData[0])[idx] != aiColor4D(0.0,0.0,0.0,1.0)) {
if (next >= AI_MAX_NUMBER_OF_COLOR_SETS) {
DefaultLogger::get()->error("LWO: Maximum number of vertex color channels for "
ASSIMP_LOG_ERROR("LWO: Maximum number of vertex color channels for "
"this mesh reached. Skipping channel \'" + vc.name + "\'");
}
@@ -567,7 +567,7 @@ void LWOImporter::LoadLWO2ImageMap(unsigned int size, LWO::Texture& tex )
void LWOImporter::LoadLWO2Procedural(unsigned int /*size*/, LWO::Texture& tex )
{
// --- not supported at the moment
DefaultLogger::get()->error("LWO2: Found procedural texture, this is not supported");
ASSIMP_LOG_ERROR("LWO2: Found procedural texture, this is not supported");
tex.bCanUse = false;
}
@@ -575,7 +575,7 @@ void LWOImporter::LoadLWO2Procedural(unsigned int /*size*/, LWO::Texture& tex )
void LWOImporter::LoadLWO2Gradient(unsigned int /*size*/, LWO::Texture& tex )
{
// --- not supported at the moment
DefaultLogger::get()->error("LWO2: Found gradient texture, this is not supported");
ASSIMP_LOG_ERROR("LWO2: Found gradient texture, this is not supported");
tex.bCanUse = false;
}
@@ -590,7 +590,7 @@ void LWOImporter::LoadLWO2TextureHeader(unsigned int size, LWO::Texture& tex )
// we could crash later if this is an empty string ...
if (!tex.ordinal.length())
{
DefaultLogger::get()->error("LWO2: Ill-formed SURF.BLOK ordinal string");
ASSIMP_LOG_ERROR("LWO2: Ill-formed SURF.BLOK ordinal string");
tex.ordinal = "\x00";
}
while (true)
@@ -662,7 +662,7 @@ void LWOImporter::LoadLWO2TextureBlock(LE_NCONST IFF::SubChunkHeader* head, unsi
case AI_LWO_REFL:
listRef = &surf.mReflectionTextures;break;
default:
DefaultLogger::get()->warn("LWO2: Encountered unknown texture type");
ASSIMP_LOG_WARN("LWO2: Encountered unknown texture type");
return;
}
@@ -691,7 +691,7 @@ void LWOImporter::LoadLWO2ShaderBlock(LE_NCONST IFF::SubChunkHeader* /*head*/, u
// we could crash later if this is an empty string ...
if (!shader.ordinal.length())
{
DefaultLogger::get()->error("LWO2: Ill-formed SURF.BLOK ordinal string");
ASSIMP_LOG_ERROR("LWO2: Ill-formed SURF.BLOK ordinal string");
shader.ordinal = "\x00";
}
@@ -750,7 +750,7 @@ void LWOImporter::LoadLWO2Surface(unsigned int size)
}
}
if (derived.size())
DefaultLogger::get()->warn("LWO2: Unable to find source surface: " + derived);
ASSIMP_LOG_WARN("LWO2: Unable to find source surface: " + derived);
}
while (true)
@@ -886,7 +886,7 @@ void LWOImporter::LoadLWO2Surface(unsigned int size)
break;
default:
DefaultLogger::get()->warn("LWO2: Found an unsupported surface BLOK");
ASSIMP_LOG_WARN("LWO2: Found an unsupported surface BLOK");
};
break;