MetaHuman Export Crash

Hi - I am posting this question on behalf of one of my team members:

I’m trying to export the 'head_dna' of a Metahuman Character, using Python, on Unreal 5.7. While it’s working fine when I call my code directly from unreal, it crashes when I launch it from an external process (be it maya, CLI, etc…).

I managed to isolate the culprit:

request_obj = unreal.MetaHumanCharacterAutoRiggingRequestParams()
request_obj.blocking = True
mh_subsystem.request_auto_rigging(my_character, request_obj)

The blocking parameter ensures Unreal holds until everything’s ready, to proceed with the auto_rigging request. So exactly what’s needed.

But from outside of unreal, calling this blocking property crashes unreal, probably because of how the async state is handled internally.

Is there a workaround / a way to reproduce the blocking behavior directly in my code? How can I export a dna from a MetaHuman Character in python, from a CLI or dcc application?

[Attachment Removed]

Hi Adam,

I have not been able to replicate this crash using Unreal Engine 5.7.4.

Please could you provide some more information, such as the command you are using to invoke Unreal Editor (from the CLI) and the log file showing the crash? Are you using the example script we provide as-is, or have you made additional changes?

Thanks.

Mark.

[Attachment Removed]

Hi Mark,

Thank you for your reply, i checked with the dev and it would take a bit to isolate the code, unfortunately it’s not a few lines in a single file. Getting approvals to send it out would also take some time. Would you be able to provide the code you have been using? And they can work from there?

Tanks,

-adam

[Attachment Removed]

HI Adam,

I used the autorig example found in Engine\Plugins\MetaHuman\MetaHumanCharacter\Content\Python\examples\example_auto_rig.py with a MetaHuman Character asset that I had already created. I used this with Unreal Engine launcher via Powershell, both headless and not headless.

I understand the concerns with sharing the script, not a problem. The command you are using to start Unreal Engine and any logs etc. that show the crash would still be informative if you are able to share those.

Just to note (although I don’t think it helps with this problem) there is some documentation for the Python scripting on EDC here. This question prompted me to find the link and discovered that it had been missing from EDC for some reason.

Thanks,

Mark.

[Attachment Removed]

Hi Mark,

Stepping in while Adam is away. Currently still waiting to receive the materials from the team member.

[Attachment Removed]

Feel free to open a new issue when you have more information that might help us reproduce this problem.

Thanks.

[Attachment Removed]