Only use MIs for display assets

This commit is contained in:
GMatrixGames 2021-06-21 08:45:14 -04:00
parent b3e36708d6
commit 6061730fee
No known key found for this signature in database
GPG Key ID: 2621164AAF16CEDF
2 changed files with 1 additions and 21 deletions

@ -1 +1 @@
Subproject commit 71618499a3b84ea099142b0533a90699dc8103de
Subproject commit 212313d0f5a21cd4d2a02a4f518ad7f6e01ee3e1

View File

@ -6,7 +6,6 @@ using System.Text.RegularExpressions;
using CUE4Parse.UE4.Assets.Exports;
using CUE4Parse.UE4.Assets.Exports.Material;
using CUE4Parse.UE4.Assets.Exports.Texture;
using CUE4Parse.UE4.Assets.Objects;
using CUE4Parse.UE4.Objects.UObject;
using CUE4Parse.Utils;
using CUE4Parse_Conversion.Textures;
@ -38,12 +37,6 @@ namespace FModel.Creator
public static bool TryGetDisplayAsset(UObject uObject, out SKBitmap preview)
{
if (uObject.TryGetValue(out FSoftObjectPath displayAsset, "DisplayAssetPath"))
{
preview = GetDisplayAsset(displayAsset);
return preview != null;
}
if (uObject.TryGetValue(out FSoftObjectPath sidePanelIcon, "SidePanelIcon"))
{
preview = GetBitmap(sidePanelIcon);
@ -61,19 +54,6 @@ namespace FModel.Creator
return preview != null;
}
public static SKBitmap GetDisplayAsset(FSoftObjectPath path)
{
if (!TryLoadObject(path.AssetPathName.Text, out UObject obj)) return null;
if (obj.TryGetValue(out FStructFallback type, "DetailsImage") &&
type.TryGetValue(out FPackageIndex resource, "ResourceObject") && resource.ResolvedObject?.Outer != null &&
!resource.ResolvedObject.Outer.Name.Text.Contains("FortniteGame/Content/Athena/Prototype/Textures/"))
{
return GetBitmap(resource);
}
return null;
}
public static SKBitmap GetBitmap(FPackageIndex packageIndex)
{
while (true)