|
|
@@ -4512,17 +4512,28 @@ class GLTFParser {
|
|
|
const targetName = node.name ? node.name : node.uuid;
|
|
|
const targetNames = [];
|
|
|
|
|
|
+ function collectMorphTargets( object ) {
|
|
|
+
|
|
|
+ if ( object.morphTargetInfluences ) {
|
|
|
+
|
|
|
+ targetNames.push( object.name ? object.name : object.uuid );
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
if ( PATH_PROPERTIES[ target.path ] === PATH_PROPERTIES.weights ) {
|
|
|
|
|
|
- node.traverse( function ( object ) {
|
|
|
+ collectMorphTargets( node );
|
|
|
|
|
|
- if ( object.morphTargetInfluences ) {
|
|
|
+ // for multi-primitive meshes, the node is a Group containing the sub-meshes
|
|
|
|
|
|
- targetNames.push( object.name ? object.name : object.uuid );
|
|
|
+ if ( node.isGroup ) {
|
|
|
|
|
|
- }
|
|
|
+ node.children.forEach( collectMorphTargets );
|
|
|
|
|
|
- } );
|
|
|
+ }
|
|
|
|
|
|
} else {
|
|
|
|