Skip to content
This repository has been archived by the owner on Sep 20, 2024. It is now read-only.

Commit

Permalink
Move imports to workaround importing qt if using headless
Browse files Browse the repository at this point in the history
  • Loading branch information
farrizabalaga committed Feb 7, 2024
1 parent 9058962 commit 547b56d
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions openpype/pype_commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit 547b56d

Please sign in to comment.