♻️ refactor to new function calls

This commit is contained in:
Ondrej Samohel 2022-09-08 16:55:16 +02:00
parent 831050799d
commit e1a504ff3a
No known key found for this signature in database
GPG key ID: 02376E18990A97C6

View file

@ -14,13 +14,13 @@ class SaveCurrentScene(pyblish.api.ContextPlugin):
# Filename must not have changed since collecting
host = registered_host()
current_file = host.current_file()
current_file = host.get_current_workfile()
assert context.data['currentFile'] == current_file, (
"Collected filename from current scene name."
)
if host.has_unsaved_changes():
self.log.info("Saving current file..")
host.save_file(current_file)
self.log.info("Saving current file {}...".format(current_file))
host.save_workfile(current_file)
else:
self.log.debug("No unsaved changes, skipping file save..")