mirror of
https://github.com/4sval/FModel.git
synced 2026-03-22 01:34:37 -05:00
removed atom model
This commit is contained in:
parent
9781446aef
commit
e87e75acd4
|
|
@ -39,7 +39,7 @@ public class BaseIcon : UCreator
|
|||
Preview = preview;
|
||||
else if (Object.TryGetValue(out FPackageIndex itemDefinition, "HeroDefinition", "WeaponDefinition"))
|
||||
Preview = Utils.GetBitmap(itemDefinition);
|
||||
else if (Object.TryGetValue(out FSoftObjectPath largePreview, "LargePreviewImage", "EntryListIcon", "SmallPreviewImage", "ItemDisplayAsset", "LargeIcon", "ToastIcon", "SmallIcon"))
|
||||
else if (Object.TryGetValue(out FSoftObjectPath largePreview, "LargePreviewImage", "EntryListIcon", "SmallPreviewImage", "BundleImage", "ItemDisplayAsset", "LargeIcon", "ToastIcon", "SmallIcon"))
|
||||
Preview = Utils.GetBitmap(largePreview);
|
||||
else if (Object.TryGetValue(out string s, "LargePreviewImage") && !string.IsNullOrEmpty(s))
|
||||
Preview = Utils.GetBitmap(s);
|
||||
|
|
@ -51,9 +51,9 @@ public class BaseIcon : UCreator
|
|||
Preview = Utils.GetBitmap(res);
|
||||
|
||||
// text
|
||||
if (Object.TryGetValue(out FText displayName, "DisplayName", "ItemName", "DefaultHeaderText", "UIDisplayName", "EntryName", "EventCalloutTitle"))
|
||||
if (Object.TryGetValue(out FText displayName, "DisplayName", "ItemName", "BundleName", "DefaultHeaderText", "UIDisplayName", "EntryName", "EventCalloutTitle"))
|
||||
DisplayName = displayName.Text;
|
||||
if (Object.TryGetValue(out FText description, "Description", "ItemDescription", "GeneralDescription", "DefaultBodyText", "UIDescription", "UIDisplayDescription", "EntryDescription", "EventCalloutDescription"))
|
||||
if (Object.TryGetValue(out FText description, "Description", "ItemDescription", "BundleDescription", "GeneralDescription", "DefaultBodyText", "UIDescription", "UIDisplayDescription", "EntryDescription", "EventCalloutDescription"))
|
||||
Description = description.Text;
|
||||
else if (Object.TryGetValue(out FText[] descriptions, "Description"))
|
||||
Description = string.Join('\n', descriptions.Select(x => x.Text));
|
||||
|
|
|
|||
|
|
@ -57,6 +57,7 @@ public class CreatorPackage : IDisposable
|
|||
case "FortAbilityKit":
|
||||
case "FortWorkerType":
|
||||
case "RewardGraphToken":
|
||||
case "JunoKnowledgeBundle":
|
||||
case "FortBannerTokenType":
|
||||
case "FortVariantTokenType":
|
||||
case "FortDecoItemDefinition":
|
||||
|
|
@ -117,6 +118,7 @@ public class CreatorPackage : IDisposable
|
|||
case "FortPersistentResourceItemDefinition":
|
||||
case "FortWeaponMeleeOffhandItemDefinition":
|
||||
case "FortHomebaseBannerIconItemDefinition":
|
||||
case "JunoBuildingPropAccountItemDefinition":
|
||||
case "FortCampaignHeroLoadoutItemDefinition":
|
||||
case "FortConditionalResourceItemDefinition":
|
||||
case "FortChallengeBundleScheduleDefinition":
|
||||
|
|
|
|||
|
|
@ -34,15 +34,12 @@ using CUE4Parse.UE4.Shaders;
|
|||
using CUE4Parse.UE4.Versions;
|
||||
using CUE4Parse.UE4.Wwise;
|
||||
using CUE4Parse_Conversion;
|
||||
using CUE4Parse_Conversion.Animations;
|
||||
using CUE4Parse_Conversion.Meshes;
|
||||
using CUE4Parse_Conversion.Sounds;
|
||||
using CUE4Parse.GameTypes.UDWN.Encryption.Aes;
|
||||
using CUE4Parse.GameTypes.DBD.Encryption.Aes;
|
||||
using CUE4Parse.GameTypes.PAXDEI.Encryption.Aes;
|
||||
using CUE4Parse.GameTypes.NetEase.MAR.Encryption.Aes;
|
||||
using CUE4Parse.GameTypes.FSR.Encryption.Aes;
|
||||
using CUE4Parse.UE4.Assets.Exports.Atom;
|
||||
using EpicManifestParser;
|
||||
using FModel.Creator;
|
||||
using FModel.Extensions;
|
||||
|
|
@ -849,9 +846,9 @@ public class CUE4ParseViewModel : ViewModel
|
|||
{
|
||||
"JunoBuildInstructionsItemDefinition" => true,
|
||||
"JunoBuildingSetAccountItemDefinition" => true,
|
||||
"JunoBuildingPropAccountItemDefinition" => true,
|
||||
_ => false
|
||||
}:
|
||||
case UAtomModel when isNone && UserSettings.Default.PreviewStaticMeshes:
|
||||
case UStaticMesh when isNone && UserSettings.Default.PreviewStaticMeshes:
|
||||
case USkeletalMesh when isNone && UserSettings.Default.PreviewSkeletalMeshes:
|
||||
case USkeleton when isNone && UserSettings.Default.SaveSkeletonAsMesh:
|
||||
|
|
|
|||
|
|
@ -8,7 +8,6 @@ using CUE4Parse_Conversion.Animations;
|
|||
using CUE4Parse_Conversion.Meshes;
|
||||
using CUE4Parse.UE4.Assets.Exports;
|
||||
using CUE4Parse.UE4.Assets.Exports.Animation;
|
||||
using CUE4Parse.UE4.Assets.Exports.Atom;
|
||||
using CUE4Parse.UE4.Assets.Exports.Component.StaticMesh;
|
||||
using CUE4Parse.UE4.Assets.Exports.GeometryCollection;
|
||||
using CUE4Parse.UE4.Assets.Exports.Material;
|
||||
|
|
@ -104,9 +103,6 @@ public class Renderer : IDisposable
|
|||
LoadJunoWorld(cancellationToken, bp, Transform.Identity);
|
||||
Color = VertexColor.Colors;
|
||||
break;
|
||||
case UAtomModel at:
|
||||
LoadAtom(cancellationToken, at);
|
||||
break;
|
||||
}
|
||||
CameraOp.Mode = _saveCameraMode ? UserSettings.Default.CameraMode : Camera.WorldMode.FlyCam;
|
||||
SetupCamera();
|
||||
|
|
@ -677,7 +673,7 @@ public class Renderer : IDisposable
|
|||
{
|
||||
ref var vertexColor = ref staticMesh.RenderData.LODs[0].ColorVertexBuffer.Data[i];
|
||||
var indexAsByte = vertexColor.R;
|
||||
if (vertexColor.R == 255) indexAsByte = vertexColor.A;
|
||||
if (indexAsByte == 255) indexAsByte = vertexColor.A;
|
||||
distinctReds.Add(indexAsByte);
|
||||
}
|
||||
|
||||
|
|
@ -757,50 +753,6 @@ public class Renderer : IDisposable
|
|||
LoadWorld(cancellationToken, w, transform);
|
||||
}
|
||||
|
||||
private void LoadAtom(CancellationToken cancellationToken, UAtomModel original)
|
||||
{
|
||||
var length = original.Primitives.Length;
|
||||
for (var i = 0; i < length; i++)
|
||||
{
|
||||
cancellationToken.ThrowIfCancellationRequested();
|
||||
Services.ApplicationService.ApplicationView.Status.UpdateStatusLabel($"{original.Name} ... {i}/{length}");
|
||||
|
||||
foreach (var part in original.Primitives[i].Parts)
|
||||
{
|
||||
var fixedPath = part.AtomPrimitive.AssetPathName.Text
|
||||
.Replace("Primitives", "ProcessedMeshes")
|
||||
.Replace("VX", "SM_VX");
|
||||
if (!Utils.TryLoadObject(fixedPath, out UStaticMesh staticMesh) || !staticMesh.TryConvert(out var mesh))
|
||||
continue;
|
||||
|
||||
var guid = staticMesh.LightingGuid;
|
||||
var transform = new Transform
|
||||
{
|
||||
Position = part.Transforms[0].Translation * Constants.SCALE_DOWN_RATIO,
|
||||
Rotation = part.Transforms[0].Rotation,
|
||||
Scale = part.Transforms[0].Scale3D
|
||||
};
|
||||
|
||||
if (Options.TryGetModel(guid, out var model))
|
||||
{
|
||||
model.AddInstance(transform);
|
||||
}
|
||||
else
|
||||
{
|
||||
model = new StaticModel(staticMesh, mesh, transform);
|
||||
foreach (var section in model.Sections)
|
||||
{
|
||||
section.Show = true;
|
||||
}
|
||||
Options.Models[guid] = model;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
CameraOp.Setup(original.SourceModel.Bounds * Constants.SCALE_DOWN_RATIO);
|
||||
Services.ApplicationService.ApplicationView.Status.UpdateStatusLabel($"{original.Name} ... {length}/{length}");
|
||||
}
|
||||
|
||||
public void WindowResized(int width, int height)
|
||||
{
|
||||
CameraOp.AspectRatio = width / (float) height;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user