瀏覽代碼

USDZExporter: Fixed exporting Xforms with duplicated names.

Mr.doob 4 年之前
父節點
當前提交
ac377cf530
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      examples/jsm/exporters/USDZExporter.js

+ 2 - 2
examples/jsm/exporters/USDZExporter.js

@@ -46,7 +46,7 @@ function buildHeader() {
 
 function buildXform( object, define ) {
 
-	const name = object.name || 'Xform1';
+	const name = 'Object' + object.id;
 	const transform = buildMatrix( object.matrixWorld );
 
 	return `def Xform "${ name }"
@@ -79,7 +79,7 @@ function buildMatrixRow( array, offset ) {
 
 function buildMesh( geometry, material ) {
 
-	const name = geometry.name || 'Mesh1';
+	const name = 'Geometry' + geometry.id;
 	const attributes = geometry.attributes;
 	const count = attributes.position.count;