I’m working on a solution that enables a back and forth communication channel between Maya and Unreal using Python. The goal is to be able to run commands from one software that do things in the other. This works from Unreal to Maya surprisingly well without the need of using the built-in ‘cmds.commandPort’ feature.
The connection is managed by the socket module in Python and to trigger them to execute the messages I am using eval an/or exec functions with the globals() flag.
This works beautifully on Maya side, however when I try running Unreal commands from Maya I get this error:
LogEditorScripting: Error: You are not on the main thread.
I’m hoping someone with a better Unreal understanding would be able to tell me why this happens and how to overcome it, because currently it seems to be a biggie.