Skip to content

Commit

Permalink
lol I didn't commit CUE4Parse last time
Browse files Browse the repository at this point in the history
  • Loading branch information
4sval committed Dec 3, 2021
1 parent e085b09 commit 9581ca7
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
8 changes: 6 additions & 2 deletions FModel/ViewModels/Commands/MenuCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@ public override async void Execute(ApplicationViewModel contextViewModel, object
case "Settings":
Helper.OpenWindow<AdonisWindow>("Settings", () => new SettingsView().Show());
break;
case "ModelSettings":
UserSettings.Default.LastOpenedSettingTab = contextViewModel.CUE4Parse.Game == FGame.FortniteGame ? 2 : 1;
Helper.OpenWindow<AdonisWindow>("Settings", () => new SettingsView().Show());
break;
case "Help_About":
Helper.OpenWindow<AdonisWindow>("About", () => new About().Show());
break;
Expand Down Expand Up @@ -101,9 +105,9 @@ private void LoopFolders(CancellationToken cancellationToken, TreeItem parent, b
parent.IsExpanded = isExpanded;
Thread.Sleep(10);
}

cancellationToken.ThrowIfCancellationRequested();
foreach (var f in parent.Folders) LoopFolders(cancellationToken, f, isExpanded);
}
}
}
}
4 changes: 2 additions & 2 deletions FModel/ViewModels/ModelViewerViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ private void PushLod(CMeshSection[] sections, CMeshVertex[] verts, FRawStaticInd
var isRendering = !parameters.IsNull;
if (isRendering)
{
if (parameters.HasNoTopDiffuseTexture && parameters.DiffuseColor is { A: > 0 } diffuseColor)
if (!parameters.HasTopDiffuseTexture && parameters.DiffuseColor is { A: > 0 } diffuseColor)
{
Application.Current.Dispatcher.Invoke(() => m.AlbedoColor = new Color4(diffuseColor.R, diffuseColor.G, diffuseColor.B, diffuseColor.A));
}
Expand Down Expand Up @@ -451,7 +451,7 @@ private void PushLod(CMeshSection[] sections, CMeshVertex[] verts, FRawStaticInd
});
}

if (parameters.Emissive is UTexture2D emissive && parameters.EmissiveColor is { A: > 0 } emissiveColor)
if (parameters.HasTopEmissiveTexture && parameters.Emissive is UTexture2D emissive && parameters.EmissiveColor is { A: > 0 } emissiveColor)
{
var s = emissive.Decode()?.Encode().AsStream();
var c = new Color4(emissiveColor.R, emissiveColor.G, emissiveColor.B, emissiveColor.A);
Expand Down

0 comments on commit 9581ca7

Please sign in to comment.