mirror of
https://github.com/4sval/FModel.git
synced 2026-12-04 23:02:22 -06:00
Merge remote-tracking branch 'origin/dev' into feature/new-viewer
# Conflicts: # CUE4Parse # FModel/ViewModels/CUE4ParseViewModel.cs # FModel/Views/Snooper/Animations/Skeleton.cs # FModel/Views/Snooper/Models/StaticModel.cs # FModel/Views/Snooper/Models/UModel.cs # FModel/Views/Snooper/Renderer.cs
This commit is contained in:
Submodule CUE4Parse updated: e4ea4ba8ec...4ca8c6c088
@@ -47,14 +47,12 @@ public class BaseIcon : UCreator
|
||||
{
|
||||
if (isUsingDisplayAsset && Utils.TryGetDisplayAsset(Object, out var preview))
|
||||
Preview = preview;
|
||||
else if (Object.TryGetValue(out FPackageIndex itemDefinition, "HeroDefinition", "WeaponDefinition"))
|
||||
else if (Object.TryGetValue(out ILoadableObject itemDefinition, "HeroDefinition", "WeaponDefinition"))
|
||||
Preview = Utils.GetBitmap(itemDefinition);
|
||||
else if (Object.TryGetValue(out FSoftObjectPath largePreview, "LargePreviewImage", "EntryListIcon", "SmallPreviewImage", "BundleImage", "ItemDisplayAsset", "LargeIcon", "ToastIcon", "SmallIcon", "CartridgeIcon", "EffectIcon"))
|
||||
else if (Object.TryGetValue(out ILoadableObject largePreview, "LargePreviewImage", "EntryListIcon", "SmallPreviewImage", "BundleImage", "ItemDisplayAsset", "LargeIcon", "ToastIcon", "SmallIcon", "CartridgeIcon", "EffectIcon", "ToastIcon", "access_item"))
|
||||
Preview = Utils.GetBitmap(largePreview);
|
||||
else if (Object.TryGetValue(out string s, "LargePreviewImage") && !string.IsNullOrEmpty(s))
|
||||
Preview = Utils.GetBitmap(s);
|
||||
else if (Object.TryGetValue(out FPackageIndex otherPreview, "SmallPreviewImage", "ToastIcon", "access_item"))
|
||||
Preview = Utils.GetBitmap(otherPreview);
|
||||
else if (Object.TryGetValue(out UMaterialInstanceConstant materialInstancePreview, "EventCalloutImage"))
|
||||
Preview = Utils.GetBitmap(materialInstancePreview);
|
||||
else if (Object.TryGetValue(out FStructFallback brush, "IconBrush", "BuildingSymbolNormal") && brush.TryGetValue(out UTexture2D res, "ResourceObject"))
|
||||
|
||||
@@ -60,11 +60,11 @@ public static class Utils
|
||||
return preview != null;
|
||||
}
|
||||
|
||||
public static SKBitmap GetBitmap(FPackageIndex packageIndex)
|
||||
public static SKBitmap GetBitmap(ILoadableObject loadableObject)
|
||||
{
|
||||
while (true)
|
||||
{
|
||||
if (!TryGetPackageIndexExport(packageIndex, out UObject export)) return null;
|
||||
if (!loadableObject.TryLoad(out UObject export)) return null;
|
||||
switch (export)
|
||||
{
|
||||
case UTexture2D texture:
|
||||
@@ -74,13 +74,8 @@ public static class Utils
|
||||
default:
|
||||
{
|
||||
if (export.TryGetValue(out FInstancedStruct[] dataList, "DataList")) return GetBitmap(dataList);
|
||||
if (export.TryGetValue(out FSoftObjectPath previewImage, "LargePreviewImage", "SmallPreviewImage")) return GetBitmap(previewImage);
|
||||
if (export.TryGetValue(out ILoadableObject previewImage, "LargePreviewImage", "SmallPreviewImage")) return GetBitmap(previewImage);
|
||||
if (export.TryGetValue(out string largePreview, "LargePreviewImage")) return GetBitmap(largePreview);
|
||||
if (export.TryGetValue(out FPackageIndex smallPreview, "SmallPreviewImage"))
|
||||
{
|
||||
packageIndex = smallPreview;
|
||||
continue;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
@@ -128,7 +123,6 @@ public static class Utils
|
||||
}
|
||||
|
||||
public static SKBitmap GetB64Bitmap(string b64) => SKBitmap.Decode(new MemoryStream(Convert.FromBase64String(b64)) { Position = 0 });
|
||||
public static SKBitmap GetBitmap(FSoftObjectPath softObjectPath) => GetBitmap(softObjectPath.Load<UTexture2D>());
|
||||
public static SKBitmap GetBitmap(string fullPath) => TryLoadObject(fullPath, out UTexture2D texture) ? GetBitmap(texture) : null;
|
||||
public static SKBitmap GetBitmap(UTexture2D texture) => texture.Decode(UserSettings.Default.CurrentDir.TexturePlatform).ToSkBitmap();
|
||||
public static SKBitmap GetBitmap(byte[] data) => SKBitmap.Decode(data);
|
||||
|
||||
@@ -169,6 +169,7 @@ public enum EAssetCategory : uint
|
||||
LegoBatman = GameSpecific + 5,
|
||||
ArcSys = GameSpecific + 6,
|
||||
GothamKnights = GameSpecific + 7,
|
||||
Nascar = GameSpecific + 8,
|
||||
}
|
||||
|
||||
public enum EAssetFamily
|
||||
@@ -177,6 +178,7 @@ public enum EAssetFamily
|
||||
Criware,
|
||||
Wwise,
|
||||
FMod,
|
||||
Houdini,
|
||||
}
|
||||
|
||||
public enum EUnluacMode
|
||||
|
||||
@@ -4,7 +4,7 @@ namespace FModel.Extensions;
|
||||
|
||||
public static class ListBoxExtensions
|
||||
{
|
||||
public static ListBoxItem RevealItem(this ListBox list, object item, bool alignToTop = false)
|
||||
public static ListBoxItem RevealItem(this ListBox list, object item)
|
||||
{
|
||||
var index = list.Items.IndexOf(item);
|
||||
if (index < 0)
|
||||
@@ -12,12 +12,6 @@ public static class ListBoxExtensions
|
||||
|
||||
list.ApplyTemplate();
|
||||
list.UpdateLayout();
|
||||
if (alignToTop && list.FindVisualChild<ScrollViewer>() is { } scroll)
|
||||
{
|
||||
scroll.ScrollToVerticalOffset(index);
|
||||
list.UpdateLayout();
|
||||
}
|
||||
|
||||
if (list.FindVisualChild<VirtualizingPanel>() is { } panel)
|
||||
{
|
||||
panel.BringIndexIntoViewPublic(index);
|
||||
|
||||
@@ -382,6 +382,7 @@
|
||||
<Separator Grid.Row="1" Style="{StaticResource CustomSeparator}" Margin="0" />
|
||||
<controls:FolderTree Grid.Row="2" x:Name="AssetsFolderName"
|
||||
Style="{StaticResource AssetsFolderListBox}"
|
||||
IsTextSearchEnabled="False"
|
||||
Folders="{Binding CUE4Parse.AssetsFolder}"
|
||||
ItemsSource="{Binding CUE4Parse.AssetsFolder.VisibleFolders}"
|
||||
SelectedItem="{Binding CUE4Parse.AssetsFolder.SelectedFolder, Mode=TwoWay}"
|
||||
|
||||
@@ -165,7 +165,7 @@ public partial class MainWindow
|
||||
_applicationView.CUE4Parse.TabControl.SelectedTab.GoNextImage();
|
||||
else if (_applicationView.Status.IsReady && _applicationView.IsAssetsExplorerVisible && Keyboard.Modifiers.HasFlag(ModifierKeys.Alt))
|
||||
{
|
||||
CategoriesSelector.SelectedIndex = e.SystemKey switch
|
||||
var categoryIndex = e.SystemKey switch
|
||||
{
|
||||
Key.D0 or Key.NumPad0 => 0,
|
||||
Key.D1 or Key.NumPad1 => 1,
|
||||
@@ -177,8 +177,13 @@ public partial class MainWindow
|
||||
Key.D7 or Key.NumPad7 => 7,
|
||||
Key.D8 or Key.NumPad8 => 8,
|
||||
Key.D9 or Key.NumPad9 => 9,
|
||||
_ => CategoriesSelector.SelectedIndex
|
||||
_ => -1
|
||||
};
|
||||
|
||||
if (categoryIndex < 0)
|
||||
return;
|
||||
|
||||
CategoriesSelector.SelectedIndex = categoryIndex;
|
||||
}
|
||||
else if (_applicationView.Status.IsReady && UserSettings.Default.ExportData.IsTriggered(e.Key))
|
||||
OnExportHotkey("Save_Data");
|
||||
@@ -210,6 +215,10 @@ public partial class MainWindow
|
||||
_applicationView.SelectedLeftTabIndex--;
|
||||
else if (UserSettings.Default.DirRightTab.IsTriggered(e.Key) && _applicationView.SelectedLeftTabIndex < LeftTabControl.Items.Count - 1)
|
||||
_applicationView.SelectedLeftTabIndex++;
|
||||
else
|
||||
return;
|
||||
|
||||
e.Handled = true;
|
||||
}
|
||||
|
||||
private void OnSearchViewClick(object sender, RoutedEventArgs e)
|
||||
|
||||
@@ -275,13 +275,6 @@ public sealed class UserSettings : ViewModel
|
||||
set => SetProperty(ref _convertAudioOnBulkExport, value);
|
||||
}
|
||||
|
||||
private bool _mergeEditorOnlyDataExports = false;
|
||||
public bool MergeEditorOnlyDataExports
|
||||
{
|
||||
get => _mergeEditorOnlyDataExports;
|
||||
set => SetProperty(ref _mergeEditorOnlyDataExports, value);
|
||||
}
|
||||
|
||||
private bool _decompileLua;
|
||||
public bool DecompileLua
|
||||
{
|
||||
|
||||
@@ -18,6 +18,8 @@ using CUE4Parse.Encryption.Aes;
|
||||
using CUE4Parse.FileProvider;
|
||||
using CUE4Parse.FileProvider.Objects;
|
||||
using CUE4Parse.FileProvider.Vfs;
|
||||
using CUE4Parse.GameTypes.ACE8.Assets.Exports;
|
||||
using CUE4Parse.GameTypes.ACE8.Encryption;
|
||||
using CUE4Parse.GameTypes.Aion2.Objects;
|
||||
using CUE4Parse.GameTypes.AoC.Objects;
|
||||
using CUE4Parse.GameTypes.AshEchoes.FileProvider;
|
||||
@@ -29,6 +31,7 @@ using CUE4Parse.GameTypes.DFHO.Assets.Objects;
|
||||
using CUE4Parse.GameTypes.HonorOfKings.FileProvider;
|
||||
using CUE4Parse.GameTypes.KRD.Assets.Exports;
|
||||
using CUE4Parse.GameTypes.LegoBatman.Assets;
|
||||
using CUE4Parse.GameTypes.Nascar.Assets.Exports;
|
||||
using CUE4Parse.GameTypes.LordOfMysteries.FileProvider;
|
||||
using CUE4Parse.GameTypes.Tencent.RocoKingdomWorld.Assets.Objects;
|
||||
using CUE4Parse.GameTypes.SMG.UE4.Assets.Exports.Wwise;
|
||||
@@ -46,6 +49,7 @@ using CUE4Parse.UE4.Assets.Exports.Criware;
|
||||
using CUE4Parse.UE4.Assets.Exports.Engine;
|
||||
using CUE4Parse.UE4.Assets.Exports.Fmod;
|
||||
using CUE4Parse.UE4.Assets.Exports.GeometryCollection;
|
||||
using CUE4Parse.UE4.Assets.Exports.Houdini;
|
||||
using CUE4Parse.UE4.Assets.Exports.Material;
|
||||
using CUE4Parse.UE4.Assets.Exports.Sound;
|
||||
using CUE4Parse.UE4.Assets.Exports.StaticMesh;
|
||||
@@ -636,32 +640,6 @@ public class CUE4ParseViewModel : ViewModel
|
||||
if (saveProperties || updateUi)
|
||||
{
|
||||
var displayData = result.GetDisplayData(saveProperties);
|
||||
|
||||
if (UserSettings.Default.MergeEditorOnlyDataExports && Provider.TryLoadPackage(entry.Path.SubstringBefore('.') + ".o.uasset", out var editorAsset))
|
||||
{
|
||||
var pkg = Provider.LoadPackage(entry.Path);
|
||||
var exports = pkg.GetExports().ToArray();
|
||||
var finalExports = new List<UObject>(exports);
|
||||
var editorOnlyDataExports = new HashSet<UObject>();
|
||||
|
||||
foreach (var export in exports)
|
||||
{
|
||||
var editorData = editorAsset.GetExportOrNull(export.Name + "EditorOnlyData");
|
||||
if (editorData == null)
|
||||
continue;
|
||||
|
||||
export.Properties.AddRange(editorData.Properties);
|
||||
editorOnlyDataExports.Add(editorData);
|
||||
}
|
||||
|
||||
if (editorOnlyDataExports.Count > 0)
|
||||
{
|
||||
finalExports.AddRange(editorAsset.GetExports().Where(editorExport => !editorOnlyDataExports.Contains(editorExport)));
|
||||
}
|
||||
|
||||
displayData = finalExports;
|
||||
}
|
||||
|
||||
TabControl.SelectedTab.SetDocumentText(JsonConvert.SerializeObject(displayData, Formatting.Indented), saveProperties, updateUi);
|
||||
if (saveProperties) break; // do not search for viewable exports if we are dealing with jsons
|
||||
}
|
||||
@@ -696,6 +674,11 @@ public class CUE4ParseViewModel : ViewModel
|
||||
ProcessAion2DatFile(entry, updateUi, saveProperties);
|
||||
break;
|
||||
}
|
||||
case "dat" when Provider.Versions.Game is GAME_AceCombat8WingsofTheve:
|
||||
{
|
||||
ProcessACE8DatFile(entry, updateUi, saveProperties);
|
||||
break;
|
||||
}
|
||||
case "bytes" when Provider.Versions.Game is GAME_RocoKingdomWorld:
|
||||
{
|
||||
ProcessRocoBinFile(entry, updateUi, saveProperties);
|
||||
@@ -1014,6 +997,7 @@ public class CUE4ParseViewModel : ViewModel
|
||||
}
|
||||
case "res": // just skip
|
||||
case "bytes": // wuthering waves
|
||||
case "ffxanim": // dead island 2
|
||||
break;
|
||||
default:
|
||||
{
|
||||
@@ -1137,6 +1121,43 @@ public class CUE4ParseViewModel : ViewModel
|
||||
|
||||
TabControl.SelectedTab.SetDocumentText(JsonConvert.SerializeObject(dbc, Formatting.Indented), saveProperties, updateUi);
|
||||
}
|
||||
|
||||
// Ace Combat 8
|
||||
void ProcessACE8DatFile(GameFile entry, bool updateUi, bool saveProperties)
|
||||
{
|
||||
TabControl.SelectedTab.Highlighter = AvalonExtensions.HighlighterSelector("json");
|
||||
|
||||
if (entry.NameWithoutExtension.EndsWith("_Cmn"))
|
||||
{
|
||||
TabControl.SelectedTab.SetDocumentText(JsonConvert.SerializeObject(ACE8LocDecrypt.ReadKeysDatFile(entry), Formatting.Indented), saveProperties, updateUi);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (Provider.TryGetGameFile(entry.PathWithoutExtension[..^1] + "Cmn." + entry.Extension, out var keysDatFile))
|
||||
{
|
||||
var keys = ACE8LocDecrypt.ReadKeysDatFile(keysDatFile);
|
||||
var values = ACE8LocDecrypt.ReadDatFile(entry);
|
||||
var locTable = new Dictionary<string, string>(Math.Max(keys.Count, values.Length));
|
||||
var k = 0;
|
||||
for (var i = 0; i < values.Length; i++)
|
||||
{
|
||||
if (keys.TryGetValue(i, out var key))
|
||||
{
|
||||
locTable[key] = values[i];
|
||||
}
|
||||
else
|
||||
{
|
||||
locTable[$"UnknownKey_{k++}"] = values[i];
|
||||
}
|
||||
}
|
||||
TabControl.SelectedTab.SetDocumentText(JsonConvert.SerializeObject(locTable, Formatting.Indented), saveProperties, updateUi);
|
||||
}
|
||||
else
|
||||
{
|
||||
TabControl.SelectedTab.SetDocumentText(JsonConvert.SerializeObject(ACE8LocDecrypt.ReadDatFile(entry), Formatting.Indented), saveProperties, updateUi);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private byte[] ProcessLuaFile(byte[] data)
|
||||
@@ -1227,13 +1248,23 @@ public class CUE4ParseViewModel : ViewModel
|
||||
}
|
||||
case UVerseDigest when isNone && pointer.Object.Value is UVerseDigest verseDigest:
|
||||
{
|
||||
if (!TabControl.CanAddTabs) return false;
|
||||
if (verseDigest.ReadableCode is null || !TabControl.CanAddTabs) return false;
|
||||
|
||||
TabControl.AddTab($"{verseDigest.Name}.verse");
|
||||
TabControl.SelectedTab.Highlighter = AvalonExtensions.HighlighterSelector("verse");
|
||||
TabControl.SelectedTab.SetDocumentText(Encoding.UTF8.GetString(verseDigest.ReadableCode), false, false);
|
||||
return true;
|
||||
}
|
||||
// Ace Combat 8
|
||||
case ULuaScript when isNone && pointer.Object.Value is ULuaScript luaScript:
|
||||
{
|
||||
if (!TabControl.CanAddTabs) return false;
|
||||
|
||||
TabControl.AddTab($"{luaScript.Name}.lua");
|
||||
TabControl.SelectedTab.Highlighter = AvalonExtensions.HighlighterSelector("lua");
|
||||
TabControl.SelectedTab.SetDocumentText(luaScript.Code, false, false);
|
||||
return true;
|
||||
}
|
||||
case UTexture when (isNone || saveTextures) && pointer.Object.Value is UTexture texture:
|
||||
{
|
||||
if (saveTextures)
|
||||
@@ -1545,6 +1576,8 @@ public class CUE4ParseViewModel : ViewModel
|
||||
case UBlueprintGeneratedClass when isNone && UserSettings.Default.PreviewWorlds:
|
||||
// case UPaperSprite when isNone && UserSettings.Default.PreviewMaterials:
|
||||
case UStaticMesh when isNone && UserSettings.Default.PreviewStaticMeshes:
|
||||
case UIRMesh when isNone && UserSettings.Default.PreviewStaticMeshes:
|
||||
case UHoudiniStaticMesh when isNone && UserSettings.Default.PreviewStaticMeshes:
|
||||
case UGeometryCollection when isNone && UserSettings.Default.PreviewStaticMeshes:
|
||||
case USkinnedAsset when isNone && UserSettings.Default.PreviewSkeletalMeshes:
|
||||
case USkeleton when isNone && UserSettings.Default.SaveSkeletonAsMesh:
|
||||
@@ -1559,6 +1592,9 @@ public class CUE4ParseViewModel : ViewModel
|
||||
return true;
|
||||
}
|
||||
case UStaticMesh when HasFlag(bulk, EBulkType.Meshes):
|
||||
case UIRMesh when HasFlag(bulk, EBulkType.Meshes):
|
||||
case UHoudiniAsset when HasFlag(bulk, EBulkType.Meshes):
|
||||
case UHoudiniStaticMesh when HasFlag(bulk, EBulkType.Meshes):
|
||||
case UGeometryCollection when HasFlag(bulk, EBulkType.Meshes):
|
||||
case USkinnedAsset when HasFlag(bulk, EBulkType.Meshes):
|
||||
case USkeleton when UserSettings.Default.SaveSkeletonAsMesh && HasFlag(bulk, EBulkType.Meshes):
|
||||
@@ -1624,11 +1660,11 @@ public class CUE4ParseViewModel : ViewModel
|
||||
TabControl.SelectedTab.TitleExtra = "Decompiled";
|
||||
TabControl.SelectedTab.Highlighter = AvalonExtensions.HighlighterSelector("cpp");
|
||||
|
||||
var pkg = Provider.LoadPackage(entry);
|
||||
UClassCookedMetaData cookedMetaData = null;
|
||||
try
|
||||
{
|
||||
var editorPkg = Provider.LoadPackage(entry.Path.Replace(".uasset", ".o.uasset"));
|
||||
cookedMetaData = editorPkg.GetExport<UClassCookedMetaData>("CookedClassMetaData");
|
||||
cookedMetaData = pkg.GetExportOrNull<UClassCookedMetaData>("CookedClassMetaData");
|
||||
}
|
||||
catch
|
||||
{
|
||||
@@ -1636,7 +1672,6 @@ public class CUE4ParseViewModel : ViewModel
|
||||
}
|
||||
|
||||
var cppList = new List<string>();
|
||||
var pkg = Provider.LoadPackage(entry);
|
||||
for (var i = 0; i < pkg.ExportMapLength; i++)
|
||||
{
|
||||
var pointer = new FPackageIndex(pkg, i + 1).ResolvedObject;
|
||||
|
||||
@@ -11,6 +11,7 @@ using CUE4Parse.GameTypes.Borderlands3.Assets.Exports;
|
||||
using CUE4Parse.GameTypes.Borderlands4.Assets.Exports;
|
||||
using CUE4Parse.GameTypes.FN.Assets.Exports.DataAssets;
|
||||
using CUE4Parse.GameTypes.LegoBatman.Assets;
|
||||
using CUE4Parse.GameTypes.Nascar.Assets.Exports;
|
||||
using CUE4Parse.GameTypes.RED.Assets.Exports;
|
||||
using CUE4Parse.GameTypes.SMG.UE4.Assets.Exports.Wwise;
|
||||
using CUE4Parse.GameTypes.SMG.UE4.Assets.Objects;
|
||||
@@ -31,6 +32,7 @@ using CUE4Parse.UE4.Assets.Exports.Fmod;
|
||||
using CUE4Parse.UE4.Assets.Exports.FMod;
|
||||
using CUE4Parse.UE4.Assets.Exports.Foliage;
|
||||
using CUE4Parse.UE4.Assets.Exports.GeometryCollection;
|
||||
using CUE4Parse.UE4.Assets.Exports.Houdini;
|
||||
using CUE4Parse.UE4.Assets.Exports.Internationalization;
|
||||
using CUE4Parse.UE4.Assets.Exports.LevelSequence;
|
||||
using CUE4Parse.UE4.Assets.Exports.Material;
|
||||
@@ -219,6 +221,8 @@ public class GameFileViewModel(GameFile asset) : ViewModel
|
||||
UFMODEvent or UFMODBank or UFMODBankLookup or UFMODBus
|
||||
or UFMODSnapshot or UFMODSnapshotReverb or UFMODVCA => EAssetFamily.FMod,
|
||||
|
||||
UHoudiniAsset or UHoudiniStaticMesh => EAssetFamily.Houdini,
|
||||
|
||||
_ => EAssetFamily.None,
|
||||
};
|
||||
|
||||
@@ -234,12 +238,15 @@ public class GameFileViewModel(GameFile asset) : ViewModel
|
||||
UClassCookedMetaData or UStructCookedMetaData or UEnumCookedMetaData => (EAssetCategory.CookedMetaData, EBulkType.None),
|
||||
|
||||
UStaticMesh => (EAssetCategory.StaticMesh, EBulkType.Meshes),
|
||||
UHoudiniStaticMesh => (EAssetCategory.StaticMesh, EBulkType.Meshes),
|
||||
USkeletalMesh => (EAssetCategory.SkeletalMesh, EBulkType.Meshes),
|
||||
UChaosClothAsset => (EAssetCategory.ChaosClothAsset, EBulkType.Meshes),
|
||||
UCustomizableObject => (EAssetCategory.CustomizableObject, EBulkType.None),
|
||||
UNaniteDisplacedMesh => (EAssetCategory.NaniteDisplacedMesh, EBulkType.None),
|
||||
UGeometryCollection => (EAssetCategory.GeometryCollection, EBulkType.Meshes),
|
||||
|
||||
UHoudiniAsset => (EAssetCategory.Data, EBulkType.Meshes),
|
||||
|
||||
UTexture => (EAssetCategory.Texture, EBulkType.Textures),
|
||||
|
||||
UMaterialInterface => (EAssetCategory.Material, EBulkType.None),
|
||||
@@ -294,6 +301,7 @@ public class GameFileViewModel(GameFile asset) : ViewModel
|
||||
UWubAudioEvent or UWubDialogueEvent when GameVersion is EGame.GAME_LEGOBatmanLegacyoftheDarkKnight => (EAssetCategory.LegoBatman, EBulkType.Audio), // Lego Batman: Legacy of the Dark Knight;
|
||||
UREDBinaryObject => (EAssetCategory.ArcSys, EBulkType.None), // Arc System Works games;
|
||||
UOrpheusBank or UOrpheusEvent => (EAssetCategory.GothamKnights, EBulkType.Audio), // Gotham Knights;
|
||||
UIRMesh => (EAssetCategory.Nascar, EBulkType.Meshes), // iRacing games;
|
||||
|
||||
_ => (EAssetCategory.All, EBulkType.None),
|
||||
};
|
||||
@@ -367,6 +375,7 @@ public class GameFileViewModel(GameFile asset) : ViewModel
|
||||
"acb" or "acf" or "adx" or "awb" or "hca" or "usm" => EAssetFamily.Criware,
|
||||
"bnk" or "pck" or "wem" => EAssetFamily.Wwise,
|
||||
"bank" or "fsb" => EAssetFamily.FMod,
|
||||
"hda" or "hip" => EAssetFamily.Houdini,
|
||||
_ => EAssetFamily.None,
|
||||
};
|
||||
|
||||
|
||||
@@ -55,6 +55,7 @@ public partial class AudioPlayer
|
||||
|
||||
if (UserSettings.Default.AddAudio.IsTriggered(e.Key))
|
||||
{
|
||||
e.Handled = true;
|
||||
var openFileDialog = new OpenFileDialog
|
||||
{
|
||||
Title = "Select an audio file",
|
||||
@@ -77,6 +78,10 @@ public partial class AudioPlayer
|
||||
_applicationView.AudioPlayer.Next();
|
||||
else if (UserSettings.Default.RemoveAudio.IsTriggered(e.Key))
|
||||
_applicationView.AudioPlayer.Remove();
|
||||
else
|
||||
return;
|
||||
|
||||
e.Handled = true;
|
||||
}
|
||||
|
||||
private void OnAudioFileMouseDoubleClick(object sender, MouseButtonEventArgs e)
|
||||
|
||||
@@ -58,12 +58,14 @@
|
||||
<SolidColorBrush x:Key="CriwareBrush" Color="#005bab" />
|
||||
<SolidColorBrush x:Key="WwiseBrush" Color="#0152a1" />
|
||||
<SolidColorBrush x:Key="FModBrush" Color="#00758f" />
|
||||
<SolidColorBrush x:Key="HoudiniBrush" Color="#ff6600" />
|
||||
|
||||
<!-- For specific games -->
|
||||
<SolidColorBrush x:Key="BorderlandsBrush" Color="Yellow"></SolidColorBrush>
|
||||
<SolidColorBrush x:Key="AionBrush" Color="DeepSkyBlue"></SolidColorBrush>
|
||||
<SolidColorBrush x:Key="RocoKingdomWorldBrush" Color="#fecf4d"></SolidColorBrush>
|
||||
<SolidColorBrush x:Key="DeltaForceBrush" Color="LightGreen"></SolidColorBrush>
|
||||
<SolidColorBrush x:Key="BatmanBrush" Color="Gold"></SolidColorBrush>
|
||||
<SolidColorBrush x:Key="ArcSysBrush" Color="Red"></SolidColorBrush>
|
||||
<SolidColorBrush x:Key="BorderlandsBrush" Color="Yellow" />
|
||||
<SolidColorBrush x:Key="AionBrush" Color="DeepSkyBlue" />
|
||||
<SolidColorBrush x:Key="RocoKingdomWorldBrush" Color="#fecf4d" />
|
||||
<SolidColorBrush x:Key="DeltaForceBrush" Color="LightGreen" />
|
||||
<SolidColorBrush x:Key="BatmanBrush" Color="Gold" />
|
||||
<SolidColorBrush x:Key="ArcSysBrush" Color="Red" />
|
||||
<SolidColorBrush x:Key="NascarBrush" Color="#dd002a" />
|
||||
</ResourceDictionary>
|
||||
|
||||
@@ -23,17 +23,6 @@ public sealed class FolderTree : ListBox
|
||||
|
||||
public event EventHandler OpenAssets;
|
||||
|
||||
public FolderTree()
|
||||
{
|
||||
IsVisibleChanged += (_, e) =>
|
||||
{
|
||||
if (e.NewValue is true)
|
||||
{
|
||||
RevealSelection();
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
public void SelectFolder(TreeItem folder)
|
||||
{
|
||||
Folders.Reveal(folder);
|
||||
@@ -53,14 +42,6 @@ public sealed class FolderTree : ListBox
|
||||
}
|
||||
}
|
||||
|
||||
public void RevealSelection()
|
||||
{
|
||||
if (SelectedItem is TreeItem folder)
|
||||
{
|
||||
this.RevealItem(folder, alignToTop: true);
|
||||
}
|
||||
}
|
||||
|
||||
private void ToggleFolder(TreeItem folder)
|
||||
{
|
||||
if (Folders == null)
|
||||
|
||||
@@ -102,6 +102,7 @@ public class FileToGeometryConverter : IMultiValueConverter
|
||||
EAssetCategory.DeltaForce => ("DeltaForceIcon", "DeltaForceBrush"),
|
||||
EAssetCategory.LegoBatman or EAssetCategory.GothamKnights => ("BatmanIcon", "BatmanBrush"),
|
||||
EAssetCategory.ArcSys => ("ArcSysIcon", "ArcSysBrush"),
|
||||
EAssetCategory.Nascar => ("NascarIcon", "NascarBrush"),
|
||||
|
||||
_ => ("AssetIcon", "NeutralBrush")
|
||||
};
|
||||
@@ -117,6 +118,8 @@ public class FileToGeometryConverter : IMultiValueConverter
|
||||
(EAssetFamily.FMod, EAssetCategory.Data) => ("FModIcon", "FModBrush"),
|
||||
(EAssetFamily.FMod, _) => ("FModIcon", brush),
|
||||
|
||||
(EAssetFamily.Houdini, _) => ("HoudiniIcon", "HoudiniBrush"),
|
||||
|
||||
_ => (geometry, brush),
|
||||
};
|
||||
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -246,27 +246,6 @@
|
||||
Margin="0 5 0 10"
|
||||
Style="{DynamicResource {x:Static adonisUi:Styles.ToggleSwitch}}" />
|
||||
|
||||
<TextBlock Grid.Row="20"
|
||||
Grid.Column="0"
|
||||
Text="Merge Editor-Only Data (.o.uasset)"
|
||||
VerticalAlignment="Center"
|
||||
ToolTip="Reads .o.uasset packages and merges their editor-only data into the parent asset. Useful for JSON-based asset export workflows"
|
||||
Margin="0 0 0 5"
|
||||
Visibility="{Binding DataContext.CUE4Parse.Provider.ProjectName,
|
||||
RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type local:Views.SettingsView}},
|
||||
Converter={x:Static converters:ProjectNameToVisibilityConverter.Instance},
|
||||
ConverterParameter='FortniteGame'}" />
|
||||
<CheckBox Grid.Row="20"
|
||||
Grid.Column="2"
|
||||
Content="{Binding IsChecked, RelativeSource={RelativeSource Self}, Converter={x:Static converters:BoolToToggleConverter.Instance}}"
|
||||
IsChecked="{Binding MergeEditorOnlyDataExports, Source={x:Static local:Settings.UserSettings.Default}, Mode=TwoWay}"
|
||||
Margin="0 5 0 10"
|
||||
Style="{DynamicResource {x:Static adonisUi:Styles.ToggleSwitch}}"
|
||||
Visibility="{Binding DataContext.CUE4Parse.Provider.ProjectName,
|
||||
RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type local:Views.SettingsView}},
|
||||
Converter={x:Static converters:ProjectNameToVisibilityConverter.Instance},
|
||||
ConverterParameter='FortniteGame'}" />
|
||||
|
||||
<TextBlock Grid.Row="21"
|
||||
Grid.Column="0"
|
||||
Text="CRIWARE Decryption Key"
|
||||
|
||||
Reference in New Issue
Block a user