Fix unsaved changes save prompt on open file with workfiles in Substance Painter

This commit is contained in:
Roy Nieterau 2023-07-05 12:02:36 +02:00
parent 439d16cb6b
commit bc87b34f66
2 changed files with 2 additions and 2 deletions

View file

@ -86,7 +86,7 @@ class SubstanceHost(HostBase, IWorkfileHost, ILoadHost, IPublishHost):
self._uninstall_menu()
self._deregister_callbacks()
def has_unsaved_changes(self):
def workfile_has_unsaved_changes(self):
if not substance_painter.project.is_open():
return False

View file

@ -20,7 +20,7 @@ class SaveCurrentWorkfile(pyblish.api.ContextPlugin):
if context.data["currentFile"] != current:
raise KnownPublishError("Workfile has changed during publishing!")
if host.has_unsaved_changes():
if host.workfile_has_unsaved_changes():
self.log.info("Saving current file: {}".format(current))
host.save_workfile()
else: