diff --git a/FModel/FModel.csproj b/FModel/FModel.csproj
index be042452..145ff39c 100644
--- a/FModel/FModel.csproj
+++ b/FModel/FModel.csproj
@@ -152,7 +152,7 @@
-
+
diff --git a/FModel/ViewModels/CUE4ParseViewModel.cs b/FModel/ViewModels/CUE4ParseViewModel.cs
index 23c1c7a3..623d48e2 100644
--- a/FModel/ViewModels/CUE4ParseViewModel.cs
+++ b/FModel/ViewModels/CUE4ParseViewModel.cs
@@ -847,7 +847,7 @@ public class CUE4ParseViewModel : ViewModel
case UAnimMontage when HasFlag(bulk, EBulkType.Animations):
case UAnimComposite when HasFlag(bulk, EBulkType.Animations):
{
- SaveExport(export, HasFlag(bulk, EBulkType.Auto));
+ SaveExport(export, updateUi);
return true;
}
default:
@@ -893,29 +893,21 @@ public class CUE4ParseViewModel : ViewModel
});
}
- private void SaveExport(UObject export, bool auto)
+ private void SaveExport(UObject export, bool updateUi = true)
{
var toSave = new Exporter(export, UserSettings.Default.ExportOptions);
-
- string dir;
- if (!auto)
- {
- var folderBrowser = new VistaFolderBrowserDialog();
- if (folderBrowser.ShowDialog() == true)
- dir = folderBrowser.SelectedPath;
- else return;
- }
- else dir = UserSettings.Default.ModelDirectory;
-
- var toSaveDirectory = new DirectoryInfo(dir);
+ var toSaveDirectory = new DirectoryInfo(UserSettings.Default.ModelDirectory);
if (toSave.TryWriteToDir(toSaveDirectory, out var label, out var savedFilePath))
{
Log.Information("Successfully saved {FilePath}", savedFilePath);
- FLogger.Append(ELog.Information, () =>
+ if (updateUi)
{
- FLogger.Text("Successfully saved ", Constants.WHITE);
- FLogger.Link(label, savedFilePath, true);
- });
+ FLogger.Append(ELog.Information, () =>
+ {
+ FLogger.Text("Successfully saved ", Constants.WHITE);
+ FLogger.Link(label, savedFilePath, true);
+ });
+ }
}
else
{
diff --git a/FModel/ViewModels/Commands/RightClickMenuCommand.cs b/FModel/ViewModels/Commands/RightClickMenuCommand.cs
index ab009a4b..acb48897 100644
--- a/FModel/ViewModels/Commands/RightClickMenuCommand.cs
+++ b/FModel/ViewModels/Commands/RightClickMenuCommand.cs
@@ -22,6 +22,7 @@ public class RightClickMenuCommand : ViewModelCommand
var assetItems = ((IList) parameters[1]).Cast().ToArray();
if (!assetItems.Any()) return;
+ var updateUi = assetItems.Length > 1 ? EBulkType.Auto : EBulkType.None;
await _threadWorkerView.Begin(cancellationToken =>
{
switch (trigger)
@@ -47,7 +48,7 @@ public class RightClickMenuCommand : ViewModelCommand
{
Thread.Yield();
cancellationToken.ThrowIfCancellationRequested();
- contextViewModel.CUE4Parse.Extract(cancellationToken, asset.FullPath, false, EBulkType.Properties);
+ contextViewModel.CUE4Parse.Extract(cancellationToken, asset.FullPath, false, EBulkType.Properties | updateUi);
}
break;
case "Assets_Save_Textures":
@@ -55,7 +56,7 @@ public class RightClickMenuCommand : ViewModelCommand
{
Thread.Yield();
cancellationToken.ThrowIfCancellationRequested();
- contextViewModel.CUE4Parse.Extract(cancellationToken, asset.FullPath, false, EBulkType.Textures);
+ contextViewModel.CUE4Parse.Extract(cancellationToken, asset.FullPath, false, EBulkType.Textures | updateUi);
}
break;
case "Assets_Save_Models":
@@ -63,7 +64,7 @@ public class RightClickMenuCommand : ViewModelCommand
{
Thread.Yield();
cancellationToken.ThrowIfCancellationRequested();
- contextViewModel.CUE4Parse.Extract(cancellationToken, asset.FullPath, false, EBulkType.Meshes | EBulkType.Auto);
+ contextViewModel.CUE4Parse.Extract(cancellationToken, asset.FullPath, false, EBulkType.Meshes | updateUi);
}
break;
case "Assets_Save_Animations":
@@ -71,7 +72,7 @@ public class RightClickMenuCommand : ViewModelCommand
{
Thread.Yield();
cancellationToken.ThrowIfCancellationRequested();
- contextViewModel.CUE4Parse.Extract(cancellationToken, asset.FullPath, false, EBulkType.Animations | EBulkType.Auto);
+ contextViewModel.CUE4Parse.Extract(cancellationToken, asset.FullPath, false, EBulkType.Animations | updateUi);
}
break;
}