@@ -205,7 +205,7 @@ public FbxSurfaceMaterial ExportMaterial (Material unityMaterial, FbxScene fbxSc
205
205
/// Unconditionally export this mesh object to the file.
206
206
/// We have decided; this mesh is definitely getting exported.
207
207
/// </summary>
208
- public void ExportMesh ( MeshInfo meshInfo , FbxNode fbxNode , FbxScene fbxScene , bool mergeVertices = true )
208
+ public void ExportMesh ( MeshInfo meshInfo , FbxNode fbxNode , FbxScene fbxScene , bool weldVertices = true )
209
209
{
210
210
if ( ! meshInfo . IsValid )
211
211
return ;
@@ -220,7 +220,7 @@ public void ExportMesh (MeshInfo meshInfo, FbxNode fbxNode, FbxScene fbxScene, b
220
220
Dictionary < Vector3 , int > ControlPointToIndex = new Dictionary < Vector3 , int > ( ) ;
221
221
222
222
int NumControlPoints = 0 ;
223
- if ( mergeVertices ) {
223
+ if ( weldVertices ) {
224
224
for ( int v = 0 ; v < meshInfo . VertexCount ; v ++ ) {
225
225
if ( ControlPointToIndex . ContainsKey ( meshInfo . Vertices [ v ] ) ) {
226
226
continue ;
@@ -229,7 +229,6 @@ public void ExportMesh (MeshInfo meshInfo, FbxNode fbxNode, FbxScene fbxScene, b
229
229
230
230
NumControlPoints ++ ;
231
231
}
232
- NumVertices += NumControlPoints ;
233
232
fbxMesh . InitControlPoints ( NumControlPoints ) ;
234
233
235
234
// copy control point data from Unity to FBX
@@ -242,7 +241,6 @@ public void ExportMesh (MeshInfo meshInfo, FbxNode fbxNode, FbxScene fbxScene, b
242
241
}
243
242
} else {
244
243
NumControlPoints = meshInfo . VertexCount ;
245
- NumVertices += NumControlPoints ;
246
244
fbxMesh . InitControlPoints ( NumControlPoints ) ;
247
245
248
246
for ( int v = 0 ; v < NumControlPoints ; v ++ )
@@ -275,7 +273,7 @@ meshInfo.Vertices [v].z
275
273
// properly export UVs, normals, binormals, etc.
276
274
unmergedTriangles [ current ] = tri ;
277
275
278
- if ( mergeVertices ) {
276
+ if ( weldVertices ) {
279
277
tri = ControlPointToIndex [ meshInfo . Vertices [ tri ] ] ;
280
278
}
281
279
fbxMesh . AddPolygon ( tri ) ;
@@ -722,11 +720,6 @@ private MeshInfo GetMeshInfo (GameObject gameObject, bool requireRenderer = true
722
720
/// </summary>
723
721
public int NumTriangles { private set ; get ; }
724
722
725
- /// <summary>
726
- /// Number of vertices
727
- /// </summary>
728
- public int NumVertices { private set ; get ; }
729
-
730
723
/// <summary>
731
724
/// Clean up this class on garbage collection
732
725
/// </summary>
0 commit comments