Skip to content

Commit 67ae8c3

Browse files
committed
Fix for face export with FMV
1 parent a47466a commit 67ae8c3

File tree

1 file changed

+9
-0
lines changed
  • xivModdingFramework/Models/FileTypes

1 file changed

+9
-0
lines changed

xivModdingFramework/Models/FileTypes/Mdl.cs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -327,12 +327,21 @@ public static async Task ExportMaterialsForModel(TTModel model, string outputFil
327327
if (targetRace != XivRace.All_Races)
328328
{
329329
var bodyRegex = new Regex("(b[0-9]{4})");
330+
var faceRegex = new Regex("(f[0-9]{4})");
330331

331332
if (bodyRegex.Match(materialName).Success)
332333
{
333334
var currentRace = model.Source.Substring(model.Source.LastIndexOf('c') + 1, 4);
334335
mdlPath = model.Source.Replace(currentRace, targetRace.GetRaceCode());
335336
}
337+
338+
var faceMatch = faceRegex.Match(materialName);
339+
if (faceMatch.Success)
340+
{
341+
var mdlFace = faceRegex.Match(model.Source).Value;
342+
343+
mdlPath = model.Source.Replace(mdlFace, faceMatch.Value);
344+
}
336345
}
337346

338347
// This messy sequence is ultimately to get access to _modelMaps.GetModelMaps().

0 commit comments

Comments
 (0)