From 8453692bfe4e8bd56f8b298225e318fd02a030ca Mon Sep 17 00:00:00 2001 From: 4sval Date: Sat, 15 Apr 2023 14:33:34 +0200 Subject: [PATCH] local clean --- CUE4Parse | 2 +- FModel/Creator/Utils.cs | 4 ++-- FModel/MainWindow.xaml.cs | 6 +++--- FModel/ViewModels/AssetsFolderViewModel.cs | 9 +++++---- FModel/ViewModels/CUE4ParseViewModel.cs | 4 ++-- 5 files changed, 13 insertions(+), 12 deletions(-) diff --git a/CUE4Parse b/CUE4Parse index 269bfa7a..ebcd2399 160000 --- a/CUE4Parse +++ b/CUE4Parse @@ -1 +1 @@ -Subproject commit 269bfa7afcc23021ee3667f2f98ec6a8cd354d2c +Subproject commit ebcd23996be6e7a87629ae976162d2ba600795a9 diff --git a/FModel/Creator/Utils.cs b/FModel/Creator/Utils.cs index 40970544..5e33bbfa 100644 --- a/FModel/Creator/Utils.cs +++ b/FModel/Creator/Utils.cs @@ -146,9 +146,9 @@ public static class Utils return _applicationView.CUE4Parse.Provider.TryLoadObject(fullPath, out export); } - public static IEnumerable LoadExports(string fullPath) + public static IEnumerable LoadExports(string packagePath) { - return _applicationView.CUE4Parse.Provider.LoadObjectExports(fullPath); + return _applicationView.CUE4Parse.Provider.LoadAllObjects(packagePath); } public static float GetMaxFontSize(double sectorSize, SKTypeface typeface, string text, float degreeOfCertainty = 1f, float maxFont = 100f) diff --git a/FModel/MainWindow.xaml.cs b/FModel/MainWindow.xaml.cs index 03a5fd18..98eb5810 100644 --- a/FModel/MainWindow.xaml.cs +++ b/FModel/MainWindow.xaml.cs @@ -76,9 +76,9 @@ public partial class MainWindow _discordHandler.Initialize(_applicationView.GameDisplayName); #if DEBUG - // await _threadWorkerView.Begin(cancellationToken => - // _applicationView.CUE4Parse.Extract(cancellationToken, - // "Discovery/Content/Discovery/Items/Charms/Charm_Skateboard_01/SM_Charm_Skateboard_01_A.uasset")); + await _threadWorkerView.Begin(cancellationToken => + _applicationView.CUE4Parse.Extract(cancellationToken, + "FortniteGame/Content/Athena/Environments/Landscape/Material/M_Athena_Terrain_Master.o.uasset")); #endif } diff --git a/FModel/ViewModels/AssetsFolderViewModel.cs b/FModel/ViewModels/AssetsFolderViewModel.cs index 053c2d74..54865feb 100644 --- a/FModel/ViewModels/AssetsFolderViewModel.cs +++ b/FModel/ViewModels/AssetsFolderViewModel.cs @@ -4,6 +4,7 @@ using System.ComponentModel; using System.Text; using System.Windows; using System.Windows.Data; +using CUE4Parse.UE4.Versions; using CUE4Parse.UE4.Vfs; using FModel.Framework; using FModel.Services; @@ -47,8 +48,8 @@ public class TreeItem : ViewModel private set => SetProperty(ref _mountPoint, value); } - private int _version; - public int Version + private FPackageFileVersion _version; + public FPackageFileVersion Version { get => _version; private set => SetProperty(ref _version, value); @@ -59,7 +60,7 @@ public class TreeItem : ViewModel public RangeObservableCollection Folders { get; } public ICollectionView FoldersView { get; } - public TreeItem(string header, string archive, string mountPoint, int version, string pathHere) + public TreeItem(string header, string archive, string mountPoint, FPackageFileVersion version, string pathHere) { Header = header; Archive = archive; @@ -127,7 +128,7 @@ public class AssetsFolderViewModel if (lastNode == null) { var nodePath = builder.ToString(); - lastNode = new TreeItem(folder, item.Archive, entry.Vfs.MountPoint, entry.Vfs.Ver.Value, nodePath[..^1]); + lastNode = new TreeItem(folder, item.Archive, entry.Vfs.MountPoint, entry.Vfs.Ver, nodePath[..^1]); lastNode.Folders.SetSuppressionState(true); lastNode.AssetsList.Assets.SetSuppressionState(true); parentNode.Add(lastNode); diff --git a/FModel/ViewModels/CUE4ParseViewModel.cs b/FModel/ViewModels/CUE4ParseViewModel.cs index 64e7edeb..bd2568ff 100644 --- a/FModel/ViewModels/CUE4ParseViewModel.cs +++ b/FModel/ViewModels/CUE4ParseViewModel.cs @@ -585,7 +585,7 @@ public class CUE4ParseViewModel : ViewModel case "uasset": case "umap": { - var exports = Provider.LoadObjectExports(fullPath); // cancellationToken + var exports = Provider.LoadAllObjects(fullPath); TabControl.SelectedTab.SetDocumentText(JsonConvert.SerializeObject(exports, Formatting.Indented), saveProperties, updateUi); if (HasFlag(bulk, EBulkType.Properties)) break; // do not search for viewable exports if we are dealing with jsons @@ -760,7 +760,7 @@ public class CUE4ParseViewModel : ViewModel TabControl.AddTab(fullPath.SubstringAfterLast('/'), fullPath.SubstringBeforeLast('/')); TabControl.SelectedTab.ScrollTrigger = objectName; - var exports = Provider.LoadObjectExports(fullPath); // cancellationToken + var exports = Provider.LoadAllObjects(fullPath); TabControl.SelectedTab.Highlighter = AvalonExtensions.HighlighterSelector(""); // json TabControl.SelectedTab.SetDocumentText(JsonConvert.SerializeObject(exports, Formatting.Indented), false, false);