2
0
Эх сурвалжийг харах

Merge pull request #18397 from soccer1mt/dev

GLTFExporter: Add null check for skeleton while processing skinned mesh.
Michael Herzog 5 жил өмнө
parent
commit
c3cbf55002

+ 3 - 0
examples/js/exporters/GLTFExporter.js

@@ -1646,6 +1646,9 @@ THREE.GLTFExporter.prototype = {
 			var node = outputJSON.nodes[ nodeMap.get( object ) ];
 			var node = outputJSON.nodes[ nodeMap.get( object ) ];
 
 
 			var skeleton = object.skeleton;
 			var skeleton = object.skeleton;
+
+			if ( skeleton === undefined ) return null;
+
 			var rootJoint = object.skeleton.bones[ 0 ];
 			var rootJoint = object.skeleton.bones[ 0 ];
 
 
 			if ( rootJoint === undefined ) return null;
 			if ( rootJoint === undefined ) return null;