Skip to content

Commit 219a86a

Browse files
committed
rename mergeVertices to weldVertices
Also remove NumVertices
1 parent ce77b18 commit 219a86a

File tree

1 file changed

+3
-10
lines changed

1 file changed

+3
-10
lines changed

Assets/FbxExporters/Editor/FbxExporter.cs

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ public FbxSurfaceMaterial ExportMaterial (Material unityMaterial, FbxScene fbxSc
205205
/// Unconditionally export this mesh object to the file.
206206
/// We have decided; this mesh is definitely getting exported.
207207
/// </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)
209209
{
210210
if (!meshInfo.IsValid)
211211
return;
@@ -220,7 +220,7 @@ public void ExportMesh (MeshInfo meshInfo, FbxNode fbxNode, FbxScene fbxScene, b
220220
Dictionary<Vector3, int> ControlPointToIndex = new Dictionary<Vector3, int> ();
221221

222222
int NumControlPoints = 0;
223-
if (mergeVertices) {
223+
if (weldVertices) {
224224
for (int v = 0; v < meshInfo.VertexCount; v++) {
225225
if (ControlPointToIndex.ContainsKey (meshInfo.Vertices [v])) {
226226
continue;
@@ -229,7 +229,6 @@ public void ExportMesh (MeshInfo meshInfo, FbxNode fbxNode, FbxScene fbxScene, b
229229

230230
NumControlPoints++;
231231
}
232-
NumVertices += NumControlPoints;
233232
fbxMesh.InitControlPoints (NumControlPoints);
234233

235234
// copy control point data from Unity to FBX
@@ -242,7 +241,6 @@ public void ExportMesh (MeshInfo meshInfo, FbxNode fbxNode, FbxScene fbxScene, b
242241
}
243242
} else {
244243
NumControlPoints = meshInfo.VertexCount;
245-
NumVertices += NumControlPoints;
246244
fbxMesh.InitControlPoints (NumControlPoints);
247245

248246
for (int v = 0; v < NumControlPoints; v++)
@@ -275,7 +273,7 @@ meshInfo.Vertices [v].z
275273
// properly export UVs, normals, binormals, etc.
276274
unmergedTriangles [current] = tri;
277275

278-
if (mergeVertices) {
276+
if (weldVertices) {
279277
tri = ControlPointToIndex [meshInfo.Vertices [tri]];
280278
}
281279
fbxMesh.AddPolygon (tri);
@@ -722,11 +720,6 @@ private MeshInfo GetMeshInfo (GameObject gameObject, bool requireRenderer = true
722720
/// </summary>
723721
public int NumTriangles { private set; get; }
724722

725-
/// <summary>
726-
/// Number of vertices
727-
/// </summary>
728-
public int NumVertices { private set; get; }
729-
730723
/// <summary>
731724
/// Clean up this class on garbage collection
732725
/// </summary>

0 commit comments

Comments
 (0)