diff --git a/CUE4Parse b/CUE4Parse index e9a88678..a2be829b 160000 --- a/CUE4Parse +++ b/CUE4Parse @@ -1 +1 @@ -Subproject commit e9a88678cc4fffecb6a5ee6dfbd3b94df0648d61 +Subproject commit a2be829ba154755ad195be94a84ddc6d99ab887e diff --git a/FModel/Settings/UserSettings.cs b/FModel/Settings/UserSettings.cs index ba1d0b86..8dd6b3cb 100644 --- a/FModel/Settings/UserSettings.cs +++ b/FModel/Settings/UserSettings.cs @@ -661,6 +661,13 @@ namespace FModel.Settings set => SetProperty(ref _cameraMode, value); } + private int _previewMaxTextureSize = 1024; + public int PreviewMaxTextureSize + { + get => _previewMaxTextureSize; + set => SetProperty(ref _previewMaxTextureSize, value); + } + private bool _previewStaticMeshes = true; public bool PreviewStaticMeshes { diff --git a/FModel/Views/SettingsView.xaml b/FModel/Views/SettingsView.xaml index 7f4ea566..e335927b 100644 --- a/FModel/Views/SettingsView.xaml +++ b/FModel/Views/SettingsView.xaml @@ -313,6 +313,7 @@ + @@ -359,40 +360,45 @@ - - + + + + - - + - - + - - + - - + - - + - + - - + @@ -401,8 +407,8 @@ - - + diff --git a/FModel/Views/Snooper/Options.cs b/FModel/Views/Snooper/Options.cs index e3d970a7..d2ed42e2 100644 --- a/FModel/Views/Snooper/Options.cs +++ b/FModel/Views/Snooper/Options.cs @@ -178,7 +178,7 @@ public class Options public bool TryGetTexture(UTexture2D o, bool fix, out Texture texture) { var guid = o.LightingGuid; - if (!Textures.TryGetValue(guid, out texture) && o.GetFirstMip() is { } mip) + if (!Textures.TryGetValue(guid, out texture) && o.GetMipByMaxSize(UserSettings.Default.PreviewMaxTextureSize) is { } mip) { TextureDecoder.DecodeTexture(mip, o.Format, o.isNormalMap, _platform, out var data, out _); if (fix) TextureHelper.FixChannels(o, mip, ref data);