Skip to content

Commit

Permalink
Handle KeepMobileMinLODSettingOnDesktop
Browse files Browse the repository at this point in the history
  • Loading branch information
GMatrixGames committed Jun 11, 2023
1 parent 6f11d87 commit 3435897
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 6 deletions.
23 changes: 18 additions & 5 deletions FModel/ViewModels/CUE4ParseViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -446,13 +446,26 @@ public Task VerifyConsoleVariables()

return Task.Run(() =>
{
var inst = new List<InstructionToken>();
Provider.DefaultEngine.FindPropertyInstructions("ConsoleVariables", "a.StripAdditiveRefPose", inst);
if (inst.Count > 0 && inst[0].Value.Equals("1"))
foreach (var token in Provider.DefaultEngine.Sections.FirstOrDefault(s => s.Name == "ConsoleVariables")?.Tokens ?? new List<IniToken>())
{
FLogger.Append(ELog.Warning, () =>
FLogger.Text("Additive animations have their reference pose stripped, which will lead to inaccurate preview and export", Constants.WHITE, true));
if (token is not InstructionToken it) continue;
var boolValue = it.Value.Equals("1");
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":
Provider.Versions["StaticMesh.KeepMobileMinLODSettingOnDesktop"] = boolValue;
continue;
case "r.SkeletalMesh.KeepMobileMinLODSettingOnDesktop":
Provider.Versions["SkeletalMesh.KeepMobileMinLODSettingOnDesktop"] = boolValue;
continue;
}
}
_cvaVerifDone = true;
});
}
Expand Down

0 comments on commit 3435897

Please sign in to comment.