Skip to content

Commit

Permalink
Fortnite InstalledBundles
Browse files Browse the repository at this point in the history
  • Loading branch information
MinshuG committed Apr 30, 2022
1 parent e2523b4 commit b319d9d
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 3 deletions.
16 changes: 15 additions & 1 deletion FModel/ViewModels/CUE4ParseViewModel.cs
Expand Up @@ -118,6 +118,13 @@ public CUE4ParseViewModel(string gameDirectory)
SearchOption.AllDirectories, true, versions);
break;
}
case FGame.FortniteGame:
Provider = new DefaultFileProvider(new DirectoryInfo(gameDirectory), new List<DirectoryInfo>
{
new(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData) + "\\FortniteGame\\Saved\\PersistentDownloadDir\\InstalledBundles"),
},
SearchOption.AllDirectories, true, versions);
break;
case FGame.Unknown when UserSettings.Default.ManualGames.TryGetValue(gameDirectory, out var settings):
{
versions = new VersionContainer(settings.OverridedGame, UserSettings.Default.OverridedPlatform,
Expand Down Expand Up @@ -769,7 +776,14 @@ private void SaveAndPlaySound(string fullPath, string ext, byte[] data)

private void SaveExport(UObject export)
{
var toSave = new Exporter(export, UserSettings.Default.TextureExportFormat, UserSettings.Default.LodExportFormat, UserSettings.Default.MeshExportFormat, UserSettings.Default.OverridedPlatform);
var exportOptions = new ExporterOptions()
{
TextureFormat = UserSettings.Default.TextureExportFormat,
LodFormat = UserSettings.Default.LodExportFormat,
MeshFormat = UserSettings.Default.MeshExportFormat,
Platform = UserSettings.Default.OverridedPlatform
};
var toSave = new Exporter(export, exportOptions);
var toSaveDirectory = new DirectoryInfo(UserSettings.Default.ModelDirectory);
if (toSave.TryWriteToDir(toSaveDirectory, out var savedFileName))
{
Expand Down
9 changes: 8 additions & 1 deletion FModel/ViewModels/ModelViewerViewModel.cs
Expand Up @@ -184,9 +184,16 @@ public async Task SaveLoadedModels()

await _threadWorkerView.Begin(_ =>
{
var exportOptions = new CUE4Parse_Conversion.ExporterOptions()
{
TextureFormat = UserSettings.Default.TextureExportFormat,
LodFormat = UserSettings.Default.LodExportFormat,
MeshFormat = UserSettings.Default.MeshExportFormat,
Platform = UserSettings.Default.OverridedPlatform
};
foreach (var model in _loadedModels)
{
var toSave = new CUE4Parse_Conversion.Exporter(model.Export, UserSettings.Default.TextureExportFormat, UserSettings.Default.LodExportFormat, UserSettings.Default.MeshExportFormat, UserSettings.Default.OverridedPlatform);
var toSave = new CUE4Parse_Conversion.Exporter(model.Export, exportOptions);
if (toSave.TryWriteToDir(new DirectoryInfo(folderBrowser.SelectedPath), out var savedFileName))
{
Log.Information("Successfully saved {FileName}", savedFileName);
Expand Down

0 comments on commit b319d9d

Please sign in to comment.