mirror of
https://github.com/4sval/FModel.git
synced 2026-03-22 01:34:37 -05:00
just getting rid of some output folders
This commit is contained in:
parent
fdfaddaa66
commit
f0caf246b5
|
|
@ -46,14 +46,11 @@ namespace FModel
|
|||
if (!Directory.Exists(UserSettings.Default.OutputDirectory))
|
||||
UserSettings.Default.OutputDirectory = Path.Combine(Directory.GetCurrentDirectory(), "Output");
|
||||
if (!Directory.Exists(UserSettings.Default.ModelDirectory))
|
||||
UserSettings.Default.ModelDirectory = Path.Combine(UserSettings.Default.OutputDirectory, "Saves");
|
||||
UserSettings.Default.ModelDirectory = Path.Combine(UserSettings.Default.OutputDirectory, "Exports");
|
||||
|
||||
Directory.CreateDirectory(Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "FModel"));
|
||||
Directory.CreateDirectory(Path.Combine(UserSettings.Default.OutputDirectory, "Backups"));
|
||||
Directory.CreateDirectory(Path.Combine(UserSettings.Default.OutputDirectory, "Exports"));
|
||||
Directory.CreateDirectory(Path.Combine(UserSettings.Default.OutputDirectory, "Saves"));
|
||||
Directory.CreateDirectory(Path.Combine(UserSettings.Default.OutputDirectory, "Textures"));
|
||||
Directory.CreateDirectory(Path.Combine(UserSettings.Default.OutputDirectory, "Sounds"));
|
||||
Directory.CreateDirectory(Path.Combine(UserSettings.Default.OutputDirectory, "Logs"));
|
||||
Directory.CreateDirectory(Path.Combine(UserSettings.Default.OutputDirectory, ".data"));
|
||||
|
||||
|
|
|
|||
|
|
@ -307,7 +307,7 @@ namespace FModel.ViewModels
|
|||
{
|
||||
Title = "Save Audio",
|
||||
FileName = fileToSave.FileName,
|
||||
InitialDirectory = Path.Combine(UserSettings.Default.OutputDirectory, "Sounds")
|
||||
InitialDirectory = Path.Combine(UserSettings.Default.OutputDirectory, "Exports")
|
||||
};
|
||||
if (!(bool) saveFileDialog.ShowDialog()) return;
|
||||
path = saveFileDialog.FileName;
|
||||
|
|
@ -580,4 +580,4 @@ namespace FModel.ViewModels
|
|||
return vgmProcess?.ExitCode == 0 && File.Exists(wavFilePath);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -730,7 +730,7 @@ namespace FModel.ViewModels
|
|||
|
||||
private void SaveAndPlaySound(string fullPath, string ext, byte[] data)
|
||||
{
|
||||
var userDir = Path.Combine(UserSettings.Default.OutputDirectory, "Sounds");
|
||||
var userDir = Path.Combine(UserSettings.Default.OutputDirectory, "Exports");
|
||||
if (fullPath.StartsWith("/")) fullPath = fullPath[1..];
|
||||
var savedAudioPath = Path.Combine(userDir,
|
||||
UserSettings.Default.KeepDirectoryStructure ? fullPath : fullPath.SubstringAfterLast('/')).Replace('\\', '/') + $".{ext.ToLower()}";
|
||||
|
|
|
|||
|
|
@ -187,7 +187,7 @@ namespace FModel.ViewModels
|
|||
public void SaveProperty(bool autoSave)
|
||||
{
|
||||
var fileName = Path.ChangeExtension(Header, ".json");
|
||||
var directory = Path.Combine(UserSettings.Default.OutputDirectory, "Saves",
|
||||
var directory = Path.Combine(UserSettings.Default.OutputDirectory, "Exports",
|
||||
UserSettings.Default.KeepDirectoryStructure ? Directory : "", fileName).Replace('\\', '/');
|
||||
|
||||
if (!autoSave)
|
||||
|
|
@ -196,7 +196,7 @@ namespace FModel.ViewModels
|
|||
{
|
||||
Title = "Save Property",
|
||||
FileName = fileName,
|
||||
InitialDirectory = Path.Combine(UserSettings.Default.OutputDirectory, "Saves"),
|
||||
InitialDirectory = Path.Combine(UserSettings.Default.OutputDirectory, "Exports"),
|
||||
Filter = "JSON Files (*.json)|*.json|INI Files (*.ini)|*.ini|XML Files (*.xml)|*.xml|All Files (*.*)|*.*"
|
||||
};
|
||||
var result = saveFileDialog.ShowDialog();
|
||||
|
|
@ -236,7 +236,7 @@ namespace FModel.ViewModels
|
|||
{
|
||||
if (!HasImage) return;
|
||||
var fileName = Path.ChangeExtension(Header, ".png");
|
||||
var directory = Path.Combine(UserSettings.Default.OutputDirectory, "Textures",
|
||||
var directory = Path.Combine(UserSettings.Default.OutputDirectory, "Exports",
|
||||
UserSettings.Default.KeepDirectoryStructure ? Directory : "", fileName!).Replace('\\', '/');
|
||||
|
||||
if (!autoSave)
|
||||
|
|
@ -245,7 +245,7 @@ namespace FModel.ViewModels
|
|||
{
|
||||
Title = "Save Texture",
|
||||
FileName = fileName,
|
||||
InitialDirectory = Path.Combine(UserSettings.Default.OutputDirectory, "Textures"),
|
||||
InitialDirectory = Path.Combine(UserSettings.Default.OutputDirectory, "Exports"),
|
||||
Filter = "PNG Files (*.png)|*.png|All Files (*.*)|*.*"
|
||||
};
|
||||
var result = saveFileDialog.ShowDialog();
|
||||
|
|
|
|||
|
|
@ -53,13 +53,13 @@ namespace FModel.Views
|
|||
{
|
||||
if (e.OriginalSource is TextBox)
|
||||
return;
|
||||
|
||||
|
||||
if (UserSettings.Default.AddAudio.IsTriggered(e.Key))
|
||||
{
|
||||
var openFileDialog = new OpenFileDialog
|
||||
{
|
||||
Title = "Select an audio file",
|
||||
InitialDirectory = Path.Combine(UserSettings.Default.OutputDirectory, "Sounds"),
|
||||
InitialDirectory = Path.Combine(UserSettings.Default.OutputDirectory, "Exports"),
|
||||
Filter = "OGG Files (*.ogg)|*.ogg|WAV Files (*.wav)|*.wav|WEM Files (*.wem)|*.wem|ADPCM Files (*.adpcm)|*.adpcm|All Files (*.*)|*.*",
|
||||
Multiselect = true
|
||||
};
|
||||
|
|
@ -82,7 +82,7 @@ namespace FModel.Views
|
|||
{
|
||||
_applicationView.AudioPlayer.PlayPauseOnForce();
|
||||
}
|
||||
|
||||
|
||||
private void OnFilterTextChanged(object sender, TextChangedEventArgs e)
|
||||
{
|
||||
if (sender is not TextBox textBox)
|
||||
|
|
@ -95,4 +95,4 @@ namespace FModel.Views
|
|||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ namespace FModel.Views
|
|||
private void OnClick(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (_applicationView.MapViewer.MapImage == null) return;
|
||||
var path = Path.Combine(UserSettings.Default.OutputDirectory, "Textures", "MiniMap.png");
|
||||
var path = Path.Combine(UserSettings.Default.OutputDirectory, "Exports", "MiniMap.png");
|
||||
|
||||
var saveFileDialog = new SaveFileDialog
|
||||
{
|
||||
|
|
@ -61,7 +61,7 @@ namespace FModel.Views
|
|||
FLogger.AppendText("Could not save 'MiniMap.png'", Constants.WHITE, true);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void OnSelectedItemChanged(object sender, RoutedPropertyChangedEventArgs<object> e)
|
||||
{
|
||||
var i = 0;
|
||||
|
|
@ -72,10 +72,10 @@ namespace FModel.Views
|
|||
i++;
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
_applicationView.MapViewer.MapIndex = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ namespace FModel.Views
|
|||
{
|
||||
public partial class SearchView
|
||||
{
|
||||
private ThreadWorkerViewModel _threadWorkerView => ApplicationService.ThreadWorkerView;
|
||||
private ApplicationViewModel _applicationView => ApplicationService.ApplicationView;
|
||||
|
||||
public SearchView()
|
||||
|
|
@ -57,8 +58,7 @@ namespace FModel.Views
|
|||
return;
|
||||
|
||||
WindowState = WindowState.Minimized;
|
||||
await ApplicationService.ThreadWorkerView.Begin(_ =>
|
||||
_applicationView.CUE4Parse.Extract(assetItem.FullPath, true));
|
||||
await _threadWorkerView.Begin(_ => _applicationView.CUE4Parse.Extract(assetItem.FullPath, true));
|
||||
|
||||
MainWindow.YesWeCats.Activate();
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user