Skip to content

Commit

Permalink
Update v3.0.6.8
Browse files Browse the repository at this point in the history
  • Loading branch information
Lunaretic committed Jul 16, 2024
2 parents 91de5aa + cc3dd41 commit 9396333
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 6 deletions.
6 changes: 3 additions & 3 deletions FFXIV_TexTools/FFXIV_TexTools.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@
<Product>FFXIV_TexTools</Product>
<Copyright>Copyright © 2024</Copyright>

<ApplicationVersion>3.0.6.7</ApplicationVersion>
<AssemblyVersion>3.0.6.7</AssemblyVersion>
<FileVersion>3.0.6.7</FileVersion>
<ApplicationVersion>3.0.6.8</ApplicationVersion>
<AssemblyVersion>3.0.6.8</AssemblyVersion>
<FileVersion>3.0.6.8</FileVersion>

<LangVersion>9.0</LangVersion>
<UseWPF>true</UseWPF>
Expand Down
20 changes: 18 additions & 2 deletions FFXIV_TexTools/ViewModels/ImportModelEditViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,17 @@ public class ImportModelEditViewModel
private readonly Regex ImcAttributeRegex = new Regex("^atr_([a-z]{2})_([a-j])$");

private readonly Regex DefaultSkinRegex = new Regex("\\/mt_c[0-9]{4}b0001_a\\.mtrl");
private readonly Regex SkinBRegex = new Regex("\\/mt_c[0-9]{4}b0001_b\\.mtrl");
private readonly Regex SkinBiboRegex = new Regex("\\/mt_c[0-9]{4}b0001_bibo\\.mtrl");
private readonly Regex ItemMaterialRegex = new Regex("\\/mt_c([0-9]{4})[e|a][0-9]{4}_[a-z0-9]{3}_([a-z])+\\.mtrl");
private const string SkinMaterial = "/mt_c0101b0001_a.mtrl";
private const string SkinBMaterial = "/mt_c0101b0001_b.mtrl";
private const string SkinBiboMaterial = "/mt_c0101b0001_bibo.mtrl";
private readonly KeyValuePair<string, string> DefaultTag = new KeyValuePair<string, string>("_!ADDNEW!_", "Add Attributes...".L());
private readonly KeyValuePair<string, string> CustomTag = new KeyValuePair<string, string>("_!CUSTOM!_", "Custom".L());
private readonly KeyValuePair<string, string> SkinTag = new KeyValuePair<string, string>(SkinMaterial, "Skin".L());
private readonly KeyValuePair<string, string> SkinTag = new KeyValuePair<string, string>(SkinMaterial, "Skin A (Gen2/Vanilla)".L());
private readonly KeyValuePair<string, string> SkinBTag = new KeyValuePair<string, string>(SkinBMaterial, "Skin B (Gen3/TBSE)".L());
private readonly KeyValuePair<string, string> SkinBiboTag = new KeyValuePair<string, string>(SkinBiboMaterial, "Skin Bibo (Bibo+)".L());
private readonly string UnknownText = "Unknown".L();

private float OldModelSize;
Expand Down Expand Up @@ -101,6 +107,14 @@ public async Task SetupUi()
{
m.Material = SkinMaterial;
}
if(SkinBRegex.IsMatch(m.Material))
{
m.Material = SkinBMaterial;
}
if (SkinBiboRegex.IsMatch(m.Material))
{
m.Material = SkinBiboMaterial;
}
}

if(_newModel.MeshGroups.Count <= 1)
Expand Down Expand Up @@ -317,9 +331,11 @@ private void UpdateMaterialsList()
if (!_view.MaterialsSource.Contains(SkinTag))
{
_view.MaterialsSource.Add(SkinTag);
_view.MaterialsSource.Add(SkinBTag);
_view.MaterialsSource.Add(SkinBiboTag);

// Get our root materials, if we have any
foreach(var m in RootMaterials)
foreach (var m in RootMaterials)
{
AddMaterial(m);
}
Expand Down
2 changes: 1 addition & 1 deletion lib/xivModdingFramework

0 comments on commit 9396333

Please sign in to comment.