Bake Animation Sequence from code

In Sequencer on the menu of a binding for a skeletal mesh component there is an option called ‘Bake Animation Sequence’ (see screenshot). I am looking for a way to automate this without the GUI in an editor tool.

Thank you!

\Engine\Plugins\MovieScene\SequencerScripting\Content\Python\sequencer_anim_examples.py
this file template could work for you, using unreal.SequencerTools.export_anim_sequence()

but I have got a new problem: how could I using it in multi thread? It seems like this function only work in the game thread?

you can get started with this “unreal.SequencerTools.export_anim_sequence()”
I already tested , and it worked