mirror of
https://github.com/4sval/FModel.git
synced 2026-04-03 15:45:59 -05:00
Only use MIs for display assets
This commit is contained in:
parent
b3e36708d6
commit
6061730fee
|
|
@ -1 +1 @@
|
|||
Subproject commit 71618499a3b84ea099142b0533a90699dc8103de
|
||||
Subproject commit 212313d0f5a21cd4d2a02a4f518ad7f6e01ee3e1
|
||||
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user