Browse Source

Re-added special handling of SkinnedMesh.

Ian Kerr 11 years ago
parent
commit
c18a8b9a8a
1 changed files with 13 additions and 1 deletions
  1. 13 1
      src/extras/animation/AnimationHandler.js

+ 13 - 1
src/extras/animation/AnimationHandler.js

@@ -149,7 +149,19 @@ THREE.AnimationHandler = {
 
 		var hierarchy = [];
 
-		parseRecurseHierarchy( root, hierarchy );
+		if ( root instanceof THREE.SkinnedMesh ) {
+
+			for ( var b = 0; b < root.skeleton.bones.length; b++ ) {
+
+				hierarchy.push( root.skeleton.bones[ b ] );
+
+			}
+
+		} else {
+
+			parseRecurseHierarchy( root, hierarchy );
+
+		}
 
 		return hierarchy;