From f3324da6ea77273b69bb30f5eb626334d990be44 Mon Sep 17 00:00:00 2001 From: aramis_acg Date: Fri, 10 Apr 2009 22:10:11 +0000 Subject: [PATCH] ColladaLoader does now utilize SkeletonMeshBuilder to build animated meshes for animation skeletons. git-svn-id: https://assimp.svn.sourceforge.net/svnroot/assimp/trunk@382 67173fc5-114c-0410-ac8e-9d2fd5bffc1f --- code/ColladaLoader.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/code/ColladaLoader.cpp b/code/ColladaLoader.cpp index 4df44aa36..524feaa1c 100644 --- a/code/ColladaLoader.cpp +++ b/code/ColladaLoader.cpp @@ -50,6 +50,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include "fast_atof.h" #include "ParsingUtils.h" +#include "SkeletonMeshBuilder.h" #include "time.h" @@ -158,7 +159,16 @@ void ColladaLoader::InternReadFile( const std::string& pFile, aiScene* pScene, I // store all cameras StoreSceneCameras( pScene); + // store all animations StoreAnimations( pScene, parser); + + + // If no meshes have been loaded, it's probably just an animated skeleton. + if (!pScene->mNumMeshes) { + + SkeletonMeshBuilder hero(pScene); + pScene->mFlags |= AI_SCENE_FLAGS_INCOMPLETE; + } } // ------------------------------------------------------------------------------------------------