mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-01 16:34:53 +01:00
♻️ refactor to new function calls
This commit is contained in:
parent
831050799d
commit
e1a504ff3a
1 changed files with 3 additions and 3 deletions
|
|
@ -14,13 +14,13 @@ class SaveCurrentScene(pyblish.api.ContextPlugin):
|
||||||
|
|
||||||
# Filename must not have changed since collecting
|
# Filename must not have changed since collecting
|
||||||
host = registered_host()
|
host = registered_host()
|
||||||
current_file = host.current_file()
|
current_file = host.get_current_workfile()
|
||||||
assert context.data['currentFile'] == current_file, (
|
assert context.data['currentFile'] == current_file, (
|
||||||
"Collected filename from current scene name."
|
"Collected filename from current scene name."
|
||||||
)
|
)
|
||||||
|
|
||||||
if host.has_unsaved_changes():
|
if host.has_unsaved_changes():
|
||||||
self.log.info("Saving current file..")
|
self.log.info("Saving current file {}...".format(current_file))
|
||||||
host.save_file(current_file)
|
host.save_workfile(current_file)
|
||||||
else:
|
else:
|
||||||
self.log.debug("No unsaved changes, skipping file save..")
|
self.log.debug("No unsaved changes, skipping file save..")
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue