Skip to content

Conversation

@haojiezhe12345
Copy link

@haojiezhe12345 haojiezhe12345 commented Dec 30, 2025

1. Fix --fbx-animation all not working with --mode animator

with CLI option --mode animator --fbx-animation all it should export Animator + AnimationClips, but it fails to add AnimationClips because the type is not added to the o_exportAssetTypes list

as seen in ExportAnimator(), Studio.cs:961, it has an exportAllAnimations flag which adds AnimationClips to animationList, but because all AnimationClips is filtered out, nothing will be added

public static void ExportAnimator()
{
    var animationList = CLIOptions.o_fbxAnimMode.Value == AnimationExportMode.Auto
        ? null
        : new List<AssetItem>();
    // `animationList` exists if `--fbx-animation` is set to all/skip

    var exportAllAnimations = CLIOptions.o_fbxAnimMode.Value == AnimationExportMode.All;
    // true if `--fbx-animation all`

    Logger.Info("Searching for Animator assets...");
    var animatorList = new List<AssetItem>();
    foreach (var asset in parsedAssetsList) // `AnimationClip`s is filtered out
    {
        switch (asset.Type)
        {
            case ClassIDType.Animator:
                animatorList.Add(asset);
                break;
            case ClassIDType.AnimationClip when exportAllAnimations:
                animationList?.Add(asset); // never reaches
                break;

as observed, parsedAssetsList is added by ParseAssets(), and the exportable filtering logic is located at Studio.cs:332

isExportable = CLIOptions.o_exportAssetTypes.Value.Contains(asset.type); // filter by `o_exportAssetTypes`
if (isExportable || (CLIOptions.f_loadAllAssets.Value && CLIOptions.o_exportAssetTypes.Value == CLIOptions.o_exportAssetTypes.DefaultValue))
{
    fileAssetsList.Add(assetItem);
}

by adding ClassIDType.AnimationClip to o_exportAssetTypes in WorkMode.Animator, AnimationClips are kept and animations will be exported in the model

it is sure that AnimationExportMode.All (--fbx-animation all) is designed to use here because this is the only reference to it

image

2. Fix the 'unsupported' message for --fbx-uvs-as-diffuse in --mode animator

--fbx-uvs-as-diffuse is designed to work with FBX export where WorkMode.SplitObjects does, but WorkMode.Animator also does this job. Both these two modes should accept this flag

3. Added CLI option --fbx-ascii-format

With this switch, FBX will be exported in ASCII format, otherwise in Binary.

@haojiezhe12345 haojiezhe12345 changed the title Fix CLI --mode animator --fbx-animation all not exporting AnimationClips Fix CLI --mode animator not exporting AnimationClip with --fbx-animation all, and add support for --fbx-uvs-as-diffuse Dec 31, 2025
@haojiezhe12345 haojiezhe12345 changed the title Fix CLI --mode animator not exporting AnimationClip with --fbx-animation all, and add support for --fbx-uvs-as-diffuse Fix CLI --mode animator not exporting AnimationClip with --fbx-animation all, and add support for --fbx-uvs-as-diffuse, add FBX ASCII format support for CLI Jan 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant