mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-21 10:47:04 +02:00
feat: export
This commit is contained in:
1 parent
8b268cb647
commit
22e4553720
4 files changed
+26
-3
No files matched your search
@@ -1,3 +1,6 @@
|
||||
[submodule "submodules/blitzkit-closed"]
|
||||
path = submodules/blitzkit-closed
|
||||
url = https://github.com/tresabhi/blitzkit-closed
|
||||
[submodule "submodules/CUE4Parse"]
|
||||
path = submodules/CUE4Parse
|
||||
url = https://github.com/FabianFG/CUE4Parse
|
||||
@@ -7,11 +7,11 @@
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="../../submodules/CUE4Parse/CUE4Parse-Conversion/CUE4Parse-Conversion.csproj" />
|
||||
<ProjectReference Include="../../submodules/CUE4Parse/CUE4Parse/CUE4Parse.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="CUE4Parse" Version="1.2.1" />
|
||||
<PackageReference Include="DotNet.Glob" Version="3.1.3" />
|
||||
<PackageReference Include="Google.Protobuf" Version="3.29.3" />
|
||||
</ItemGroup>
|
||||
|
||||
@@ -1,8 +1,15 @@
|
||||
using Blitzkit;
|
||||
using BlitzKit.CLI.Models;
|
||||
using BlitzKit.CLI.Utils;
|
||||
using CUE4Parse_Conversion;
|
||||
using CUE4Parse_Conversion.Animations;
|
||||
using CUE4Parse_Conversion.Meshes;
|
||||
using CUE4Parse_Conversion.Textures;
|
||||
using CUE4Parse_Conversion.UEFormat.Enums;
|
||||
using CUE4Parse.UE4.Assets.Exports.Engine;
|
||||
using CUE4Parse.UE4.Assets.Exports.Material;
|
||||
using CUE4Parse.UE4.Assets.Exports.StaticMesh;
|
||||
using CUE4Parse.UE4.Assets.Exports.Texture;
|
||||
using CUE4Parse.UE4.Objects.UObject;
|
||||
using CUE4Parse.Utils;
|
||||
using Google.Protobuf.Collections;
|
||||
@@ -66,9 +73,21 @@ namespace BlitzKit.CLI.Functions
|
||||
var hullVisual = hull.GetObject("VisualData");
|
||||
var hullMeshSettings = hullVisual.GetStruct("MeshSettings");
|
||||
var hullMesh = hullMeshSettings.GetSoftObject<UStaticMesh>("Mesh");
|
||||
MeshExporter hullMeshExporter = new(
|
||||
hullMesh,
|
||||
new()
|
||||
{
|
||||
MeshFormat = EMeshFormat.Gltf2,
|
||||
ExportMaterials = true,
|
||||
ExportMorphTargets = false,
|
||||
LodFormat = ELodFormat.FirstLod,
|
||||
TextureFormat = ETextureFormat.Jpeg,
|
||||
SocketFormat = ESocketFormat.None,
|
||||
Platform = ETexturePlatform.DesktopMobile,
|
||||
}
|
||||
);
|
||||
|
||||
// var hullMesh = hullMeshSettings.GetSoftObject("Mesh");
|
||||
// GLB hullGlb = new(hullMesh);
|
||||
hullMeshExporter.TryWriteToDir(new("../../temp"), out _, out _);
|
||||
|
||||
return new() { Id = tankId };
|
||||
}
|
||||
|
||||
Submodule
+1
Submodule submodules/CUE4Parse added at e45f854722.
Reference in new issue
Block a user