Skip to content

Commit 4b93acc

Browse files
committed
GLTFExporter: Fix morph target export bugs.
1 parent a0fc9b7 commit 4b93acc

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

examples/js/exporters/GLTFExporter.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1192,9 +1192,9 @@ THREE.GLTFExporter.prototype = {
11921192

11931193
var baseAttribute = geometry.attributes[ attributeName ];
11941194

1195-
if ( cachedData.attributes.has( baseAttribute ) ) {
1195+
if ( cachedData.attributes.has( attribute ) ) {
11961196

1197-
target[ gltfAttributeName ] = cachedData.attributes.get( baseAttribute );
1197+
target[ gltfAttributeName ] = cachedData.attributes.get( attribute );
11981198
continue;
11991199

12001200
}
@@ -1999,9 +1999,9 @@ THREE.GLTFExporter.Utils = {
19991999
var sourceTrackBinding = THREE.PropertyBinding.parseTrackName( sourceTrack.name );
20002000
var sourceTrackNode = THREE.PropertyBinding.findNode( root, sourceTrackBinding.nodeName );
20012001

2002-
if ( sourceTrackBinding.propertyName !== 'morphTargetInfluences' ) {
2002+
if ( sourceTrackBinding.propertyName !== 'morphTargetInfluences' || sourceTrackBinding.propertyIndex === undefined ) {
20032003

2004-
// Tracks that don't affect morph targets can be kept as-is.
2004+
// Tracks that don't affect morph targets, or that affect all morph targets together, can be left as-is.
20052005
tracks.push( sourceTrack );
20062006
continue;
20072007

0 commit comments

Comments
 (0)