Browse Source

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
aramis_acg 16 years ago
parent
commit
f3324da6ea
1 changed files with 10 additions and 0 deletions
  1. 10 0
      code/ColladaLoader.cpp

+ 10 - 0
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;
+	}
 }
 
 // ------------------------------------------------------------------------------------------------