mirror of
https://github.com/4sval/FModel.git
synced 2026-08-22 09:24:32 -05:00
submodule update
This commit is contained in:
Submodule CUE4Parse updated: 6c4d60ae06...fd8613ad06
@@ -78,18 +78,18 @@ namespace FModel.Creator
|
||||
{
|
||||
while (true)
|
||||
{
|
||||
if (!TryGetPackageIndexExport(packageIndex, out UExport export)) return null;
|
||||
if (!TryGetPackageIndexExport(packageIndex, out UObject export)) return null;
|
||||
switch (export)
|
||||
{
|
||||
case UTexture2D texture:
|
||||
return GetBitmap(texture);
|
||||
case UMaterialInstanceConstant material:
|
||||
return GetBitmap(material);
|
||||
case UObject uObject:
|
||||
default:
|
||||
{
|
||||
if (uObject.TryGetValue(out FSoftObjectPath previewImage, "LargePreviewImage", "SmallPreviewImage")) return GetBitmap(previewImage);
|
||||
if (uObject.TryGetValue(out string largePreview, "LargePreviewImage")) return GetBitmap(largePreview);
|
||||
if (uObject.TryGetValue(out FPackageIndex smallPreview, "SmallPreviewImage"))
|
||||
if (export.TryGetValue(out FSoftObjectPath 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;
|
||||
@@ -97,8 +97,6 @@ namespace FModel.Creator
|
||||
|
||||
return null;
|
||||
}
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -139,7 +137,7 @@ namespace FModel.Creator
|
||||
return bmp;
|
||||
}
|
||||
|
||||
public static bool TryGetPackageIndexExport<T>(FPackageIndex packageIndex, out T export) where T : UExport
|
||||
public static bool TryGetPackageIndexExport<T>(FPackageIndex packageIndex, out T export) where T : UObject
|
||||
{
|
||||
if (packageIndex.ResolvedObject == null)
|
||||
{
|
||||
@@ -172,19 +170,19 @@ namespace FModel.Creator
|
||||
}
|
||||
|
||||
// fullpath must be either without any extension or with the export objectname
|
||||
public static bool TryLoadObject<T>(string fullPath, out T export) where T : UExport
|
||||
public static bool TryLoadObject<T>(string fullPath, out T export) where T : UObject
|
||||
{
|
||||
return _applicationView.CUE4Parse.Provider.TryLoadObject(fullPath, out export);
|
||||
}
|
||||
|
||||
public static IEnumerable<UExport> LoadExports(string fullPath)
|
||||
public static IEnumerable<UObject> LoadExports(string fullPath)
|
||||
{
|
||||
return _applicationView.CUE4Parse.Provider.LoadObjectExports(fullPath);
|
||||
}
|
||||
|
||||
public static string GetLocalizedResource(string namespacee, string key, string defaultValue)
|
||||
public static string GetLocalizedResource(string @namespace, string key, string defaultValue)
|
||||
{
|
||||
return _applicationView.CUE4Parse.Provider.GetLocalizedString(namespacee, key, defaultValue);
|
||||
return _applicationView.CUE4Parse.Provider.GetLocalizedString(@namespace, key, defaultValue);
|
||||
}
|
||||
|
||||
public static string GetFullPath(string partialPath)
|
||||
|
||||
@@ -19,7 +19,6 @@ using CUE4Parse.UE4.Assets.Exports.Sound;
|
||||
using CUE4Parse.UE4.Assets.Exports.Texture;
|
||||
using CUE4Parse.UE4.Assets.Exports.Wwise;
|
||||
using CUE4Parse.UE4.Localization;
|
||||
using CUE4Parse.UE4.Objects.UObject;
|
||||
using CUE4Parse.UE4.Oodle.Objects;
|
||||
using CUE4Parse.UE4.Wwise;
|
||||
using CUE4Parse_Conversion.Materials;
|
||||
@@ -533,7 +532,7 @@ namespace FModel.ViewModels
|
||||
ExportData(fullPath);
|
||||
}
|
||||
|
||||
private bool CheckExport(UExport export) // return if this loads an image
|
||||
private bool CheckExport(UObject export) // return if this loads an image
|
||||
{
|
||||
switch (export)
|
||||
{
|
||||
@@ -574,9 +573,9 @@ namespace FModel.ViewModels
|
||||
|
||||
return false;
|
||||
}
|
||||
case UObject uObject:
|
||||
default:
|
||||
{
|
||||
using var package = new CreatorPackage(uObject, UserSettings.Default.CosmeticStyle);
|
||||
using var package = new CreatorPackage(export, UserSettings.Default.CosmeticStyle);
|
||||
if (!package.TryConstructCreator(out var creator)) return false;
|
||||
|
||||
creator.ParseForInfo();
|
||||
@@ -584,8 +583,6 @@ namespace FModel.ViewModels
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
private void SetImage(SKImage img)
|
||||
|
||||
@@ -18,4 +18,13 @@ To use FModel, you need to have **[.NET 5](https://dotnet.microsoft.com/download
|
||||
- [@GMatrix](https://github.com/GMatrixGames)
|
||||
- [@Tiger](https://github.com/XTigerHyperX)
|
||||
|
||||
## Support
|
||||
|
||||
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=EP9SSWG8MW4UC&source=url)
|
||||
|
||||
<p>This project is supported by:</p>
|
||||
<p>
|
||||
<a href="https://www.jetbrains.com/">
|
||||
<img src="https://cdn.fmodel.app/i/svg/jetbrains.svg" width="256px">
|
||||
</a>
|
||||
</p>
|
||||
Reference in New Issue
Block a user