浏览代码

Fix GLTFExport Bug with MorphTarget Animations which aren't aimed at the root node being exported:
Github Issue: https://github.com/mrdoob/three.js/issues/17579

Bug-Reaper 5 年之前
父节点
当前提交
2d3903e4dd
共有 2 个文件被更改,包括 6 次插入2 次删除
  1. 3 1
      examples/js/exporters/GLTFExporter.js
  2. 3 1
      examples/jsm/exporters/GLTFExporter.js

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

@@ -2254,7 +2254,9 @@ THREE.GLTFExporter.Utils = {
 
 				}
 
-				mergedTrack.name = '.morphTargetInfluences';
+				// We need to take into consideration that the target node for a
+				// blendshape animation might not be the root node of the animation:
+				mergedTrack.name = sourceTrack.name;
 				mergedTrack.values = values;
 
 				mergedTracks[ sourceTrackNode.uuid ] = mergedTrack;

+ 3 - 1
examples/jsm/exporters/GLTFExporter.js

@@ -2276,7 +2276,9 @@ GLTFExporter.Utils = {
 
 				}
 
-				mergedTrack.name = '.morphTargetInfluences';
+				// We need to take into consideration that the target node for a
+				// blendshape animation might not be the root node of the animation:
+				mergedTrack.name = sourceTrack.name
 				mergedTrack.values = values;
 
 				mergedTracks[ sourceTrackNode.uuid ] = mergedTrack;