Merge pull request #5248 from BigRoy/bugfix/substancepainter_open_file_prompt_save

This commit is contained in:
Milan Kolar 2023-07-05 12:11:10 +02:00 committed by GitHub
commit 25bc9be95a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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: