Skip to content

Commit c5ffc45

Browse files
committed
Adjustment to hair material paths during root clone.
1 parent 844f7ba commit c5ffc45

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

xivModdingFramework/Mods/RootCloner.cs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,6 +246,7 @@ public static async Task CloneRoot(XivDependencyRoot Source, XivDependencyRoot D
246246
{
247247
ProgressReporter.Report("Copying textures...");
248248
}
249+
249250
// Raw Copy all Texture files to the new destinations to avoid having the MTRL save functions auto-generate blank textures.
250251
foreach (var kv in newTexturePaths)
251252
{
@@ -459,7 +460,13 @@ private static string UpdatePath(XivDependencyRoot Source, XivDependencyRoot Des
459460

460461
private static string UpdateFolder(XivDependencyRoot Source, XivDependencyRoot Destination, string path)
461462
{
462-
463+
if(Source.Info.PrimaryType == XivItemType.human && Path.GetExtension(path) == ".mtrl")
464+
{
465+
// For hair MTRLs we have to keep the same MTRL folder.
466+
path = Path.GetDirectoryName(path);
467+
path = path.Replace('\\', '/');
468+
return path;
469+
}
463470

464471
// So first off, just copy anything from the old root folder to the new one.
465472
var match = RemoveRootPathRegex.Match(path);

0 commit comments

Comments
 (0)