mirror of
https://github.com/4sval/FModel.git
synced 2026-04-01 14:45:45 -05:00
improved model settings close #222
This commit is contained in:
parent
66c8672ace
commit
7f14a5ca05
|
|
@ -102,10 +102,19 @@ namespace FModel.Creator.Bases.FN
|
|||
if (!bShort) return base.GetCosmeticSeason(seasonNumber);
|
||||
var s = seasonNumber["Cosmetics.Filter.Season.".Length..];
|
||||
var number = int.Parse(s);
|
||||
if (number == 10)
|
||||
s = "X";
|
||||
|
||||
return number > 10 ? $"C{number / 10 + 1} S{s[^1..]}" : $"C1 S{s}";
|
||||
switch (number)
|
||||
{
|
||||
case 10:
|
||||
s = "X";
|
||||
break;
|
||||
case > 18:
|
||||
number += 2;
|
||||
s = number.ToString();
|
||||
break;
|
||||
}
|
||||
|
||||
return $"C{number / 10 + 1} S{s[^1..]}";
|
||||
}
|
||||
|
||||
private new void DrawBackground(SKCanvas c)
|
||||
|
|
|
|||
|
|
@ -162,9 +162,6 @@
|
|||
<MenuItem Header="Open Sounds" IsCheckable="True" StaysOpenOnClick="True"
|
||||
InputGestureText="{Binding AutoOpenSounds, Source={x:Static local:Settings.UserSettings.Default}}"
|
||||
IsChecked="{Binding IsAutoOpenSounds, Source={x:Static local:Settings.UserSettings.Default}}" />
|
||||
<MenuItem Header="Open Meshes" IsCheckable="True" StaysOpenOnClick="True"
|
||||
InputGestureText="{Binding AutoOpenMeshes, Source={x:Static local:Settings.UserSettings.Default}}"
|
||||
IsChecked="{Binding IsAutoOpenMeshes, Source={x:Static local:Settings.UserSettings.Default}}" />
|
||||
</MenuItem>
|
||||
</MenuItem>
|
||||
<MenuItem Header="Views">
|
||||
|
|
@ -866,19 +863,6 @@
|
|||
</StatusBarItem.Style>
|
||||
<TextBlock HorizontalAlignment="Center" FontWeight="SemiBold" Text="SND" />
|
||||
</StatusBarItem>
|
||||
|
||||
<StatusBarItem Width="35" HorizontalContentAlignment="Stretch" ToolTip="Auto Open Meshes Enabled">
|
||||
<StatusBarItem.Style>
|
||||
<Style TargetType="StatusBarItem">
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding IsAutoOpenMeshes, Source={x:Static local:Settings.UserSettings.Default}}" Value="False">
|
||||
<Setter Property="Visibility" Value="Hidden" />
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</StatusBarItem.Style>
|
||||
<TextBlock HorizontalAlignment="Center" FontWeight="SemiBold" Text="MSH" />
|
||||
</StatusBarItem>
|
||||
</StackPanel>
|
||||
</StatusBarItem>
|
||||
</StatusBar>
|
||||
|
|
|
|||
|
|
@ -37,8 +37,6 @@ namespace FModel
|
|||
{new KeyGesture(UserSettings.Default.AutoSaveAnimations.Key, UserSettings.Default.AutoSaveAnimations.Modifiers)}), OnAutoTriggerExecuted));
|
||||
CommandBindings.Add(new CommandBinding(new RoutedCommand("AutoOpenSounds", typeof(MainWindow), new InputGestureCollection
|
||||
{new KeyGesture(UserSettings.Default.AutoOpenSounds.Key, UserSettings.Default.AutoOpenSounds.Modifiers)}), OnAutoTriggerExecuted));
|
||||
CommandBindings.Add(new CommandBinding(new RoutedCommand("AutoOpenMeshes", typeof(MainWindow), new InputGestureCollection
|
||||
{new KeyGesture(UserSettings.Default.AutoOpenMeshes.Key, UserSettings.Default.AutoOpenMeshes.Modifiers)}), OnAutoTriggerExecuted));
|
||||
CommandBindings.Add(new CommandBinding(new RoutedCommand("ReloadMappings", typeof(MainWindow), new InputGestureCollection {new KeyGesture(Key.F12)}), OnMappingsReload));
|
||||
CommandBindings.Add(new CommandBinding(ApplicationCommands.Find, (s, e) => OnOpenAvalonFinder()));
|
||||
|
||||
|
|
@ -152,9 +150,6 @@ namespace FModel
|
|||
case "AutoOpenSounds":
|
||||
UserSettings.Default.IsAutoOpenSounds = !UserSettings.Default.IsAutoOpenSounds;
|
||||
break;
|
||||
case "AutoOpenMeshes":
|
||||
UserSettings.Default.IsAutoOpenMeshes = !UserSettings.Default.IsAutoOpenMeshes;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -100,13 +100,6 @@ namespace FModel.Settings
|
|||
set => SetProperty(ref _isAutoOpenSounds, value);
|
||||
}
|
||||
|
||||
private bool _isAutoOpenMeshes = true;
|
||||
public bool IsAutoOpenMeshes
|
||||
{
|
||||
get => _isAutoOpenMeshes;
|
||||
set => SetProperty(ref _isAutoOpenMeshes, value);
|
||||
}
|
||||
|
||||
private bool _isLoggerExpanded = true;
|
||||
public bool IsLoggerExpanded
|
||||
{
|
||||
|
|
@ -478,13 +471,6 @@ namespace FModel.Settings
|
|||
set => SetProperty(ref _autoOpenSounds, value);
|
||||
}
|
||||
|
||||
private Hotkey _autoOpenMeshes = new(Key.F6);
|
||||
public Hotkey AutoOpenMeshes
|
||||
{
|
||||
get => _autoOpenMeshes;
|
||||
set => SetProperty(ref _autoOpenMeshes, value);
|
||||
}
|
||||
|
||||
private Hotkey _addAudio = new(Key.N, ModifierKeys.Control);
|
||||
public Hotkey AddAudio
|
||||
{
|
||||
|
|
@ -527,11 +513,76 @@ namespace FModel.Settings
|
|||
set => SetProperty(ref _lodExportFormat, value);
|
||||
}
|
||||
|
||||
private bool _openMaterialsInModelViewer = true;
|
||||
public bool OpenMaterialsInModelViewer
|
||||
private bool _previewStaticMeshes = true;
|
||||
public bool PreviewStaticMeshes
|
||||
{
|
||||
get => _openMaterialsInModelViewer;
|
||||
set => SetProperty(ref _openMaterialsInModelViewer, value);
|
||||
get => _previewStaticMeshes;
|
||||
set
|
||||
{
|
||||
SetProperty(ref _previewStaticMeshes, value);
|
||||
if (_previewStaticMeshes && SaveStaticMeshes)
|
||||
SaveStaticMeshes = false;
|
||||
}
|
||||
}
|
||||
|
||||
private bool _previewSkeletalMeshes = true;
|
||||
public bool PreviewSkeletalMeshes
|
||||
{
|
||||
get => _previewSkeletalMeshes;
|
||||
set
|
||||
{
|
||||
SetProperty(ref _previewSkeletalMeshes, value);
|
||||
if (_previewSkeletalMeshes && SaveSkeletalMeshes)
|
||||
SaveSkeletalMeshes = false;
|
||||
}
|
||||
}
|
||||
|
||||
private bool _previewMaterials = true;
|
||||
public bool PreviewMaterials
|
||||
{
|
||||
get => _previewMaterials;
|
||||
set
|
||||
{
|
||||
SetProperty(ref _previewMaterials, value);
|
||||
if (_previewMaterials && SaveMaterials)
|
||||
SaveMaterials = false;
|
||||
}
|
||||
}
|
||||
|
||||
private bool _saveStaticMeshes;
|
||||
public bool SaveStaticMeshes
|
||||
{
|
||||
get => _saveStaticMeshes;
|
||||
set
|
||||
{
|
||||
SetProperty(ref _saveStaticMeshes, value);
|
||||
if (_saveStaticMeshes && PreviewStaticMeshes)
|
||||
PreviewStaticMeshes = false;
|
||||
}
|
||||
}
|
||||
|
||||
private bool _saveSkeletalMeshes;
|
||||
public bool SaveSkeletalMeshes
|
||||
{
|
||||
get => _saveSkeletalMeshes;
|
||||
set
|
||||
{
|
||||
SetProperty(ref _saveSkeletalMeshes, value);
|
||||
if (_saveSkeletalMeshes && PreviewSkeletalMeshes)
|
||||
PreviewSkeletalMeshes = false;
|
||||
}
|
||||
}
|
||||
|
||||
private bool _saveMaterials;
|
||||
public bool SaveMaterials
|
||||
{
|
||||
get => _saveMaterials;
|
||||
set
|
||||
{
|
||||
SetProperty(ref _saveMaterials, value);
|
||||
if (_saveMaterials && PreviewMaterials)
|
||||
PreviewMaterials = false;
|
||||
}
|
||||
}
|
||||
|
||||
private bool _saveSkeletonAsMesh;
|
||||
|
|
|
|||
|
|
@ -670,9 +670,9 @@ namespace FModel.ViewModels
|
|||
SaveAndPlaySound(Path.Combine(TabControl.SelectedTab.Directory, TabControl.SelectedTab.Header.SubstringBeforeLast('.')).Replace('\\', '/'), audioFormat, data);
|
||||
return false;
|
||||
}
|
||||
case UStaticMesh when UserSettings.Default.IsAutoOpenMeshes:
|
||||
case USkeletalMesh when UserSettings.Default.IsAutoOpenMeshes:
|
||||
case UMaterialInstance when UserSettings.Default.OpenMaterialsInModelViewer && !ModelIsSwappingMaterial &&
|
||||
case UStaticMesh when UserSettings.Default.PreviewStaticMeshes:
|
||||
case USkeletalMesh when UserSettings.Default.PreviewSkeletalMeshes:
|
||||
case UMaterialInstance when UserSettings.Default.PreviewMaterials && !ModelIsSwappingMaterial &&
|
||||
!(Game == FGame.FortniteGame && export.Owner != null && (export.Owner.Name.EndsWith($"/MI_OfferImages/{export.Name}", StringComparison.OrdinalIgnoreCase) ||
|
||||
export.Owner.Name.EndsWith($"/RenderSwitch_Materials/{export.Name}", StringComparison.OrdinalIgnoreCase) ||
|
||||
export.Owner.Name.EndsWith($"/MI_BPTile/{export.Name}", StringComparison.OrdinalIgnoreCase))):
|
||||
|
|
@ -693,6 +693,9 @@ namespace FModel.ViewModels
|
|||
});
|
||||
return true;
|
||||
}
|
||||
case UStaticMesh when UserSettings.Default.SaveStaticMeshes:
|
||||
case USkeletalMesh when UserSettings.Default.SaveSkeletalMeshes:
|
||||
case UMaterialInstance when UserSettings.Default.SaveMaterials:
|
||||
case USkeleton when UserSettings.Default.SaveSkeletonAsMesh:
|
||||
case UAnimSequence when UserSettings.Default.IsAutoSaveAnimations:
|
||||
{
|
||||
|
|
|
|||
|
|
@ -236,6 +236,7 @@
|
|||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
|
|
@ -263,20 +264,35 @@
|
|||
</ComboBox.ItemTemplate>
|
||||
</ComboBox>
|
||||
|
||||
<TextBlock Grid.Row="2" Grid.Column="0" Text="Open Materials in Model Viewer" VerticalAlignment="Center" Margin="0 2.5 0 5" />
|
||||
<CheckBox Grid.Row="2" Grid.Column="2" Content="{Binding IsChecked, RelativeSource={RelativeSource Self}, Converter={x:Static converters:BoolToToggleConverter.Instance}}"
|
||||
IsChecked="{Binding OpenMaterialsInModelViewer, Source={x:Static local:Settings.UserSettings.Default}, Mode=TwoWay}"
|
||||
Style="{DynamicResource {x:Static adonisUi:Styles.ToggleSwitch}}" Margin="0 5 0 5"/>
|
||||
<TextBlock Grid.Row="2" Grid.Column="0" Text="Preview in Model Viewer" VerticalAlignment="Center" Margin="0 0 0 5" />
|
||||
<UniformGrid Grid.Row="2" Grid.Column="2" HorizontalAlignment="Stretch" Rows="1" Columns="3" Margin="0 5 0 5">
|
||||
<CheckBox Content="Static Meshes" HorizontalAlignment="Left"
|
||||
IsChecked="{Binding PreviewStaticMeshes, Source={x:Static local:Settings.UserSettings.Default}, Mode=TwoWay}"/>
|
||||
<CheckBox Content="Skeletal Meshes" HorizontalAlignment="Center"
|
||||
IsChecked="{Binding PreviewSkeletalMeshes, Source={x:Static local:Settings.UserSettings.Default}, Mode=TwoWay}"/>
|
||||
<CheckBox Content="Materials" HorizontalAlignment="Right"
|
||||
IsChecked="{Binding PreviewMaterials, Source={x:Static local:Settings.UserSettings.Default}, Mode=TwoWay}"/>
|
||||
</UniformGrid>
|
||||
|
||||
<TextBlock Grid.Row="3" Grid.Column="0" Text="Save Skeletons as Empty Meshes" VerticalAlignment="Center" Margin="0 0 0 5" />
|
||||
<CheckBox Grid.Row="3" Grid.Column="2" Content="{Binding IsChecked, RelativeSource={RelativeSource Self}, Converter={x:Static converters:BoolToToggleConverter.Instance}}"
|
||||
<TextBlock Grid.Row="3" Grid.Column="0" Text="Auto-Save without Previewing" VerticalAlignment="Center" Margin="0 0 0 5" />
|
||||
<UniformGrid Grid.Row="3" Grid.Column="2" HorizontalAlignment="Stretch" Rows="1" Columns="3" Margin="0 5 0 5">
|
||||
<CheckBox Content="Static Meshes" HorizontalAlignment="Left"
|
||||
IsChecked="{Binding SaveStaticMeshes, Source={x:Static local:Settings.UserSettings.Default}, Mode=TwoWay}" />
|
||||
<CheckBox Content="Skeletal Meshes" HorizontalAlignment="Center"
|
||||
IsChecked="{Binding SaveSkeletalMeshes, Source={x:Static local:Settings.UserSettings.Default}, Mode=TwoWay}"/>
|
||||
<CheckBox Content="Materials" HorizontalAlignment="Right"
|
||||
IsChecked="{Binding SaveMaterials, Source={x:Static local:Settings.UserSettings.Default}, Mode=TwoWay}"/>
|
||||
</UniformGrid>
|
||||
|
||||
<TextBlock Grid.Row="4" Grid.Column="0" Text="Save Skeletons as Empty Meshes" VerticalAlignment="Center" Margin="0 0 0 5" />
|
||||
<CheckBox Grid.Row="4" Grid.Column="2" Content="{Binding IsChecked, RelativeSource={RelativeSource Self}, Converter={x:Static converters:BoolToToggleConverter.Instance}}"
|
||||
IsChecked="{Binding SaveSkeletonAsMesh, Source={x:Static local:Settings.UserSettings.Default}, Mode=TwoWay}"
|
||||
Style="{DynamicResource {x:Static adonisUi:Styles.ToggleSwitch}}" Margin="0 5 0 10"/>
|
||||
|
||||
<Separator Grid.Row="4" Grid.Column="0" Grid.ColumnSpan="3" Style="{StaticResource CustomSeparator}" />
|
||||
<Separator Grid.Row="5" Grid.Column="0" Grid.ColumnSpan="3" Style="{StaticResource CustomSeparator}" />
|
||||
|
||||
<TextBlock Grid.Row="5" Grid.Column="0" Text="Texture Format" VerticalAlignment="Center" Margin="0 0 0 5" />
|
||||
<ComboBox Grid.Row="5" Grid.Column="2" ItemsSource="{Binding SettingsView.TextureExportFormats}" SelectedItem="{Binding SettingsView.SelectedTextureExportFormat, Mode=TwoWay}"
|
||||
<TextBlock Grid.Row="6" Grid.Column="0" Text="Texture Format" VerticalAlignment="Center" Margin="0 0 0 5" />
|
||||
<ComboBox Grid.Row="6" Grid.Column="2" ItemsSource="{Binding SettingsView.TextureExportFormats}" SelectedItem="{Binding SettingsView.SelectedTextureExportFormat, Mode=TwoWay}"
|
||||
DataContext="{Binding DataContext, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type local:Views.SettingsView}}}" Margin="0 0 0 5">
|
||||
<ComboBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
|
|
@ -307,7 +323,6 @@
|
|||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
|
|
@ -354,23 +369,20 @@
|
|||
<TextBlock Grid.Row="12" Grid.Column="0" Text="Auto Open Sounds *" VerticalAlignment="Center" Margin="0 0 0 5" />
|
||||
<controls:HotkeyTextBox Grid.Row="12" Grid.Column="2" Style="{StaticResource TextBoxDefaultStyle}" Margin="0 0 0 5"
|
||||
HotKey="{Binding AutoOpenSounds, Source={x:Static local:Settings.UserSettings.Default}, Mode=TwoWay}" />
|
||||
<TextBlock Grid.Row="13" Grid.Column="0" Text="Auto Open Meshes *" VerticalAlignment="Center" />
|
||||
<controls:HotkeyTextBox Grid.Row="13" Grid.Column="2" Style="{StaticResource TextBoxDefaultStyle}"
|
||||
HotKey="{Binding AutoOpenMeshes, Source={x:Static local:Settings.UserSettings.Default}, Mode=TwoWay}" />
|
||||
|
||||
<Separator Grid.Row="14" Grid.Column="0" Grid.ColumnSpan="3" Style="{StaticResource CustomSeparator}" />
|
||||
<Separator Grid.Row="13" Grid.Column="0" Grid.ColumnSpan="3" Style="{StaticResource CustomSeparator}" />
|
||||
|
||||
<TextBlock Grid.Row="15" Grid.Column="0" Text="Add Audio File" VerticalAlignment="Center" Margin="0 0 0 5" />
|
||||
<controls:HotkeyTextBox Grid.Row="15" Grid.Column="2" Style="{StaticResource TextBoxDefaultStyle}" Margin="0 0 0 5"
|
||||
<TextBlock Grid.Row="14" Grid.Column="0" Text="Add Audio File" VerticalAlignment="Center" Margin="0 0 0 5" />
|
||||
<controls:HotkeyTextBox Grid.Row="14" Grid.Column="2" Style="{StaticResource TextBoxDefaultStyle}" Margin="0 0 0 5"
|
||||
HotKey="{Binding AddAudio, Source={x:Static local:Settings.UserSettings.Default}, Mode=TwoWay}" />
|
||||
<TextBlock Grid.Row="16" Grid.Column="0" Text="Play / Pause Current Audio" VerticalAlignment="Center" Margin="0 0 0 5" />
|
||||
<controls:HotkeyTextBox Grid.Row="16" Grid.Column="2" Style="{StaticResource TextBoxDefaultStyle}" Margin="0 0 0 5"
|
||||
<TextBlock Grid.Row="15" Grid.Column="0" Text="Play / Pause Current Audio" VerticalAlignment="Center" Margin="0 0 0 5" />
|
||||
<controls:HotkeyTextBox Grid.Row="15" Grid.Column="2" Style="{StaticResource TextBoxDefaultStyle}" Margin="0 0 0 5"
|
||||
HotKey="{Binding PlayPauseAudio, Source={x:Static local:Settings.UserSettings.Default}, Mode=TwoWay}" />
|
||||
<TextBlock Grid.Row="17" Grid.Column="0" Text="Previous Audio" VerticalAlignment="Center" Margin="0 0 0 5" />
|
||||
<controls:HotkeyTextBox Grid.Row="17" Grid.Column="2" Style="{StaticResource TextBoxDefaultStyle}" Margin="0 0 0 5"
|
||||
<TextBlock Grid.Row="16" Grid.Column="0" Text="Previous Audio" VerticalAlignment="Center" Margin="0 0 0 5" />
|
||||
<controls:HotkeyTextBox Grid.Row="16" Grid.Column="2" Style="{StaticResource TextBoxDefaultStyle}" Margin="0 0 0 5"
|
||||
HotKey="{Binding PreviousAudio, Source={x:Static local:Settings.UserSettings.Default}, Mode=TwoWay}" />
|
||||
<TextBlock Grid.Row="18" Grid.Column="0" Text="Next Audio" VerticalAlignment="Center" Margin="0 0 0 5" />
|
||||
<controls:HotkeyTextBox Grid.Row="18" Grid.Column="2" Style="{StaticResource TextBoxDefaultStyle}" Margin="0 0 0 5"
|
||||
<TextBlock Grid.Row="17" Grid.Column="0" Text="Next Audio" VerticalAlignment="Center" Margin="0 0 0 5" />
|
||||
<controls:HotkeyTextBox Grid.Row="17" Grid.Column="2" Style="{StaticResource TextBoxDefaultStyle}" Margin="0 0 0 5"
|
||||
HotKey="{Binding NextAudio, Source={x:Static local:Settings.UserSettings.Default}, Mode=TwoWay}" />
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user