jiri's comment

This commit is contained in:
Kayla Man 2023-06-13 21:31:45 +08:00
parent e4fcc033a9
commit b150e0b6a1

View file

@ -28,7 +28,7 @@ def open_file(filepath):
nuke.scriptClear()
headless = QtWidgets.QApplication.instance() is None
if not headless:
autosave = "{}.autosave".format(filepath)
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):
filepath = autosave