|
@@ -168,7 +168,7 @@ void OgreBinarySerializer::RollbackHeader() {
|
|
|
|
|
|
void OgreBinarySerializer::SkipBytes(size_t numBytes) {
|
|
void OgreBinarySerializer::SkipBytes(size_t numBytes) {
|
|
#if (OGRE_BINARY_SERIALIZER_DEBUG == 1)
|
|
#if (OGRE_BINARY_SERIALIZER_DEBUG == 1)
|
|
- ASSIMP_LOG_DEBUG_F("Skipping ", numBytes, " bytes");
|
|
|
|
|
|
+ ASSIMP_LOG_VERBOSE_DEBUG_F("Skipping ", numBytes, " bytes");
|
|
#endif
|
|
#endif
|
|
|
|
|
|
m_reader->IncPtr(numBytes);
|
|
m_reader->IncPtr(numBytes);
|
|
@@ -207,8 +207,8 @@ Mesh *OgreBinarySerializer::ImportMesh(MemoryStreamReader *stream) {
|
|
void OgreBinarySerializer::ReadMesh(Mesh *mesh) {
|
|
void OgreBinarySerializer::ReadMesh(Mesh *mesh) {
|
|
mesh->hasSkeletalAnimations = Read<bool>();
|
|
mesh->hasSkeletalAnimations = Read<bool>();
|
|
|
|
|
|
- ASSIMP_LOG_DEBUG("Reading Mesh");
|
|
|
|
- ASSIMP_LOG_DEBUG_F(" - Skeletal animations: ", mesh->hasSkeletalAnimations ? "true" : "false");
|
|
|
|
|
|
+ ASSIMP_LOG_VERBOSE_DEBUG("Reading Mesh");
|
|
|
|
+ ASSIMP_LOG_VERBOSE_DEBUG_F(" - Skeletal animations: ", mesh->hasSkeletalAnimations ? "true" : "false");
|
|
|
|
|
|
if (!AtEnd()) {
|
|
if (!AtEnd()) {
|
|
uint16_t id = ReadHeader();
|
|
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->faceCount = static_cast<uint32_t>(submesh->indexData->count / 3);
|
|
submesh->indexData->is32bit = Read<bool>();
|
|
submesh->indexData->is32bit = Read<bool>();
|
|
|
|
|
|
- ASSIMP_LOG_DEBUG_F("Reading SubMesh ", mesh->subMeshes.size());
|
|
|
|
- ASSIMP_LOG_DEBUG_F(" - Material: '", submesh->materialRef, "'");
|
|
|
|
- ASSIMP_LOG_DEBUG_F(" - Uses shared geometry: ", submesh->usesSharedVertexData ? "true" : "false");
|
|
|
|
|
|
+ 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");
|
|
|
|
|
|
// Index buffer
|
|
// Index buffer
|
|
if (submesh->indexData->count > 0) {
|
|
if (submesh->indexData->count > 0) {
|
|
@@ -374,7 +374,7 @@ void OgreBinarySerializer::ReadSubMesh(Mesh *mesh) {
|
|
uint8_t *indexBuffer = ReadBytes(numBytes);
|
|
uint8_t *indexBuffer = ReadBytes(numBytes);
|
|
submesh->indexData->buffer = MemoryStreamPtr(new Assimp::MemoryIOStream(indexBuffer, numBytes, true));
|
|
submesh->indexData->buffer = MemoryStreamPtr(new Assimp::MemoryIOStream(indexBuffer, numBytes, true));
|
|
|
|
|
|
- ASSIMP_LOG_DEBUG_F(" - ", submesh->indexData->faceCount,
|
|
|
|
|
|
+ ASSIMP_LOG_VERBOSE_DEBUG_F(" - ", submesh->indexData->faceCount,
|
|
" faces from ", submesh->indexData->count, (submesh->indexData->is32bit ? " 32bit" : " 16bit"),
|
|
" faces from ", submesh->indexData->count, (submesh->indexData->is32bit ? " 32bit" : " 16bit"),
|
|
" indexes of ", numBytes, " bytes");
|
|
" indexes of ", numBytes, " bytes");
|
|
}
|
|
}
|
|
@@ -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) {
|