Skip to content

Conversation

@Mets3D
Copy link

@Mets3D Mets3D commented Mar 19, 2025

Summary

The goal of the PR is to let you easily batch-export as many animations as you can select. Then inspect any warnings and re-export after loading more appropriate skeletons where needed, resulting in a pretty quick and complete export with minimal manual labour.

Developed as part of my efforts to bring the game's art assets into Blender just for fun.

Most animation files come with the correct skeleton packaged, you just need to manually handle a few cases where you get warnings. Some animation files also seem to come with truly bogus animated bones, like arms on fish. Such warnings can obviously be ignored after human inspection, confirming that fish do not, in fact, have arms. Don't tell nintendo.

The changes

  • Add a "Batch Export Animations" button that behaves just like "Batch Export Models". Just select any number of .sbfres files and wait for it to crunch the data. (defaults to .seanim)
  • The useful formats (.seanim, .smd, .anim) require a skeleton to export animations, and choosing the correct skeleton is vital to avoid discarding or mangling data. It will try to find skeletons which have every bone in the animation being exported, in this order of preference:
    • Skeletons visible in the viewport
    • Skeleton in the nodegroup where the animation is being exported from (in the case of right click -> Export (All))
    • Skeleton in the .sbfres file where the animation is being exported from (in the case of Tool->Batch Export Animations)
  • Preferring skeletons in the viewport is important so the user can override the incorrect or non-existent skeleton that some animation files come with (eg. BotW motorcycle, moblin).
  • When no perfectly matching skeleton is found (or no skeleton at all) and we discarded some data in the export process, a pop-up window informs the user of this, whether they used "Tool->Batch Export Animations" or right-clicking on a Skeletal Animation group and choosing "Export All". It will show a list of source filenames, animation names, and the missing bones in that animation.

Bonus

  • Create a folder for each source file, including when using "Export All" function. (all types, not just animation)
  • Expose .json animation format support, since it was already implemented. Although its usefulness is questionable, since the data seems very difficult to interpret. But exposing it costs nothing.

In case this PR never makes it in, a build with my fork can be downloaded here.

That's all, cheers mate, cool software.

Demeter Dzadik and others added 4 commits March 1, 2025 01:06
Even his best matching skeleton has a single bone that isn't a perfect match,
so in this case we should fall back to using an imperfect skeleton that is in the viewport.
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