Commit d65af1e5 authored by hybrid's avatar hybrid

Also try to load a skeleton if no skeleton link was given.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@2831 dfc29bdd-3216-0410-991c-e03cc46cb475
parent 98ef47c1
...@@ -203,6 +203,7 @@ bool COgreMeshFileLoader::readObjectChunk(io::IReadFile* file, ChunkData& parent ...@@ -203,6 +203,7 @@ bool COgreMeshFileLoader::readObjectChunk(io::IReadFile* file, ChunkData& parent
os::Printer::log("Read Object Chunk"); os::Printer::log("Read Object Chunk");
#endif #endif
readBool(file, parent, mesh.SkeletalAnimation); readBool(file, parent, mesh.SkeletalAnimation);
bool skeleton_loaded=false;
while ((parent.read < parent.header.length)&&(file->getPos() < file->getSize())) while ((parent.read < parent.header.length)&&(file->getPos() < file->getSize()))
{ {
ChunkData data; ChunkData data;
...@@ -237,6 +238,7 @@ bool COgreMeshFileLoader::readObjectChunk(io::IReadFile* file, ChunkData& parent ...@@ -237,6 +238,7 @@ bool COgreMeshFileLoader::readObjectChunk(io::IReadFile* file, ChunkData& parent
core::stringc name; core::stringc name;
readString(file, data, name); readString(file, data, name);
loadSkeleton(file, name); loadSkeleton(file, name);
skeleton_loaded=true;
} }
break; break;
case COGRE_BONE_ASSIGNMENT: case COGRE_BONE_ASSIGNMENT:
...@@ -258,6 +260,8 @@ bool COgreMeshFileLoader::readObjectChunk(io::IReadFile* file, ChunkData& parent ...@@ -258,6 +260,8 @@ bool COgreMeshFileLoader::readObjectChunk(io::IReadFile* file, ChunkData& parent
} }
parent.read += data.read; parent.read += data.read;
} }
if (!skeleton_loaded)
loadSkeleton(file, FileSystem->getFileBasename(file->getFileName(), false));
return true; return true;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment