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

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 жил өмнө
parent
commit
2d3903e4dd

+ 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;