From 547b56d65bd848b7d04deb57ce4ef1944284570d Mon Sep 17 00:00:00 2001 From: farrizabalaga Date: Wed, 7 Feb 2024 16:19:22 -0500 Subject: [PATCH 1/2] 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: From 06ddeb7b6bfa4637871961065f0c0e13856fe738 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabi=C3=A0=20Serra=20Arrizabalaga?= Date: Wed, 7 Feb 2024 16:24:02 -0500 Subject: [PATCH 2/2] Update pype_commands.py --- openpype/pype_commands.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/openpype/pype_commands.py b/openpype/pype_commands.py index 78be3ed3a7f..7c4fd8f1a38 100644 --- a/openpype/pype_commands.py +++ b/openpype/pype_commands.py @@ -147,9 +147,6 @@ 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