Explorar o código

FBXLoader fails when no pose nodes found for a node #22743 (#22744)

Check number of pose nodes before accessing them.
Viktor Kovacs %!s(int64=3) %!d(string=hai) anos
pai
achega
43739ba87e
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      examples/jsm/loaders/FBXLoader.js

+ 1 - 1
examples/jsm/loaders/FBXLoader.js

@@ -1421,7 +1421,7 @@ class FBXTreeParser {
 
 			for ( const nodeID in BindPoseNode ) {
 
-				if ( BindPoseNode[ nodeID ].attrType === 'BindPose' ) {
+				if ( BindPoseNode[ nodeID ].attrType === 'BindPose' && BindPoseNode[ nodeID ].NbPoseNodes > 0 ) {
 
 					const poseNodes = BindPoseNode[ nodeID ].PoseNode;