Explorar el Código

Store FBXLoader original (not sanitized) node name in Object3D.userData (#26641)

mrdoob/three.js#26637

Co-authored-by: Mindaugas Janulis <Mindaugas.Janulis@cleverdist.com>
janulis hace 2 años
padre
commit
6162a7e81f
Se han modificado 1 ficheros con 2 adiciones y 0 borrados
  1. 2 0
      examples/jsm/loaders/FBXLoader.js

+ 2 - 0
examples/jsm/loaders/FBXLoader.js

@@ -961,6 +961,7 @@ class FBXTreeParser {
 				}
 
 				model.name = node.attrName ? PropertyBinding.sanitizeNodeName( node.attrName ) : '';
+				model.userData.originalName = node.attrName;
 
 				model.ID = id;
 
@@ -997,6 +998,7 @@ class FBXTreeParser {
 						// set name and id here - otherwise in cases where "subBone" is created it will not have a name / id
 
 						bone.name = name ? PropertyBinding.sanitizeNodeName( name ) : '';
+						bone.userData.originalName = name;
 						bone.ID = id;
 
 						skeleton.bones[ i ] = bone;

粤ICP备19079148号