Skip to content

Commit 370bafa

Browse files
committed
Update Program.cs
1 parent 9980f60 commit 370bafa

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

MySFformat/src/Program.cs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,8 @@ static partial class Program
150150
// [Done, Experimental] Multi-UV Exporting
151151
// [Done, Experimental] Multi-UV Importing
152152
// When showing up, make sure no window overlap
153+
// Fix no-texture flver cannot be loaded issue
154+
// VBS Editing
153155

154156
//X2.6 TODO List:
155157
// Strange Mesh Error problem
@@ -162,7 +164,6 @@ static partial class Program
162164
// Pipeline check: whole new animation pipeline walktrough (flver skeleton + further custom animation)
163165
// exporting dummypolys
164166
// exporting with axis convertsion
165-
// Exporting Multi-UVs
166167
// 3dsmax support
167168
// o assign the mesh to use “base buffer layout” and “cloth buffer layouts”
168169
// sorta like two templates to use one for every other mesh (buffer 0) or cloth mesh (3, 8, 5)
@@ -652,7 +653,11 @@ void DrawRing(Vector3D[] vectors, Microsoft.Xna.Framework.Color c)
652653
}
653654

654655
MeshInfos mi = new MeshInfos();
655-
var tName = targetFlver.Materials[ targetFlver.Meshes[i].MaterialIndex].Textures[0].Path;
656+
var tName = "ERROR(No texture channel found in material!)";
657+
// Fix no-texture flver cannot be loaded issue
658+
if (targetFlver.Materials[targetFlver.Meshes[i].MaterialIndex].Textures.Count > 0) {
659+
tName = targetFlver.Materials[targetFlver.Meshes[i].MaterialIndex].Textures[0].Path;
660+
}
656661
tName = FindFileName(tName);
657662
mi.textureName = tName;
658663
//MessageBox.Show("Found texture name:" + mi.textureName);

0 commit comments

Comments
 (0)