Hello, I’m trying to create an animation sequence from a metahuman performance and the following code work.
import unreal
metahuman_performance_path = "/Game/.../NewMetaHumanPerformance"
metahuman_performance = unreal.EditorAssetLibrary.load_asset(metahuman_performance_path)
export_range = unreal.PerformanceExportRange.WHOLE_SEQUENCE
if metahuman_performance:
try:
metahuman_performance.export_animation(export_range)
unreal.log("Animation export initiated.")
except Exception as e:
unreal.log_error(f"Failed to export animation: {str(e)}")
else:
unreal.log_error("Failed to load MetaHumanPerformance asset.")
The only issue I have is that it creates the “save animation sequence as” window and after pressing save the “export animation sequence settings” window pops.
This has been a normal behavior so far if I click on the save and create I have the correct animation in the animation sequence.
Is there a way to create the animation sequence with the options needed without activating the UI? My goal is to run this automatically using a batch.
Thanks in advance for the help.