Skip to content

Commit f810cbf

Browse files
committed
don't try to merge duplicate vertices yet
will fix in UNI-20504
1 parent 1fa9a4f commit f810cbf

File tree

1 file changed

+2
-15
lines changed

1 file changed

+2
-15
lines changed

Assets/FbxExporters/Editor/FbxExporter.cs

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -223,23 +223,14 @@ public void ExportMesh (MeshInfo meshInfo, FbxNode fbxNode, FbxScene fbxScene)
223223

224224
fbxMesh.InitControlPoints (NumControlPoints);
225225

226-
Dictionary<Vector3, int> ControlPointToIndex = new Dictionary<Vector3, int> ();
227-
228226
// copy control point data from Unity to FBX
229-
for (int v = 0; v < NumControlPoints; v++)
227+
for (int v = 0; v < meshInfo.VertexCount; v++)
230228
{
231-
if (ControlPointToIndex.ContainsKey (meshInfo.Vertices [v])) {
232-
continue;
233-
}
234-
235-
ControlPointToIndex [meshInfo.Vertices [v]] = v;
236-
237229
fbxMesh.SetControlPointAt(new FbxVector4 (
238230
-meshInfo.Vertices [v].x,
239231
meshInfo.Vertices [v].y,
240232
meshInfo.Vertices [v].z
241-
),
242-
v);
233+
), v);
243234
}
244235

245236
/*
@@ -255,10 +246,6 @@ meshInfo.Vertices [v].z
255246

256247
foreach (int val in new int[]{0,2,1}) {
257248
int tri = meshInfo.Triangles [3 * f + val];
258-
if (tri > fbxMesh.GetControlPointsCount ()) {
259-
int index = ControlPointToIndex [meshInfo.Vertices [tri]];
260-
tri = index;
261-
}
262249
fbxMesh.AddPolygon (tri);
263250

264251
// save the exported triangle order so we

0 commit comments

Comments
 (0)