mirror of
https://github.com/4sval/FModel.git
synced 2026-08-06 03:03:04 -05:00
Option to export all mips
This commit is contained in:
parent
d812d688fa
commit
ef7492fbd7
|
|
@ -1 +1 @@
|
|||
Subproject commit fe7db2d0f06ee33df69d49b5566a1bc00ce33db2
|
||||
Subproject commit d1c7083f32c1a6bf9aa4b2b25e9fd3a6cd53073f
|
||||
File diff suppressed because it is too large
Load Diff
|
|
@ -1275,7 +1275,16 @@ public class CUE4ParseViewModel : ViewModel
|
|||
}
|
||||
case UTexture when (isNone || saveTextures) && pointer.Object.Value is UTexture texture:
|
||||
{
|
||||
TabControl.SelectedTab.AddImage(texture, saveTextures, updateUi);
|
||||
if (saveTextures)
|
||||
{
|
||||
SaveExport(texture);
|
||||
}
|
||||
|
||||
if (updateUi)
|
||||
{
|
||||
TabControl.SelectedTab.AddImage(texture, false, true);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
case USvgAsset when (isNone || saveTextures) && pointer.Object.Value is USvgAsset svgasset:
|
||||
|
|
|
|||
|
|
@ -143,6 +143,7 @@ public class ExportOptionsViewModel : ViewModel
|
|||
get;
|
||||
set => SetProperty(ref field, value);
|
||||
}
|
||||
|
||||
public int TextureQuality
|
||||
{
|
||||
get;
|
||||
|
|
@ -155,6 +156,12 @@ public class ExportOptionsViewModel : ViewModel
|
|||
set => SetProperty(ref field, value);
|
||||
}
|
||||
|
||||
public bool ExportAllTextureMips
|
||||
{
|
||||
get;
|
||||
set => SetProperty(ref field, value);
|
||||
}
|
||||
|
||||
public ExportOptionsViewModel()
|
||||
{
|
||||
ResetToUserDefaults();
|
||||
|
|
@ -175,6 +182,7 @@ public class ExportOptionsViewModel : ViewModel
|
|||
ExportHdrTexturesAsHdr = UserSettings.Default.SaveHdrTexturesAsHdr;
|
||||
ExportMorphTargets = UserSettings.Default.SaveMorphTargets;
|
||||
TextureQuality = UserSettings.Default.TextureQuality;
|
||||
ExportAllTextureMips = UserSettings.Default.ExportAllTextureMips;
|
||||
|
||||
OverrideOptions = false;
|
||||
FeedbackMessage = "Reset to defaults";
|
||||
|
|
@ -195,6 +203,7 @@ public class ExportOptionsViewModel : ViewModel
|
|||
UserSettings.Default.SaveHdrTexturesAsHdr = ExportHdrTexturesAsHdr;
|
||||
UserSettings.Default.SaveMorphTargets = ExportMorphTargets;
|
||||
UserSettings.Default.TextureQuality = TextureQuality;
|
||||
UserSettings.Default.ExportAllTextureMips = ExportAllTextureMips;
|
||||
UserSettings.Save();
|
||||
|
||||
OverrideOptions = false;
|
||||
|
|
@ -213,6 +222,7 @@ public class ExportOptionsViewModel : ViewModel
|
|||
ExportMaterials,
|
||||
ExportMorphTargets,
|
||||
SelectedSocketFormat,
|
||||
SelectedCompressionFormat
|
||||
SelectedCompressionFormat,
|
||||
ExportAllTextureMips
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
<UserControl x:Class="FModel.Views.Resources.Controls.ExportOptionsControl"
|
||||
<UserControl x:Class="FModel.Views.Resources.Controls.ExportOptionsControl"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
|
|
@ -30,6 +30,7 @@
|
|||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
|
|
@ -142,7 +143,7 @@
|
|||
</ComboBox.ItemTemplate>
|
||||
</ComboBox>
|
||||
|
||||
<Border Grid.Row="8" Grid.Column="0" Grid.ColumnSpan="5" Margin="0 0 0 5" CornerRadius="1"
|
||||
<Border Grid.Row="8" 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>
|
||||
|
|
@ -203,16 +204,28 @@
|
|||
AutoToolTipPlacement="BottomRight" IsMoveToPointEnabled="True" IsSnapToTickEnabled="True" Margin="0 0 0 12"
|
||||
Value="{Binding TextureQuality, Mode=TwoWay}" />
|
||||
|
||||
<TextBlock Grid.Row="13" Grid.Column="0" Text="Save HDR as .hdr" VerticalAlignment="Center" />
|
||||
<TextBlock Grid.Row="13" Grid.Column="0" Text="Save HDR as .hdr" VerticalAlignment="Center" Margin="0 0 0 12" />
|
||||
<CheckBox Grid.Row="13" 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="14"
|
||||
Grid.Column="0"
|
||||
Text="Export all texture mips"
|
||||
VerticalAlignment="Center" />
|
||||
<CheckBox Grid.Row="14"
|
||||
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="14" Grid.Column="0" Grid.ColumnSpan="5" Style="{StaticResource CustomSeparator}" Tag="MATERIAL & MORPH" Margin="0 10 0 10" />
|
||||
<Separator Grid.Row="15" Grid.Column="0" Grid.ColumnSpan="5" Style="{StaticResource CustomSeparator}" Tag="MATERIAL & MORPH" Margin="0 10 0 10" />
|
||||
|
||||
<TextBlock Grid.Row="15" Grid.Column="0" Text="Material Depth" VerticalAlignment="Center" Margin="0 0 0 12" />
|
||||
<ComboBox Grid.Row="15" Grid.Column="2" Grid.ColumnSpan="3" Margin="0 0 0 12"
|
||||
<TextBlock Grid.Row="16" Grid.Column="0" Text="Material Depth" VerticalAlignment="Center" Margin="0 0 0 12" />
|
||||
<ComboBox Grid.Row="16" Grid.Column="2" Grid.ColumnSpan="3" Margin="0 0 0 12"
|
||||
ItemsSource="{Binding MaterialDepths}"
|
||||
SelectedItem="{Binding SelectedMaterialDepth, Mode=TwoWay}">
|
||||
<ComboBox.ItemTemplate>
|
||||
|
|
@ -222,9 +235,9 @@
|
|||
</ComboBox.ItemTemplate>
|
||||
</ComboBox>
|
||||
|
||||
<TextBlock Grid.Row="16" Grid.Column="0" Text="Auto-Export Attached Materials" VerticalAlignment="Center" Margin="0 0 0 15"
|
||||
<TextBlock Grid.Row="17" 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="16" Grid.Column="2" Grid.ColumnSpan="3" Margin="0 0 0 15">
|
||||
<Grid Grid.Row="17" Grid.Column="2" Grid.ColumnSpan="3" Margin="0 0 0 15">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
|
|
@ -239,8 +252,8 @@
|
|||
Text="For geometry-only exports, it can be significantly faster to disable this option." />
|
||||
</Grid>
|
||||
|
||||
<TextBlock Grid.Row="17" Grid.Column="0" Text="Export Morph Targets" VerticalAlignment="Center" Margin="0 0 0 15" />
|
||||
<CheckBox Grid.Row="17" Grid.Column="2" Grid.ColumnSpan="3" Margin="0 0 0 15"
|
||||
<TextBlock Grid.Row="18" Grid.Column="0" Text="Export Morph Targets" VerticalAlignment="Center" Margin="0 0 0 15" />
|
||||
<CheckBox Grid.Row="18" 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}}" />
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user