Skip to content

Commit 2c10f5b

Browse files
committed
Update v3.0.8.6
2 parents 1d886be + e0add24 commit 2c10f5b

File tree

4 files changed

+20
-10
lines changed

4 files changed

+20
-10
lines changed

xivModdingFramework/Materials/DataContainers/XivMtrl.cs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,6 @@ public enum EMaterialFlags2 : ushort
8484
public class XivMtrl : ICloneable
8585
{
8686
public const string ItemPathToken = "{item_folder}";
87-
public const string MaterialSetToken = "{version}";
8887
public const string TextureNameToken = "{default_name}";
8988
public const string CommonPathToken = "{shared_folder}";
9089

@@ -559,12 +558,6 @@ public string TokenizePath(string path, XivTexType usage)
559558
path = path.Replace(commonPath, XivMtrl.CommonPathToken);
560559

561560

562-
var version = GetVariantString();
563-
if (version != "")
564-
{
565-
path = path.Replace(version, XivMtrl.MaterialSetToken);
566-
}
567-
568561
//var texName = GetDefaultTexureName(usage, false);
569562
//path = path.Replace(texName, XivMtrl.TextureNameToken);
570563
return path;
@@ -590,7 +583,6 @@ public string DetokenizePath(string path, MtrlTexture texture)
590583

591584

592585
path = path.Replace(ItemPathToken, rootPath);
593-
path = path.Replace(MaterialSetToken, variantString);
594586
path = path.Replace(CommonPathToken, GetCommonTextureDirectory());
595587
return path;
596588
}

xivModdingFramework/Models/DataContainers/TTModel.cs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1672,6 +1672,19 @@ public static async Task<TTModel> LoadFromFile(string filePath, Action<bool, str
16721672
vertex.FlowDirection[0] = reader.GetFloat("flow_u");
16731673
vertex.FlowDirection[1] = reader.GetFloat("flow_v");
16741674

1675+
if(vertex.Binormal != Vector3.Zero)
1676+
{
1677+
var tangent = Vector3.Cross(vertex.Normal, vertex.Binormal).Normalized();
1678+
var dot = Vector3.Dot(tangent, vertex.Tangent);
1679+
if(dot < 0.5f)
1680+
{
1681+
vertex.Handedness = true;
1682+
} else
1683+
{
1684+
vertex.Handedness = false;
1685+
}
1686+
}
1687+
16751688
return vertex;
16761689
});
16771690

xivModdingFramework/Mods/FileTypes/PMP.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -909,7 +909,8 @@ internal static async Task<Dictionary<string, FileStorageInformation>> UnpackPMP
909909

910910
var defMod = pmp.DefaultMod as PmpStandardOptionJson;
911911
PmpStandardOptionJson option = null;
912-
if (defMod != null && (defMod.FileSwaps.Count > 0 || defMod.Manipulations.Count > 0 || defMod.Files.Count > 0))
912+
913+
if (defMod != null && (defMod.FileSwaps.Count > 0 || defMod.Manipulations.Count > 0 || defMod.Files.Count > 0) && pmp.Groups.Count == 0)
913914
{
914915
// Valid Default Mod Option
915916
option = defMod;

xivModdingFramework/Mods/Modding.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,10 @@ public static bool ValidateModlist(string ffxivDirectory = null)
101101
if (res != null)
102102
{
103103
return true;
104+
} else
105+
{
106+
// Modlist failed to parse.
107+
return false;
104108
}
105109
}
106110
catch (Exception ex)
@@ -193,7 +197,7 @@ internal static async Task<ModList> INTERNAL_GetModList(bool writeEnabled)
193197
}
194198
catch(Exception ex)
195199
{
196-
throw new FileNotFoundException("Failedto find or parse modlist file.\n\n" + ex.Message);
200+
throw new FileNotFoundException("Failed to find or parse modlist file.\n\n" + ex.Message);
197201
}
198202
finally
199203
{

0 commit comments

Comments
 (0)