mirror of
https://github.com/4sval/FModel.git
synced 2026-06-21 23:40:12 -05:00
feature/webp_and_texture_quality_settings
This commit is contained in:
parent
9159a91626
commit
664c69defe
|
|
@ -1 +1 @@
|
|||
Subproject commit 81458ae77d3f3230d7582a77ffd938510430a4bf
|
||||
Subproject commit 7382811d0c452d7d4759fd21c704e81b58307400
|
||||
|
|
@ -75,7 +75,8 @@ namespace FModel.Settings
|
|||
Platform = Default.CurrentDir.TexturePlatform,
|
||||
ExportMorphTargets = Default.SaveMorphTargets,
|
||||
ExportMaterials = Default.SaveEmbeddedMaterials,
|
||||
ExportHdrTexturesAsHdr = Default.SaveHdrTexturesAsHdr
|
||||
ExportHdrTexturesAsHdr = Default.SaveHdrTexturesAsHdr,
|
||||
TextureQuality = Default.TextureQuality
|
||||
};
|
||||
|
||||
private bool _showChangelog = true;
|
||||
|
|
@ -562,6 +563,13 @@ namespace FModel.Settings
|
|||
set => SetProperty(ref _saveHdrTexturesAsHdr, value);
|
||||
}
|
||||
|
||||
private int _textureQuality = 100;
|
||||
public int TextureQuality
|
||||
{
|
||||
get => _textureQuality;
|
||||
set => SetProperty(ref _textureQuality, value);
|
||||
}
|
||||
|
||||
private bool _featurePreviewNewAssetExplorer = true;
|
||||
public bool FeaturePreviewNewAssetExplorer
|
||||
{
|
||||
|
|
|
|||
|
|
@ -220,6 +220,7 @@ public class SettingsViewModel : ViewModel
|
|||
private ENaniteMeshFormat _naniteMeshExportFormatSnapshot;
|
||||
private EMaterialFormat _materialExportFormatSnapshot;
|
||||
private ETextureFormat _textureExportFormatSnapshot;
|
||||
private int _textureQualitySnapshot;
|
||||
|
||||
private bool _mappingsUpdate = false;
|
||||
|
||||
|
|
@ -264,6 +265,7 @@ public class SettingsViewModel : ViewModel
|
|||
_naniteMeshExportFormatSnapshot = UserSettings.Default.NaniteMeshExportFormat;
|
||||
_materialExportFormatSnapshot = UserSettings.Default.MaterialExportFormat;
|
||||
_textureExportFormatSnapshot = UserSettings.Default.TextureExportFormat;
|
||||
_textureQualitySnapshot = UserSettings.Default.TextureQuality;
|
||||
|
||||
SelectedUePlatform = _uePlatformSnapshot;
|
||||
SelectedUeGame = _ueGameSnapshot;
|
||||
|
|
@ -337,6 +339,8 @@ public class SettingsViewModel : ViewModel
|
|||
UserSettings.Default.TextureExportFormat = SelectedTextureExportFormat;
|
||||
UserSettings.Default.AesReload = SelectedAesReload;
|
||||
UserSettings.Default.DiscordRpc = SelectedDiscordRpc;
|
||||
if (_textureQualitySnapshot != UserSettings.Default.TextureQuality)
|
||||
restart = false;
|
||||
|
||||
if (SelectedDiscordRpc == EDiscordRpc.Never)
|
||||
_discordHandler.Shutdown();
|
||||
|
|
|
|||
|
|
@ -107,7 +107,7 @@ public class TabImage : ViewModel
|
|||
|
||||
if (PixelFormatUtils.IsHDR(bitmap.PixelFormat) || (UserSettings.Default.TextureExportFormat != ETextureFormat.Jpeg && UserSettings.Default.TextureExportFormat != ETextureFormat.Png))
|
||||
{
|
||||
ImageBuffer = bitmap.Encode(UserSettings.Default.TextureExportFormat, UserSettings.Default.SaveHdrTexturesAsHdr, out var ext);
|
||||
ImageBuffer = bitmap.Encode(UserSettings.Default.TextureExportFormat, UserSettings.Default.SaveHdrTexturesAsHdr, out var ext, UserSettings.Default.TextureQuality);
|
||||
ExportName += "." + ext;
|
||||
}
|
||||
else
|
||||
|
|
|
|||
|
|
@ -366,6 +366,7 @@
|
|||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
|
|
@ -541,8 +542,13 @@
|
|||
</ComboBox.ItemTemplate>
|
||||
</ComboBox>
|
||||
|
||||
<TextBlock Grid.Row="20" Grid.Column="0" Text="Save HDR Textures as Radiance .hdr" VerticalAlignment="Center" />
|
||||
<CheckBox Grid.Row="20" Grid.Column="2" Grid.ColumnSpan="3" Content="{Binding IsChecked, RelativeSource={RelativeSource Self}, Converter={x:Static converters:BoolToToggleConverter.Instance}}"
|
||||
<TextBlock Grid.Row="20" Grid.Column="0" Text="Texture Quality" VerticalAlignment="Center" Margin="0 0 0 5" />
|
||||
<TextBox Grid.Row="20" Grid.Column="2" Grid.ColumnSpan="3" Margin="0 0 0 5"
|
||||
Text="{Binding TextureQuality, Source={x:Static local:Settings.UserSettings.Default}, Mode=TwoWay}" />
|
||||
|
||||
|
||||
<TextBlock Grid.Row="21" Grid.Column="0" Text="Save HDR Textures as Radiance .hdr" VerticalAlignment="Center" />
|
||||
<CheckBox Grid.Row="21" Grid.Column="2" Grid.ColumnSpan="3" Content="{Binding IsChecked, RelativeSource={RelativeSource Self}, Converter={x:Static converters:BoolToToggleConverter.Instance}}"
|
||||
IsChecked="{Binding SaveHdrTexturesAsHdr, Source={x:Static local:Settings.UserSettings.Default}, Mode=TwoWay}"
|
||||
Style="{DynamicResource {x:Static adonisUi:Styles.ToggleSwitch}}" Margin="0 5 0 5"/>
|
||||
</Grid>
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user