Skip to content

Commit 8b95b40

Browse files
Masusder4svalLongerWarrior
authored
New Explorer System (#619)
+ filter by types, find by references (UE5+), and a lot of other improvements Co-authored-by: Asval <[email protected]> Co-authored-by: LongerWarrior <[email protected]>
1 parent 5776444 commit 8b95b40

File tree

78 files changed

+4400
-1318
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

78 files changed

+4400
-1318
lines changed

CUE4Parse

Submodule CUE4Parse updated 50 files

FModel/App.xaml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<Application x:Class="FModel.App"
1+
<Application x:Class="FModel.App"
22
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
33
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
44
xmlns:adonisUi="clr-namespace:AdonisUI;assembly=AdonisUI"
@@ -9,6 +9,14 @@
99
<ResourceDictionary.MergedDictionaries>
1010
<ResourceDictionary Source="pack://application:,,,/AdonisUI;component/ColorSchemes/Dark.xaml"/>
1111
<ResourceDictionary Source="pack://application:,,,/AdonisUI.ClassicTheme;component/Resources.xaml"/>
12+
13+
<ResourceDictionary Source="Views/Resources/Colors.xaml" />
14+
<ResourceDictionary Source="Views/Resources/Icons.xaml" />
15+
<ResourceDictionary Source="Views/Resources/Controls/ContextMenus/FileContextMenu.xaml" />
16+
<ResourceDictionary Source="Views/Resources/Controls/ContextMenus/FolderContextMenu.xaml" />
17+
18+
<ResourceDictionary Source="Views/Resources/Resources.xaml" />
19+
<ResourceDictionary Source="Views/Resources/Controls/TiledExplorer/Resources.xaml" />
1220
</ResourceDictionary.MergedDictionaries>
1321

1422
<Color x:Key="{x:Static adonisUi:Colors.AccentColor}">#206BD4</Color>

FModel/Constants.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using System;
1+
using System;
22
using System.Diagnostics;
33
using System.IO;
44
using System.Numerics;
@@ -13,6 +13,7 @@ public static class Constants
1313
public static readonly string APP_VERSION = FileVersionInfo.GetVersionInfo(APP_PATH).FileVersion;
1414
public static readonly string APP_COMMIT_ID = FileVersionInfo.GetVersionInfo(APP_PATH).ProductVersion?.SubstringAfter('+');
1515
public static readonly string APP_SHORT_COMMIT_ID = APP_COMMIT_ID[..7];
16+
public static readonly DateTime APP_BUILD_DATE = File.GetLastWriteTime(APP_PATH);
1617

1718
public const string ZERO_64_CHAR = "0000000000000000000000000000000000000000000000000000000000000000";
1819
public static readonly FGuid ZERO_GUID = new(0U);

FModel/Creator/CreatorPackage.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ public UCreator ConstructCreator()
3333
[MethodImpl(MethodImplOptions.AggressiveInlining)]
3434
public bool TryConstructCreator([MaybeNullWhen(false)] out UCreator creator)
3535
{
36+
// TODO: convert to a type based system
3637
switch (_exportType)
3738
{
3839
// Fortnite
@@ -51,7 +52,7 @@ public bool TryConstructCreator([MaybeNullWhen(false)] out UCreator creator)
5152
case "CosmeticCompanionReactFXItemDefinition":
5253
case "AthenaPickaxeItemDefinition":
5354
case "AthenaGadgetItemDefinition":
54-
case "AthenaGliderItemDefinition":
55+
case "AthenaGliderItemDefinition":
5556
case "AthenaHatItemDefinition":
5657
case "AthenaSprayItemDefinition":
5758
case "AthenaDanceItemDefinition":

FModel/Enums.cs

Lines changed: 41 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
using System;
22
using System.ComponentModel;
3+
using FModel.Extensions;
34

45
namespace FModel;
56

@@ -65,16 +66,6 @@ public enum ELoadingMode
6566
AllButPatched,
6667
}
6768

68-
// public enum EUpdateMode
69-
// {
70-
// [Description("Stable")]
71-
// Stable,
72-
// [Description("Beta")]
73-
// Beta,
74-
// [Description("QA Testing")]
75-
// Qa
76-
// }
77-
7869
public enum ECompressedAudio
7970
{
8071
[Description("Play the decompressed data")]
@@ -117,3 +108,43 @@ public enum EBulkType
117108
Animations = 1 << 5,
118109
Audio = 1 << 6
119110
}
111+
112+
public enum EAssetCategory : uint
113+
{
114+
All = AssetCategoryExtensions.CategoryBase + (0 << 16),
115+
Blueprints = AssetCategoryExtensions.CategoryBase + (1 << 16),
116+
BlueprintGeneratedClass = Blueprints + 1,
117+
WidgetBlueprintGeneratedClass = Blueprints + 2,
118+
AnimBlueprintGeneratedClass = Blueprints + 3,
119+
RigVMBlueprintGeneratedClass = Blueprints + 4,
120+
UserDefinedEnum = Blueprints + 5,
121+
UserDefinedStruct = Blueprints + 6,
122+
//Metadata
123+
Blueprint = Blueprints + 8,
124+
CookedMetaData = Blueprints + 9,
125+
Mesh = AssetCategoryExtensions.CategoryBase + (2 << 16),
126+
StaticMesh = Mesh + 1,
127+
SkeletalMesh = Mesh + 2,
128+
Skeleton = Mesh + 3,
129+
Texture = AssetCategoryExtensions.CategoryBase + (3 << 16),
130+
Materials = AssetCategoryExtensions.CategoryBase + (4 << 16),
131+
Material = Materials + 1,
132+
MaterialEditorData = Materials + 2,
133+
MaterialFunction = Materials + 3,
134+
MaterialParameterCollection = Materials + 4,
135+
Animation = AssetCategoryExtensions.CategoryBase + (5 << 16),
136+
Level = AssetCategoryExtensions.CategoryBase + (6 << 16),
137+
World = Level + 1,
138+
BuildData = Level + 2,
139+
LevelSequence = Level + 3,
140+
Foliage = Level + 4,
141+
Data = AssetCategoryExtensions.CategoryBase + (7 << 16),
142+
ItemDefinitionBase = Data + 1,
143+
CurveBase = Data + 2,
144+
PhysicsAsset = Data + 3,
145+
Media = AssetCategoryExtensions.CategoryBase + (8 << 16),
146+
Audio = Media + 1,
147+
Video = Media + 2,
148+
Font = Media + 3,
149+
Particle = AssetCategoryExtensions.CategoryBase + (9 << 16),
150+
}
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Linq;
4+
5+
namespace FModel.Extensions;
6+
7+
public static class AssetCategoryExtensions
8+
{
9+
public const uint CategoryBase = 0x00010000;
10+
11+
public static EAssetCategory GetBaseCategory(this EAssetCategory category)
12+
{
13+
return (EAssetCategory) ((uint) category & 0xFFFF0000);
14+
}
15+
16+
public static bool IsOfCategory(this EAssetCategory item, EAssetCategory category)
17+
{
18+
return item.GetBaseCategory() == category.GetBaseCategory();
19+
}
20+
21+
public static bool IsBaseCategory(this EAssetCategory category)
22+
{
23+
return category == category.GetBaseCategory();
24+
}
25+
26+
public static IEnumerable<EAssetCategory> GetBaseCategories()
27+
{
28+
return Enum.GetValues<EAssetCategory>().Where(c => c.IsBaseCategory());
29+
}
30+
}

FModel/FModel.csproj

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,8 +168,9 @@
168168
<PackageReference Include="Serilog.Sinks.File" Version="7.0.0" />
169169
<PackageReference Include="SixLabors.ImageSharp" Version="3.1.12" />
170170
<PackageReference Include="SkiaSharp.HarfBuzz" Version="2.88.9" />
171-
<PackageReference Include="SkiaSharp.Svg" Version="1.60.0" />
171+
<PackageReference Include="Svg.Skia" Version="3.2.1" />
172172
<PackageReference Include="Twizzle.ImGui-Bundle.NET" Version="1.91.5.2" />
173+
<PackageReference Include="VirtualizingWrapPanel" Version="2.3.2" />
173174
</ItemGroup>
174175

175176
<ItemGroup>

FModel/Framework/FakeCUE4Parse.cs

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,22 @@
11
using System;
22
using CUE4Parse.Compression;
33
using CUE4Parse.FileProvider.Objects;
4+
using CUE4Parse.UE4.Assets.Objects;
45
using CUE4Parse.UE4.Readers;
56

67
namespace FModel.Framework;
78

8-
public class FakeGameFile : GameFile
9+
public class FakeGameFile(string path) : GameFile(path, 0)
910
{
10-
public FakeGameFile(string path) : base(path, 0)
11-
{
12-
13-
}
14-
1511
public override bool IsEncrypted => false;
1612
public override CompressionMethod CompressionMethod => CompressionMethod.None;
1713

18-
public override byte[] Read()
14+
public override byte[] Read(FByteBulkDataHeader? header = null)
1915
{
2016
throw new NotImplementedException();
2117
}
2218

23-
public override FArchive CreateReader()
19+
public override FArchive CreateReader(FByteBulkDataHeader? header = null)
2420
{
2521
throw new NotImplementedException();
2622
}

FModel/Helper.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public static void OpenWindow<T>(string windowName, Action action) where T : Win
3838
else
3939
{
4040
var w = GetOpenedWindow<T>(windowName);
41-
if (windowName == "Search View") w.WindowState = WindowState.Normal;
41+
if (windowName == "Search For Packages") w.WindowState = WindowState.Normal;
4242
w.Focus();
4343
}
4444
}

0 commit comments

Comments
 (0)