local clean

This commit is contained in:
4sval 2023-04-15 14:33:34 +02:00
parent 0f5aeaad8d
commit 8453692bfe
5 changed files with 13 additions and 12 deletions

@ -1 +1 @@
Subproject commit 269bfa7afcc23021ee3667f2f98ec6a8cd354d2c
Subproject commit ebcd23996be6e7a87629ae976162d2ba600795a9

View File

@ -146,9 +146,9 @@ public static class Utils
return _applicationView.CUE4Parse.Provider.TryLoadObject(fullPath, out export);
}
public static IEnumerable<UObject> LoadExports(string fullPath)
public static IEnumerable<UObject> 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)

View File

@ -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
}

View File

@ -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<TreeItem> 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);

View File

@ -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);