diff --git a/FModel/Creator/Bases/FN/BaseAssembledMesh.cs b/FModel/Creator/Bases/FN/BaseAssembledMesh.cs new file mode 100644 index 00000000..cc2accc8 --- /dev/null +++ b/FModel/Creator/Bases/FN/BaseAssembledMesh.cs @@ -0,0 +1,47 @@ +using CUE4Parse.UE4.Assets.Exports; +using CUE4Parse.UE4.Assets.Objects; +using CUE4Parse.UE4.Objects.UObject; +using SkiaSharp; + +namespace FModel.Creator.Bases.FN; + +public class BaseAssembledMesh : UCreator +{ + public BaseAssembledMesh(UObject uObject, EIconStyle style) : base(uObject, style) + { + + } + + public override void ParseForInfo() + { + if (Object.TryGetValue(out FInstancedStruct[] additionalData, "AdditionalData")) + { + foreach (var data in additionalData) + { + if (data.NonConstStruct?.TryGetValue(out FSoftObjectPath largePreview, "LargePreviewImage", "SmallPreviewImage") == true) + { + Preview = Utils.GetBitmap(largePreview); + } + } + } + } + + public override SKBitmap[] Draw() + { + var ret = new SKBitmap(Width, Height, SKColorType.Rgba8888, SKAlphaType.Premul); + using var c = new SKCanvas(ret); + + switch (Style) + { + case EIconStyle.NoBackground: + DrawPreview(c); + break; + default: + DrawBackground(c); + DrawPreview(c); + break; + } + + return new[] { ret }; + } +} diff --git a/FModel/Creator/CreatorPackage.cs b/FModel/Creator/CreatorPackage.cs index e93caf19..391f4698 100644 --- a/FModel/Creator/CreatorPackage.cs +++ b/FModel/Creator/CreatorPackage.cs @@ -157,6 +157,9 @@ public bool TryConstructCreator(out UCreator creator) case "JunoAthenaDanceItemOverrideDefinition": creator = new BaseJuno(_object, _style); return true; + case "AssembledMeshSchema": + creator = new BaseAssembledMesh(_object, _style); + return true; case "FortTandemCharacterData": creator = new BaseTandem(_object, _style); return true;