diff --git a/CUE4Parse b/CUE4Parse index 8f053d40..338fdf5b 160000 --- a/CUE4Parse +++ b/CUE4Parse @@ -1 +1 @@ -Subproject commit 8f053d409cbb39c4cd9dde77a25039d4aed0aa34 +Subproject commit 338fdf5bb380245a26ce1c5b540159c9b8a1c277 diff --git a/FModel/App.xaml.cs b/FModel/App.xaml.cs index 0d01ea4d..2dd04be6 100644 --- a/FModel/App.xaml.cs +++ b/FModel/App.xaml.cs @@ -118,7 +118,7 @@ public partial class App var filePath = Path.Combine(UserSettings.Default.OutputDirectory, "Logs", $"FModel-Log-{DateTime.Now:yyyy-MM-dd}.log"); #endif const string template1 = "{Timestamp:yyyy-MM-dd HH:mm:ss} [{Level:u3}] {Enriched}: {Message:lj}{NewLine}{Exception}"; - const string template2 = "{Timestamp:yyyy-MM-dd HH:mm:ss} [{Level:u3}] [{ClassName}] {ObjectName}: {Message:lj}{NewLine}{Exception}"; + const string template2 = "{Timestamp:yyyy-MM-dd HH:mm:ss} [{Level:u3}] [{ClassName}] {ObjectPath}: {Message:lj}{NewLine}{Exception}"; Log.Logger = new LoggerConfiguration() #if DEBUG .Enrich.With() diff --git a/FModel/ViewModels/ExportSessionViewModel.cs b/FModel/ViewModels/ExportSessionViewModel.cs index 852e852c..dd7f0f81 100644 --- a/FModel/ViewModels/ExportSessionViewModel.cs +++ b/FModel/ViewModels/ExportSessionViewModel.cs @@ -10,6 +10,7 @@ using System.Windows; using System.Windows.Threading; using CUE4Parse_Conversion; using CUE4Parse_Conversion.Options; +using CUE4Parse.Utils; using FModel.Extensions; using FModel.Framework; using FModel.Settings; @@ -288,11 +289,11 @@ public class ExportSessionViewModel : ViewModel while (_pendingLogs.TryDequeue(out var log)) { var className = log.GetContext("ClassName"); - var objectName = log.GetContext("ObjectName"); + var objectPath = log.GetContext("ObjectPath"); var filePath = log.GetContext("FilePath"); var cg = FindOrCreateClass(className); - var og = FindOrCreateObject(cg, objectName); + var og = FindOrCreateObject(cg, objectPath); if (log.Level >= LogEventLevel.Error) { og.ErrorCount++; @@ -313,11 +314,11 @@ public class ExportSessionViewModel : ViewModel return cg; } - private static ObjectGroupViewModel FindOrCreateObject(ClassGroupViewModel cg, string name) + private static ObjectGroupViewModel FindOrCreateObject(ClassGroupViewModel cg, string path) { - var og = cg.Objects.FirstOrDefault(o => o.Name == name); + var og = cg.Objects.FirstOrDefault(o => o.Path == path); if (og != null) return og; - og = new ObjectGroupViewModel(name); + og = new ObjectGroupViewModel(path); cg.Objects.Add(og); return og; } @@ -346,9 +347,10 @@ public class ClassGroupViewModel(string name) : ViewModel public override bool HasErrors => ErrorCount > 0; } -public class ObjectGroupViewModel(string name) : ViewModel +public class ObjectGroupViewModel(string path) : ViewModel { - public string Name { get; } = name; + public string Path { get; } = path; + public string Name { get; } = path.SubstringAfterLast('.'); public ObservableCollection Entries { get; } = []; public bool IsExpanded diff --git a/FModel/Views/ExportSessionWindow.xaml b/FModel/Views/ExportSessionWindow.xaml index 39434977..a9c0928a 100644 --- a/FModel/Views/ExportSessionWindow.xaml +++ b/FModel/Views/ExportSessionWindow.xaml @@ -200,7 +200,8 @@ + Foreground="{DynamicResource {x:Static adonisUi:Brushes.ForegroundBrush}}" + ToolTip="{Binding Path}" />