diff --git a/CUE4Parse b/CUE4Parse index 068e843f..7d9115c2 160000 --- a/CUE4Parse +++ b/CUE4Parse @@ -1 +1 @@ -Subproject commit 068e843fb40649559d0aa82e5f2767b2e6a42512 +Subproject commit 7d9115c2d6eb464c641efb6c2c41efcb0260673d diff --git a/FModel/ViewModels/ApiEndpoints/GitHubApiEndpoint.cs b/FModel/ViewModels/ApiEndpoints/GitHubApiEndpoint.cs index 4fd50731..f9165130 100644 --- a/FModel/ViewModels/ApiEndpoints/GitHubApiEndpoint.cs +++ b/FModel/ViewModels/ApiEndpoints/GitHubApiEndpoint.cs @@ -1,3 +1,4 @@ +using System; using System.Threading.Tasks; using FModel.Framework; using FModel.ViewModels.ApiEndpoints.Models; @@ -26,7 +27,7 @@ public class GitHubApiEndpoint(RestClient client) : AbstractApiProvider(client) public async Task GetUserAsync(string username) { - var request = new FRestRequest($"https://api.github.com/users/{username}"); + var request = new FRestRequest($"https://api.github.com/users/{Uri.EscapeDataString(username)}"); var response = await _client.ExecuteAsync(request).ConfigureAwait(false); return response.Data; } diff --git a/FModel/ViewModels/ExportOptionsViewModel.cs b/FModel/ViewModels/ExportOptionsViewModel.cs index 22e883a4..351f772c 100644 --- a/FModel/ViewModels/ExportOptionsViewModel.cs +++ b/FModel/ViewModels/ExportOptionsViewModel.cs @@ -56,6 +56,12 @@ public class ExportOptionsViewModel : ViewModel if (!SetProperty(ref field, value)) return; RaisePropertyChanged(nameof(SocketSettingsEnabled)); RaisePropertyChanged(nameof(CompressionSettingsEnabled)); + RaisePropertyChanged(nameof(TextureFormatsEnabled)); + + if (value == EMeshFormat.USD) + { + SelectedTextureFormat = ETextureFormat.Png; + } } } @@ -122,6 +128,7 @@ public class ExportOptionsViewModel : ViewModel get; set => SetProperty(ref field, value); } + public bool TextureFormatsEnabled => SelectedMeshFormat != EMeshFormat.USD; public bool ExportHdrTexturesAsHdr { get; diff --git a/FModel/ViewModels/TabControlViewModel.cs b/FModel/ViewModels/TabControlViewModel.cs index 41df329f..f3d70bef 100644 --- a/FModel/ViewModels/TabControlViewModel.cs +++ b/FModel/ViewModels/TabControlViewModel.cs @@ -114,7 +114,7 @@ public class TabImage : ViewModel else { ImageBuffer = imageData; - ExportName += "." + (NoAlpha ? "jpg" : "png"); + ExportName += "." + (NoAlpha || UserSettings.Default.TextureExportFormat == ETextureFormat.Jpeg ? "jpg" : "png"); } using var stream = new MemoryStream(imageData); diff --git a/FModel/ViewModels/UpdateViewModel.cs b/FModel/ViewModels/UpdateViewModel.cs index 8e0d2bad..60ae9129 100644 --- a/FModel/ViewModels/UpdateViewModel.cs +++ b/FModel/ViewModels/UpdateViewModel.cs @@ -111,7 +111,7 @@ public partial class UpdateViewModel : ViewModel foreach (var (commit, usernames) in coAuthorMap) { var coAuthors = usernames - .Where(username => authorCache.ContainsKey(username)) + .Where(authorCache.ContainsKey) .Select(username => authorCache[username]) .ToArray(); diff --git a/FModel/Views/Resources/Controls/ExportOptionsControl.xaml b/FModel/Views/Resources/Controls/ExportOptionsControl.xaml index fe24087a..06d26724 100644 --- a/FModel/Views/Resources/Controls/ExportOptionsControl.xaml +++ b/FModel/Views/Resources/Controls/ExportOptionsControl.xaml @@ -174,10 +174,12 @@ - + + SelectedItem="{Binding SelectedTextureFormat, Mode=TwoWay}" + IsEnabled="{Binding TextureFormatsEnabled}"> diff --git a/FModel/Views/SettingsView.xaml b/FModel/Views/SettingsView.xaml index ea114f4c..96c871d0 100644 --- a/FModel/Views/SettingsView.xaml +++ b/FModel/Views/SettingsView.xaml @@ -46,7 +46,6 @@ - @@ -128,19 +127,8 @@ - - - - - - - - - - - + @@ -149,8 +137,8 @@ - - + @@ -159,32 +147,32 @@ - - + - - + - - -