From 52d8aa6a05a965ad68343d5ba2da71e16ec6fb62 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B5=A9=E5=8A=AB=E8=80=8512345?= <3112611479@qq.com> Date: Wed, 31 Dec 2025 06:34:37 +0800 Subject: [PATCH 1/3] fix CLI `--mode animator` not exporting AnimationClips --- AssetStudioCLI/Options/CLIOptions.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/AssetStudioCLI/Options/CLIOptions.cs b/AssetStudioCLI/Options/CLIOptions.cs index 37cd04451..237891562 100644 --- a/AssetStudioCLI/Options/CLIOptions.cs +++ b/AssetStudioCLI/Options/CLIOptions.cs @@ -679,6 +679,7 @@ public static void ParseArgs(string[] args) o_exportAssetTypes.Value = new List { ClassIDType.Animator, + ClassIDType.AnimationClip, ClassIDType.Mesh, ClassIDType.Texture2D, }; From daaf3cedb6646d568da85bcc2f98d7784e0cc55f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B5=A9=E5=8A=AB=E8=80=8512345?= <3112611479@qq.com> Date: Wed, 31 Dec 2025 14:08:40 +0800 Subject: [PATCH 2/3] support `--fbx-uvs-as-diffuse` in `--mode animator` --- AssetStudioCLI/Options/CLIOptions.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AssetStudioCLI/Options/CLIOptions.cs b/AssetStudioCLI/Options/CLIOptions.cs index 237891562..81c11ff74 100644 --- a/AssetStudioCLI/Options/CLIOptions.cs +++ b/AssetStudioCLI/Options/CLIOptions.cs @@ -727,7 +727,7 @@ public static void ParseArgs(string[] args) flagIndexes.Add(i); break; case "--fbx-uvs-as-diffuse": - if (o_workMode.Value != WorkMode.SplitObjects) + if (o_workMode.Value != WorkMode.SplitObjects && o_workMode.Value != WorkMode.Animator) { Console.WriteLine($"{"Error".Color(brightRed)} during parsing [{flag.Color(brightYellow)}] flag. This flag is not suitable for the current working mode [{o_workMode.Value}].\n"); ShowOptionDescription(o_workMode); From 81a348f02c427e3da890334d6c4172e828fa1c2b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B5=A9=E5=8A=AB=E8=80=8512345?= <3112611479@qq.com> Date: Thu, 1 Jan 2026 08:40:06 +0800 Subject: [PATCH 3/3] CLI: Add FBX ASCII format support --- AssetStudioCLI/Exporter.cs | 1 + AssetStudioCLI/Options/CLIOptions.cs | 17 ++++++++++++++++- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/AssetStudioCLI/Exporter.cs b/AssetStudioCLI/Exporter.cs index 90260b1e6..35b93c6a5 100644 --- a/AssetStudioCLI/Exporter.cs +++ b/AssetStudioCLI/Exporter.cs @@ -287,6 +287,7 @@ private static void ExportFbx(IImported convert, string exportPath) ScaleFactor = CLIOptions.o_fbxScaleFactor.Value, ExportAllUvsAsDiffuseMaps = CLIOptions.f_fbxUvsAsDiffuseMaps.Value, ExportAnimations = CLIOptions.o_fbxAnimMode.Value != AnimationExportMode.Skip, + FbxFormat = CLIOptions.f_fbxAsciiFormat.Value == true ? 1 : 0, }; ModelExporter.ExportFbx(exportPath, convert, fbxSettings); } diff --git a/AssetStudioCLI/Options/CLIOptions.cs b/AssetStudioCLI/Options/CLIOptions.cs index 81c11ff74..d23d1f42a 100644 --- a/AssetStudioCLI/Options/CLIOptions.cs +++ b/AssetStudioCLI/Options/CLIOptions.cs @@ -112,6 +112,7 @@ internal static class CLIOptions public static Option o_fbxBoneSize; public static Option o_fbxAnimMode; public static Option f_fbxUvsAsDiffuseMaps; + public static Option f_fbxAsciiFormat; //filter public static Option> o_filterByName; public static Option> o_filterByContainer; @@ -407,7 +408,16 @@ private static void InitOptions() optionName: "--fbx-uvs-as-diffuse", optionDescription: "(Flag) If specified, Studio will export all UVs as Diffuse maps.\n" + "Сan be useful if you cannot find some UVs after exporting (e.g. in Blender)\n" + - "(But can also cause some bugs with UVs)", + "(But can also cause some bugs with UVs)\n", + optionExample: "", + optionHelpGroup: HelpGroups.FBX + ); + f_fbxAsciiFormat = new GroupedOption + ( + optionDefaultValue: false, + optionName: "--fbx-ascii-format", + optionDescription: "(Flag) If specified, Studio will export FBX in ASCII format.\n" + + "If not specified, Binary format will be used", optionExample: "", optionHelpGroup: HelpGroups.FBX ); @@ -736,6 +746,10 @@ public static void ParseArgs(string[] args) f_fbxUvsAsDiffuseMaps.Value = true; flagIndexes.Add(i); break; + case "--fbx-ascii-format": + f_fbxAsciiFormat.Value = true; + flagIndexes.Add(i); + break; case "--filter-with-regex": f_filterWithRegex.Value = true; flagIndexes.Add(i); @@ -1482,6 +1496,7 @@ public static void ShowCurrentOptions() sb.AppendLine($"# FBX Bone Size: {o_fbxBoneSize}"); sb.AppendLine($"# FBX Animation Mode: {o_fbxAnimMode}"); sb.AppendLine($"# FBX UVs as Diffuse Maps: {f_fbxUvsAsDiffuseMaps}"); + sb.AppendLine($"# FBX Export in ASCII Format: {f_fbxAsciiFormat}"); break; } sb.AppendLine("======");