From 340d208a22a75c24bf3bc97fd0b63da3f1f85e0a Mon Sep 17 00:00:00 2001 From: Masusder <59669685+Masusder@users.noreply.github.com> Date: Sun, 1 Nov 2026 11:24:31 +0100 Subject: [PATCH] IncludeDisabledMeshSections / Clear Snooper cache when settings change --- CUE4Parse | 2 +- FModel/Settings/UserSettings.cs | 10 ++- FModel/ViewModels/ExportOptionsViewModel.cs | 13 +++- FModel/ViewModels/SnooperViewModel.cs | 1 + .../Controls/ExportOptionsControl.xaml | 75 +++++++++++++------ Snooper | 2 +- 6 files changed, 75 insertions(+), 28 deletions(-) diff --git a/CUE4Parse b/CUE4Parse index 85495b5e..e76778c1 160000 --- a/CUE4Parse +++ b/CUE4Parse @@ -1 +1 @@ -Subproject commit 85495b5e126203d68ae3bf84e37fe31abd56a0e5 +Subproject commit e76778c10ed25860e11ec488750753224d067d87 diff --git a/FModel/Settings/UserSettings.cs b/FModel/Settings/UserSettings.cs index ebe567f7..f3a16a9e 100644 --- a/FModel/Settings/UserSettings.cs +++ b/FModel/Settings/UserSettings.cs @@ -72,7 +72,8 @@ public sealed class UserSettings : ViewModel Default.SocketExportFormat, Default.CompressionFormat, Default.PngCompressionLevel, - Default.TgaRleCompression + Default.TgaRleCompression, + Default.IncludeDisabledMeshSections ); } @@ -504,6 +505,13 @@ public sealed class UserSettings : ViewModel set => SetProperty(ref _naniteMeshExportFormat, value); } + private bool _includeDisabledMeshSections; + public bool IncludeDisabledMeshSections + { + get => _includeDisabledMeshSections; + set => SetProperty(ref _includeDisabledMeshSections, value); + } + private EMeshQuality _meshQuality = EMeshQuality.Highest; public EMeshQuality MeshQuality { diff --git a/FModel/ViewModels/ExportOptionsViewModel.cs b/FModel/ViewModels/ExportOptionsViewModel.cs index d11a254b..dba46049 100644 --- a/FModel/ViewModels/ExportOptionsViewModel.cs +++ b/FModel/ViewModels/ExportOptionsViewModel.cs @@ -90,6 +90,12 @@ public class ExportOptionsViewModel : ViewModel public bool ShowNaniteWarning => SelectedNaniteMeshFormat != ENaniteMeshFormat.NoNanite; + public bool IncludeDisabledMeshSections + { + get; + set => SetProperty(ref field, value); + } + public IEnumerable MeshQualities { get; } = Enum.GetValues(); public EMeshQuality SelectedMeshQuality { @@ -199,6 +205,7 @@ public class ExportOptionsViewModel : ViewModel OutputDirectory = UserSettings.Default.ModelDirectory; SelectedMeshFormat = UserSettings.Default.MeshExportFormat; SelectedNaniteMeshFormat = UserSettings.Default.NaniteMeshExportFormat; + IncludeDisabledMeshSections = UserSettings.Default.IncludeDisabledMeshSections; SelectedMeshQuality = UserSettings.Default.MeshQuality; SelectedSocketFormat = UserSettings.Default.SocketExportFormat; SelectedCompressionFormat = UserSettings.Default.CompressionFormat; @@ -228,6 +235,7 @@ public class ExportOptionsViewModel : ViewModel UserSettings.Default.ModelDirectory = OutputDirectory; UserSettings.Default.MeshExportFormat = SelectedMeshFormat; UserSettings.Default.NaniteMeshExportFormat = SelectedNaniteMeshFormat; + UserSettings.Default.IncludeDisabledMeshSections = IncludeDisabledMeshSections; UserSettings.Default.MeshQuality = SelectedMeshQuality; UserSettings.Default.SocketExportFormat = SelectedSocketFormat; UserSettings.Default.CompressionFormat = SelectedCompressionFormat; @@ -244,6 +252,8 @@ public class ExportOptionsViewModel : ViewModel UserSettings.Default.ExportImmediately = ExportImmediately; UserSettings.Save(); + SnooperViewModel.Instance.Dispose(); + OverrideOptions = false; FeedbackMessage = "Saved as default"; } @@ -263,6 +273,7 @@ public class ExportOptionsViewModel : ViewModel SelectedSocketFormat, SelectedCompressionFormat, PngCompressionLevel, - TgaRleCompression + TgaRleCompression, + IncludeDisabledMeshSections ); } diff --git a/FModel/ViewModels/SnooperViewModel.cs b/FModel/ViewModels/SnooperViewModel.cs index ef472eeb..e12fef76 100644 --- a/FModel/ViewModels/SnooperViewModel.cs +++ b/FModel/ViewModels/SnooperViewModel.cs @@ -161,6 +161,7 @@ public class SnooperViewModel : ViewModel, IDisposable options.MaterialDepth = settings.MaterialExportFormat; options.TexturePlatform = settings.CurrentDir.TexturePlatform; options.LoadMorphTargets = settings.SaveMorphTargets; + options.IncludeDisabledMeshSections = settings.IncludeDisabledMeshSections; options.MaxTextureMipSize = settings.PreviewMaxTextureSize; } diff --git a/FModel/Views/Resources/Controls/ExportOptionsControl.xaml b/FModel/Views/Resources/Controls/ExportOptionsControl.xaml index 7a245e18..9e61d3a5 100644 --- a/FModel/Views/Resources/Controls/ExportOptionsControl.xaml +++ b/FModel/Views/Resources/Controls/ExportOptionsControl.xaml @@ -32,6 +32,7 @@ + @@ -150,7 +151,7 @@ - @@ -160,7 +161,33 @@ - + + + + + + + + + + + @@ -190,11 +217,11 @@ - + - - @@ -205,8 +232,8 @@ - - + @@ -216,17 +243,17 @@ - - - - @@ -239,37 +266,37 @@ - - - - + - - - + - - + @@ -279,9 +306,9 @@ - - + @@ -296,8 +323,8 @@ Text="For geometry-only exports, it can be significantly faster to disable this option." /> - - + diff --git a/Snooper b/Snooper index 9d44219c..526a2be7 160000 --- a/Snooper +++ b/Snooper @@ -1 +1 @@ -Subproject commit 9d44219c9faaac86dc9a0fba66c854ccfefa59cb +Subproject commit 526a2be78db6b49341dd05a6a48246c50a8b944f