More thinks using VERBOSE_DEBUG
parent
d70685d37f
commit
87a7662bee
|
@ -147,7 +147,7 @@ D3MFOpcPackage::D3MFOpcPackage(IOSystem* pIOHandler, const std::string& rFile)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ASSIMP_LOG_DEBUG(rootFile);
|
ASSIMP_LOG_VERBOSE_DEBUG(rootFile);
|
||||||
|
|
||||||
mZipArchive->Close(fileStream);
|
mZipArchive->Close(fileStream);
|
||||||
|
|
||||||
|
|
|
@ -475,7 +475,7 @@ void OgreBinarySerializer::ReadSubMeshNames(Mesh *mesh) {
|
||||||
}
|
}
|
||||||
|
|
||||||
submesh->name = ReadLine();
|
submesh->name = ReadLine();
|
||||||
ASSIMP_LOG_DEBUG_F(" - SubMesh ", submesh->index, " name '", submesh->name, "'");
|
ASSIMP_LOG_VERBOSE_DEBUG_F(" - SubMesh ", submesh->index, " name '", submesh->name, "'");
|
||||||
|
|
||||||
if (!AtEnd())
|
if (!AtEnd())
|
||||||
id = ReadHeader();
|
id = ReadHeader();
|
||||||
|
@ -488,7 +488,7 @@ void OgreBinarySerializer::ReadSubMeshNames(Mesh *mesh) {
|
||||||
void OgreBinarySerializer::ReadGeometry(VertexData *dest) {
|
void OgreBinarySerializer::ReadGeometry(VertexData *dest) {
|
||||||
dest->count = Read<uint32_t>();
|
dest->count = Read<uint32_t>();
|
||||||
|
|
||||||
ASSIMP_LOG_DEBUG_F(" - Reading geometry of ", dest->count, " vertices");
|
ASSIMP_LOG_VERBOSE_DEBUG_F(" - Reading geometry of ", dest->count, " vertices");
|
||||||
|
|
||||||
if (!AtEnd()) {
|
if (!AtEnd()) {
|
||||||
uint16_t id = ReadHeader();
|
uint16_t id = ReadHeader();
|
||||||
|
@ -536,7 +536,7 @@ void OgreBinarySerializer::ReadGeometryVertexElement(VertexData *dest) {
|
||||||
element.offset = Read<uint16_t>();
|
element.offset = Read<uint16_t>();
|
||||||
element.index = Read<uint16_t>();
|
element.index = Read<uint16_t>();
|
||||||
|
|
||||||
ASSIMP_LOG_DEBUG_F(" - Vertex element ", element.SemanticToString(), " of type ",
|
ASSIMP_LOG_VERBOSE_DEBUG_F(" - Vertex element ", element.SemanticToString(), " of type ",
|
||||||
element.TypeToString(), " index=", element.index, " source=", element.source);
|
element.TypeToString(), " index=", element.index, " source=", element.source);
|
||||||
|
|
||||||
dest->vertexElements.push_back(element);
|
dest->vertexElements.push_back(element);
|
||||||
|
@ -557,7 +557,7 @@ void OgreBinarySerializer::ReadGeometryVertexBuffer(VertexData *dest) {
|
||||||
uint8_t *vertexBuffer = ReadBytes(numBytes);
|
uint8_t *vertexBuffer = ReadBytes(numBytes);
|
||||||
dest->vertexBindings[bindIndex] = MemoryStreamPtr(new Assimp::MemoryIOStream(vertexBuffer, numBytes, true));
|
dest->vertexBindings[bindIndex] = MemoryStreamPtr(new Assimp::MemoryIOStream(vertexBuffer, numBytes, true));
|
||||||
|
|
||||||
ASSIMP_LOG_DEBUG_F(" - Read vertex buffer for source ", bindIndex, " of ", numBytes, " bytes");
|
ASSIMP_LOG_VERBOSE_DEBUG_F(" - Read vertex buffer for source ", bindIndex, " of ", numBytes, " bytes");
|
||||||
}
|
}
|
||||||
|
|
||||||
void OgreBinarySerializer::ReadEdgeList(Mesh * /*mesh*/) {
|
void OgreBinarySerializer::ReadEdgeList(Mesh * /*mesh*/) {
|
||||||
|
@ -807,7 +807,7 @@ void OgreBinarySerializer::ReadSkeleton(Skeleton *skeleton) {
|
||||||
<< " Supported versions: " << SKELETON_VERSION_1_8 << " and " << SKELETON_VERSION_1_1);
|
<< " Supported versions: " << SKELETON_VERSION_1_8 << " and " << SKELETON_VERSION_1_1);
|
||||||
}
|
}
|
||||||
|
|
||||||
ASSIMP_LOG_DEBUG("Reading Skeleton");
|
ASSIMP_LOG_VERBOSE_DEBUG("Reading Skeleton");
|
||||||
|
|
||||||
bool firstBone = true;
|
bool firstBone = true;
|
||||||
bool firstAnim = true;
|
bool firstAnim = true;
|
||||||
|
@ -821,7 +821,7 @@ void OgreBinarySerializer::ReadSkeleton(Skeleton *skeleton) {
|
||||||
}
|
}
|
||||||
case SKELETON_BONE: {
|
case SKELETON_BONE: {
|
||||||
if (firstBone) {
|
if (firstBone) {
|
||||||
ASSIMP_LOG_DEBUG(" - Bones");
|
ASSIMP_LOG_VERBOSE_DEBUG(" - Bones");
|
||||||
firstBone = false;
|
firstBone = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -834,7 +834,7 @@ void OgreBinarySerializer::ReadSkeleton(Skeleton *skeleton) {
|
||||||
}
|
}
|
||||||
case SKELETON_ANIMATION: {
|
case SKELETON_ANIMATION: {
|
||||||
if (firstAnim) {
|
if (firstAnim) {
|
||||||
ASSIMP_LOG_DEBUG(" - Animations");
|
ASSIMP_LOG_VERBOSE_DEBUG(" - Animations");
|
||||||
firstAnim = false;
|
firstAnim = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -874,7 +874,7 @@ void OgreBinarySerializer::ReadBone(Skeleton *skeleton) {
|
||||||
throw DeadlyImportError(Formatter::format() << "Ogre Skeleton bone indexes not contiguous. Error at bone index " << bone->id);
|
throw DeadlyImportError(Formatter::format() << "Ogre Skeleton bone indexes not contiguous. Error at bone index " << bone->id);
|
||||||
}
|
}
|
||||||
|
|
||||||
ASSIMP_LOG_DEBUG_F(" ", bone->id, " ", bone->name);
|
ASSIMP_LOG_VERBOSE_DEBUG_F(" ", bone->id, " ", bone->name);
|
||||||
|
|
||||||
skeleton->bones.push_back(bone);
|
skeleton->bones.push_back(bone);
|
||||||
}
|
}
|
||||||
|
@ -919,7 +919,7 @@ void OgreBinarySerializer::ReadSkeletonAnimation(Skeleton *skeleton) {
|
||||||
|
|
||||||
skeleton->animations.push_back(anim);
|
skeleton->animations.push_back(anim);
|
||||||
|
|
||||||
ASSIMP_LOG_DEBUG_F(" ", anim->name, " (", anim->length, " sec, ", anim->tracks.size(), " tracks)");
|
ASSIMP_LOG_VERBOSE_DEBUG_F(" ", anim->name, " (", anim->length, " sec, ", anim->tracks.size(), " tracks)");
|
||||||
}
|
}
|
||||||
|
|
||||||
void OgreBinarySerializer::ReadSkeletonAnimationTrack(Skeleton * /*skeleton*/, Animation *dest) {
|
void OgreBinarySerializer::ReadSkeletonAnimationTrack(Skeleton * /*skeleton*/, Animation *dest) {
|
||||||
|
|
|
@ -175,7 +175,7 @@ aiMaterial* OgreImporter::ReadMaterial(const std::string &pFile, Assimp::IOSyste
|
||||||
if (materialFile) {
|
if (materialFile) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
ASSIMP_LOG_DEBUG_F( "Source file for material '", materialName, "' ", potentialFiles[i], " does not exist");
|
ASSIMP_LOG_VERBOSE_DEBUG_F( "Source file for material '", materialName, "' ", potentialFiles[i], " does not exist");
|
||||||
}
|
}
|
||||||
if (!materialFile)
|
if (!materialFile)
|
||||||
{
|
{
|
||||||
|
@ -201,7 +201,7 @@ aiMaterial* OgreImporter::ReadMaterial(const std::string &pFile, Assimp::IOSyste
|
||||||
ss << &data[0];
|
ss << &data[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
ASSIMP_LOG_DEBUG_F("Reading material '", materialName, "'");
|
ASSIMP_LOG_VERBOSE_DEBUG_F("Reading material '", materialName, "'");
|
||||||
|
|
||||||
aiMaterial *material = new aiMaterial();
|
aiMaterial *material = new aiMaterial();
|
||||||
m_textures.clear();
|
m_textures.clear();
|
||||||
|
@ -245,7 +245,7 @@ aiMaterial* OgreImporter::ReadMaterial(const std::string &pFile, Assimp::IOSyste
|
||||||
return material;
|
return material;
|
||||||
}
|
}
|
||||||
|
|
||||||
ASSIMP_LOG_DEBUG_F("material '", materialName, "'");
|
ASSIMP_LOG_VERBOSE_DEBUG_F("material '", materialName, "'");
|
||||||
|
|
||||||
while(linePart != partBlockEnd)
|
while(linePart != partBlockEnd)
|
||||||
{
|
{
|
||||||
|
@ -353,7 +353,7 @@ bool OgreImporter::ReadTechnique(const std::string &techniqueName, stringstream
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
ASSIMP_LOG_DEBUG_F(" technique '", techniqueName, "'");
|
ASSIMP_LOG_VERBOSE_DEBUG_F(" technique '", techniqueName, "'");
|
||||||
|
|
||||||
const string partPass = "pass";
|
const string partPass = "pass";
|
||||||
|
|
||||||
|
@ -389,7 +389,7 @@ bool OgreImporter::ReadPass(const std::string &passName, stringstream &ss, aiMat
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
ASSIMP_LOG_DEBUG_F(" pass '", passName, "'");
|
ASSIMP_LOG_VERBOSE_DEBUG_F(" pass '", passName, "'");
|
||||||
|
|
||||||
const string partAmbient = "ambient";
|
const string partAmbient = "ambient";
|
||||||
const string partDiffuse = "diffuse";
|
const string partDiffuse = "diffuse";
|
||||||
|
@ -416,7 +416,7 @@ bool OgreImporter::ReadPass(const std::string &passName, stringstream &ss, aiMat
|
||||||
ss >> r >> g >> b;
|
ss >> r >> g >> b;
|
||||||
const aiColor3D color(r, g, b);
|
const aiColor3D color(r, g, b);
|
||||||
|
|
||||||
ASSIMP_LOG_DEBUG_F( " ", linePart, " ", r, " ", g, " ", b);
|
ASSIMP_LOG_VERBOSE_DEBUG_F( " ", linePart, " ", r, " ", g, " ", b);
|
||||||
|
|
||||||
if (linePart == partAmbient)
|
if (linePart == partAmbient)
|
||||||
{
|
{
|
||||||
|
@ -455,7 +455,7 @@ bool OgreImporter::ReadTextureUnit(const std::string &textureUnitName, stringstr
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
ASSIMP_LOG_DEBUG_F(" texture_unit '", textureUnitName, "'");
|
ASSIMP_LOG_VERBOSE_DEBUG_F(" texture_unit '", textureUnitName, "'");
|
||||||
|
|
||||||
const string partTexture = "texture";
|
const string partTexture = "texture";
|
||||||
const string partTextCoordSet = "tex_coord_set";
|
const string partTextCoordSet = "tex_coord_set";
|
||||||
|
@ -490,7 +490,7 @@ bool OgreImporter::ReadTextureUnit(const std::string &textureUnitName, stringstr
|
||||||
if (posSuffix != string::npos && posUnderscore != string::npos && posSuffix > posUnderscore)
|
if (posSuffix != string::npos && posUnderscore != string::npos && posSuffix > posUnderscore)
|
||||||
{
|
{
|
||||||
string identifier = Ogre::ToLower(textureRef.substr(posUnderscore, posSuffix - posUnderscore));
|
string identifier = Ogre::ToLower(textureRef.substr(posUnderscore, posSuffix - posUnderscore));
|
||||||
ASSIMP_LOG_DEBUG_F( "Detecting texture type from filename postfix '", identifier, "'");
|
ASSIMP_LOG_VERBOSE_DEBUG_F( "Detecting texture type from filename postfix '", identifier, "'");
|
||||||
|
|
||||||
if (identifier == "_n" || identifier == "_nrm" || identifier == "_nrml" || identifier == "_normal" || identifier == "_normals" || identifier == "_normalmap")
|
if (identifier == "_n" || identifier == "_nrm" || identifier == "_nrml" || identifier == "_normal" || identifier == "_normals" || identifier == "_normalmap")
|
||||||
{
|
{
|
||||||
|
@ -580,7 +580,7 @@ bool OgreImporter::ReadTextureUnit(const std::string &textureUnitName, stringstr
|
||||||
unsigned int textureTypeIndex = m_textures[textureType];
|
unsigned int textureTypeIndex = m_textures[textureType];
|
||||||
m_textures[textureType]++;
|
m_textures[textureType]++;
|
||||||
|
|
||||||
ASSIMP_LOG_DEBUG_F( " texture '", textureRef, "' type ", textureType,
|
ASSIMP_LOG_VERBOSE_DEBUG_F( " texture '", textureRef, "' type ", textureType,
|
||||||
" index ", textureTypeIndex, " UV ", uvCoord);
|
" index ", textureTypeIndex, " UV ", uvCoord);
|
||||||
|
|
||||||
aiString assimpTextureRef(textureRef);
|
aiString assimpTextureRef(textureRef);
|
||||||
|
|
|
@ -268,7 +268,7 @@ void OgreXmlSerializer::ReadMesh(MeshXml *mesh) {
|
||||||
throw DeadlyImportError("Root node is <" + m_currentNodeName + "> expecting <mesh>");
|
throw DeadlyImportError("Root node is <" + m_currentNodeName + "> expecting <mesh>");
|
||||||
}
|
}
|
||||||
|
|
||||||
ASSIMP_LOG_DEBUG("Reading Mesh");
|
ASSIMP_LOG_VERBOSE_DEBUG("Reading Mesh");
|
||||||
|
|
||||||
NextNode();
|
NextNode();
|
||||||
|
|
||||||
|
@ -294,7 +294,7 @@ void OgreXmlSerializer::ReadMesh(MeshXml *mesh) {
|
||||||
ReadBoneAssignments(mesh->sharedVertexData);
|
ReadBoneAssignments(mesh->sharedVertexData);
|
||||||
} else if (m_currentNodeName == nnSkeletonLink) {
|
} else if (m_currentNodeName == nnSkeletonLink) {
|
||||||
mesh->skeletonRef = ReadAttribute<std::string>("name");
|
mesh->skeletonRef = ReadAttribute<std::string>("name");
|
||||||
ASSIMP_LOG_DEBUG_F("Read skeleton link ", mesh->skeletonRef);
|
ASSIMP_LOG_VERBOSE_DEBUG_F("Read skeleton link ", mesh->skeletonRef);
|
||||||
NextNode();
|
NextNode();
|
||||||
}
|
}
|
||||||
// Assimp incompatible/ignored nodes
|
// Assimp incompatible/ignored nodes
|
||||||
|
@ -305,7 +305,7 @@ void OgreXmlSerializer::ReadMesh(MeshXml *mesh) {
|
||||||
|
|
||||||
void OgreXmlSerializer::ReadGeometry(VertexDataXml *dest) {
|
void OgreXmlSerializer::ReadGeometry(VertexDataXml *dest) {
|
||||||
dest->count = ReadAttribute<uint32_t>("vertexcount");
|
dest->count = ReadAttribute<uint32_t>("vertexcount");
|
||||||
ASSIMP_LOG_DEBUG_F(" - Reading geometry of ", dest->count, " vertices");
|
ASSIMP_LOG_VERBOSE_DEBUG_F(" - Reading geometry of ", dest->count, " vertices");
|
||||||
|
|
||||||
NextNode();
|
NextNode();
|
||||||
while (m_currentNodeName == nnVertexBuffer) {
|
while (m_currentNodeName == nnVertexBuffer) {
|
||||||
|
@ -325,19 +325,19 @@ void OgreXmlSerializer::ReadGeometryVertexBuffer(VertexDataXml *dest) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (positions) {
|
if (positions) {
|
||||||
ASSIMP_LOG_DEBUG(" - Contains positions");
|
ASSIMP_LOG_VERBOSE_DEBUG(" - Contains positions");
|
||||||
dest->positions.reserve(dest->count);
|
dest->positions.reserve(dest->count);
|
||||||
}
|
}
|
||||||
if (normals) {
|
if (normals) {
|
||||||
ASSIMP_LOG_DEBUG(" - Contains normals");
|
ASSIMP_LOG_VERBOSE_DEBUG(" - Contains normals");
|
||||||
dest->normals.reserve(dest->count);
|
dest->normals.reserve(dest->count);
|
||||||
}
|
}
|
||||||
if (tangents) {
|
if (tangents) {
|
||||||
ASSIMP_LOG_DEBUG(" - Contains tangents");
|
ASSIMP_LOG_VERBOSE_DEBUG(" - Contains tangents");
|
||||||
dest->tangents.reserve(dest->count);
|
dest->tangents.reserve(dest->count);
|
||||||
}
|
}
|
||||||
if (uvs > 0) {
|
if (uvs > 0) {
|
||||||
ASSIMP_LOG_DEBUG_F(" - Contains ", uvs, " texture coords");
|
ASSIMP_LOG_VERBOSE_DEBUG_F(" - Contains ", uvs, " texture coords");
|
||||||
dest->uvs.resize(uvs);
|
dest->uvs.resize(uvs);
|
||||||
for (size_t i = 0, len = dest->uvs.size(); i < len; ++i) {
|
for (size_t i = 0, len = dest->uvs.size(); i < len; ++i) {
|
||||||
dest->uvs[i].reserve(dest->count);
|
dest->uvs[i].reserve(dest->count);
|
||||||
|
@ -464,9 +464,9 @@ void OgreXmlSerializer::ReadSubMesh(MeshXml *mesh) {
|
||||||
submesh->usesSharedVertexData = ReadAttribute<bool>(anUseSharedVertices);
|
submesh->usesSharedVertexData = ReadAttribute<bool>(anUseSharedVertices);
|
||||||
}
|
}
|
||||||
|
|
||||||
ASSIMP_LOG_DEBUG_F("Reading SubMesh ", mesh->subMeshes.size());
|
ASSIMP_LOG_VERBOSE_DEBUG_F("Reading SubMesh ", mesh->subMeshes.size());
|
||||||
ASSIMP_LOG_DEBUG_F(" - Material: '", submesh->materialRef, "'");
|
ASSIMP_LOG_VERBOSE_DEBUG_F(" - Material: '", submesh->materialRef, "'");
|
||||||
ASSIMP_LOG_DEBUG_F(" - Uses shared geometry: ", (submesh->usesSharedVertexData ? "true" : "false"));
|
ASSIMP_LOG_VERBOSE_DEBUG_F(" - 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
|
// 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
|
// of faces and geometry changed, and not if we have more than one of one
|
||||||
|
@ -505,7 +505,7 @@ void OgreXmlSerializer::ReadSubMesh(MeshXml *mesh) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (submesh->indexData->faces.size() == submesh->indexData->faceCount) {
|
if (submesh->indexData->faces.size() == submesh->indexData->faceCount) {
|
||||||
ASSIMP_LOG_DEBUG_F(" - Faces ", submesh->indexData->faceCount);
|
ASSIMP_LOG_VERBOSE_DEBUG_F(" - Faces ", submesh->indexData->faceCount);
|
||||||
} else {
|
} else {
|
||||||
throw DeadlyImportError(Formatter::format() << "Read only " << submesh->indexData->faces.size() << " faces when should have read " << submesh->indexData->faceCount);
|
throw DeadlyImportError(Formatter::format() << "Read only " << submesh->indexData->faces.size() << " faces when should have read " << submesh->indexData->faceCount);
|
||||||
}
|
}
|
||||||
|
@ -571,7 +571,7 @@ void OgreXmlSerializer::ReadBoneAssignments(VertexDataXml *dest) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ASSIMP_LOG_DEBUG_F(" - ", dest->boneAssignments.size(), " bone assignments");
|
ASSIMP_LOG_VERBOSE_DEBUG_F(" - ", dest->boneAssignments.size(), " bone assignments");
|
||||||
}
|
}
|
||||||
|
|
||||||
// Skeleton
|
// Skeleton
|
||||||
|
@ -648,7 +648,7 @@ void OgreXmlSerializer::ReadSkeleton(Skeleton *skeleton) {
|
||||||
throw DeadlyImportError("Root node is <" + m_currentNodeName + "> expecting <skeleton>");
|
throw DeadlyImportError("Root node is <" + m_currentNodeName + "> expecting <skeleton>");
|
||||||
}
|
}
|
||||||
|
|
||||||
ASSIMP_LOG_DEBUG("Reading Skeleton");
|
ASSIMP_LOG_VERBOSE_DEBUG("Reading Skeleton");
|
||||||
|
|
||||||
// Optional blend mode from root node
|
// Optional blend mode from root node
|
||||||
if (HasAttribute("blendmode")) {
|
if (HasAttribute("blendmode")) {
|
||||||
|
@ -678,7 +678,7 @@ void OgreXmlSerializer::ReadAnimations(Skeleton *skeleton) {
|
||||||
throw DeadlyImportError("Cannot read <animations> for a Skeleton without bones");
|
throw DeadlyImportError("Cannot read <animations> for a Skeleton without bones");
|
||||||
}
|
}
|
||||||
|
|
||||||
ASSIMP_LOG_DEBUG(" - Animations");
|
ASSIMP_LOG_VERBOSE_DEBUG(" - Animations");
|
||||||
|
|
||||||
NextNode();
|
NextNode();
|
||||||
while (m_currentNodeName == nnAnimation) {
|
while (m_currentNodeName == nnAnimation) {
|
||||||
|
@ -693,7 +693,7 @@ void OgreXmlSerializer::ReadAnimations(Skeleton *skeleton) {
|
||||||
ReadAnimationTracks(anim);
|
ReadAnimationTracks(anim);
|
||||||
skeleton->animations.push_back(anim);
|
skeleton->animations.push_back(anim);
|
||||||
|
|
||||||
ASSIMP_LOG_DEBUG_F(" ", anim->name, " (", anim->length, " sec, ", anim->tracks.size(), " tracks)");
|
ASSIMP_LOG_VERBOSE_DEBUG_F(" ", anim->name, " (", anim->length, " sec, ", anim->tracks.size(), " tracks)");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -793,7 +793,7 @@ static bool BoneCompare(Bone *a, Bone *b) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void OgreXmlSerializer::ReadBones(Skeleton *skeleton) {
|
void OgreXmlSerializer::ReadBones(Skeleton *skeleton) {
|
||||||
ASSIMP_LOG_DEBUG(" - Bones");
|
ASSIMP_LOG_VERBOSE_DEBUG(" - Bones");
|
||||||
|
|
||||||
NextNode();
|
NextNode();
|
||||||
while (m_currentNodeName == nnBone) {
|
while (m_currentNodeName == nnBone) {
|
||||||
|
@ -851,7 +851,7 @@ void OgreXmlSerializer::ReadBones(Skeleton *skeleton) {
|
||||||
as per the Ogre skeleton spec. It might be more that other (later) code in this imported does not break. */
|
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) {
|
for (size_t i = 0, len = skeleton->bones.size(); i < len; ++i) {
|
||||||
Bone *b = skeleton->bones[i];
|
Bone *b = skeleton->bones[i];
|
||||||
ASSIMP_LOG_DEBUG_F(" ", b->id, " ", b->name);
|
ASSIMP_LOG_VERBOSE_DEBUG_F(" ", b->id, " ", b->name);
|
||||||
|
|
||||||
if (b->id != static_cast<uint16_t>(i)) {
|
if (b->id != static_cast<uint16_t>(i)) {
|
||||||
throw DeadlyImportError(Formatter::format() << "Bone ids are not in sequence starting from 0. Missing index " << i);
|
throw DeadlyImportError(Formatter::format() << "Bone ids are not in sequence starting from 0. Missing index " << i);
|
||||||
|
|
|
@ -514,7 +514,7 @@ bool PLY::DOM::SkipComments(std::vector<char> &buffer)
|
||||||
|
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
bool PLY::DOM::ParseHeader(IOStreamBuffer<char> &streamBuffer, std::vector<char> &buffer, bool isBinary) {
|
bool PLY::DOM::ParseHeader(IOStreamBuffer<char> &streamBuffer, std::vector<char> &buffer, bool isBinary) {
|
||||||
ASSIMP_LOG_DEBUG("PLY::DOM::ParseHeader() begin");
|
ASSIMP_LOG_VERBOSE_DEBUG("PLY::DOM::ParseHeader() begin");
|
||||||
|
|
||||||
// parse all elements
|
// parse all elements
|
||||||
while (!buffer.empty())
|
while (!buffer.empty())
|
||||||
|
@ -543,14 +543,14 @@ bool PLY::DOM::ParseHeader(IOStreamBuffer<char> &streamBuffer, std::vector<char>
|
||||||
if (!isBinary) // it would occur an error, if binary data start with values as space or line end.
|
if (!isBinary) // it would occur an error, if binary data start with values as space or line end.
|
||||||
SkipSpacesAndLineEnd(buffer);
|
SkipSpacesAndLineEnd(buffer);
|
||||||
|
|
||||||
ASSIMP_LOG_DEBUG("PLY::DOM::ParseHeader() succeeded");
|
ASSIMP_LOG_VERBOSE_DEBUG("PLY::DOM::ParseHeader() succeeded");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
bool PLY::DOM::ParseElementInstanceLists(IOStreamBuffer<char> &streamBuffer, std::vector<char> &buffer, PLYImporter* loader)
|
bool PLY::DOM::ParseElementInstanceLists(IOStreamBuffer<char> &streamBuffer, std::vector<char> &buffer, PLYImporter* loader)
|
||||||
{
|
{
|
||||||
ASSIMP_LOG_DEBUG("PLY::DOM::ParseElementInstanceLists() begin");
|
ASSIMP_LOG_VERBOSE_DEBUG("PLY::DOM::ParseElementInstanceLists() begin");
|
||||||
alElementData.resize(alElements.size());
|
alElementData.resize(alElements.size());
|
||||||
|
|
||||||
std::vector<PLY::Element>::const_iterator i = alElements.begin();
|
std::vector<PLY::Element>::const_iterator i = alElements.begin();
|
||||||
|
@ -571,7 +571,7 @@ bool PLY::DOM::ParseElementInstanceLists(IOStreamBuffer<char> &streamBuffer, std
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ASSIMP_LOG_DEBUG("PLY::DOM::ParseElementInstanceLists() succeeded");
|
ASSIMP_LOG_VERBOSE_DEBUG("PLY::DOM::ParseElementInstanceLists() succeeded");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -582,7 +582,7 @@ bool PLY::DOM::ParseElementInstanceListsBinary(IOStreamBuffer<char> &streamBuffe
|
||||||
PLYImporter* loader,
|
PLYImporter* loader,
|
||||||
bool p_bBE)
|
bool p_bBE)
|
||||||
{
|
{
|
||||||
ASSIMP_LOG_DEBUG("PLY::DOM::ParseElementInstanceListsBinary() begin");
|
ASSIMP_LOG_VERBOSE_DEBUG("PLY::DOM::ParseElementInstanceListsBinary() begin");
|
||||||
alElementData.resize(alElements.size());
|
alElementData.resize(alElements.size());
|
||||||
|
|
||||||
std::vector<PLY::Element>::const_iterator i = alElements.begin();
|
std::vector<PLY::Element>::const_iterator i = alElements.begin();
|
||||||
|
@ -602,7 +602,7 @@ bool PLY::DOM::ParseElementInstanceListsBinary(IOStreamBuffer<char> &streamBuffe
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ASSIMP_LOG_DEBUG("PLY::DOM::ParseElementInstanceListsBinary() succeeded");
|
ASSIMP_LOG_VERBOSE_DEBUG("PLY::DOM::ParseElementInstanceListsBinary() succeeded");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -615,11 +615,11 @@ bool PLY::DOM::ParseInstanceBinary(IOStreamBuffer<char> &streamBuffer, DOM* p_pc
|
||||||
std::vector<char> buffer;
|
std::vector<char> buffer;
|
||||||
streamBuffer.getNextLine(buffer);
|
streamBuffer.getNextLine(buffer);
|
||||||
|
|
||||||
ASSIMP_LOG_DEBUG("PLY::DOM::ParseInstanceBinary() begin");
|
ASSIMP_LOG_VERBOSE_DEBUG("PLY::DOM::ParseInstanceBinary() begin");
|
||||||
|
|
||||||
if (!p_pcOut->ParseHeader(streamBuffer, buffer, true))
|
if (!p_pcOut->ParseHeader(streamBuffer, buffer, true))
|
||||||
{
|
{
|
||||||
ASSIMP_LOG_DEBUG("PLY::DOM::ParseInstanceBinary() failure");
|
ASSIMP_LOG_VERBOSE_DEBUG("PLY::DOM::ParseInstanceBinary() failure");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -628,10 +628,10 @@ bool PLY::DOM::ParseInstanceBinary(IOStreamBuffer<char> &streamBuffer, DOM* p_pc
|
||||||
const char* pCur = (char*)&buffer[0];
|
const char* pCur = (char*)&buffer[0];
|
||||||
if (!p_pcOut->ParseElementInstanceListsBinary(streamBuffer, buffer, pCur, bufferSize, loader, p_bBE))
|
if (!p_pcOut->ParseElementInstanceListsBinary(streamBuffer, buffer, pCur, bufferSize, loader, p_bBE))
|
||||||
{
|
{
|
||||||
ASSIMP_LOG_DEBUG("PLY::DOM::ParseInstanceBinary() failure");
|
ASSIMP_LOG_VERBOSE_DEBUG("PLY::DOM::ParseInstanceBinary() failure");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
ASSIMP_LOG_DEBUG("PLY::DOM::ParseInstanceBinary() succeeded");
|
ASSIMP_LOG_VERBOSE_DEBUG("PLY::DOM::ParseInstanceBinary() succeeded");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -644,11 +644,11 @@ bool PLY::DOM::ParseInstance(IOStreamBuffer<char> &streamBuffer, DOM* p_pcOut, P
|
||||||
std::vector<char> buffer;
|
std::vector<char> buffer;
|
||||||
streamBuffer.getNextLine(buffer);
|
streamBuffer.getNextLine(buffer);
|
||||||
|
|
||||||
ASSIMP_LOG_DEBUG("PLY::DOM::ParseInstance() begin");
|
ASSIMP_LOG_VERBOSE_DEBUG("PLY::DOM::ParseInstance() begin");
|
||||||
|
|
||||||
if (!p_pcOut->ParseHeader(streamBuffer, buffer, false))
|
if (!p_pcOut->ParseHeader(streamBuffer, buffer, false))
|
||||||
{
|
{
|
||||||
ASSIMP_LOG_DEBUG("PLY::DOM::ParseInstance() failure");
|
ASSIMP_LOG_VERBOSE_DEBUG("PLY::DOM::ParseInstance() failure");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -656,10 +656,10 @@ bool PLY::DOM::ParseInstance(IOStreamBuffer<char> &streamBuffer, DOM* p_pcOut, P
|
||||||
streamBuffer.getNextLine(buffer);
|
streamBuffer.getNextLine(buffer);
|
||||||
if (!p_pcOut->ParseElementInstanceLists(streamBuffer, buffer, loader))
|
if (!p_pcOut->ParseElementInstanceLists(streamBuffer, buffer, loader))
|
||||||
{
|
{
|
||||||
ASSIMP_LOG_DEBUG("PLY::DOM::ParseInstance() failure");
|
ASSIMP_LOG_VERBOSE_DEBUG("PLY::DOM::ParseInstance() failure");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
ASSIMP_LOG_DEBUG("PLY::DOM::ParseInstance() succeeded");
|
ASSIMP_LOG_VERBOSE_DEBUG("PLY::DOM::ParseInstance() succeeded");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -490,7 +490,7 @@ bool TriangulateProcess::TriangulateMesh( aiMesh* pMesh)
|
||||||
// drop dumb 0-area triangles - deactivated for now:
|
// drop dumb 0-area triangles - deactivated for now:
|
||||||
//FindDegenerates post processing step can do the same thing
|
//FindDegenerates post processing step can do the same thing
|
||||||
//if (std::fabs(GetArea2D(temp_verts[i[0]],temp_verts[i[1]],temp_verts[i[2]])) < 1e-5f) {
|
//if (std::fabs(GetArea2D(temp_verts[i[0]],temp_verts[i[1]],temp_verts[i[2]])) < 1e-5f) {
|
||||||
// ASSIMP_LOG_DEBUG("Dropping triangle with area 0");
|
// ASSIMP_LOG_VERBOSE_DEBUG("Dropping triangle with area 0");
|
||||||
// --curOut;
|
// --curOut;
|
||||||
|
|
||||||
// delete[] f->mIndices;
|
// delete[] f->mIndices;
|
||||||
|
|
Loading…
Reference in New Issue