浏览代码

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

Check number of pose nodes before accessing them.
Viktor Kovacs 3 年之前
父节点
当前提交
43739ba87e
共有 1 个文件被更改,包括 1 次插入1 次删除
  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;