From 395e2cb1dd70587dd193367d37a1d288ed722852 Mon Sep 17 00:00:00 2001 From: GMatrixGames Date: Sun, 23 May 2021 13:41:52 -0400 Subject: [PATCH] Re-add .udic support --- CUE4Parse | 2 +- FModel/App.xaml.cs | 2 +- FModel/ViewModels/CUE4ParseViewModel.cs | 11 +++++++++++ 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/CUE4Parse b/CUE4Parse index adb0529c..560e867b 160000 --- a/CUE4Parse +++ b/CUE4Parse @@ -1 +1 @@ -Subproject commit adb0529c1770d41c84fa73f47ad918cd7d5ece4c +Subproject commit 560e867bef0ef46640bda66458613dd0070a4809 diff --git a/FModel/App.xaml.cs b/FModel/App.xaml.cs index de79dd94..75802e98 100644 --- a/FModel/App.xaml.cs +++ b/FModel/App.xaml.cs @@ -52,7 +52,7 @@ namespace FModel Directory.CreateDirectory(Path.Combine(UserSettings.Default.OutputDirectory, ".data")); Log.Logger = new LoggerConfiguration().WriteTo.Console(theme: AnsiConsoleTheme.Literate).WriteTo.File( - path: Path.Combine(UserSettings.Default.OutputDirectory, "Logs", $"FModel-Log-{DateTime.Now:yyyy-MM-dd}.txt"), + Path.Combine(UserSettings.Default.OutputDirectory, "Logs", $"FModel-Log-{DateTime.Now:yyyy-MM-dd}.txt"), outputTemplate: "{Timestamp:yyyy-MM-dd HH:mm:ss} [FModel] [{Level:u3}] {Message:lj}{NewLine}{Exception}").CreateLogger(); Log.Information("Version {Version}", Constants.APP_VERSION); diff --git a/FModel/ViewModels/CUE4ParseViewModel.cs b/FModel/ViewModels/CUE4ParseViewModel.cs index 7a655333..857bfa3c 100644 --- a/FModel/ViewModels/CUE4ParseViewModel.cs +++ b/FModel/ViewModels/CUE4ParseViewModel.cs @@ -19,6 +19,7 @@ using CUE4Parse.UE4.Assets.Exports.Sound; using CUE4Parse.UE4.Assets.Exports.Texture; using CUE4Parse.UE4.Assets.Exports.Wwise; using CUE4Parse.UE4.Localization; +using CUE4Parse.UE4.Oodle.Objects; using CUE4Parse.UE4.Wwise; using CUE4Parse_Conversion.Materials; using CUE4Parse_Conversion.Sounds; @@ -476,6 +477,16 @@ namespace FModel.ViewModels FLogger.AppendText($"Export '{fullPath.SubstringAfterLast('/')}' and change its extension if you want it to be an installable font file", Constants.WHITE, true); break; case "udic": + { + TabControl.SelectedTab.Image = null; + if (Provider.TryCreateReader(fullPath, out var archive)) + { + var header = new FDictionaryHeader(archive); + TabControl.SelectedTab.SetDocumentText(JsonConvert.SerializeObject(header, Formatting.Indented), bulkSave); + } + + break; + } case "ushaderbytecode": TabControl.SelectedTab.Image = null; break;