Andrew_LP

Hi,
I love the addition of folders in 3.8, and was wondering if it is possible to use them to export specific animations from the JSON exporter?

For context, we have a character that appears across multiple games and want to be able to export a sub-set of animations tailored to each game.

It sounds like folders could be good for this, kind of like how the Movie exporter works but with a dropdown to select a folder instead of single animations.

Or allow the 'Options/Export' checkbox to appear on a folder basis rather than just single animations.

Or maybe there's a command-line method, or something else that would work for us?

Thanks! :)
Andrew_LP
  • Сообщения: 2

Nate

There currently isn't a way to export only a subset of animations. We made add that in the future, but we don't have short term plans for it. You could pretty easily write a script that removes animations from the JSON data though. Eg, the JsonRollback tool manipulates skeleton JSON:
spine-runtimes/JsonRollback.java at 3.8
You would just need the couple lines of loading code, then something like:
delete(root, "animations", "hello*");
That would delete all animations whose named starts with hello. Of course you don't have to use Java, you could use any programming language that can parse JSON.
Аватара пользователя
Nate

Nate
  • Сообщения: 9264

Andrew_LP

Ok, thanks for that - gives me somewhere to start! :)
Andrew_LP
  • Сообщения: 2


Вернуться в Editor