Fix for UV bindings

This commit is contained in:
VaDiM 2025-04-06 00:06:09 +03:00
parent 190cb68b07
commit f077064a6a

View File

@ -264,7 +264,7 @@ namespace AssetStudio.FbxInterop
} }
else if(fbxSettings.UvBindings[i] > 0) //if checked else if(fbxSettings.UvBindings[i] > 0) //if checked
{ {
AsFbxMeshCreateUVMap(mesh, i, fbxSettings.UvBindings[i]); AsFbxMeshCreateUVMap(mesh, i, fbxSettings.UvBindings[i] - 1);
} }
} }
@ -370,7 +370,7 @@ namespace AssetStudio.FbxInterop
for (var uvIndex = 0; uvIndex < importedMesh.hasUV.Length; uvIndex += 1) for (var uvIndex = 0; uvIndex < importedMesh.hasUV.Length; uvIndex += 1)
{ {
if (importedMesh.hasUV[uvIndex]) if (importedMesh.hasUV[uvIndex] && fbxSettings.UvBindings[uvIndex] > 0)
{ {
var uv = importedVertex.UV[uvIndex]; var uv = importedVertex.UV[uvIndex];
AsFbxMeshElementUVAdd(mesh, uvIndex, uv[0], uv[1]); AsFbxMeshElementUVAdd(mesh, uvIndex, uv[0], uv[1]);