mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-25 05:14:40 +01:00
jakub's comment
This commit is contained in:
parent
bb269ccb7d
commit
31f76563b8
2 changed files with 2 additions and 4 deletions
|
|
@ -3162,5 +3162,4 @@ def is_headless():
|
|||
Returns:
|
||||
bool: headless
|
||||
"""
|
||||
headless = QtWidgets.QApplication.instance() is None
|
||||
return headless
|
||||
return QtWidgets.QApplication.instance() is None
|
||||
|
|
|
|||
|
|
@ -26,8 +26,7 @@ def open_file(filepath):
|
|||
# To remain in the same window, we have to clear the script and read
|
||||
# in the contents of the workfile.
|
||||
nuke.scriptClear()
|
||||
headless = is_headless()
|
||||
if not headless:
|
||||
if not is_headless():
|
||||
autosave = nuke.toNode("preferences")["AutoSaveName"].evaluate()
|
||||
autosave_prmpt = "Autosave detected.\nWould you like to load the autosave file?" # noqa
|
||||
if os.path.isfile(autosave) and nuke.ask(autosave_prmpt):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue