diff --git a/CUE4Parse b/CUE4Parse index 05f36306..1acd39e6 160000 --- a/CUE4Parse +++ b/CUE4Parse @@ -1 +1 @@ -Subproject commit 05f36306fae35a30dae565ba02c4fc05e643a995 +Subproject commit 1acd39e63cb81a34b022deca630bf30c6b8d1036 diff --git a/FModel/ViewModels/ApplicationViewModel.cs b/FModel/ViewModels/ApplicationViewModel.cs index 86929360..bb9bdb4e 100644 --- a/FModel/ViewModels/ApplicationViewModel.cs +++ b/FModel/ViewModels/ApplicationViewModel.cs @@ -156,7 +156,6 @@ public class ApplicationViewModel : ViewModel await ApplicationService.ThreadWorkerView.Begin(cancellationToken => { CUE4Parse.LoadVfs(cancellationToken, AesManager.AesKeys); - CUE4Parse.Provider.LoadIniConfigs(); AesManager.SetAesKeys(); }); RaisePropertyChanged(nameof(GameDisplayName)); diff --git a/FModel/ViewModels/CUE4ParseViewModel.cs b/FModel/ViewModels/CUE4ParseViewModel.cs index 13eac386..37dfe9ca 100644 --- a/FModel/ViewModels/CUE4ParseViewModel.cs +++ b/FModel/ViewModels/CUE4ParseViewModel.cs @@ -312,6 +312,7 @@ public class CUE4ParseViewModel : ViewModel if (k.Length != 66) k = Constants.ZERO_64_CHAR; Provider.SubmitKey(key.Guid, new FAesKey(k)); } + Provider.PostMount(); // files in MountedVfs will be enabled foreach (var file in GameDirectory.DirectoryFiles) @@ -437,34 +438,15 @@ public class CUE4ParseViewModel : ViewModel }); } - private bool _cvaVerifDone { get; set; } public Task VerifyConsoleVariables() { - if (_cvaVerifDone) - return Task.CompletedTask; - - return Task.Run(() => + if (Provider.Versions["StripAdditiveRefPose"]) { - foreach (var token in Provider.DefaultEngine.Sections.FirstOrDefault(s => s.Name == "ConsoleVariables")?.Tokens ?? new List()) - { - if (token is not InstructionToken it) continue; - var boolValue = it.Value.Equals("1"); + FLogger.Append(ELog.Warning, () => + FLogger.Text("Additive animations have their reference pose stripped, which will lead to inaccurate preview and export", Constants.WHITE, true)); + } - switch (it.Key) - { - case "a.StripAdditiveRefPose" when boolValue: - FLogger.Append(ELog.Warning, () => - FLogger.Text("Additive animations have their reference pose stripped, which will lead to inaccurate preview and export", Constants.WHITE, true)); - continue; - case "r.StaticMesh.KeepMobileMinLODSettingOnDesktop": - case "r.SkeletalMesh.KeepMobileMinLODSettingOnDesktop": - Provider.Versions[it.Key[2..]] = boolValue; - continue; - } - } - - _cvaVerifDone = true; - }); + return Task.CompletedTask; } public Task VerifyOnDemandArchives() diff --git a/FModel/ViewModels/Commands/LoadCommand.cs b/FModel/ViewModels/Commands/LoadCommand.cs index 9d838476..3dfa13b1 100644 --- a/FModel/ViewModels/Commands/LoadCommand.cs +++ b/FModel/ViewModels/Commands/LoadCommand.cs @@ -38,7 +38,7 @@ public class LoadCommand : ViewModelCommand public override async void Execute(LoadingModesViewModel contextViewModel, object parameter) { if (_applicationView.CUE4Parse.GameDirectory.HasNoFile) return; - if (_applicationView.CUE4Parse.Provider.Files.Count <= 0) + if (_applicationView.CUE4Parse.Provider.Keys.Count == 0 && _applicationView.CUE4Parse.Provider.RequiredKeys.Count > 0) { FLogger.Append(ELog.Error, () => FLogger.Text("An encrypted archive has been found. In order to decrypt it, please specify a working AES encryption key", Constants.WHITE, true));