From 547b56d65bd848b7d04deb57ce4ef1944284570d Mon Sep 17 00:00:00 2001 From: farrizabalaga Date: Wed, 7 Feb 2024 16:19:22 -0500 Subject: [PATCH] Move imports to workaround importing qt if using headless --- openpype/pype_commands.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/openpype/pype_commands.py b/openpype/pype_commands.py index f744337c672..78be3ed3a7f 100644 --- a/openpype/pype_commands.py +++ b/openpype/pype_commands.py @@ -97,8 +97,6 @@ def publish(paths, targets=None, gui=False): install_openpype_plugins, get_global_context, ) - from openpype.tools.utils.host_tools import show_publish - from openpype.tools.utils.lib import qt_app_context # Register target and host import pyblish.api @@ -149,7 +147,12 @@ def publish(paths, targets=None, gui=False): for plugin in plugins: print(plugin) + print("HELLO?? why is gui being true") + print(gui) + log.warning(gui) if gui: + from openpype.tools.utils.host_tools import show_publish + from openpype.tools.utils.lib import qt_app_context with qt_app_context(): show_publish() else: