No need to distinguish formatting log functions.
parent
6957d34733
commit
5cd3bdd5c2
|
@ -305,7 +305,7 @@ void Discreet3DSImporter::ParseEditorChunk() {
|
|||
// print the version number
|
||||
char buff[10];
|
||||
ASSIMP_itoa10(buff, stream->GetI2());
|
||||
ASSIMP_LOG_INFO_F("3DS file format version: ", buff);
|
||||
ASSIMP_LOG_INFO("3DS file format version: ", buff);
|
||||
} break;
|
||||
};
|
||||
ASSIMP_3DS_END_CHUNK();
|
||||
|
@ -934,7 +934,7 @@ void Discreet3DSImporter::ParseFaceChunk() {
|
|||
}
|
||||
}
|
||||
if (0xcdcdcdcd == idx) {
|
||||
ASSIMP_LOG_ERROR_F("3DS: Unknown material: ", sz);
|
||||
ASSIMP_LOG_ERROR("3DS: Unknown material: ", sz);
|
||||
}
|
||||
|
||||
// Now continue and read all material indices
|
||||
|
|
|
@ -160,9 +160,9 @@ D3MFOpcPackage::D3MFOpcPackage(IOSystem *pIOHandler, const std::string &rFile) :
|
|||
}
|
||||
|
||||
} else if (file == D3MF::XmlTag::CONTENT_TYPES_ARCHIVE) {
|
||||
ASSIMP_LOG_WARN_F("Ignored file of unsupported type CONTENT_TYPES_ARCHIVES", file);
|
||||
ASSIMP_LOG_WARN("Ignored file of unsupported type CONTENT_TYPES_ARCHIVES", file);
|
||||
} else {
|
||||
ASSIMP_LOG_WARN_F("Ignored file of unknown type: ", file);
|
||||
ASSIMP_LOG_WARN("Ignored file of unknown type: ", file);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -492,7 +492,7 @@ aiNode *AC3DImporter::ConvertObjectSection(Object &object,
|
|||
|
||||
default:
|
||||
// Coerce unknowns to a polygon and warn
|
||||
ASSIMP_LOG_WARN_F("AC3D: The type flag of a surface is unknown: ", (*it).flags);
|
||||
ASSIMP_LOG_WARN("AC3D: The type flag of a surface is unknown: ", (*it).flags);
|
||||
(*it).flags &= ~(Surface::Mask);
|
||||
// fallthrough
|
||||
|
||||
|
@ -690,7 +690,7 @@ aiNode *AC3DImporter::ConvertObjectSection(Object &object,
|
|||
if (object.subDiv) {
|
||||
if (configEvalSubdivision) {
|
||||
std::unique_ptr<Subdivider> div(Subdivider::Create(Subdivider::CATMULL_CLARKE));
|
||||
ASSIMP_LOG_INFO_F("AC3D: Evaluating subdivision surface: ", object.name);
|
||||
ASSIMP_LOG_INFO("AC3D: Evaluating subdivision surface: ", object.name);
|
||||
|
||||
std::vector<aiMesh *> cpy(meshes.size() - oldm, nullptr);
|
||||
div->Subdivide(&meshes[oldm], cpy.size(), &cpy.front(), object.subDiv, true);
|
||||
|
@ -698,7 +698,7 @@ aiNode *AC3DImporter::ConvertObjectSection(Object &object,
|
|||
|
||||
// previous meshes are deleted vy Subdivide().
|
||||
} else {
|
||||
ASSIMP_LOG_INFO_F("AC3D: Letting the subdivision surface untouched due to my configuration: ", object.name);
|
||||
ASSIMP_LOG_INFO("AC3D: Letting the subdivision surface untouched due to my configuration: ", object.name);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -782,7 +782,7 @@ void AC3DImporter::InternReadFile(const std::string &pFile,
|
|||
unsigned int version = HexDigitToDecimal(buffer[4]);
|
||||
char msg[3];
|
||||
ASSIMP_itoa10(msg, 3, version);
|
||||
ASSIMP_LOG_INFO_F("AC3D file format version: ", msg);
|
||||
ASSIMP_LOG_INFO("AC3D file format version: ", msg);
|
||||
|
||||
std::vector<Material> materials;
|
||||
materials.reserve(5);
|
||||
|
|
|
@ -614,7 +614,7 @@ void ASEImporter::AddNodes(const std::vector<BaseNode *> &nodes,
|
|||
node->mNumChildren++;
|
||||
|
||||
// What we did is so great, it is at least worth a debug message
|
||||
ASSIMP_LOG_VERBOSE_DEBUG_F("ASE: Generating separate target node (", snode->mName, ")");
|
||||
ASSIMP_LOG_VERBOSE_DEBUG("ASE: Generating separate target node (", snode->mName, ")");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -677,7 +677,7 @@ void Parser::ParseLV3MapBlock(Texture &map) {
|
|||
if (!ParseString(temp, "*MAP_CLASS"))
|
||||
SkipToNextToken();
|
||||
if (temp != "Bitmap" && temp != "Normal Bump") {
|
||||
ASSIMP_LOG_WARN_F("ASE: Skipping unknown map type: ", temp);
|
||||
ASSIMP_LOG_WARN("ASE: Skipping unknown map type: ", temp);
|
||||
parsePath = false;
|
||||
}
|
||||
continue;
|
||||
|
|
|
@ -145,7 +145,7 @@ AI_WONT_RETURN void B3DImporter::Oops() {
|
|||
// ------------------------------------------------------------------------------------------------
|
||||
AI_WONT_RETURN void B3DImporter::Fail(string str) {
|
||||
#ifdef DEBUG_B3D
|
||||
ASSIMP_LOG_ERROR_F("Error in B3D file data: ", str);
|
||||
ASSIMP_LOG_ERROR("Error in B3D file data: ", str);
|
||||
#endif
|
||||
throw DeadlyImportError("B3D Importer - error in B3D file data: ", str);
|
||||
}
|
||||
|
@ -233,7 +233,7 @@ string B3DImporter::ReadChunk() {
|
|||
tag += char(ReadByte());
|
||||
}
|
||||
#ifdef DEBUG_B3D
|
||||
ASSIMP_LOG_DEBUG_F("ReadChunk: ", tag);
|
||||
ASSIMP_LOG_DEBUG("ReadChunk: ", tag);
|
||||
#endif
|
||||
unsigned sz = (unsigned)ReadInt();
|
||||
_stack.push_back(_pos + sz);
|
||||
|
@ -397,7 +397,7 @@ void B3DImporter::ReadTRIS(int v0) {
|
|||
matid = 0;
|
||||
} else if (matid < 0 || matid >= (int)_materials.size()) {
|
||||
#ifdef DEBUG_B3D
|
||||
ASSIMP_LOG_ERROR_F("material id=", matid);
|
||||
ASSIMP_LOG_ERROR("material id=", matid);
|
||||
#endif
|
||||
Fail("Bad material id");
|
||||
}
|
||||
|
@ -417,7 +417,7 @@ void B3DImporter::ReadTRIS(int v0) {
|
|||
int i2 = ReadInt() + v0;
|
||||
if (i0 < 0 || i0 >= (int)_vertices.size() || i1 < 0 || i1 >= (int)_vertices.size() || i2 < 0 || i2 >= (int)_vertices.size()) {
|
||||
#ifdef DEBUG_B3D
|
||||
ASSIMP_LOG_ERROR_F("Bad triangle index: i0=", i0, ", i1=", i1, ", i2=", i2);
|
||||
ASSIMP_LOG_ERROR("Bad triangle index: i0=", i0, ", i1=", i1, ", i2=", i2);
|
||||
#endif
|
||||
Fail("Bad triangle index");
|
||||
continue;
|
||||
|
|
|
@ -198,7 +198,7 @@ void DNAParser::Parse() {
|
|||
s.size = offset;
|
||||
}
|
||||
|
||||
ASSIMP_LOG_DEBUG_F("BlenderDNA: Got ", dna.structures.size(), " structures with totally ", fields, " fields");
|
||||
ASSIMP_LOG_DEBUG("BlenderDNA: Got ", dna.structures.size(), " structures with totally ", fields, " fields");
|
||||
|
||||
#ifdef ASSIMP_BUILD_BLENDER_DEBUG
|
||||
dna.DumpToFile();
|
||||
|
|
|
@ -565,7 +565,7 @@ template <> bool Structure :: ResolvePointer<std::shared_ptr,ElemBase>(std::shar
|
|||
// this might happen if DNA::RegisterConverters hasn't been called so far
|
||||
// or if the target type is not contained in `our` DNA.
|
||||
out.reset();
|
||||
ASSIMP_LOG_WARN_F( "Failed to find a converter for the `",s.name,"` structure" );
|
||||
ASSIMP_LOG_WARN( "Failed to find a converter for the `",s.name,"` structure" );
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -310,7 +310,7 @@ void BlenderImporter::ExtractScene(Scene &out, const FileDatabase &file) {
|
|||
ss.Convert(out, file);
|
||||
|
||||
#ifndef ASSIMP_BUILD_BLENDER_NO_STATS
|
||||
ASSIMP_LOG_INFO_F(
|
||||
ASSIMP_LOG_INFO(
|
||||
"(Stats) Fields read: ", file.stats().fields_read,
|
||||
", pointers resolved: ", file.stats().pointers_resolved,
|
||||
", cache hits: ", file.stats().cache_hits,
|
||||
|
|
|
@ -90,7 +90,7 @@ void BlenderModifierShowcase::ApplyModifiers(aiNode &out, ConversionData &conv_d
|
|||
|
||||
const Structure *s = conv_data.db.dna.Get(cur->dna_type);
|
||||
if (!s) {
|
||||
ASSIMP_LOG_WARN_F("BlendModifier: could not resolve DNA name: ", cur->dna_type);
|
||||
ASSIMP_LOG_WARN("BlendModifier: could not resolve DNA name: ", cur->dna_type);
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -132,7 +132,7 @@ void BlenderModifierShowcase::ApplyModifiers(aiNode &out, ConversionData &conv_d
|
|||
}
|
||||
}
|
||||
if (curgod) {
|
||||
ASSIMP_LOG_WARN_F("Couldn't find a handler for modifier: ", dat.name);
|
||||
ASSIMP_LOG_WARN("Couldn't find a handler for modifier: ", dat.name);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -140,7 +140,7 @@ void BlenderModifierShowcase::ApplyModifiers(aiNode &out, ConversionData &conv_d
|
|||
// object, we still can't say whether our modifier implementations were
|
||||
// able to fully do their job.
|
||||
if (ful) {
|
||||
ASSIMP_LOG_DEBUG_F("BlendModifier: found handlers for ", cnt, " of ", ful, " modifiers on `", orig_object.id.name,
|
||||
ASSIMP_LOG_DEBUG("BlendModifier: found handlers for ", cnt, " of ", ful, " modifiers on `", orig_object.id.name,
|
||||
"`, check log messages above for errors");
|
||||
}
|
||||
}
|
||||
|
@ -248,7 +248,7 @@ void BlenderModifier_Mirror ::DoIt(aiNode &out, ConversionData &conv_data, const
|
|||
out.mMeshes = nind;
|
||||
out.mNumMeshes *= 2;
|
||||
|
||||
ASSIMP_LOG_INFO_F("BlendModifier: Applied the `Mirror` modifier to `",
|
||||
ASSIMP_LOG_INFO("BlendModifier: Applied the `Mirror` modifier to `",
|
||||
orig_object.id.name, "`");
|
||||
}
|
||||
|
||||
|
@ -277,7 +277,7 @@ void BlenderModifier_Subdivision ::DoIt(aiNode &out, ConversionData &conv_data,
|
|||
break;
|
||||
|
||||
default:
|
||||
ASSIMP_LOG_WARN_F("BlendModifier: Unrecognized subdivision algorithm: ", mir.subdivType);
|
||||
ASSIMP_LOG_WARN("BlendModifier: Unrecognized subdivision algorithm: ", mir.subdivType);
|
||||
return;
|
||||
};
|
||||
|
||||
|
@ -292,7 +292,7 @@ void BlenderModifier_Subdivision ::DoIt(aiNode &out, ConversionData &conv_data,
|
|||
subd->Subdivide(meshes, out.mNumMeshes, tempmeshes.get(), std::max(mir.renderLevels, mir.levels), true);
|
||||
std::copy(tempmeshes.get(), tempmeshes.get() + out.mNumMeshes, meshes);
|
||||
|
||||
ASSIMP_LOG_INFO_F("BlendModifier: Applied the `Subdivision` modifier to `",
|
||||
ASSIMP_LOG_INFO("BlendModifier: Applied the `Subdivision` modifier to `",
|
||||
orig_object.id.name, "`");
|
||||
}
|
||||
|
||||
|
|
|
@ -86,7 +86,7 @@ public:
|
|||
const Scene& /*in*/,
|
||||
const Object& /*orig_object*/
|
||||
) {
|
||||
ASSIMP_LOG_INFO_F("This modifier is not supported, skipping: ",orig_modifier.dna_type );
|
||||
ASSIMP_LOG_INFO("This modifier is not supported, skipping: ",orig_modifier.dna_type );
|
||||
return;
|
||||
}
|
||||
};
|
||||
|
|
|
@ -152,7 +152,7 @@ void COBImporter::InternReadFile(const std::string &pFile, aiScene *pScene, IOSy
|
|||
ThrowException("Could not found magic id: `Caligari`");
|
||||
}
|
||||
|
||||
ASSIMP_LOG_INFO_F("File format tag: ", std::string(head + 9, 6));
|
||||
ASSIMP_LOG_INFO("File format tag: ", std::string(head + 9, 6));
|
||||
if (head[16] != 'L') {
|
||||
ThrowException("File is big-endian, which is not supported");
|
||||
}
|
||||
|
@ -301,7 +301,7 @@ aiNode *COBImporter::BuildNodes(const Node &root, const Scene &scin, aiScene *fi
|
|||
}
|
||||
std::unique_ptr<const Material> defmat;
|
||||
if (!min) {
|
||||
ASSIMP_LOG_VERBOSE_DEBUG_F("Could not resolve material index ", reflist.first, " - creating default material for this slot");
|
||||
ASSIMP_LOG_VERBOSE_DEBUG("Could not resolve material index ", reflist.first, " - creating default material for this slot");
|
||||
|
||||
defmat.reset(min = new Material());
|
||||
}
|
||||
|
@ -526,7 +526,7 @@ void COBImporter::ReadMat1_Ascii(Scene &out, LineSplitter &splitter, const Chunk
|
|||
|
||||
++splitter;
|
||||
if (!splitter.match_start("mat# ")) {
|
||||
ASSIMP_LOG_WARN_F("Expected `mat#` line in `Mat1` chunk ", nfo.id);
|
||||
ASSIMP_LOG_WARN("Expected `mat#` line in `Mat1` chunk ", nfo.id);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -538,7 +538,7 @@ void COBImporter::ReadMat1_Ascii(Scene &out, LineSplitter &splitter, const Chunk
|
|||
++splitter;
|
||||
|
||||
if (!splitter.match_start("shader: ")) {
|
||||
ASSIMP_LOG_WARN_F("Expected `mat#` line in `Mat1` chunk ", nfo.id);
|
||||
ASSIMP_LOG_WARN("Expected `mat#` line in `Mat1` chunk ", nfo.id);
|
||||
return;
|
||||
}
|
||||
std::string shader = std::string(splitter[1]);
|
||||
|
@ -549,12 +549,12 @@ void COBImporter::ReadMat1_Ascii(Scene &out, LineSplitter &splitter, const Chunk
|
|||
} else if (shader == "phong") {
|
||||
mat.shader = Material::PHONG;
|
||||
} else if (shader != "flat") {
|
||||
ASSIMP_LOG_WARN_F("Unknown value for `shader` in `Mat1` chunk ", nfo.id);
|
||||
ASSIMP_LOG_WARN("Unknown value for `shader` in `Mat1` chunk ", nfo.id);
|
||||
}
|
||||
|
||||
++splitter;
|
||||
if (!splitter.match_start("rgb ")) {
|
||||
ASSIMP_LOG_WARN_F("Expected `rgb` line in `Mat1` chunk ", nfo.id);
|
||||
ASSIMP_LOG_WARN("Expected `rgb` line in `Mat1` chunk ", nfo.id);
|
||||
}
|
||||
|
||||
const char *rgb = splitter[1];
|
||||
|
@ -562,7 +562,7 @@ void COBImporter::ReadMat1_Ascii(Scene &out, LineSplitter &splitter, const Chunk
|
|||
|
||||
++splitter;
|
||||
if (!splitter.match_start("alpha ")) {
|
||||
ASSIMP_LOG_WARN_F("Expected `alpha` line in `Mat1` chunk ", nfo.id);
|
||||
ASSIMP_LOG_WARN("Expected `alpha` line in `Mat1` chunk ", nfo.id);
|
||||
}
|
||||
|
||||
const char *tokens[10];
|
||||
|
@ -582,7 +582,7 @@ void COBImporter::ReadUnit_Ascii(Scene &out, LineSplitter &splitter, const Chunk
|
|||
}
|
||||
++splitter;
|
||||
if (!splitter.match_start("Units ")) {
|
||||
ASSIMP_LOG_WARN_F("Expected `Units` line in `Unit` chunk ", nfo.id);
|
||||
ASSIMP_LOG_WARN("Expected `Units` line in `Unit` chunk ", nfo.id);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -593,12 +593,12 @@ void COBImporter::ReadUnit_Ascii(Scene &out, LineSplitter &splitter, const Chunk
|
|||
const unsigned int t = strtoul10(splitter[1]);
|
||||
|
||||
nd->unit_scale = t >= sizeof(units) / sizeof(units[0]) ? (
|
||||
ASSIMP_LOG_WARN_F(t, " is not a valid value for `Units` attribute in `Unit chunk` ", nfo.id), 1.f) :
|
||||
ASSIMP_LOG_WARN(t, " is not a valid value for `Units` attribute in `Unit chunk` ", nfo.id), 1.f) :
|
||||
units[t];
|
||||
return;
|
||||
}
|
||||
}
|
||||
ASSIMP_LOG_WARN_F("`Unit` chunk ", nfo.id, " is a child of ", nfo.parent_id, " which does not exist");
|
||||
ASSIMP_LOG_WARN("`Unit` chunk ", nfo.id, " is a child of ", nfo.parent_id, " which does not exist");
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
|
@ -627,13 +627,13 @@ void COBImporter::ReadLght_Ascii(Scene &out, LineSplitter &splitter, const Chunk
|
|||
} else if (splitter.match_start("Spot ")) {
|
||||
msh.ltype = Light::SPOT;
|
||||
} else {
|
||||
ASSIMP_LOG_WARN_F("Unknown kind of light source in `Lght` chunk ", nfo.id, " : ", *splitter);
|
||||
ASSIMP_LOG_WARN("Unknown kind of light source in `Lght` chunk ", nfo.id, " : ", *splitter);
|
||||
msh.ltype = Light::SPOT;
|
||||
}
|
||||
|
||||
++splitter;
|
||||
if (!splitter.match_start("color ")) {
|
||||
ASSIMP_LOG_WARN_F("Expected `color` line in `Lght` chunk ", nfo.id);
|
||||
ASSIMP_LOG_WARN("Expected `color` line in `Lght` chunk ", nfo.id);
|
||||
}
|
||||
|
||||
const char *rgb = splitter[1];
|
||||
|
@ -641,14 +641,14 @@ void COBImporter::ReadLght_Ascii(Scene &out, LineSplitter &splitter, const Chunk
|
|||
|
||||
SkipSpaces(&rgb);
|
||||
if (strncmp(rgb, "cone angle", 10) != 0) {
|
||||
ASSIMP_LOG_WARN_F("Expected `cone angle` entity in `color` line in `Lght` chunk ", nfo.id);
|
||||
ASSIMP_LOG_WARN("Expected `cone angle` entity in `color` line in `Lght` chunk ", nfo.id);
|
||||
}
|
||||
SkipSpaces(rgb + 10, &rgb);
|
||||
msh.angle = fast_atof(&rgb);
|
||||
|
||||
SkipSpaces(&rgb);
|
||||
if (strncmp(rgb, "inner angle", 11) != 0) {
|
||||
ASSIMP_LOG_WARN_F("Expected `inner angle` entity in `color` line in `Lght` chunk ", nfo.id);
|
||||
ASSIMP_LOG_WARN("Expected `inner angle` entity in `color` line in `Lght` chunk ", nfo.id);
|
||||
}
|
||||
SkipSpaces(rgb + 11, &rgb);
|
||||
msh.inner_angle = fast_atof(&rgb);
|
||||
|
@ -1032,7 +1032,7 @@ void COBImporter::ReadMat1_Binary(COB::Scene &out, StreamReaderLE &reader, const
|
|||
mat.type = Material::METAL;
|
||||
break;
|
||||
default:
|
||||
ASSIMP_LOG_ERROR_F("Unrecognized shader type in `Mat1` chunk with id ", nfo.id);
|
||||
ASSIMP_LOG_ERROR("Unrecognized shader type in `Mat1` chunk with id ", nfo.id);
|
||||
mat.type = Material::FLAT;
|
||||
}
|
||||
|
||||
|
@ -1047,7 +1047,7 @@ void COBImporter::ReadMat1_Binary(COB::Scene &out, StreamReaderLE &reader, const
|
|||
mat.autofacet = Material::SMOOTH;
|
||||
break;
|
||||
default:
|
||||
ASSIMP_LOG_ERROR_F("Unrecognized faceting mode in `Mat1` chunk with id ", nfo.id);
|
||||
ASSIMP_LOG_ERROR("Unrecognized faceting mode in `Mat1` chunk with id ", nfo.id);
|
||||
mat.autofacet = Material::FACETED;
|
||||
}
|
||||
mat.autofacet_angle = static_cast<float>(reader.GetI1());
|
||||
|
@ -1175,13 +1175,13 @@ void COBImporter::ReadUnit_Binary(COB::Scene &out, StreamReaderLE &reader, const
|
|||
if (nd->id == nfo.parent_id) {
|
||||
const unsigned int t = reader.GetI2();
|
||||
nd->unit_scale = t >= sizeof(units) / sizeof(units[0]) ? (
|
||||
ASSIMP_LOG_WARN_F(t, " is not a valid value for `Units` attribute in `Unit chunk` ", nfo.id), 1.f) :
|
||||
ASSIMP_LOG_WARN(t, " is not a valid value for `Units` attribute in `Unit chunk` ", nfo.id), 1.f) :
|
||||
units[t];
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
ASSIMP_LOG_WARN_F("`Unit` chunk ", nfo.id, " is a child of ", nfo.parent_id, " which does not exist");
|
||||
ASSIMP_LOG_WARN("`Unit` chunk ", nfo.id, " is a child of ", nfo.parent_id, " which does not exist");
|
||||
}
|
||||
|
||||
#endif // ASSIMP_BUILD_NO_COB_IMPORTER
|
||||
|
|
|
@ -317,7 +317,7 @@ void ColladaLoader::ResolveNodeInstances(const ColladaParser &pParser, const Nod
|
|||
nd = FindNode(pParser.mRootNode, nodeInst.mNode);
|
||||
}
|
||||
if (nullptr == nd) {
|
||||
ASSIMP_LOG_ERROR_F("Collada: Unable to resolve reference to instanced node ", nodeInst.mNode);
|
||||
ASSIMP_LOG_ERROR("Collada: Unable to resolve reference to instanced node ", nodeInst.mNode);
|
||||
} else {
|
||||
// attach this node to the list of children
|
||||
resolved.push_back(nd);
|
||||
|
@ -347,7 +347,7 @@ void ColladaLoader::BuildLightsForNode(const ColladaParser &pParser, const Node
|
|||
// find the referred light
|
||||
ColladaParser::LightLibrary::const_iterator srcLightIt = pParser.mLightLibrary.find(lid.mLight);
|
||||
if (srcLightIt == pParser.mLightLibrary.end()) {
|
||||
ASSIMP_LOG_WARN_F("Collada: Unable to find light for ID \"", lid.mLight, "\". Skipping.");
|
||||
ASSIMP_LOG_WARN("Collada: Unable to find light for ID \"", lid.mLight, "\". Skipping.");
|
||||
continue;
|
||||
}
|
||||
const Collada::Light *srcLight = &srcLightIt->second;
|
||||
|
@ -412,7 +412,7 @@ void ColladaLoader::BuildCamerasForNode(const ColladaParser &pParser, const Node
|
|||
// find the referred light
|
||||
ColladaParser::CameraLibrary::const_iterator srcCameraIt = pParser.mCameraLibrary.find(cid.mCamera);
|
||||
if (srcCameraIt == pParser.mCameraLibrary.end()) {
|
||||
ASSIMP_LOG_WARN_F("Collada: Unable to find camera for ID \"", cid.mCamera, "\". Skipping.");
|
||||
ASSIMP_LOG_WARN("Collada: Unable to find camera for ID \"", cid.mCamera, "\". Skipping.");
|
||||
continue;
|
||||
}
|
||||
const Collada::Camera *srcCamera = &srcCameraIt->second;
|
||||
|
@ -486,7 +486,7 @@ void ColladaLoader::BuildMeshesForNode(const ColladaParser &pParser, const Node
|
|||
}
|
||||
|
||||
if (nullptr == srcMesh) {
|
||||
ASSIMP_LOG_WARN_F("Collada: Unable to find geometry for ID \"", mid.mMeshOrController, "\". Skipping.");
|
||||
ASSIMP_LOG_WARN("Collada: Unable to find geometry for ID \"", mid.mMeshOrController, "\". Skipping.");
|
||||
continue;
|
||||
}
|
||||
} else {
|
||||
|
@ -511,7 +511,7 @@ void ColladaLoader::BuildMeshesForNode(const ColladaParser &pParser, const Node
|
|||
table = &meshMatIt->second;
|
||||
meshMaterial = table->mMatName;
|
||||
} else {
|
||||
ASSIMP_LOG_WARN_F("Collada: No material specified for subgroup <", submesh.mMaterial, "> in geometry <",
|
||||
ASSIMP_LOG_WARN("Collada: No material specified for subgroup <", submesh.mMaterial, "> in geometry <",
|
||||
mid.mMeshOrController, ">.");
|
||||
if (!mid.mMaterials.empty()) {
|
||||
meshMaterial = mid.mMaterials.begin()->second.mMatName;
|
||||
|
@ -883,7 +883,7 @@ aiMesh *ColladaLoader::CreateMesh(const ColladaParser &pParser, const Mesh *pSrc
|
|||
if (nullptr != bnode) {
|
||||
bone->mName.Set(FindNameForNode(bnode));
|
||||
} else {
|
||||
ASSIMP_LOG_WARN_F("ColladaLoader::CreateMesh(): could not find corresponding node for joint \"", bone->mName.data, "\".");
|
||||
ASSIMP_LOG_WARN("ColladaLoader::CreateMesh(): could not find corresponding node for joint \"", bone->mName.data, "\".");
|
||||
}
|
||||
|
||||
// and insert bone
|
||||
|
@ -1184,7 +1184,7 @@ void ColladaLoader::CreateAnimation(aiScene *pScene, const ColladaParser &pParse
|
|||
else if (subElement == "Z")
|
||||
entry.mSubElement = 2;
|
||||
else
|
||||
ASSIMP_LOG_WARN_F("Unknown anim subelement <", subElement, ">. Ignoring");
|
||||
ASSIMP_LOG_WARN("Unknown anim subelement <", subElement, ">. Ignoring");
|
||||
} else {
|
||||
// no sub-element following, transformId is remaining string
|
||||
entry.mTransformId = srcChannel.mTarget.substr(slashPos + 1);
|
||||
|
@ -1711,7 +1711,7 @@ aiString ColladaLoader::FindFilenameForEffectTexture(const ColladaParser &pParse
|
|||
// find the image referred by this name in the image library of the scene
|
||||
ColladaParser::ImageLibrary::const_iterator imIt = pParser.mImageLibrary.find(name);
|
||||
if (imIt == pParser.mImageLibrary.end()) {
|
||||
ASSIMP_LOG_WARN_F("Collada: Unable to resolve effect texture entry \"", pName, "\", ended up at ID \"", name, "\".");
|
||||
ASSIMP_LOG_WARN("Collada: Unable to resolve effect texture entry \"", pName, "\", ended up at ID \"", name, "\".");
|
||||
|
||||
//set default texture file name
|
||||
result.Set(name + ".jpg");
|
||||
|
|
|
@ -71,7 +71,7 @@ static void ReportWarning(const char *msg, ...) {
|
|||
ai_assert(iLen > 0);
|
||||
|
||||
va_end(args);
|
||||
ASSIMP_LOG_WARN_F("Validation warning: ", std::string(szBuffer, iLen));
|
||||
ASSIMP_LOG_WARN("Validation warning: ", std::string(szBuffer, iLen));
|
||||
}
|
||||
|
||||
static bool FindCommonKey(const std::string &collada_key, const MetaKeyPairVector &key_renaming, size_t &found_index) {
|
||||
|
@ -2400,7 +2400,7 @@ Collada::InputType ColladaParser::GetTypeForSemantic(const std::string &semantic
|
|||
else if (semantic == "TANGENT" || semantic == "TEXTANGENT")
|
||||
return IT_Tangent;
|
||||
|
||||
ASSIMP_LOG_WARN_F("Unknown vertex input type \"", semantic, "\". Ignoring.");
|
||||
ASSIMP_LOG_WARN("Unknown vertex input type \"", semantic, "\". Ignoring.");
|
||||
return IT_Invalid;
|
||||
}
|
||||
|
||||
|
|
|
@ -135,7 +135,7 @@ public:
|
|||
for(;splitter->length() && splitter->at(0) != '}'; splitter++, cnt++);
|
||||
|
||||
splitter++;
|
||||
ASSIMP_LOG_VERBOSE_DEBUG_F("DXF: skipped over control group (",cnt," lines)");
|
||||
ASSIMP_LOG_VERBOSE_DEBUG("DXF: skipped over control group (",cnt," lines)");
|
||||
}
|
||||
} catch(std::logic_error&) {
|
||||
ai_assert(!splitter);
|
||||
|
|
|
@ -202,7 +202,7 @@ void DXFImporter::InternReadFile( const std::string& filename, aiScene* pScene,
|
|||
|
||||
// comments
|
||||
else if (reader.Is(999)) {
|
||||
ASSIMP_LOG_INFO_F("DXF Comment: ", reader.Value());
|
||||
ASSIMP_LOG_INFO("DXF Comment: ", reader.Value());
|
||||
}
|
||||
|
||||
// don't read past the official EOF sign
|
||||
|
@ -241,7 +241,7 @@ void DXFImporter::ConvertMeshes(aiScene* pScene, DXF::FileData& output) {
|
|||
}
|
||||
}
|
||||
|
||||
ASSIMP_LOG_VERBOSE_DEBUG_F("DXF: Unexpanded polycount is ", icount, ", vertex count is ", vcount);
|
||||
ASSIMP_LOG_VERBOSE_DEBUG("DXF: Unexpanded polycount is ", icount, ", vertex count is ", vcount);
|
||||
}
|
||||
|
||||
if (! output.blocks.size() ) {
|
||||
|
@ -372,7 +372,7 @@ void DXFImporter::ExpandBlockReferences(DXF::Block& bl,const DXF::BlockMap& bloc
|
|||
// first check if the referenced blocks exists ...
|
||||
const DXF::BlockMap::const_iterator it = blocks_by_name.find(insert.name);
|
||||
if (it == blocks_by_name.end()) {
|
||||
ASSIMP_LOG_ERROR_F("DXF: Failed to resolve block reference: ", insert.name,"; skipping" );
|
||||
ASSIMP_LOG_ERROR("DXF: Failed to resolve block reference: ", insert.name,"; skipping" );
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -473,7 +473,7 @@ void DXFImporter::ParseBlocks(DXF::LineReader& reader, DXF::FileData& output) {
|
|||
++reader;
|
||||
}
|
||||
|
||||
ASSIMP_LOG_VERBOSE_DEBUG_F("DXF: got ", output.blocks.size()," entries in BLOCKS" );
|
||||
ASSIMP_LOG_VERBOSE_DEBUG("DXF: got ", output.blocks.size()," entries in BLOCKS" );
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
|
@ -549,7 +549,7 @@ void DXFImporter::ParseEntities(DXF::LineReader& reader, DXF::FileData& output)
|
|||
++reader;
|
||||
}
|
||||
|
||||
ASSIMP_LOG_VERBOSE_DEBUG_F( "DXF: got ", block.lines.size()," polylines and ", block.insertions.size(),
|
||||
ASSIMP_LOG_VERBOSE_DEBUG( "DXF: got ", block.lines.size()," polylines and ", block.insertions.size(),
|
||||
" inserted blocks in ENTITIES" );
|
||||
}
|
||||
|
||||
|
@ -654,7 +654,7 @@ void DXFImporter::ParsePolyLine(DXF::LineReader& reader, DXF::FileData& output)
|
|||
//}
|
||||
|
||||
if (vguess && line.positions.size() != vguess) {
|
||||
ASSIMP_LOG_WARN_F("DXF: unexpected vertex count in polymesh: ",
|
||||
ASSIMP_LOG_WARN("DXF: unexpected vertex count in polymesh: ",
|
||||
line.positions.size(),", expected ", vguess );
|
||||
}
|
||||
|
||||
|
@ -670,7 +670,7 @@ void DXFImporter::ParsePolyLine(DXF::LineReader& reader, DXF::FileData& output)
|
|||
// to set the 71 and 72 fields, respectively, to valid values.
|
||||
// So just fire a warning.
|
||||
if (iguess && line.counts.size() != iguess) {
|
||||
ASSIMP_LOG_WARN_F( "DXF: unexpected face count in polymesh: ", line.counts.size(),", expected ", iguess );
|
||||
ASSIMP_LOG_WARN( "DXF: unexpected face count in polymesh: ", line.counts.size(),", expected ", iguess );
|
||||
}
|
||||
}
|
||||
else if (!line.indices.size() && !line.counts.size()) {
|
||||
|
|
|
@ -459,7 +459,7 @@ void TokenizeBinary(TokenList& output_tokens, const char* input, size_t length)
|
|||
/*Result ignored*/ ReadByte(input, cursor, input + length);
|
||||
/*Result ignored*/ ReadByte(input, cursor, input + length);
|
||||
const uint32_t version = ReadWord(input, cursor, input + length);
|
||||
ASSIMP_LOG_DEBUG_F("FBX version: ", version);
|
||||
ASSIMP_LOG_DEBUG("FBX version: ", version);
|
||||
const bool is64bits = version >= 7500;
|
||||
const char *end = input + length;
|
||||
try
|
||||
|
|
|
@ -1542,10 +1542,10 @@ void FBXConverter::ConvertCluster(std::vector<aiBone *> &local_mesh_bones, const
|
|||
aiBone *bone = nullptr;
|
||||
|
||||
if (bone_map.count(deformer_name)) {
|
||||
ASSIMP_LOG_VERBOSE_DEBUG_F("retrieved bone from lookup ", bone_name.C_Str(), ". Deformer:", deformer_name);
|
||||
ASSIMP_LOG_VERBOSE_DEBUG("retrieved bone from lookup ", bone_name.C_Str(), ". Deformer:", deformer_name);
|
||||
bone = bone_map[deformer_name];
|
||||
} else {
|
||||
ASSIMP_LOG_VERBOSE_DEBUG_F("created new bone ", bone_name.C_Str(), ". Deformer: ", deformer_name);
|
||||
ASSIMP_LOG_VERBOSE_DEBUG("created new bone ", bone_name.C_Str(), ". Deformer: ", deformer_name);
|
||||
bone = new aiBone();
|
||||
bone->mName = bone_name;
|
||||
|
||||
|
@ -1591,7 +1591,7 @@ void FBXConverter::ConvertCluster(std::vector<aiBone *> &local_mesh_bones, const
|
|||
bone_map.insert(std::pair<const std::string, aiBone *>(deformer_name, bone));
|
||||
}
|
||||
|
||||
ASSIMP_LOG_DEBUG_F("bone research: Indicies size: ", out_indices.size());
|
||||
ASSIMP_LOG_DEBUG("bone research: Indicies size: ", out_indices.size());
|
||||
|
||||
// lookup must be populated in case something goes wrong
|
||||
// this also allocates bones to mesh instance outside
|
||||
|
|
|
@ -312,7 +312,7 @@ void Document::ReadHeader() {
|
|||
|
||||
const Scope& shead = *ehead->Compound();
|
||||
fbxVersion = ParseTokenAsInt(GetRequiredToken(GetRequiredElement(shead,"FBXVersion",ehead),0));
|
||||
ASSIMP_LOG_DEBUG_F("FBX Version: ", fbxVersion);
|
||||
ASSIMP_LOG_DEBUG("FBX Version: ", fbxVersion);
|
||||
|
||||
// While we may have some success with newer files, we don't support
|
||||
// the older 6.n fbx format
|
||||
|
|
|
@ -79,7 +79,7 @@ void DOMError(const std::string& message, const Element* element /*= nullptr*/)
|
|||
void DOMWarning(const std::string& message, const Token& token)
|
||||
{
|
||||
if(DefaultLogger::get()) {
|
||||
ASSIMP_LOG_WARN_F("FBX-DOM", Util::GetTokenText(&token), message);
|
||||
ASSIMP_LOG_WARN("FBX-DOM", Util::GetTokenText(&token), message);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -352,7 +352,7 @@ Video::Video(uint64_t id, const Element& element, const Document& doc, const std
|
|||
}
|
||||
} catch (const runtime_error& runtimeError) {
|
||||
//we don't need the content data for contents that has already been loaded
|
||||
ASSIMP_LOG_VERBOSE_DEBUG_F("Caught exception in FBXMaterial (likely because content was already loaded): ",
|
||||
ASSIMP_LOG_VERBOSE_DEBUG("Caught exception in FBXMaterial (likely because content was already loaded): ",
|
||||
runtimeError.what());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -242,7 +242,7 @@ LWO::Texture* LWOImporter::SetupNewTextureLWOB(LWO::TextureList& list,unsigned i
|
|||
else
|
||||
{
|
||||
// procedural or gradient, not supported
|
||||
ASSIMP_LOG_ERROR_F("LWOB: Unsupported legacy texture: ", type);
|
||||
ASSIMP_LOG_ERROR("LWOB: Unsupported legacy texture: ", type);
|
||||
}
|
||||
|
||||
return tex;
|
||||
|
|
|
@ -1006,7 +1006,7 @@ void LWOImporter::LoadLWO2VertexMap(unsigned int length, bool perPoly) {
|
|||
if (name == "APS.Level") {
|
||||
// XXX handle this (seems to be subdivision-related).
|
||||
}
|
||||
ASSIMP_LOG_WARN_F("LWO2: Skipping unknown VMAP/VMAD channel \'", name, "\'");
|
||||
ASSIMP_LOG_WARN("LWO2: Skipping unknown VMAP/VMAD channel \'", name, "\'");
|
||||
return;
|
||||
};
|
||||
base->Allocate((unsigned int)mCurLayer->mTempPoints.size());
|
||||
|
@ -1026,7 +1026,7 @@ void LWOImporter::LoadLWO2VertexMap(unsigned int length, bool perPoly) {
|
|||
|
||||
unsigned int idx = ReadVSizedIntLWO2(mFileBuffer) + mCurLayer->mPointIDXOfs;
|
||||
if (idx >= numPoints) {
|
||||
ASSIMP_LOG_WARN_F("LWO2: Failure evaluating VMAP/VMAD entry \'", name, "\', vertex index is out of range");
|
||||
ASSIMP_LOG_WARN("LWO2: Failure evaluating VMAP/VMAD entry \'", name, "\', vertex index is out of range");
|
||||
mFileBuffer += base->dims << 2u;
|
||||
continue;
|
||||
}
|
||||
|
@ -1036,7 +1036,7 @@ void LWOImporter::LoadLWO2VertexMap(unsigned int length, bool perPoly) {
|
|||
// we have already a VMAP entry for this vertex - thus
|
||||
// we need to duplicate the corresponding polygon.
|
||||
if (polyIdx >= numFaces) {
|
||||
ASSIMP_LOG_WARN_F("LWO2: Failure evaluating VMAD entry \'", name, "\', polygon index is out of range");
|
||||
ASSIMP_LOG_WARN("LWO2: Failure evaluating VMAD entry \'", name, "\', polygon index is out of range");
|
||||
mFileBuffer += base->dims << 2u;
|
||||
continue;
|
||||
}
|
||||
|
@ -1076,7 +1076,7 @@ void LWOImporter::LoadLWO2VertexMap(unsigned int length, bool perPoly) {
|
|||
CreateNewEntry(mCurLayer->mNormals, srcIdx);
|
||||
}
|
||||
if (!had) {
|
||||
ASSIMP_LOG_WARN_F("LWO2: Failure evaluating VMAD entry \'", name, "\', vertex index wasn't found in that polygon");
|
||||
ASSIMP_LOG_WARN("LWO2: Failure evaluating VMAD entry \'", name, "\', vertex index wasn't found in that polygon");
|
||||
ai_assert(had);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -335,7 +335,7 @@ void LWOImporter::ConvertMaterial(const LWO::Surface &surf, aiMaterial *pcMat) {
|
|||
m = aiShadingMode_Fresnel;
|
||||
break;
|
||||
} else {
|
||||
ASSIMP_LOG_WARN_F("LWO2: Unknown surface shader: ", shader.functionName);
|
||||
ASSIMP_LOG_WARN("LWO2: Unknown surface shader: ", shader.functionName);
|
||||
}
|
||||
}
|
||||
if (surf.mMaximumSmoothAngle <= 0.0)
|
||||
|
|
|
@ -193,7 +193,7 @@ void M3DImporter::InternReadFile(const std::string &file, aiScene *pScene, IOSys
|
|||
}
|
||||
|
||||
//DefaultLogger::create("/dev/stderr", Logger::VERBOSE);
|
||||
ASSIMP_LOG_DEBUG_F("M3D: loading ", file);
|
||||
ASSIMP_LOG_DEBUG("M3D: loading ", file);
|
||||
|
||||
// let the C SDK do the hard work for us
|
||||
M3DWrapper m3d(pIOHandler, buffer);
|
||||
|
@ -239,7 +239,7 @@ void M3DImporter::importMaterials(const M3DWrapper &m3d) {
|
|||
mScene->mNumMaterials = m3d->nummaterial + 1;
|
||||
mScene->mMaterials = new aiMaterial *[mScene->mNumMaterials];
|
||||
|
||||
ASSIMP_LOG_DEBUG_F("M3D: importMaterials ", mScene->mNumMaterials);
|
||||
ASSIMP_LOG_DEBUG("M3D: importMaterials ", mScene->mNumMaterials);
|
||||
|
||||
// add a default material as first
|
||||
aiMaterial *mat = new aiMaterial;
|
||||
|
@ -334,7 +334,7 @@ void M3DImporter::importTextures(const M3DWrapper &m3d) {
|
|||
ai_assert(m3d);
|
||||
|
||||
mScene->mNumTextures = m3d->numtexture;
|
||||
ASSIMP_LOG_DEBUG_F("M3D: importTextures ", mScene->mNumTextures);
|
||||
ASSIMP_LOG_DEBUG("M3D: importTextures ", mScene->mNumTextures);
|
||||
|
||||
if (!m3d->numtexture || !m3d->texture) {
|
||||
return;
|
||||
|
@ -389,7 +389,7 @@ void M3DImporter::importTextures(const M3DWrapper &m3d) {
|
|||
// individually. In assimp there're per mesh vertex and UV lists, and they must be
|
||||
// indexed simultaneously.
|
||||
void M3DImporter::importMeshes(const M3DWrapper &m3d) {
|
||||
ASSIMP_LOG_DEBUG_F("M3D: importMeshes ", m3d->numface);
|
||||
ASSIMP_LOG_DEBUG("M3D: importMeshes ", m3d->numface);
|
||||
|
||||
if (!m3d->numface || !m3d->face || !m3d->numvertex || !m3d->vertex) {
|
||||
return;
|
||||
|
@ -508,7 +508,7 @@ void M3DImporter::importBones(const M3DWrapper &m3d, unsigned int parentid, aiNo
|
|||
ai_assert(mScene != nullptr);
|
||||
ai_assert(m3d);
|
||||
|
||||
ASSIMP_LOG_DEBUG_F("M3D: importBones ", m3d->numbone, " parentid ", (int)parentid);
|
||||
ASSIMP_LOG_DEBUG("M3D: importBones ", m3d->numbone, " parentid ", (int)parentid);
|
||||
|
||||
if (!m3d->numbone || !m3d->bone) {
|
||||
return;
|
||||
|
@ -549,7 +549,7 @@ void M3DImporter::importAnimations(const M3DWrapper &m3d) {
|
|||
|
||||
mScene->mNumAnimations = m3d->numaction;
|
||||
|
||||
ASSIMP_LOG_DEBUG_F("M3D: importAnimations ", mScene->mNumAnimations);
|
||||
ASSIMP_LOG_DEBUG("M3D: importAnimations ", mScene->mNumAnimations);
|
||||
|
||||
if (!m3d->numaction || !m3d->action || !m3d->numbone || !m3d->bone || !m3d->vertex) {
|
||||
return;
|
||||
|
@ -712,7 +712,7 @@ void M3DImporter::populateMesh(const M3DWrapper &m3d, aiMesh *pMesh, std::vector
|
|||
ai_assert(vertexids != nullptr);
|
||||
ai_assert(m3d);
|
||||
|
||||
ASSIMP_LOG_DEBUG_F("M3D: populateMesh numvertices ", vertices->size(), " numfaces ", faces->size(),
|
||||
ASSIMP_LOG_DEBUG("M3D: populateMesh numvertices ", vertices->size(), " numfaces ", faces->size(),
|
||||
" numnormals ", normals->size(), " numtexcoord ", texcoords->size(), " numbones ", m3d->numbone);
|
||||
|
||||
if (vertices->size() && faces->size()) {
|
||||
|
|
|
@ -112,7 +112,7 @@ bool Q3Shader::LoadShader(ShaderData &fill, const std::string &pFile, IOSystem *
|
|||
if (!file.get())
|
||||
return false; // if we can't access the file, don't worry and return
|
||||
|
||||
ASSIMP_LOG_INFO_F("Loading Quake3 shader file ", pFile);
|
||||
ASSIMP_LOG_INFO("Loading Quake3 shader file ", pFile);
|
||||
|
||||
// read file in memory
|
||||
const size_t s = file->FileSize();
|
||||
|
@ -851,7 +851,7 @@ void MD3Importer::InternReadFile(const std::string &pFile, aiScene *pScene, IOSy
|
|||
|
||||
if (it != skins.textures.end()) {
|
||||
texture_name = &*(_texture_name = (*it).second).begin();
|
||||
ASSIMP_LOG_VERBOSE_DEBUG_F("MD3: Assigning skin texture ", (*it).second, " to surface ", pcSurfaces->NAME);
|
||||
ASSIMP_LOG_VERBOSE_DEBUG("MD3: Assigning skin texture ", (*it).second, " to surface ", pcSurfaces->NAME);
|
||||
(*it).resolved = true; // mark entry as resolved
|
||||
}
|
||||
|
||||
|
@ -1000,7 +1000,7 @@ void MD3Importer::InternReadFile(const std::string &pFile, aiScene *pScene, IOSy
|
|||
if (!DefaultLogger::isNullLogger()) {
|
||||
for (std::list<Q3Shader::SkinData::TextureEntry>::const_iterator it = skins.textures.begin(); it != skins.textures.end(); ++it) {
|
||||
if (!(*it).resolved) {
|
||||
ASSIMP_LOG_ERROR_F("MD3: Failed to match skin ", (*it).first, " to surface ", (*it).second);
|
||||
ASSIMP_LOG_ERROR("MD3: Failed to match skin ", (*it).first, " to surface ", (*it).second);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -387,7 +387,7 @@ void MS3DImporter::InternReadFile( const std::string& pFile,
|
|||
}
|
||||
|
||||
const std::string& s = std::string(reinterpret_cast<char*>(stream.GetPtr()),len);
|
||||
ASSIMP_LOG_DEBUG_F("MS3D: Model comment: ", s);
|
||||
ASSIMP_LOG_DEBUG("MS3D: Model comment: ", s);
|
||||
}
|
||||
|
||||
if(stream.GetRemainingSize() > 4 && inrange((stream >> subversion,subversion),1u,3u)) {
|
||||
|
|
|
@ -147,7 +147,7 @@ void NDOImporter::InternReadFile( const std::string& pFile,
|
|||
ASSIMP_LOG_INFO("NDO file format is 1.2");
|
||||
}
|
||||
else {
|
||||
ASSIMP_LOG_WARN_F( "Unrecognized nendo file format version, continuing happily ... :", (head+6));
|
||||
ASSIMP_LOG_WARN( "Unrecognized nendo file format version, continuing happily ... :", (head+6));
|
||||
}
|
||||
|
||||
reader.IncPtr(2); /* skip flags */
|
||||
|
|
|
@ -150,7 +150,7 @@ void NFFImporter::LoadNFF2MaterialTable(std::vector<ShadingInfo> &output,
|
|||
|
||||
// The file should start with the magic sequence "mat"
|
||||
if (!TokenMatch(buffer, "mat", 3)) {
|
||||
ASSIMP_LOG_ERROR_F("NFF2: Not a valid material library ", path, ".");
|
||||
ASSIMP_LOG_ERROR("NFF2: Not a valid material library ", path, ".");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -164,7 +164,7 @@ void NFFImporter::LoadNFF2MaterialTable(std::vector<ShadingInfo> &output,
|
|||
|
||||
// 'version' defines the version of the file format
|
||||
if (TokenMatch(sz, "version", 7)) {
|
||||
ASSIMP_LOG_INFO_F("NFF (Sense8) material library file format: ", std::string(sz));
|
||||
ASSIMP_LOG_INFO("NFF (Sense8) material library file format: ", std::string(sz));
|
||||
}
|
||||
// 'matdef' starts a new material in the file
|
||||
else if (TokenMatch(sz, "matdef", 6)) {
|
||||
|
@ -177,7 +177,7 @@ void NFFImporter::LoadNFF2MaterialTable(std::vector<ShadingInfo> &output,
|
|||
// check whether we have an active material at the moment
|
||||
if (!IsLineEnd(*sz)) {
|
||||
if (!curShader) {
|
||||
ASSIMP_LOG_ERROR_F("NFF2 material library: Found element ", sz, "but there is no active material");
|
||||
ASSIMP_LOG_ERROR("NFF2 material library: Found element ", sz, "but there is no active material");
|
||||
continue;
|
||||
}
|
||||
} else
|
||||
|
@ -277,7 +277,7 @@ void NFFImporter::InternReadFile(const std::string &pFile,
|
|||
while (GetNextLine(buffer, line)) {
|
||||
SkipSpaces(line, &sz);
|
||||
if (TokenMatch(sz, "version", 7)) {
|
||||
ASSIMP_LOG_INFO_F("NFF (Sense8) file format: ", sz);
|
||||
ASSIMP_LOG_INFO("NFF (Sense8) file format: ", sz);
|
||||
} else if (TokenMatch(sz, "viewpos", 7)) {
|
||||
AI_NFF_PARSE_TRIPLE(camPos);
|
||||
hasCam = true;
|
||||
|
|
|
@ -168,7 +168,7 @@ void OgreBinarySerializer::RollbackHeader() {
|
|||
|
||||
void OgreBinarySerializer::SkipBytes(size_t numBytes) {
|
||||
#if (OGRE_BINARY_SERIALIZER_DEBUG == 1)
|
||||
ASSIMP_LOG_VERBOSE_DEBUG_F("Skipping ", numBytes, " bytes");
|
||||
ASSIMP_LOG_VERBOSE_DEBUG("Skipping ", numBytes, " bytes");
|
||||
#endif
|
||||
|
||||
m_reader->IncPtr(numBytes);
|
||||
|
@ -208,7 +208,7 @@ void OgreBinarySerializer::ReadMesh(Mesh *mesh) {
|
|||
mesh->hasSkeletalAnimations = Read<bool>();
|
||||
|
||||
ASSIMP_LOG_VERBOSE_DEBUG("Reading Mesh");
|
||||
ASSIMP_LOG_VERBOSE_DEBUG_F(" - Skeletal animations: ", mesh->hasSkeletalAnimations ? "true" : "false");
|
||||
ASSIMP_LOG_VERBOSE_DEBUG(" - Skeletal animations: ", mesh->hasSkeletalAnimations ? "true" : "false");
|
||||
|
||||
if (!AtEnd()) {
|
||||
uint16_t id = ReadHeader();
|
||||
|
@ -364,9 +364,9 @@ void OgreBinarySerializer::ReadSubMesh(Mesh *mesh) {
|
|||
submesh->indexData->faceCount = static_cast<uint32_t>(submesh->indexData->count / 3);
|
||||
submesh->indexData->is32bit = Read<bool>();
|
||||
|
||||
ASSIMP_LOG_VERBOSE_DEBUG_F("Reading SubMesh ", mesh->subMeshes.size());
|
||||
ASSIMP_LOG_VERBOSE_DEBUG_F(" - Material: '", submesh->materialRef, "'");
|
||||
ASSIMP_LOG_VERBOSE_DEBUG_F(" - Uses shared geometry: ", submesh->usesSharedVertexData ? "true" : "false");
|
||||
ASSIMP_LOG_VERBOSE_DEBUG("Reading SubMesh ", mesh->subMeshes.size());
|
||||
ASSIMP_LOG_VERBOSE_DEBUG(" - Material: '", submesh->materialRef, "'");
|
||||
ASSIMP_LOG_VERBOSE_DEBUG(" - Uses shared geometry: ", submesh->usesSharedVertexData ? "true" : "false");
|
||||
|
||||
// Index buffer
|
||||
if (submesh->indexData->count > 0) {
|
||||
|
@ -374,7 +374,7 @@ void OgreBinarySerializer::ReadSubMesh(Mesh *mesh) {
|
|||
uint8_t *indexBuffer = ReadBytes(numBytes);
|
||||
submesh->indexData->buffer = MemoryStreamPtr(new Assimp::MemoryIOStream(indexBuffer, numBytes, true));
|
||||
|
||||
ASSIMP_LOG_VERBOSE_DEBUG_F(" - ", submesh->indexData->faceCount,
|
||||
ASSIMP_LOG_VERBOSE_DEBUG(" - ", submesh->indexData->faceCount,
|
||||
" faces from ", submesh->indexData->count, (submesh->indexData->is32bit ? " 32bit" : " 16bit"),
|
||||
" indexes of ", numBytes, " bytes");
|
||||
}
|
||||
|
@ -475,7 +475,7 @@ void OgreBinarySerializer::ReadSubMeshNames(Mesh *mesh) {
|
|||
}
|
||||
|
||||
submesh->name = ReadLine();
|
||||
ASSIMP_LOG_VERBOSE_DEBUG_F(" - SubMesh ", submesh->index, " name '", submesh->name, "'");
|
||||
ASSIMP_LOG_VERBOSE_DEBUG(" - SubMesh ", submesh->index, " name '", submesh->name, "'");
|
||||
|
||||
if (!AtEnd())
|
||||
id = ReadHeader();
|
||||
|
@ -488,7 +488,7 @@ void OgreBinarySerializer::ReadSubMeshNames(Mesh *mesh) {
|
|||
void OgreBinarySerializer::ReadGeometry(VertexData *dest) {
|
||||
dest->count = Read<uint32_t>();
|
||||
|
||||
ASSIMP_LOG_VERBOSE_DEBUG_F(" - Reading geometry of ", dest->count, " vertices");
|
||||
ASSIMP_LOG_VERBOSE_DEBUG(" - Reading geometry of ", dest->count, " vertices");
|
||||
|
||||
if (!AtEnd()) {
|
||||
uint16_t id = ReadHeader();
|
||||
|
@ -536,7 +536,7 @@ void OgreBinarySerializer::ReadGeometryVertexElement(VertexData *dest) {
|
|||
element.offset = Read<uint16_t>();
|
||||
element.index = Read<uint16_t>();
|
||||
|
||||
ASSIMP_LOG_VERBOSE_DEBUG_F(" - Vertex element ", element.SemanticToString(), " of type ",
|
||||
ASSIMP_LOG_VERBOSE_DEBUG(" - Vertex element ", element.SemanticToString(), " of type ",
|
||||
element.TypeToString(), " index=", element.index, " source=", element.source);
|
||||
|
||||
dest->vertexElements.push_back(element);
|
||||
|
@ -557,7 +557,7 @@ void OgreBinarySerializer::ReadGeometryVertexBuffer(VertexData *dest) {
|
|||
uint8_t *vertexBuffer = ReadBytes(numBytes);
|
||||
dest->vertexBindings[bindIndex] = MemoryStreamPtr(new Assimp::MemoryIOStream(vertexBuffer, numBytes, true));
|
||||
|
||||
ASSIMP_LOG_VERBOSE_DEBUG_F(" - Read vertex buffer for source ", bindIndex, " of ", numBytes, " bytes");
|
||||
ASSIMP_LOG_VERBOSE_DEBUG(" - Read vertex buffer for source ", bindIndex, " of ", numBytes, " bytes");
|
||||
}
|
||||
|
||||
void OgreBinarySerializer::ReadEdgeList(Mesh * /*mesh*/) {
|
||||
|
@ -777,12 +777,12 @@ bool OgreBinarySerializer::ImportSkeleton(Assimp::IOSystem *pIOHandler, MeshXml
|
|||
|
||||
MemoryStreamReaderPtr OgreBinarySerializer::OpenReader(Assimp::IOSystem *pIOHandler, const std::string &filename) {
|
||||
if (!EndsWith(filename, ".skeleton", false)) {
|
||||
ASSIMP_LOG_ERROR_F("Imported Mesh is referencing to unsupported '", filename, "' skeleton file.");
|
||||
ASSIMP_LOG_ERROR("Imported Mesh is referencing to unsupported '", filename, "' skeleton file.");
|
||||
return MemoryStreamReaderPtr();
|
||||
}
|
||||
|
||||
if (!pIOHandler->Exists(filename)) {
|
||||
ASSIMP_LOG_ERROR_F("Failed to find skeleton file '", filename, "' that is referenced by imported Mesh.");
|
||||
ASSIMP_LOG_ERROR("Failed to find skeleton file '", filename, "' that is referenced by imported Mesh.");
|
||||
return MemoryStreamReaderPtr();
|
||||
}
|
||||
|
||||
|
@ -874,7 +874,7 @@ void OgreBinarySerializer::ReadBone(Skeleton *skeleton) {
|
|||
throw DeadlyImportError("Ogre Skeleton bone indexes not contiguous. Error at bone index ", bone->id);
|
||||
}
|
||||
|
||||
ASSIMP_LOG_VERBOSE_DEBUG_F(" ", bone->id, " ", bone->name);
|
||||
ASSIMP_LOG_VERBOSE_DEBUG(" ", bone->id, " ", bone->name);
|
||||
|
||||
skeleton->bones.push_back(bone);
|
||||
}
|
||||
|
@ -919,7 +919,7 @@ void OgreBinarySerializer::ReadSkeletonAnimation(Skeleton *skeleton) {
|
|||
|
||||
skeleton->animations.push_back(anim);
|
||||
|
||||
ASSIMP_LOG_VERBOSE_DEBUG_F(" ", anim->name, " (", anim->length, " sec, ", anim->tracks.size(), " tracks)");
|
||||
ASSIMP_LOG_VERBOSE_DEBUG(" ", anim->name, " (", anim->length, " sec, ", anim->tracks.size(), " tracks)");
|
||||
}
|
||||
|
||||
void OgreBinarySerializer::ReadSkeletonAnimationTrack(Skeleton * /*skeleton*/, Animation *dest) {
|
||||
|
|
|
@ -160,16 +160,16 @@ aiMaterial *OgreImporter::ReadMaterial(const std::string &pFile, Assimp::IOSyste
|
|||
if (materialFile) {
|
||||
break;
|
||||
}
|
||||
ASSIMP_LOG_VERBOSE_DEBUG_F("Source file for material '", materialName, "' ", potentialFiles[i], " does not exist");
|
||||
ASSIMP_LOG_VERBOSE_DEBUG("Source file for material '", materialName, "' ", potentialFiles[i], " does not exist");
|
||||
}
|
||||
if (!materialFile) {
|
||||
ASSIMP_LOG_ERROR_F("Failed to find source file for material '", materialName, "'");
|
||||
ASSIMP_LOG_ERROR("Failed to find source file for material '", materialName, "'");
|
||||
return 0;
|
||||
}
|
||||
|
||||
std::unique_ptr<IOStream> stream(materialFile);
|
||||
if (stream->FileSize() == 0) {
|
||||
ASSIMP_LOG_WARN_F("Source file for material '", materialName, "' is empty (size is 0 bytes)");
|
||||
ASSIMP_LOG_WARN("Source file for material '", materialName, "' is empty (size is 0 bytes)");
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -184,7 +184,7 @@ aiMaterial *OgreImporter::ReadMaterial(const std::string &pFile, Assimp::IOSyste
|
|||
ss << &data[0];
|
||||
}
|
||||
|
||||
ASSIMP_LOG_VERBOSE_DEBUG_F("Reading material '", materialName, "'");
|
||||
ASSIMP_LOG_VERBOSE_DEBUG("Reading material '", materialName, "'");
|
||||
|
||||
aiMaterial *material = new aiMaterial();
|
||||
m_textures.clear();
|
||||
|
@ -219,11 +219,11 @@ aiMaterial *OgreImporter::ReadMaterial(const std::string &pFile, Assimp::IOSyste
|
|||
|
||||
NextAfterNewLine(ss, linePart);
|
||||
if (linePart != partBlockStart) {
|
||||
ASSIMP_LOG_ERROR_F("Invalid material: block start missing near index ", ss.tellg());
|
||||
ASSIMP_LOG_ERROR("Invalid material: block start missing near index ", ss.tellg());
|
||||
return material;
|
||||
}
|
||||
|
||||
ASSIMP_LOG_VERBOSE_DEBUG_F("material '", materialName, "'");
|
||||
ASSIMP_LOG_VERBOSE_DEBUG("material '", materialName, "'");
|
||||
|
||||
while (linePart != partBlockEnd) {
|
||||
// Proceed to the first technique
|
||||
|
@ -303,11 +303,11 @@ bool OgreImporter::ReadTechnique(const std::string &techniqueName, stringstream
|
|||
ss >> linePart;
|
||||
|
||||
if (linePart != partBlockStart) {
|
||||
ASSIMP_LOG_ERROR_F("Invalid material: Technique block start missing near index ", ss.tellg());
|
||||
ASSIMP_LOG_ERROR("Invalid material: Technique block start missing near index ", ss.tellg());
|
||||
return false;
|
||||
}
|
||||
|
||||
ASSIMP_LOG_VERBOSE_DEBUG_F(" technique '", techniqueName, "'");
|
||||
ASSIMP_LOG_VERBOSE_DEBUG(" technique '", techniqueName, "'");
|
||||
|
||||
const string partPass = "pass";
|
||||
|
||||
|
@ -334,11 +334,11 @@ bool OgreImporter::ReadPass(const std::string &passName, stringstream &ss, aiMat
|
|||
ss >> linePart;
|
||||
|
||||
if (linePart != partBlockStart) {
|
||||
ASSIMP_LOG_ERROR_F("Invalid material: Pass block start missing near index ", ss.tellg());
|
||||
ASSIMP_LOG_ERROR("Invalid material: Pass block start missing near index ", ss.tellg());
|
||||
return false;
|
||||
}
|
||||
|
||||
ASSIMP_LOG_VERBOSE_DEBUG_F(" pass '", passName, "'");
|
||||
ASSIMP_LOG_VERBOSE_DEBUG(" pass '", passName, "'");
|
||||
|
||||
const string partAmbient = "ambient";
|
||||
const string partDiffuse = "diffuse";
|
||||
|
@ -362,7 +362,7 @@ bool OgreImporter::ReadPass(const std::string &passName, stringstream &ss, aiMat
|
|||
ss >> r >> g >> b;
|
||||
const aiColor3D color(r, g, b);
|
||||
|
||||
ASSIMP_LOG_VERBOSE_DEBUG_F(" ", linePart, " ", r, " ", g, " ", b);
|
||||
ASSIMP_LOG_VERBOSE_DEBUG(" ", linePart, " ", r, " ", g, " ", b);
|
||||
|
||||
if (linePart == partAmbient) {
|
||||
material->AddProperty(&color, 1, AI_MATKEY_COLOR_AMBIENT);
|
||||
|
@ -386,11 +386,11 @@ bool OgreImporter::ReadTextureUnit(const std::string &textureUnitName, stringstr
|
|||
ss >> linePart;
|
||||
|
||||
if (linePart != partBlockStart) {
|
||||
ASSIMP_LOG_ERROR_F("Invalid material: Texture unit block start missing near index ", ss.tellg());
|
||||
ASSIMP_LOG_ERROR("Invalid material: Texture unit block start missing near index ", ss.tellg());
|
||||
return false;
|
||||
}
|
||||
|
||||
ASSIMP_LOG_VERBOSE_DEBUG_F(" texture_unit '", textureUnitName, "'");
|
||||
ASSIMP_LOG_VERBOSE_DEBUG(" texture_unit '", textureUnitName, "'");
|
||||
|
||||
const string partTexture = "texture";
|
||||
const string partTextCoordSet = "tex_coord_set";
|
||||
|
@ -420,7 +420,7 @@ bool OgreImporter::ReadTextureUnit(const std::string &textureUnitName, stringstr
|
|||
|
||||
if (posSuffix != string::npos && posUnderscore != string::npos && posSuffix > posUnderscore) {
|
||||
string identifier = ai_tolower(textureRef.substr(posUnderscore, posSuffix - posUnderscore));
|
||||
ASSIMP_LOG_VERBOSE_DEBUG_F("Detecting texture type from filename postfix '", identifier, "'");
|
||||
ASSIMP_LOG_VERBOSE_DEBUG("Detecting texture type from filename postfix '", identifier, "'");
|
||||
|
||||
if (identifier == "_n" || identifier == "_nrm" || identifier == "_nrml" || identifier == "_normal" || identifier == "_normals" || identifier == "_normalmap") {
|
||||
textureType = aiTextureType_NORMALS;
|
||||
|
@ -484,7 +484,7 @@ bool OgreImporter::ReadTextureUnit(const std::string &textureUnitName, stringstr
|
|||
unsigned int textureTypeIndex = m_textures[textureType];
|
||||
m_textures[textureType]++;
|
||||
|
||||
ASSIMP_LOG_VERBOSE_DEBUG_F(" texture '", textureRef, "' type ", textureType,
|
||||
ASSIMP_LOG_VERBOSE_DEBUG(" texture '", textureRef, "' type ", textureType,
|
||||
" index ", textureTypeIndex, " UV ", uvCoord);
|
||||
|
||||
aiString assimpTextureRef(textureRef);
|
||||
|
|
|
@ -545,7 +545,7 @@ aiMesh *SubMesh::ConvertToAssimpMesh(Mesh *parent) {
|
|||
dest->mNumUVComponents[0] = static_cast<unsigned int>(uv1Element->ComponentCount());
|
||||
dest->mTextureCoords[0] = new aiVector3D[dest->mNumVertices];
|
||||
} else {
|
||||
ASSIMP_LOG_WARN_F("Ogre imported UV0 type ", uv1Element->TypeToString(), " is not compatible with Assimp. Ignoring UV.");
|
||||
ASSIMP_LOG_WARN("Ogre imported UV0 type ", uv1Element->TypeToString(), " is not compatible with Assimp. Ignoring UV.");
|
||||
uv1 = 0;
|
||||
}
|
||||
}
|
||||
|
@ -554,7 +554,7 @@ aiMesh *SubMesh::ConvertToAssimpMesh(Mesh *parent) {
|
|||
dest->mNumUVComponents[1] = static_cast<unsigned int>(uv2Element->ComponentCount());
|
||||
dest->mTextureCoords[1] = new aiVector3D[dest->mNumVertices];
|
||||
} else {
|
||||
ASSIMP_LOG_WARN_F("Ogre imported UV0 type ", uv2Element->TypeToString(), " is not compatible with Assimp. Ignoring UV.");
|
||||
ASSIMP_LOG_WARN("Ogre imported UV0 type ", uv2Element->TypeToString(), " is not compatible with Assimp. Ignoring UV.");
|
||||
uv2 = 0;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -256,7 +256,7 @@ void OgreXmlSerializer::ReadMesh(MeshXml *mesh) {
|
|||
|
||||
void OgreXmlSerializer::ReadGeometry(XmlNode &node, VertexDataXml *dest) {
|
||||
dest->count = ReadAttribute<uint32_t>(node, "vertexcount");
|
||||
ASSIMP_LOG_VERBOSE_DEBUG_F(" - Reading geometry of ", dest->count, " vertices");
|
||||
ASSIMP_LOG_VERBOSE_DEBUG(" - Reading geometry of ", dest->count, " vertices");
|
||||
|
||||
for (XmlNode currentNode : node.children()) {
|
||||
const std::string ¤tName = currentNode.name();
|
||||
|
@ -290,7 +290,7 @@ void OgreXmlSerializer::ReadGeometryVertexBuffer(XmlNode &node, VertexDataXml *d
|
|||
dest->tangents.reserve(dest->count);
|
||||
}
|
||||
if (uvs > 0) {
|
||||
ASSIMP_LOG_VERBOSE_DEBUG_F(" - Contains ", uvs, " texture coords");
|
||||
ASSIMP_LOG_VERBOSE_DEBUG(" - Contains ", uvs, " texture coords");
|
||||
dest->uvs.resize(uvs);
|
||||
for (size_t i = 0, len = dest->uvs.size(); i < len; ++i) {
|
||||
dest->uvs[i].reserve(dest->count);
|
||||
|
@ -365,9 +365,9 @@ void OgreXmlSerializer::ReadSubMesh(XmlNode &node, MeshXml *mesh) {
|
|||
submesh->usesSharedVertexData = ReadAttribute<bool>(node, anUseSharedVertices);
|
||||
}
|
||||
|
||||
ASSIMP_LOG_VERBOSE_DEBUG_F("Reading SubMesh ", mesh->subMeshes.size());
|
||||
ASSIMP_LOG_VERBOSE_DEBUG_F(" - Material: '", submesh->materialRef, "'");
|
||||
ASSIMP_LOG_VERBOSE_DEBUG_F(" - Uses shared geometry: ", (submesh->usesSharedVertexData ? "true" : "false"));
|
||||
ASSIMP_LOG_VERBOSE_DEBUG("Reading SubMesh ", mesh->subMeshes.size());
|
||||
ASSIMP_LOG_VERBOSE_DEBUG(" - Material: '", submesh->materialRef, "'");
|
||||
ASSIMP_LOG_VERBOSE_DEBUG(" - Uses shared geometry: ", (submesh->usesSharedVertexData ? "true" : "false"));
|
||||
|
||||
// TODO: maybe we have always just 1 faces and 1 geometry and always in this order. this loop will only work correct, when the order
|
||||
// of faces and geometry changed, and not if we have more than one of one
|
||||
|
@ -398,7 +398,7 @@ void OgreXmlSerializer::ReadSubMesh(XmlNode &node, MeshXml *mesh) {
|
|||
}
|
||||
}
|
||||
if (submesh->indexData->faces.size() == submesh->indexData->faceCount) {
|
||||
ASSIMP_LOG_VERBOSE_DEBUG_F(" - Faces ", submesh->indexData->faceCount);
|
||||
ASSIMP_LOG_VERBOSE_DEBUG(" - Faces ", submesh->indexData->faceCount);
|
||||
} else {
|
||||
throw DeadlyImportError("Read only ", submesh->indexData->faces.size(), " faces when should have read ", submesh->indexData->faceCount);
|
||||
}
|
||||
|
@ -459,7 +459,7 @@ void OgreXmlSerializer::ReadBoneAssignments(XmlNode &node, VertexDataXml *dest)
|
|||
}
|
||||
}
|
||||
|
||||
ASSIMP_LOG_VERBOSE_DEBUG_F(" - ", dest->boneAssignments.size(), " bone assignments");
|
||||
ASSIMP_LOG_VERBOSE_DEBUG(" - ", dest->boneAssignments.size(), " bone assignments");
|
||||
}
|
||||
|
||||
// Skeleton
|
||||
|
@ -515,12 +515,12 @@ bool OgreXmlSerializer::ImportSkeleton(Assimp::IOSystem *pIOHandler, Mesh *mesh)
|
|||
|
||||
XmlParserPtr OgreXmlSerializer::OpenXmlParser(Assimp::IOSystem *pIOHandler, const std::string &filename) {
|
||||
if (!EndsWith(filename, ".skeleton.xml", false)) {
|
||||
ASSIMP_LOG_ERROR_F("Imported Mesh is referencing to unsupported '", filename, "' skeleton file.");
|
||||
ASSIMP_LOG_ERROR("Imported Mesh is referencing to unsupported '", filename, "' skeleton file.");
|
||||
return XmlParserPtr();
|
||||
}
|
||||
|
||||
if (!pIOHandler->Exists(filename)) {
|
||||
ASSIMP_LOG_ERROR_F("Failed to find skeleton file '", filename, "' that is referenced by imported Mesh.");
|
||||
ASSIMP_LOG_ERROR("Failed to find skeleton file '", filename, "' that is referenced by imported Mesh.");
|
||||
return XmlParserPtr();
|
||||
}
|
||||
|
||||
|
@ -631,7 +631,7 @@ void OgreXmlSerializer::ReadAnimationKeyFrames(XmlNode &node, Animation *anim, V
|
|||
if (axis.Equal(zeroVec)) {
|
||||
axis.x = 1.0f;
|
||||
if (angle != 0) {
|
||||
ASSIMP_LOG_WARN_F("Found invalid a key frame with a zero rotation axis in animation: ", anim->name);
|
||||
ASSIMP_LOG_WARN("Found invalid a key frame with a zero rotation axis in animation: ", anim->name);
|
||||
}
|
||||
}
|
||||
keyframe.rotation = aiQuaternion(axis, angle);
|
||||
|
@ -741,7 +741,7 @@ void OgreXmlSerializer::ReadBones(XmlNode &node, Skeleton *skeleton) {
|
|||
as per the Ogre skeleton spec. It might be more that other (later) code in this imported does not break. */
|
||||
for (size_t i = 0, len = skeleton->bones.size(); i < len; ++i) {
|
||||
Bone *b = skeleton->bones[i];
|
||||
ASSIMP_LOG_VERBOSE_DEBUG_F(" ", b->id, " ", b->name);
|
||||
ASSIMP_LOG_VERBOSE_DEBUG(" ", b->id, " ", b->name);
|
||||
|
||||
if (b->id != static_cast<uint16_t>(i)) {
|
||||
throw DeadlyImportError("Bone ids are not in sequence starting from 0. Missing index ", i);
|
||||
|
|
|
@ -726,7 +726,7 @@ void OpenGEXImporter::handleMeshNode(ODDLParser::DDLNode *node, aiScene *pScene)
|
|||
} else if ("quads" == propKey) {
|
||||
m_currentMesh->mPrimitiveTypes |= aiPrimitiveType_POLYGON;
|
||||
} else {
|
||||
ASSIMP_LOG_WARN_F(propKey, " is not supported primitive type.");
|
||||
ASSIMP_LOG_WARN(propKey, " is not supported primitive type.");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -125,7 +125,7 @@ void Q3DImporter::InternReadFile(const std::string &pFile,
|
|||
}
|
||||
|
||||
// Print the file format version
|
||||
ASSIMP_LOG_INFO_F("Quick3D File format version: ",
|
||||
ASSIMP_LOG_INFO("Quick3D File format version: ",
|
||||
std::string(&((const char *)stream.GetPtr())[8], 2));
|
||||
|
||||
// ... an store it
|
||||
|
|
|
@ -174,7 +174,7 @@ static void UnknownChunk(StreamReaderLE * /*stream*/, const SIBChunk &chunk) {
|
|||
static_cast<char>(chunk.Tag & 0xff)
|
||||
};
|
||||
|
||||
ASSIMP_LOG_WARN_F("SIB: Skipping unknown '", ai_str_toprintable(temp, 4), "' chunk.");
|
||||
ASSIMP_LOG_WARN("SIB: Skipping unknown '", ai_str_toprintable(temp, 4), "' chunk.");
|
||||
}
|
||||
|
||||
// Reads a UTF-16LE string and returns it at UTF-8.
|
||||
|
|
|
@ -297,7 +297,7 @@ void STEP::ReadFile(DB& db,const EXPRESS::ConversionSchema& scheme,
|
|||
}
|
||||
|
||||
if ( !DefaultLogger::isNullLogger()){
|
||||
ASSIMP_LOG_DEBUG_F("STEP: got ",map.size()," object records with ",
|
||||
ASSIMP_LOG_DEBUG("STEP: got ",map.size()," object records with ",
|
||||
db.GetRefs().size()," inverse index entries");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -228,9 +228,9 @@ void UnrealImporter::InternReadFile(const std::string &pFile,
|
|||
a_path = extension + "_a.3d";
|
||||
uc_path = extension + ".uc";
|
||||
|
||||
ASSIMP_LOG_DEBUG_F("UNREAL: data file is ", d_path);
|
||||
ASSIMP_LOG_DEBUG_F("UNREAL: aniv file is ", a_path);
|
||||
ASSIMP_LOG_DEBUG_F("UNREAL: uc file is ", uc_path);
|
||||
ASSIMP_LOG_DEBUG("UNREAL: data file is ", d_path);
|
||||
ASSIMP_LOG_DEBUG("UNREAL: aniv file is ", a_path);
|
||||
ASSIMP_LOG_DEBUG("UNREAL: uc file is ", uc_path);
|
||||
|
||||
// and open the files ... we can't live without them
|
||||
std::unique_ptr<IOStream> p(pIOHandler->Open(d_path));
|
||||
|
|
|
@ -602,7 +602,7 @@ void XFileImporter::ConvertMaterials( aiScene* pScene, std::vector<XFile::Materi
|
|||
}
|
||||
|
||||
if( oldMat.sceneIndex == SIZE_MAX ) {
|
||||
ASSIMP_LOG_WARN_F( "Could not resolve global material reference \"", oldMat.mName, "\"" );
|
||||
ASSIMP_LOG_WARN( "Could not resolve global material reference \"", oldMat.mName, "\"" );
|
||||
oldMat.sceneIndex = 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -604,7 +604,7 @@ void glTFExporter::ExportMeshes()
|
|||
else
|
||||
msg = "mesh must has vertices and faces.";
|
||||
|
||||
ASSIMP_LOG_WARN_F("GLTF: can not use Open3DGC-compression: ", msg);
|
||||
ASSIMP_LOG_WARN("GLTF: can not use Open3DGC-compression: ", msg);
|
||||
comp_allow = false;
|
||||
}
|
||||
|
||||
|
|
|
@ -325,7 +325,7 @@ static aiMaterial *ImportMaterial(std::vector<int> &embeddedTexIdxs, Asset &r, M
|
|||
|
||||
void glTF2Importer::ImportMaterials(glTF2::Asset &r) {
|
||||
const unsigned int numImportedMaterials = unsigned(r.materials.Size());
|
||||
ASSIMP_LOG_DEBUG_F("Importing ", numImportedMaterials, " materials");
|
||||
ASSIMP_LOG_DEBUG("Importing ", numImportedMaterials, " materials");
|
||||
Material defaultMaterial;
|
||||
|
||||
mScene->mNumMaterials = numImportedMaterials + 1;
|
||||
|
@ -402,7 +402,7 @@ aiColor4D* GetVertexColorsForType(glTF2::Ref<glTF2::Accessor> input) {
|
|||
}
|
||||
|
||||
void glTF2Importer::ImportMeshes(glTF2::Asset &r) {
|
||||
ASSIMP_LOG_DEBUG_F("Importing ", r.meshes.Size(), " meshes");
|
||||
ASSIMP_LOG_DEBUG("Importing ", r.meshes.Size(), " meshes");
|
||||
std::vector<std::unique_ptr<aiMesh>> meshes;
|
||||
|
||||
unsigned int k = 0;
|
||||
|
@ -539,7 +539,7 @@ void glTF2Importer::ImportMeshes(glTF2::Asset &r) {
|
|||
|
||||
if (needPositions) {
|
||||
if (target.position[0]->count != aim->mNumVertices) {
|
||||
ASSIMP_LOG_WARN_F("Positions of target ", i, " in mesh \"", mesh.name, "\" does not match the vertex count");
|
||||
ASSIMP_LOG_WARN("Positions of target ", i, " in mesh \"", mesh.name, "\" does not match the vertex count");
|
||||
} else {
|
||||
aiVector3D *positionDiff = nullptr;
|
||||
target.position[0]->ExtractData(positionDiff);
|
||||
|
@ -551,7 +551,7 @@ void glTF2Importer::ImportMeshes(glTF2::Asset &r) {
|
|||
}
|
||||
if (needNormals) {
|
||||
if (target.normal[0]->count != aim->mNumVertices) {
|
||||
ASSIMP_LOG_WARN_F("Normals of target ", i, " in mesh \"", mesh.name, "\" does not match the vertex count");
|
||||
ASSIMP_LOG_WARN("Normals of target ", i, " in mesh \"", mesh.name, "\" does not match the vertex count");
|
||||
} else {
|
||||
aiVector3D *normalDiff = nullptr;
|
||||
target.normal[0]->ExtractData(normalDiff);
|
||||
|
@ -563,7 +563,7 @@ void glTF2Importer::ImportMeshes(glTF2::Asset &r) {
|
|||
}
|
||||
if (needTangents) {
|
||||
if (target.tangent[0]->count != aim->mNumVertices) {
|
||||
ASSIMP_LOG_WARN_F("Tangents of target ", i, " in mesh \"", mesh.name, "\" does not match the vertex count");
|
||||
ASSIMP_LOG_WARN("Tangents of target ", i, " in mesh \"", mesh.name, "\" does not match the vertex count");
|
||||
} else {
|
||||
Tangent *tangent = nullptr;
|
||||
attr.tangent[0]->ExtractData(tangent);
|
||||
|
@ -785,7 +785,7 @@ void glTF2Importer::ImportCameras(glTF2::Asset &r) {
|
|||
if (!r.cameras.Size()) return;
|
||||
|
||||
const unsigned int numCameras = r.cameras.Size();
|
||||
ASSIMP_LOG_DEBUG_F("Importing ", numCameras, " cameras");
|
||||
ASSIMP_LOG_DEBUG("Importing ", numCameras, " cameras");
|
||||
mScene->mNumCameras = numCameras;
|
||||
mScene->mCameras = new aiCamera *[numCameras];
|
||||
std::fill(mScene->mCameras, mScene->mCameras + numCameras, nullptr);
|
||||
|
@ -822,7 +822,7 @@ void glTF2Importer::ImportLights(glTF2::Asset &r) {
|
|||
return;
|
||||
|
||||
const unsigned int numLights = r.lights.Size();
|
||||
ASSIMP_LOG_DEBUG_F("Importing ", numLights, " lights");
|
||||
ASSIMP_LOG_DEBUG("Importing ", numLights, " lights");
|
||||
mScene->mNumLights = numLights;
|
||||
mScene->mLights = new aiLight *[numLights];
|
||||
std::fill(mScene->mLights, mScene->mLights + numLights, nullptr);
|
||||
|
@ -1329,7 +1329,7 @@ void glTF2Importer::ImportAnimations(glTF2::Asset &r) {
|
|||
if (!r.scene) return;
|
||||
|
||||
const unsigned numAnimations = r.animations.Size();
|
||||
ASSIMP_LOG_DEBUG_F("Importing ", numAnimations, " animations");
|
||||
ASSIMP_LOG_DEBUG("Importing ", numAnimations, " animations");
|
||||
mScene->mNumAnimations = numAnimations;
|
||||
if (mScene->mNumAnimations == 0) {
|
||||
return;
|
||||
|
@ -1445,7 +1445,7 @@ void glTF2Importer::ImportEmbeddedTextures(glTF2::Asset &r) {
|
|||
if (numEmbeddedTexs == 0)
|
||||
return;
|
||||
|
||||
ASSIMP_LOG_DEBUG_F("Importing ", numEmbeddedTexs, " embedded textures");
|
||||
ASSIMP_LOG_DEBUG("Importing ", numEmbeddedTexs, " embedded textures");
|
||||
|
||||
mScene->mTextures = new aiTexture *[numEmbeddedTexs];
|
||||
std::fill(mScene->mTextures, mScene->mTextures + numEmbeddedTexs, nullptr);
|
||||
|
|
|
@ -83,7 +83,7 @@ void BaseImporter::UpdateImporterScale(Importer *pImp) {
|
|||
// Set active scaling
|
||||
pImp->SetPropertyFloat(AI_CONFIG_APP_SCALE_KEY, static_cast<float>(activeScale));
|
||||
|
||||
ASSIMP_LOG_DEBUG_F("UpdateImporterScale scale set: ", activeScale);
|
||||
ASSIMP_LOG_DEBUG("UpdateImporterScale scale set: ", activeScale);
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
|
@ -215,7 +215,7 @@ void BaseImporter::GetExtensionList(std::set<std::string> &extensions) {
|
|||
// We got a match, either we don't care where it is, or it happens to
|
||||
// be in the beginning of the file / line
|
||||
if (!tokensSol || r == buffer || r[-1] == '\r' || r[-1] == '\n') {
|
||||
ASSIMP_LOG_DEBUG_F("Found positive match for header keyword: ", tokens[i]);
|
||||
ASSIMP_LOG_DEBUG("Found positive match for header keyword: ", tokens[i]);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@ -604,7 +604,7 @@ void BatchLoader::LoadAll() {
|
|||
|
||||
if (!DefaultLogger::isNullLogger()) {
|
||||
ASSIMP_LOG_INFO("%%% BEGIN EXTERNAL FILE %%%");
|
||||
ASSIMP_LOG_INFO_F("File: ", (*it).file);
|
||||
ASSIMP_LOG_INFO("File: ", (*it).file);
|
||||
}
|
||||
m_data->pImporter->ReadFile((*it).file, pp);
|
||||
(*it).scene = m_data->pImporter->GetOrphanedScene();
|
||||
|
|
|
@ -176,7 +176,7 @@ inline static std::string MakeAbsolutePath(const char *in) {
|
|||
if (!ret) {
|
||||
// preserve the input path, maybe someone else is able to fix
|
||||
// the path before it is accessed (e.g. our file system filter)
|
||||
ASSIMP_LOG_WARN_F("Invalid path: ", std::string(in));
|
||||
ASSIMP_LOG_WARN("Invalid path: ", std::string(in));
|
||||
out = in;
|
||||
}
|
||||
return out;
|
||||
|
|
|
@ -232,7 +232,7 @@ aiReturn Importer::RegisterLoader(BaseImporter* pImp) {
|
|||
|
||||
#ifdef ASSIMP_BUILD_DEBUG
|
||||
if (IsExtensionSupported(*it)) {
|
||||
ASSIMP_LOG_WARN_F("The file extension ", *it, " is already in use");
|
||||
ASSIMP_LOG_WARN("The file extension ", *it, " is already in use");
|
||||
}
|
||||
#endif
|
||||
baked += *it;
|
||||
|
@ -240,7 +240,7 @@ aiReturn Importer::RegisterLoader(BaseImporter* pImp) {
|
|||
|
||||
// add the loader
|
||||
pimpl->mImporter.push_back(pImp);
|
||||
ASSIMP_LOG_INFO_F("Registering custom importer for these file extensions: ", baked);
|
||||
ASSIMP_LOG_INFO("Registering custom importer for these file extensions: ", baked);
|
||||
ASSIMP_END_EXCEPTION_REGION(aiReturn);
|
||||
|
||||
return AI_SUCCESS;
|
||||
|
@ -519,7 +519,7 @@ const aiScene* Importer::ReadFileFromMemory( const void* pBuffer,
|
|||
// ------------------------------------------------------------------------------------------------
|
||||
void WriteLogOpening(const std::string& file) {
|
||||
|
||||
ASSIMP_LOG_INFO_F("Load ", file);
|
||||
ASSIMP_LOG_INFO("Load ", file);
|
||||
|
||||
// print a full version dump. This is nice because we don't
|
||||
// need to ask the authors of incoming bug reports for
|
||||
|
|
|
@ -612,7 +612,7 @@ void SceneCombiner::MergeScenes(aiScene **_dest, aiScene *master, std::vector<At
|
|||
}
|
||||
}
|
||||
if (!(*it).resolved) {
|
||||
ASSIMP_LOG_ERROR_F("SceneCombiner: Failed to resolve attachment ", (*it).node->mName.data,
|
||||
ASSIMP_LOG_ERROR("SceneCombiner: Failed to resolve attachment ", (*it).node->mName.data,
|
||||
" ", (*it).attachToNode->mName.data);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -336,7 +336,7 @@ void CatmullClarkSubdivider::InternSubdivide(
|
|||
// Report the number of bad edges. bad edges are referenced by less than two
|
||||
// faces in the mesh. They occur at outer model boundaries in non-closed
|
||||
// shapes.
|
||||
ASSIMP_LOG_VERBOSE_DEBUG_F("Catmull-Clark Subdivider: got ", bad_cnt, " bad edges touching only one face (totally ",
|
||||
ASSIMP_LOG_VERBOSE_DEBUG("Catmull-Clark Subdivider: got ", bad_cnt, " bad edges touching only one face (totally ",
|
||||
static_cast<unsigned int>(edges.size()), " edges). ");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -77,12 +77,12 @@ void ArmaturePopulate::Execute(aiScene *out) {
|
|||
|
||||
BuildBoneStack(out->mRootNode, out->mRootNode, out, bones, bone_stack, nodes);
|
||||
|
||||
ASSIMP_LOG_DEBUG_F("Bone stack size: ", bone_stack.size());
|
||||
ASSIMP_LOG_DEBUG("Bone stack size: ", bone_stack.size());
|
||||
|
||||
for (std::pair<aiBone *, aiNode *> kvp : bone_stack) {
|
||||
aiBone *bone = kvp.first;
|
||||
aiNode *bone_node = kvp.second;
|
||||
ASSIMP_LOG_VERBOSE_DEBUG_F("active node lookup: ", bone->mName.C_Str());
|
||||
ASSIMP_LOG_VERBOSE_DEBUG("active node lookup: ", bone->mName.C_Str());
|
||||
// lcl transform grab - done in generate_nodes :)
|
||||
|
||||
// bone->mOffsetMatrix = bone_node->mTransformation;
|
||||
|
@ -179,7 +179,7 @@ void ArmaturePopulate::BuildBoneStack(aiNode *,
|
|||
if (node == nullptr) {
|
||||
node_stack.clear();
|
||||
BuildNodeList(root_node, node_stack);
|
||||
ASSIMP_LOG_VERBOSE_DEBUG_F("Resetting bone stack: nullptr element ", bone->mName.C_Str());
|
||||
ASSIMP_LOG_VERBOSE_DEBUG("Resetting bone stack: nullptr element ", bone->mName.C_Str());
|
||||
|
||||
node = GetNodeFromStack(bone->mName, node_stack);
|
||||
|
||||
|
@ -189,7 +189,7 @@ void ArmaturePopulate::BuildBoneStack(aiNode *,
|
|||
}
|
||||
}
|
||||
|
||||
ASSIMP_LOG_VERBOSE_DEBUG_F("Successfully added bone[", bone->mName.C_Str(), "] to stack and bone node is: ", node->mName.C_Str());
|
||||
ASSIMP_LOG_VERBOSE_DEBUG("Successfully added bone[", bone->mName.C_Str(), "] to stack and bone node is: ", node->mName.C_Str());
|
||||
|
||||
bone_stack.insert(std::pair<aiBone *, aiNode *>(bone, node));
|
||||
}
|
||||
|
@ -203,7 +203,7 @@ aiNode *ArmaturePopulate::GetArmatureRoot(aiNode *bone_node,
|
|||
std::vector<aiBone *> &bone_list) {
|
||||
while (nullptr != bone_node) {
|
||||
if (!IsBoneNode(bone_node->mName, bone_list)) {
|
||||
ASSIMP_LOG_VERBOSE_DEBUG_F("GetArmatureRoot() Found valid armature: ", bone_node->mName.C_Str());
|
||||
ASSIMP_LOG_VERBOSE_DEBUG("GetArmatureRoot() Found valid armature: ", bone_node->mName.C_Str());
|
||||
return bone_node;
|
||||
}
|
||||
|
||||
|
@ -247,7 +247,7 @@ aiNode *ArmaturePopulate::GetNodeFromStack(const aiString &node_name,
|
|||
}
|
||||
|
||||
if (found != nullptr) {
|
||||
ASSIMP_LOG_INFO_F("Removed node from stack: ", found->mName.C_Str());
|
||||
ASSIMP_LOG_INFO("Removed node from stack: ", found->mName.C_Str());
|
||||
// now pop the element from the node list
|
||||
nodes.erase(iter);
|
||||
|
||||
|
|
|
@ -129,7 +129,7 @@ bool CalcTangentsProcess::ProcessMesh(aiMesh *pMesh, unsigned int meshIndex) {
|
|||
return false;
|
||||
}
|
||||
if (configSourceUV >= AI_MAX_NUMBER_OF_TEXTURECOORDS || !pMesh->mTextureCoords[configSourceUV]) {
|
||||
ASSIMP_LOG_ERROR_F("Failed to compute tangents; need UV data in channel", configSourceUV);
|
||||
ASSIMP_LOG_ERROR("Failed to compute tangents; need UV data in channel", configSourceUV);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -148,7 +148,7 @@ void DeboneProcess::Execute( aiScene* pScene)
|
|||
}
|
||||
|
||||
if(!DefaultLogger::isNullLogger()) {
|
||||
ASSIMP_LOG_INFO_F("Removed %u bones. Input bones:", in - out, ". Output bones: ", out);
|
||||
ASSIMP_LOG_INFO("Removed %u bones. Input bones:", in - out, ". Output bones: ", out);
|
||||
}
|
||||
|
||||
// and destroy the source mesh. It should be completely contained inside the new submeshes
|
||||
|
|
|
@ -93,7 +93,7 @@ void EmbedTexturesProcess::Execute(aiScene* pScene) {
|
|||
}
|
||||
}
|
||||
|
||||
ASSIMP_LOG_INFO_F("EmbedTexturesProcess finished. Embedded ", embeddedTexturesCount, " textures." );
|
||||
ASSIMP_LOG_INFO("EmbedTexturesProcess finished. Embedded ", embeddedTexturesCount, " textures." );
|
||||
}
|
||||
|
||||
bool EmbedTexturesProcess::addTexture(aiScene* pScene, std::string path) const {
|
||||
|
@ -103,7 +103,7 @@ bool EmbedTexturesProcess::addTexture(aiScene* pScene, std::string path) const {
|
|||
// Test path directly
|
||||
std::ifstream file(imagePath, std::ios::binary | std::ios::ate);
|
||||
if ((imageSize = file.tellg()) == std::streampos(-1)) {
|
||||
ASSIMP_LOG_WARN_F("EmbedTexturesProcess: Cannot find image: ", imagePath, ". Will try to find it in root folder.");
|
||||
ASSIMP_LOG_WARN("EmbedTexturesProcess: Cannot find image: ", imagePath, ". Will try to find it in root folder.");
|
||||
|
||||
// Test path in root path
|
||||
imagePath = mRootPath + path;
|
||||
|
@ -113,7 +113,7 @@ bool EmbedTexturesProcess::addTexture(aiScene* pScene, std::string path) const {
|
|||
imagePath = mRootPath + path.substr(path.find_last_of("\\/") + 1u);
|
||||
file.open(imagePath, std::ios::binary | std::ios::ate);
|
||||
if ((imageSize = file.tellg()) == std::streampos(-1)) {
|
||||
ASSIMP_LOG_ERROR_F("EmbedTexturesProcess: Unable to embed texture: ", path, ".");
|
||||
ASSIMP_LOG_ERROR("EmbedTexturesProcess: Unable to embed texture: ", path, ".");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -291,7 +291,7 @@ evil_jump_outside:
|
|||
}
|
||||
|
||||
if (deg && !DefaultLogger::isNullLogger()) {
|
||||
ASSIMP_LOG_WARN_F( "Found ", deg, " degenerated primitives");
|
||||
ASSIMP_LOG_WARN( "Found ", deg, " degenerated primitives");
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -267,7 +267,7 @@ void FindInstancesProcess::Execute( aiScene* pScene)
|
|||
|
||||
// write to log
|
||||
if (!DefaultLogger::isNullLogger()) {
|
||||
ASSIMP_LOG_INFO_F( "FindInstancesProcess finished. Found ", (pScene->mNumMeshes - numMeshesOut), " instances" );
|
||||
ASSIMP_LOG_INFO( "FindInstancesProcess finished. Found ", (pScene->mNumMeshes - numMeshesOut), " instances" );
|
||||
}
|
||||
pScene->mNumMeshes = numMeshesOut;
|
||||
} else {
|
||||
|
|
|
@ -200,7 +200,7 @@ inline bool ProcessArray(T *&in, unsigned int num, const char *name,
|
|||
const std::vector<bool> &dirtyMask, bool mayBeIdentical = false, bool mayBeZero = true) {
|
||||
const char *err = ValidateArrayContents(in, num, dirtyMask, mayBeIdentical, mayBeZero);
|
||||
if (err) {
|
||||
ASSIMP_LOG_ERROR_F("FindInvalidDataProcess fails on mesh ", name, ": ", err);
|
||||
ASSIMP_LOG_ERROR("FindInvalidDataProcess fails on mesh ", name, ": ", err);
|
||||
delete[] in;
|
||||
in = nullptr;
|
||||
return true;
|
||||
|
|
|
@ -164,7 +164,7 @@ bool FixInfacingNormalsProcess::ProcessMesh( aiMesh* pcMesh, unsigned int index)
|
|||
// now compare the volumes of the bounding boxes
|
||||
if (std::fabs(fDelta0_x * fDelta0_y * fDelta0_z) < std::fabs(fDelta1_x * fDelta1_yz)) {
|
||||
if (!DefaultLogger::isNullLogger()) {
|
||||
ASSIMP_LOG_INFO_F("Mesh ", index, ": Normals are facing inwards (or the mesh is planar)", index);
|
||||
ASSIMP_LOG_INFO("Mesh ", index, ": Normals are facing inwards (or the mesh is planar)", index);
|
||||
}
|
||||
|
||||
// Invert normals
|
||||
|
|
|
@ -109,7 +109,7 @@ void ImproveCacheLocalityProcess::Execute( aiScene* pScene) {
|
|||
}
|
||||
if (!DefaultLogger::isNullLogger()) {
|
||||
if (numf > 0) {
|
||||
ASSIMP_LOG_INFO_F("Cache relevant are ", numm, " meshes (", numf, " faces). Average output ACMR is ", out / numf);
|
||||
ASSIMP_LOG_INFO("Cache relevant are ", numm, " meshes (", numf, " faces). Average output ACMR is ", out / numf);
|
||||
}
|
||||
ASSIMP_LOG_DEBUG("ImproveCacheLocalityProcess finished. ");
|
||||
}
|
||||
|
@ -355,7 +355,7 @@ ai_real ImproveCacheLocalityProcess::ProcessMesh( aiMesh* pMesh, unsigned int me
|
|||
|
||||
// very intense verbose logging ... prepare for much text if there are many meshes
|
||||
if ( DefaultLogger::get()->getLogSeverity() == Logger::VERBOSE) {
|
||||
ASSIMP_LOG_VERBOSE_DEBUG_F("Mesh %u | ACMR in: ", meshNum, " out: ", fACMR, " | ~", fACMR2, ((fACMR - fACMR2) / fACMR) * 100.f);
|
||||
ASSIMP_LOG_VERBOSE_DEBUG("Mesh %u | ACMR in: ", meshNum, " out: ", fACMR, " | ~", fACMR2, ((fACMR - fACMR2) / fACMR) * 100.f);
|
||||
}
|
||||
|
||||
fACMR2 *= pMesh->mNumFaces;
|
||||
|
|
|
@ -100,7 +100,7 @@ void JoinVerticesProcess::Execute( aiScene* pScene)
|
|||
if (iNumOldVertices == iNumVertices) {
|
||||
ASSIMP_LOG_DEBUG("JoinVerticesProcess finished ");
|
||||
} else {
|
||||
ASSIMP_LOG_INFO_F("JoinVerticesProcess finished | Verts in: ", iNumOldVertices,
|
||||
ASSIMP_LOG_INFO("JoinVerticesProcess finished | Verts in: ", iNumOldVertices,
|
||||
" out: ", iNumVertices, " | ~",
|
||||
((iNumOldVertices - iNumVertices) / (float)iNumOldVertices) * 100.f );
|
||||
}
|
||||
|
@ -373,7 +373,7 @@ int JoinVerticesProcess::ProcessMesh( aiMesh* pMesh, unsigned int meshIndex)
|
|||
}
|
||||
|
||||
if (!DefaultLogger::isNullLogger() && DefaultLogger::get()->getLogSeverity() == Logger::VERBOSE) {
|
||||
ASSIMP_LOG_VERBOSE_DEBUG_F(
|
||||
ASSIMP_LOG_VERBOSE_DEBUG(
|
||||
"Mesh ",meshIndex,
|
||||
" (",
|
||||
(pMesh->mName.length ? pMesh->mName.data : "unnamed"),
|
||||
|
|
|
@ -191,6 +191,6 @@ void LimitBoneWeightsProcess::ProcessMesh(aiMesh* pMesh)
|
|||
pMesh->mNumBones = writeBone;
|
||||
|
||||
if (!DefaultLogger::isNullLogger()) {
|
||||
ASSIMP_LOG_INFO_F("Removed ", removed, " weights. Input bones: ", old_bones, ". Output bones: ", pMesh->mNumBones);
|
||||
ASSIMP_LOG_INFO("Removed ", removed, " weights. Input bones: ", old_bones, ". Output bones: ", pMesh->mNumBones);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -335,7 +335,7 @@ void OptimizeGraphProcess::Execute(aiScene *pScene) {
|
|||
pScene->mRootNode->mParent = nullptr;
|
||||
if (!DefaultLogger::isNullLogger()) {
|
||||
if (nodes_in != nodes_out) {
|
||||
ASSIMP_LOG_INFO_F("OptimizeGraphProcess finished; Input nodes: ", nodes_in, ", Output nodes: ", nodes_out);
|
||||
ASSIMP_LOG_INFO("OptimizeGraphProcess finished; Input nodes: ", nodes_in, ", Output nodes: ", nodes_out);
|
||||
} else {
|
||||
ASSIMP_LOG_DEBUG("OptimizeGraphProcess finished");
|
||||
}
|
||||
|
|
|
@ -151,7 +151,7 @@ void OptimizeMeshesProcess::Execute( aiScene* pScene)
|
|||
std::copy(output.begin(),output.end(),mScene->mMeshes);
|
||||
|
||||
if (output.size() != num_old) {
|
||||
ASSIMP_LOG_DEBUG_F("OptimizeMeshesProcess finished. Input meshes: ", num_old, ", Output meshes: ", pScene->mNumMeshes);
|
||||
ASSIMP_LOG_DEBUG("OptimizeMeshesProcess finished. Input meshes: ", num_old, ", Output meshes: ", pScene->mNumMeshes);
|
||||
} else {
|
||||
ASSIMP_LOG_DEBUG( "OptimizeMeshesProcess finished" );
|
||||
}
|
||||
|
|
|
@ -680,9 +680,9 @@ void PretransformVertices::Execute(aiScene *pScene) {
|
|||
if (!DefaultLogger::isNullLogger()) {
|
||||
ASSIMP_LOG_DEBUG("PretransformVerticesProcess finished");
|
||||
|
||||
ASSIMP_LOG_INFO_F("Removed ", iOldNodes, " nodes and ", iOldAnimationChannels, " animation channels (",
|
||||
ASSIMP_LOG_INFO("Removed ", iOldNodes, " nodes and ", iOldAnimationChannels, " animation channels (",
|
||||
CountNodes(pScene->mRootNode), " output nodes)");
|
||||
ASSIMP_LOG_INFO_F("Kept ", pScene->mNumLights, " lights and ", pScene->mNumCameras, " cameras.");
|
||||
ASSIMP_LOG_INFO_F("Moved ", iOldMeshes, " meshes to WCS (number of output meshes: ", pScene->mNumMeshes, ")");
|
||||
ASSIMP_LOG_INFO("Kept ", pScene->mNumLights, " lights and ", pScene->mNumCameras, " cameras.");
|
||||
ASSIMP_LOG_INFO("Moved ", iOldMeshes, " meshes to WCS (number of output meshes: ", pScene->mNumMeshes, ")");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -122,7 +122,7 @@ void RemoveRedundantMatsProcess::Execute( aiScene* pScene)
|
|||
|
||||
// Keep this material even if no mesh references it
|
||||
abReferenced[i] = true;
|
||||
ASSIMP_LOG_VERBOSE_DEBUG_F( "Found positive match in exclusion list: \'", name.data, "\'");
|
||||
ASSIMP_LOG_VERBOSE_DEBUG( "Found positive match in exclusion list: \'", name.data, "\'");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -215,7 +215,7 @@ void RemoveRedundantMatsProcess::Execute( aiScene* pScene)
|
|||
}
|
||||
else
|
||||
{
|
||||
ASSIMP_LOG_INFO_F("RemoveRedundantMatsProcess finished. Removed ", redundantRemoved, " redundant and ",
|
||||
ASSIMP_LOG_INFO("RemoveRedundantMatsProcess finished. Removed ", redundantRemoved, " redundant and ",
|
||||
unreferencedRemoved, " unused materials.");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -103,7 +103,7 @@ void SplitByBoneCountProcess::Execute( aiScene* pScene)
|
|||
|
||||
if( !isNecessary )
|
||||
{
|
||||
ASSIMP_LOG_DEBUG_F("SplitByBoneCountProcess early-out: no meshes with more than ", mMaxBoneCount, " bones." );
|
||||
ASSIMP_LOG_DEBUG("SplitByBoneCountProcess early-out: no meshes with more than ", mMaxBoneCount, " bones." );
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -151,7 +151,7 @@ void SplitByBoneCountProcess::Execute( aiScene* pScene)
|
|||
// recurse through all nodes and translate the node's mesh indices to fit the new mesh array
|
||||
UpdateNode( pScene->mRootNode);
|
||||
|
||||
ASSIMP_LOG_DEBUG_F( "SplitByBoneCountProcess end: split ", mSubMeshIndices.size(), " meshes into ", meshes.size(), " submeshes." );
|
||||
ASSIMP_LOG_DEBUG( "SplitByBoneCountProcess end: split ", mSubMeshIndices.size(), " meshes into ", meshes.size(), " submeshes." );
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
|
|
|
@ -108,7 +108,7 @@ void TextureTransformStep::PreProcessUVTransform(STransformVecInfo& info)
|
|||
if (rounded)
|
||||
{
|
||||
out -= rounded * static_cast<float>(AI_MATH_PI);
|
||||
ASSIMP_LOG_INFO_F("Texture coordinate rotation ", info.mRotation, " can be simplified to ", out);
|
||||
ASSIMP_LOG_INFO("Texture coordinate rotation ", info.mRotation, " can be simplified to ", out);
|
||||
}
|
||||
|
||||
// Next step - convert negative rotation angles to positives
|
||||
|
@ -448,7 +448,7 @@ void TextureTransformStep::Execute( aiScene* pScene)
|
|||
if (size > AI_MAX_NUMBER_OF_TEXTURECOORDS) {
|
||||
|
||||
if (!DefaultLogger::isNullLogger()) {
|
||||
ASSIMP_LOG_ERROR_F(static_cast<unsigned int>(trafo.size()), " UV channels required but just ",
|
||||
ASSIMP_LOG_ERROR(static_cast<unsigned int>(trafo.size()), " UV channels required but just ",
|
||||
AI_MAX_NUMBER_OF_TEXTURECOORDS, " available");
|
||||
}
|
||||
size = AI_MAX_NUMBER_OF_TEXTURECOORDS;
|
||||
|
@ -557,7 +557,7 @@ void TextureTransformStep::Execute( aiScene* pScene)
|
|||
if (!DefaultLogger::isNullLogger()) {
|
||||
|
||||
if (transformedChannels) {
|
||||
ASSIMP_LOG_INFO_F("TransformUVCoordsProcess end: ", outChannels, " output channels (in: ", inChannels, ", modified: ", transformedChannels,")");
|
||||
ASSIMP_LOG_INFO("TransformUVCoordsProcess end: ", outChannels, " output channels (in: ", inChannels, ", modified: ", transformedChannels,")");
|
||||
} else {
|
||||
ASSIMP_LOG_DEBUG("TransformUVCoordsProcess finished");
|
||||
}
|
||||
|
|
|
@ -72,7 +72,7 @@ for(LineSplitter splitter(stream);splitter;++splitter) {
|
|||
if (strtol(splitter[2]) > 5) { .. }
|
||||
}
|
||||
|
||||
ASSIMP_LOG_VERBOSE_DEBUG_F("Current line is: ", splitter.get_index());
|
||||
ASSIMP_LOG_VERBOSE_DEBUG("Current line is: ", splitter.get_index());
|
||||
}
|
||||
@endcode
|
||||
*/
|
||||
|
|
|
@ -312,34 +312,19 @@ Logger::LogSeverity Logger::getLogSeverity() const {
|
|||
} // Namespace Assimp
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
#define ASSIMP_LOG_WARN_F(...) \
|
||||
#define ASSIMP_LOG_WARN(...) \
|
||||
Assimp::DefaultLogger::get()->warn(__VA_ARGS__)
|
||||
|
||||
#define ASSIMP_LOG_ERROR_F(...) \
|
||||
#define ASSIMP_LOG_ERROR(...) \
|
||||
Assimp::DefaultLogger::get()->error(__VA_ARGS__)
|
||||
|
||||
#define ASSIMP_LOG_DEBUG_F(...) \
|
||||
#define ASSIMP_LOG_DEBUG(...) \
|
||||
Assimp::DefaultLogger::get()->debug(__VA_ARGS__)
|
||||
|
||||
#define ASSIMP_LOG_VERBOSE_DEBUG_F(...) \
|
||||
#define ASSIMP_LOG_VERBOSE_DEBUG(...) \
|
||||
Assimp::DefaultLogger::get()->verboseDebug(__VA_ARGS__)
|
||||
|
||||
#define ASSIMP_LOG_INFO_F(...) \
|
||||
#define ASSIMP_LOG_INFO(...) \
|
||||
Assimp::DefaultLogger::get()->info(__VA_ARGS__)
|
||||
|
||||
#define ASSIMP_LOG_WARN(string) \
|
||||
Assimp::DefaultLogger::get()->warn(string)
|
||||
|
||||
#define ASSIMP_LOG_ERROR(string) \
|
||||
Assimp::DefaultLogger::get()->error(string)
|
||||
|
||||
#define ASSIMP_LOG_DEBUG(string) \
|
||||
Assimp::DefaultLogger::get()->debug(string)
|
||||
|
||||
#define ASSIMP_LOG_VERBOSE_DEBUG(string) \
|
||||
Assimp::DefaultLogger::get()->verboseDebug(string)
|
||||
|
||||
#define ASSIMP_LOG_INFO(string) \
|
||||
Assimp::DefaultLogger::get()->info(string)
|
||||
|
||||
#endif // !! INCLUDED_AI_LOGGER_H
|
||||
|
|
|
@ -76,7 +76,7 @@ public:
|
|||
/** Start a named timer */
|
||||
void BeginRegion(const std::string& region) {
|
||||
regions[region] = std::chrono::system_clock::now();
|
||||
ASSIMP_LOG_DEBUG_F("START `",region,"`");
|
||||
ASSIMP_LOG_DEBUG("START `",region,"`");
|
||||
}
|
||||
|
||||
|
||||
|
@ -88,7 +88,7 @@ public:
|
|||
}
|
||||
|
||||
std::chrono::duration<double> elapsedSeconds = std::chrono::system_clock::now() - regions[region];
|
||||
ASSIMP_LOG_DEBUG_F("END `",region,"`, dt= ", elapsedSeconds.count()," s");
|
||||
ASSIMP_LOG_DEBUG("END `",region,"`, dt= ", elapsedSeconds.count()," s");
|
||||
}
|
||||
|
||||
private:
|
||||
|
|
|
@ -206,7 +206,7 @@ uint64_t strtoul10_64( const char* in, const char** out=0, unsigned int* max_ino
|
|||
|
||||
// numeric overflow, we rely on you
|
||||
if ( new_value < value ) {
|
||||
ASSIMP_LOG_WARN_F( "Converting the string \"", in, "\" into a value resulted in overflow." );
|
||||
ASSIMP_LOG_WARN( "Converting the string \"", in, "\" into a value resulted in overflow." );
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue