I want to open WorkFiles2 via the engine_init.py hook post engine launch.
I can see the commands available to an Engine…
execute_command() is not available like it is for the Shotgun Engine.
If I try to just execute the callback function like…
callback = engine.commands['File Open...']['callback'] callback()
Or, if I try using the engine’s
uid = engine.commands['File Open...']['properties']['uid'] engine._handle_command(uid)
I get the same kind of errors.
QWidget: Must construct a QApplication before a QPaintDevice Python exited unexpectedly. Critical: The Shotgun integration has unexpectedly shut down. Specifically, the python process that handles the communication with Shotgun has been terminated.
All of this works great in the Shotgun Python Console.
I know this is executing as a hook, is there some other way I need to do this?