diff --git a/CUE4Parse b/CUE4Parse index 5b38fc68..f3ad3b30 160000 --- a/CUE4Parse +++ b/CUE4Parse @@ -1 +1 @@ -Subproject commit 5b38fc685da2f574262d54639f687945660cdf00 +Subproject commit f3ad3b3093f2693604415fa94ce9a53bb5a5c3fa diff --git a/FModel/ViewModels/CUE4ParseViewModel.cs b/FModel/ViewModels/CUE4ParseViewModel.cs index a387e007..862138b9 100644 --- a/FModel/ViewModels/CUE4ParseViewModel.cs +++ b/FModel/ViewModels/CUE4ParseViewModel.cs @@ -393,11 +393,10 @@ public class CUE4ParseViewModel : ViewModel return Task.Run(() => { + var l = ELog.Information; if (endpoint.Overwrite && File.Exists(endpoint.FilePath)) { Provider.MappingsContainer = new FileUsmapTypeMappingsProvider(endpoint.FilePath); - FLogger.Append(ELog.Information, () => - FLogger.Text($"Mappings pulled from '{endpoint.FilePath.SubstringAfterLast("\\")}'", Constants.WHITE, true)); } else if (endpoint.IsValid) { @@ -416,8 +415,6 @@ public class CUE4ParseViewModel : ViewModel } Provider.MappingsContainer = new FileUsmapTypeMappingsProvider(mappingPath); - FLogger.Append(ELog.Information, () => - FLogger.Text($"Mappings pulled from '{mapping.FileName}'", Constants.WHITE, true)); break; } } @@ -429,10 +426,15 @@ public class CUE4ParseViewModel : ViewModel var latestUsmapInfo = latestUsmaps.OrderBy(f => f.LastWriteTime).Last(); Provider.MappingsContainer = new FileUsmapTypeMappingsProvider(latestUsmapInfo.FullName); - FLogger.Append(ELog.Warning, () => - FLogger.Text($"Mappings pulled from '{latestUsmapInfo.Name}'", Constants.WHITE, true)); + l = ELog.Warning; } } + + if (Provider.MappingsContainer is FileUsmapTypeMappingsProvider m) + { + Log.Information($"Mappings pulled from '{m.FileName}'"); + FLogger.Append(l, () => FLogger.Text($"Mappings pulled from '{m.FileName}'", Constants.WHITE, true)); + } }); } diff --git a/FModel/Views/Snooper/Shading/Material.cs b/FModel/Views/Snooper/Shading/Material.cs index fed91051..7fd0ca9d 100644 --- a/FModel/Views/Snooper/Shading/Material.cs +++ b/FModel/Views/Snooper/Shading/Material.cs @@ -132,6 +132,21 @@ public class Material : IDisposable "Emissive 2 UV Positioning (RG)UpperLeft (BA)LowerRight", "EmissiveUVPositioning (RG)UpperLeft (BA)LowerRight")) EmissiveRegion = new Vector4(EmissiveUVs.R, EmissiveUVs.G, EmissiveUVs.B, EmissiveUVs.A); + + if (Parameters.TryGetSwitch(out var swizzleRoughnessToGreen, "SwizzleRoughnessToGreen") && swizzleRoughnessToGreen) + { + foreach (var specMask in SpecularMasks) + { + specMask.SwizzleMask = new [] + { + (int) PixelFormat.Red, + (int) PixelFormat.Blue, + (int) PixelFormat.Green, + (int) PixelFormat.Alpha + }; + specMask.Swizzle(); + } + } } } }