mirror of
https://github.com/4sval/FModel.git
synced 2026-03-21 17:24:26 -05:00
Borderlands 4 - GbxAudio support (#645)
Some checks are pending
FModel QA Builder / build (push) Waiting to run
Some checks are pending
FModel QA Builder / build (push) Waiting to run
This commit is contained in:
parent
40ed646dcd
commit
6b3a4ae785
|
|
@ -1 +1 @@
|
|||
Subproject commit 9596944ac2e491ffe29c0c961a27e4fa6b07fb88
|
||||
Subproject commit 1774159e9c85f4b42623cbd6e920b99c3b60b9f1
|
||||
|
|
@ -156,4 +156,6 @@ public enum EAssetCategory : uint
|
|||
SoundBank = Media + 4,
|
||||
AudioEvent = Media + 5,
|
||||
Particle = AssetCategoryExtensions.CategoryBase + (9 << 16),
|
||||
GameSpecific = AssetCategoryExtensions.CategoryBase + (10 << 16),
|
||||
Borderlands4 = GameSpecific + 1,
|
||||
}
|
||||
|
|
|
|||
|
|
@ -24,6 +24,8 @@ using CUE4Parse.GameTypes.AoC.Objects;
|
|||
using CUE4Parse.GameTypes.AshEchoes.FileProvider;
|
||||
using CUE4Parse.GameTypes.SMG.UE4.Assets.Exports.Wwise;
|
||||
using CUE4Parse.GameTypes.KRD.Assets.Exports;
|
||||
using CUE4Parse.GameTypes.Borderlands4.Assets.Exports;
|
||||
using CUE4Parse.GameTypes.Borderlands4.Wwise;
|
||||
using CUE4Parse.MappingsProvider;
|
||||
using CUE4Parse.UE4.AssetRegistry;
|
||||
using CUE4Parse.UE4.Assets;
|
||||
|
|
@ -1212,6 +1214,37 @@ public class CUE4ParseViewModel : ViewModel
|
|||
}
|
||||
return false;
|
||||
}
|
||||
// Borderlands 4
|
||||
case UFaceFXAnimSet when (isNone || saveAudio) && pointer.Object.Value is UFaceFXAnimSet faceFXAnimSet:
|
||||
{
|
||||
if (Provider.Versions.Game is not EGame.GAME_Borderlands4)
|
||||
return false;
|
||||
|
||||
foreach (var faceFXAnimData in faceFXAnimSet.FaceFXAnimDataList)
|
||||
{
|
||||
var extractedSounds = WwiseProvider.ExtractAudioEventBorderlands4(faceFXAnimData.ID.Name, false);
|
||||
foreach (var sound in extractedSounds)
|
||||
{
|
||||
SaveAndPlaySound(sound.OutputPath, sound.Extension, sound.Data, saveAudio);
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
// Borderlands 4
|
||||
case UGbxGraphAsset when (isNone || saveAudio) && pointer.Object.Value is UGbxGraphAsset gbxGraphAsset:
|
||||
{
|
||||
foreach (var (eventName, useSoundTag) in GbxAudioUtil.GetAndClearEvents())
|
||||
{
|
||||
var extractedSounds = WwiseProvider.ExtractAudioEventBorderlands4(eventName, useSoundTag);
|
||||
foreach (var sound in extractedSounds)
|
||||
{
|
||||
SaveAndPlaySound(sound.OutputPath, sound.Extension, sound.Data, saveAudio);
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
case UWorld when isNone && UserSettings.Default.PreviewWorlds:
|
||||
case UBlueprintGeneratedClass when isNone && UserSettings.Default.PreviewWorlds && TabControl.SelectedTab.ParentExportType switch
|
||||
{
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ using System.Windows.Media;
|
|||
using System.Windows.Media.Imaging;
|
||||
|
||||
using CUE4Parse.FileProvider.Objects;
|
||||
using CUE4Parse.GameTypes.Borderlands4.Assets.Exports;
|
||||
using CUE4Parse.GameTypes.FN.Assets.Exports.DataAssets;
|
||||
using CUE4Parse.GameTypes.SMG.UE4.Assets.Exports.Wwise;
|
||||
using CUE4Parse.GameTypes.SMG.UE4.Assets.Objects;
|
||||
|
|
@ -42,6 +43,7 @@ using CUE4Parse.UE4.Objects.PhysicsEngine;
|
|||
using CUE4Parse.UE4.Objects.RigVM;
|
||||
using CUE4Parse.UE4.Objects.UObject;
|
||||
using CUE4Parse.UE4.Objects.UObject.Editor;
|
||||
using CUE4Parse.UE4.Versions;
|
||||
using CUE4Parse.Utils;
|
||||
|
||||
using CUE4Parse_Conversion.Textures;
|
||||
|
|
@ -249,6 +251,10 @@ public class GameFileViewModel(GameFile asset) : ViewModel
|
|||
|
||||
UNiagaraSystem or UNiagaraScriptBase or UParticleSystem => (EAssetCategory.Particle, EBulkType.None),
|
||||
|
||||
// Game specific assets below
|
||||
UGbxGraphAsset => (EAssetCategory.Borderlands4, EBulkType.Audio), // Borderlands 4
|
||||
UFaceFXAnimSet when _applicationView.CUE4Parse?.Provider.Versions.Game is EGame.GAME_Borderlands4 => (EAssetCategory.Borderlands4, EBulkType.Audio), // Borderlands 4
|
||||
|
||||
_ => (EAssetCategory.All, EBulkType.None),
|
||||
};
|
||||
|
||||
|
|
@ -333,6 +339,12 @@ public class GameFileViewModel(GameFile asset) : ViewModel
|
|||
case "log":
|
||||
case "pem":
|
||||
case "xml":
|
||||
case "gitignore":
|
||||
case "html":
|
||||
case "css":
|
||||
case "js":
|
||||
case "data":
|
||||
case "csv":
|
||||
AssetCategory = EAssetCategory.Data;
|
||||
break;
|
||||
case "ushaderbytecode":
|
||||
|
|
|
|||
|
|
@ -42,4 +42,12 @@
|
|||
<SolidColorBrush x:Key="LuaBrush" Color="DarkBlue" />
|
||||
<SolidColorBrush x:Key="JsonXmlBrush" Color="LightGreen" />
|
||||
<SolidColorBrush x:Key="CodeBrush" Color="SandyBrown" />
|
||||
<SolidColorBrush x:Key="HtmlBrush" Color="Tomato" />
|
||||
<SolidColorBrush x:Key="JavaScriptBrush" Color="Yellow" />
|
||||
<SolidColorBrush x:Key="CssBrush" Color="MediumPurple" />
|
||||
<SolidColorBrush x:Key="GitBrush" Color="Coral" />
|
||||
<SolidColorBrush x:Key="CsvBrush" Color="ForestGreen" />
|
||||
|
||||
<!-- For specific games -->
|
||||
<SolidColorBrush x:Key="BorderlandsBrush" Color="Yellow"></SolidColorBrush>
|
||||
</ResourceDictionary>
|
||||
|
|
|
|||
|
|
@ -79,11 +79,18 @@ public class FileToGeometryConverter : IMultiValueConverter
|
|||
"function" => ("FunctionIcon", "NeutralBrush"),
|
||||
"bin" => ("DataTableIcon", "BinaryBrush"),
|
||||
"xml" => ("XmlIcon", "JsonXmlBrush"),
|
||||
"gitignore" => ("GitIcon", "GitBrush"),
|
||||
"html" => ("HtmlIcon", "HtmlBrush"),
|
||||
"js" => ("JavaScriptIcon", "JavaScriptBrush"),
|
||||
"css" => ("CssIcon", "CssBrush"),
|
||||
"csv" => ("CsvIcon", "CsvBrush"),
|
||||
_ => ("DataTableIcon", "NeutralBrush")
|
||||
},
|
||||
|
||||
EAssetCategory.ByteCode => ("CodeIcon", "CodeBrush"),
|
||||
|
||||
EAssetCategory.Borderlands4 => ("BorderlandsIcon", "BorderlandsBrush"),
|
||||
|
||||
_ => ("AssetIcon", "NeutralBrush")
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -92,4 +92,12 @@
|
|||
<Geometry x:Key="CertificateIcon">M4,3C2.89,3 2,3.89 2,5V15A2,2 0 0,0 4,17H12V22L15,19L18,22V17H20A2,2 0 0,0 22,15V8L22,6V5A2,2 0 0,0 20,3H16V3H4M12,5L15,7L18,5V8.5L21,10L18,11.5V15L15,13L12,15V11.5L9,10L12,8.5V5M4,5H9V7H4V5M4,9H7V11H4V9M4,13H9V15H4V13Z</Geometry>
|
||||
<Geometry x:Key="RedirectorIcon">M289.718,1208.22 L283.795,1202.28 C283.404,1201.89 282.768,1201.89 282.376,1202.28 C281.984,1202.68 282,1203.35 282,1204 L282,1207 L266,1207 L266,1204 C266,1203.35 266.016,1202.68 265.624,1202.28 C265.232,1201.89 264.597,1201.89 264.205,1202.28 L258.282,1208.22 C258.073,1208.43 257.983,1208.71 257.998,1208.98 C257.983,1209.26 258.073,1209.54 258.282,1209.75 L264.205,1215.69 C264.597,1216.08 265.232,1216.08 265.624,1215.69 C266.016,1215.29 266,1214.39 266,1214 L266,1211 L282,1211 L282,1214 C282,1214.65 281.984,1215.29 282.376,1215.69 C282.768,1216.08 283.404,1216.08 283.795,1215.69 L289.718,1209.75 C289.927,1209.54 290.017,1209.26 290.002,1208.98 C290.017,1208.71 289.927,1208.43 289.718,1208.22</Geometry>
|
||||
<Geometry x:Key="CodeIcon">M13,9H18.5L13,3.5V9M6,2H14L20,8V20A2,2 0 0,1 18,22H6C4.89,22 4,21.1 4,20V4C4,2.89 4.89,2 6,2M6.12,15.5L9.86,19.24L11.28,17.83L8.95,15.5L11.28,13.17L9.86,11.76L6.12,15.5M17.28,15.5L13.54,11.76L12.12,13.17L14.45,15.5L12.12,17.83L13.54,19.24L17.28,15.5Z</Geometry>
|
||||
<Geometry x:Key="GitIcon">M2.6,10.59L8.38,4.8L10.07,6.5C9.83,7.35 10.22,8.28 11,8.73V14.27C10.4,14.61 10,15.26 10,16A2,2 0 0,0 12,18A2,2 0 0,0 14,16C14,15.26 13.6,14.61 13,14.27V9.41L15.07,11.5C15,11.65 15,11.82 15,12A2,2 0 0,0 17,14A2,2 0 0,0 19,12A2,2 0 0,0 17,10C16.82,10 16.65,10 16.5,10.07L13.93,7.5C14.19,6.57 13.71,5.55 12.78,5.16C12.35,5 11.9,4.96 11.5,5.07L9.8,3.38L10.59,2.6C11.37,1.81 12.63,1.81 13.41,2.6L21.4,10.59C22.19,11.37 22.19,12.63 21.4,13.41L13.41,21.4C12.63,22.19 11.37,22.19 10.59,21.4L2.6,13.41C1.81,12.63 1.81,11.37 2.6,10.59Z</Geometry>
|
||||
<Geometry x:Key="HtmlIcon">M12,17.56L16.07,16.43L16.62,10.33H9.38L9.2,8.3H16.8L17,6.31H7L7.56,12.32H14.45L14.22,14.9L12,15.5L9.78,14.9L9.64,13.24H7.64L7.93,16.43L12,17.56M4.07,3H19.93L18.5,19.2L12,21L5.5,19.2L4.07,3Z</Geometry>
|
||||
<Geometry x:Key="JavaScriptIcon">M3,3H21V21H3V3M7.73,18.04C8.13,18.89 8.92,19.59 10.27,19.59C11.77,19.59 12.8,18.79 12.8,17.04V11.26H11.1V17C11.1,17.86 10.75,18.08 10.2,18.08C9.62,18.08 9.38,17.68 9.11,17.21L7.73,18.04M13.71,17.86C14.21,18.84 15.22,19.59 16.8,19.59C18.4,19.59 19.6,18.76 19.6,17.23C19.6,15.82 18.79,15.19 17.35,14.57L16.93,14.39C16.2,14.08 15.89,13.87 15.89,13.37C15.89,12.96 16.2,12.64 16.7,12.64C17.18,12.64 17.5,12.85 17.79,13.37L19.1,12.5C18.55,11.54 17.77,11.17 16.7,11.17C15.19,11.17 14.22,12.13 14.22,13.4C14.22,14.78 15.03,15.43 16.25,15.95L16.67,16.13C17.45,16.47 17.91,16.68 17.91,17.26C17.91,17.74 17.46,18.09 16.76,18.09C15.93,18.09 15.45,17.66 15.09,17.06L13.71,17.86Z</Geometry>
|
||||
<Geometry x:Key="CssIcon">M5,3L4.35,6.34H17.94L17.5,8.5H3.92L3.26,11.83H16.85L16.09,15.64L10.61,17.45L5.86,15.64L6.19,14H2.85L2.06,18L9.91,21L18.96,18L20.16,11.97L20.4,10.76L21.94,3H5Z</Geometry>
|
||||
<Geometry x:Key="CsvIcon">M14 2H6C4.9 2 4 2.9 4 4V20C4 21.1 4.9 22 6 22H18C19.1 22 20 21.1 20 20V8L14 2M15 16L13 20H10L12 16H9V11H15V16M13 9V3.5L18.5 9H13Z</Geometry>
|
||||
|
||||
<!-- For specific games-->
|
||||
<Geometry x:Key="BorderlandsIcon">M13,9V3.5L18.5,9M6,2C4.89,2 4,2.89 4,4V20A2,2 0 0,0 6,22H18A2,2 0 0,0 20,20V8L14,2H6 ZM12,11A3,3 0 1,0 12,17A3,3 0 0,0 12,11 ZM12,12.5L14,16H13L12,14.5L11,16H10L12,12.5Z</Geometry>
|
||||
</ResourceDictionary>
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user