mirror of
https://github.com/4sval/FModel.git
synced 2026-12-04 23:02:22 -06:00
IncludeDisabledMeshSections / Clear Snooper cache when settings change
This commit is contained in:
Submodule CUE4Parse updated: 85495b5e12...e76778c10e
@@ -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
|
||||
{
|
||||
|
||||
@@ -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<EMeshQuality> MeshQualities { get; } = Enum.GetValues<EMeshQuality>();
|
||||
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
|
||||
);
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -32,6 +32,7 @@
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
@@ -150,7 +151,7 @@
|
||||
</ComboBox>
|
||||
|
||||
<TextBlock Grid.Row="8" Grid.Column="0" Text="Nanite Format" VerticalAlignment="Center" Margin="0 0 0 5" />
|
||||
<ComboBox Grid.Row="8" Grid.Column="2" Grid.ColumnSpan="3" Margin="0 0 0 5"
|
||||
<ComboBox Grid.Row="8" Grid.Column="2" Grid.ColumnSpan="3" Margin="0 0 0 12"
|
||||
ItemsSource="{Binding NaniteMeshFormats}"
|
||||
SelectedItem="{Binding SelectedNaniteMeshFormat, Mode=TwoWay}">
|
||||
<ComboBox.ItemTemplate>
|
||||
@@ -160,7 +161,33 @@
|
||||
</ComboBox.ItemTemplate>
|
||||
</ComboBox>
|
||||
|
||||
<Border Grid.Row="9" Grid.Column="0" Grid.ColumnSpan="5" Margin="0 10 0 5" CornerRadius="1"
|
||||
<TextBlock Grid.Row="9"
|
||||
Grid.Column="0"
|
||||
Text="Include Disabled Sections"
|
||||
VerticalAlignment="Center"
|
||||
Margin="0 0 0 15" />
|
||||
<Grid Grid.Row="9"
|
||||
Grid.Column="2"
|
||||
Grid.ColumnSpan="3"
|
||||
Margin="0 0 0 13">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<CheckBox Grid.Column="0"
|
||||
IsChecked="{Binding IncludeDisabledMeshSections, Mode=TwoWay}"
|
||||
Content="{Binding IsChecked, RelativeSource={RelativeSource Self}, Converter={x:Static converters:BoolToToggleConverter.Instance}}"
|
||||
Style="{DynamicResource {x:Static adonisUi:Styles.ToggleSwitch}}" />
|
||||
<TextBlock Grid.Column="1"
|
||||
VerticalAlignment="Center"
|
||||
Margin="5 0 0 0"
|
||||
FontSize="11"
|
||||
Foreground="{DynamicResource {x:Static adonisUi:Brushes.DisabledForegroundBrush}}"
|
||||
Text="It is not recommended to enable this option, unless you need sections not rendered in-game." />
|
||||
</Grid>
|
||||
|
||||
<Border Grid.Row="10" Grid.Column="0" Grid.ColumnSpan="5" Margin="0 10 0 5" CornerRadius="1"
|
||||
Background="#1AFFA726" BorderBrush="#FFA726" BorderThickness="1" Padding="10"
|
||||
Visibility="{Binding ShowNaniteWarning, Converter={StaticResource BoolToVisibilityConverter}}">
|
||||
<Grid>
|
||||
@@ -190,11 +217,11 @@
|
||||
</Grid>
|
||||
</Border>
|
||||
|
||||
<Separator Grid.Row="10" Grid.Column="0" Grid.ColumnSpan="5" Style="{StaticResource CustomSeparator}" Tag="TEXTURE" Margin="0 10 0 10" />
|
||||
<Separator Grid.Row="11" Grid.Column="0" Grid.ColumnSpan="5" Style="{StaticResource CustomSeparator}" Tag="TEXTURE" Margin="0 10 0 10" />
|
||||
|
||||
<TextBlock Grid.Row="11" Grid.Column="0" Text="Texture Format" VerticalAlignment="Center" Margin="0 0 0 5"
|
||||
<TextBlock Grid.Row="12" Grid.Column="0" Text="Texture Format" VerticalAlignment="Center" Margin="0 0 0 5"
|
||||
IsEnabled="{Binding TextureFormatsEnabled}" />
|
||||
<ComboBox Grid.Row="11" Grid.Column="2" Grid.ColumnSpan="3" Margin="0 0 0 5"
|
||||
<ComboBox Grid.Row="12" Grid.Column="2" Grid.ColumnSpan="3" Margin="0 0 0 5"
|
||||
ItemsSource="{Binding TextureFormats}"
|
||||
SelectedItem="{Binding SelectedTextureFormat, Mode=TwoWay}"
|
||||
IsEnabled="{Binding TextureFormatsEnabled}">
|
||||
@@ -205,8 +232,8 @@
|
||||
</ComboBox.ItemTemplate>
|
||||
</ComboBox>
|
||||
|
||||
<TextBlock Grid.Row="12" Grid.Column="0" Text="Texture Platform" VerticalAlignment="Center" Margin="0 0 0 10" />
|
||||
<ComboBox Grid.Row="12" Grid.Column="2" Grid.ColumnSpan="3" Margin="0 0 0 10"
|
||||
<TextBlock Grid.Row="13" Grid.Column="0" Text="Texture Platform" VerticalAlignment="Center" Margin="0 0 0 10" />
|
||||
<ComboBox Grid.Row="13" Grid.Column="2" Grid.ColumnSpan="3" Margin="0 0 0 10"
|
||||
ItemsSource="{Binding TexturePlatforms}"
|
||||
SelectedItem="{Binding SelectedTexturePlatform, Mode=TwoWay}">
|
||||
<ComboBox.ItemTemplate>
|
||||
@@ -216,17 +243,17 @@
|
||||
</ComboBox.ItemTemplate>
|
||||
</ComboBox>
|
||||
|
||||
<TextBlock Grid.Row="13" Grid.Column="0" Text="Texture Quality" VerticalAlignment="Center" Margin="0 0 0 12"
|
||||
<TextBlock Grid.Row="14" Grid.Column="0" Text="Texture Quality" VerticalAlignment="Center" Margin="0 0 0 12"
|
||||
Visibility="{Binding ShowTextureQuality, Converter={StaticResource BoolToVisibilityConverter}}" />
|
||||
<Slider Grid.Row="13" Grid.Column="2" Grid.ColumnSpan="3" Minimum="1" Maximum="100" TickPlacement="None"
|
||||
<Slider Grid.Row="14" Grid.Column="2" Grid.ColumnSpan="3" Minimum="1" Maximum="100" TickPlacement="None"
|
||||
AutoToolTipPlacement="BottomRight" IsMoveToPointEnabled="True" IsSnapToTickEnabled="True" Margin="0 0 0 12"
|
||||
Value="{Binding TextureQuality, Mode=TwoWay}"
|
||||
Visibility="{Binding ShowTextureQuality, Converter={StaticResource BoolToVisibilityConverter}}" />
|
||||
|
||||
<TextBlock x:Name="PngCompressionText" Grid.Row="13" Grid.Column="0" Text="PNG Compression" VerticalAlignment="Center" Margin="0 0 0 12"
|
||||
<TextBlock x:Name="PngCompressionText" Grid.Row="14" Grid.Column="0" Text="PNG Compression" VerticalAlignment="Center" Margin="0 0 0 12"
|
||||
ToolTip="Lossless compression. Level 3 is recommended for speed."
|
||||
Visibility="{Binding ShowPngCompression, Converter={StaticResource BoolToVisibilityConverter}}" />
|
||||
<Grid Grid.Row="13" Grid.Column="2" Grid.ColumnSpan="3" Margin="0 0 0 12"
|
||||
<Grid Grid.Row="14" Grid.Column="2" Grid.ColumnSpan="3" Margin="0 0 0 12"
|
||||
ToolTip="{Binding ToolTip, ElementName=PngCompressionText}"
|
||||
Visibility="{Binding ShowPngCompression, Converter={StaticResource BoolToVisibilityConverter}}">
|
||||
<Grid.ColumnDefinitions>
|
||||
@@ -239,37 +266,37 @@
|
||||
<TextBlock Grid.Column="1" Text="{Binding PngCompressionLevel}" VerticalAlignment="Center" Margin="8 0 0 0" />
|
||||
</Grid>
|
||||
|
||||
<TextBlock Grid.Row="13" Grid.Column="0" Text="TGA RLE Compression" VerticalAlignment="Center" Margin="0 0 0 12"
|
||||
<TextBlock Grid.Row="14" Grid.Column="0" Text="TGA RLE Compression" VerticalAlignment="Center" Margin="0 0 0 12"
|
||||
ToolTip="Lossless compression of repeated pixels. File size depends on the image."
|
||||
Visibility="{Binding ShowTgaCompression, Converter={StaticResource BoolToVisibilityConverter}}" />
|
||||
<CheckBox Grid.Row="13" Grid.Column="2" Grid.ColumnSpan="3" Margin="0 0 0 12"
|
||||
<CheckBox Grid.Row="14" Grid.Column="2" Grid.ColumnSpan="3" Margin="0 0 0 12"
|
||||
IsChecked="{Binding TgaRleCompression, Mode=TwoWay}"
|
||||
Content="{Binding IsChecked, RelativeSource={RelativeSource Self}, Converter={x:Static converters:BoolToToggleConverter.Instance}}"
|
||||
Style="{DynamicResource {x:Static adonisUi:Styles.ToggleSwitch}}"
|
||||
Visibility="{Binding ShowTgaCompression, Converter={StaticResource BoolToVisibilityConverter}}" />
|
||||
|
||||
<TextBlock Grid.Row="14" Grid.Column="0" Text="Save HDR as .hdr" VerticalAlignment="Center" Margin="0 0 0 12" />
|
||||
<CheckBox Grid.Row="14" Grid.Column="2" Grid.ColumnSpan="3"
|
||||
<TextBlock Grid.Row="15" Grid.Column="0" Text="Save HDR as .hdr" VerticalAlignment="Center" Margin="0 0 0 12" />
|
||||
<CheckBox Grid.Row="15" Grid.Column="2" Grid.ColumnSpan="3"
|
||||
IsChecked="{Binding ExportHdrTexturesAsHdr, Mode=TwoWay}"
|
||||
Content="{Binding IsChecked, RelativeSource={RelativeSource Self}, Converter={x:Static converters:BoolToToggleConverter.Instance}}"
|
||||
Style="{DynamicResource {x:Static adonisUi:Styles.ToggleSwitch}}"
|
||||
Margin="0 0 0 12" />
|
||||
|
||||
<TextBlock Grid.Row="15"
|
||||
<TextBlock Grid.Row="16"
|
||||
Grid.Column="0"
|
||||
Text="Export All Mips"
|
||||
VerticalAlignment="Center" />
|
||||
<CheckBox Grid.Row="15"
|
||||
<CheckBox Grid.Row="16"
|
||||
Grid.Column="2"
|
||||
Grid.ColumnSpan="3"
|
||||
IsChecked="{Binding ExportAllTextureMips, Mode=TwoWay}"
|
||||
Content="{Binding IsChecked, RelativeSource={RelativeSource Self}, Converter={x:Static converters:BoolToToggleConverter.Instance}}"
|
||||
Style="{DynamicResource {x:Static adonisUi:Styles.ToggleSwitch}}" />
|
||||
|
||||
<Separator Grid.Row="16" Grid.Column="0" Grid.ColumnSpan="5" Style="{StaticResource CustomSeparator}" Tag="MATERIAL & MORPH" Margin="0 10 0 10" />
|
||||
<Separator Grid.Row="17" Grid.Column="0" Grid.ColumnSpan="5" Style="{StaticResource CustomSeparator}" Tag="MATERIAL & MORPH" Margin="0 10 0 10" />
|
||||
|
||||
<TextBlock Grid.Row="17" Grid.Column="0" Text="Material Depth" VerticalAlignment="Center" Margin="0 0 0 12" />
|
||||
<ComboBox Grid.Row="17" Grid.Column="2" Grid.ColumnSpan="3" Margin="0 0 0 12"
|
||||
<TextBlock Grid.Row="18" Grid.Column="0" Text="Material Depth" VerticalAlignment="Center" Margin="0 0 0 12" />
|
||||
<ComboBox Grid.Row="18" Grid.Column="2" Grid.ColumnSpan="3" Margin="0 0 0 12"
|
||||
ItemsSource="{Binding MaterialDepths}"
|
||||
SelectedItem="{Binding SelectedMaterialDepth, Mode=TwoWay}">
|
||||
<ComboBox.ItemTemplate>
|
||||
@@ -279,9 +306,9 @@
|
||||
</ComboBox.ItemTemplate>
|
||||
</ComboBox>
|
||||
|
||||
<TextBlock Grid.Row="18" Grid.Column="0" Text="Auto-Export Attached Materials" VerticalAlignment="Center" Margin="0 0 0 15"
|
||||
<TextBlock Grid.Row="19" Grid.Column="0" Text="Auto-Export Attached Materials" VerticalAlignment="Center" Margin="0 0 0 15"
|
||||
ToolTip="When exporting a mesh, also find and export its attached materials." />
|
||||
<Grid Grid.Row="18" Grid.Column="2" Grid.ColumnSpan="3" Margin="0 0 0 15">
|
||||
<Grid Grid.Row="19" Grid.Column="2" Grid.ColumnSpan="3" Margin="0 0 0 15">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
@@ -296,8 +323,8 @@
|
||||
Text="For geometry-only exports, it can be significantly faster to disable this option." />
|
||||
</Grid>
|
||||
|
||||
<TextBlock Grid.Row="19" Grid.Column="0" Text="Export Morph Targets" VerticalAlignment="Center" Margin="0 0 0 15" />
|
||||
<CheckBox Grid.Row="19" Grid.Column="2" Grid.ColumnSpan="3" Margin="0 0 0 15"
|
||||
<TextBlock Grid.Row="20" Grid.Column="0" Text="Export Morph Targets" VerticalAlignment="Center" Margin="0 0 0 15" />
|
||||
<CheckBox Grid.Row="20" Grid.Column="2" Grid.ColumnSpan="3" Margin="0 0 0 15"
|
||||
IsChecked="{Binding ExportMorphTargets, Mode=TwoWay}"
|
||||
Content="{Binding IsChecked, RelativeSource={RelativeSource Self}, Converter={x:Static converters:BoolToToggleConverter.Instance}}"
|
||||
Style="{DynamicResource {x:Static adonisUi:Styles.ToggleSwitch}}" />
|
||||
|
||||
2
Snooper
2
Snooper
Submodule Snooper updated: 9d44219c9f...526a2be78d
Reference in New Issue
Block a user