mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 12:54:40 +01:00
Merge branch 'develop' into enhancement/AY-1228_Load-plugins-update
This commit is contained in:
commit
c4ddfe7a89
2 changed files with 7 additions and 5 deletions
|
|
@ -9,7 +9,7 @@ class IncrementWorkfileVersion(pyblish.api.ContextPlugin):
|
|||
order = pyblish.api.IntegratorOrder + 0.9
|
||||
label = "Increment Workfile Version"
|
||||
hosts = ["max"]
|
||||
families = ["workfile"]
|
||||
families = ["maxrender", "workfile"]
|
||||
|
||||
def process(self, context):
|
||||
path = context.data["currentFile"]
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ import pyblish.api
|
|||
from ayon_core.pipeline import registered_host
|
||||
|
||||
|
||||
class SaveCurrentScene(pyblish.api.ContextPlugin):
|
||||
class SaveCurrentScene(pyblish.api.InstancePlugin):
|
||||
"""Save current scene"""
|
||||
|
||||
label = "Save current file"
|
||||
|
|
@ -10,13 +10,15 @@ class SaveCurrentScene(pyblish.api.ContextPlugin):
|
|||
hosts = ["max"]
|
||||
families = ["maxrender", "workfile"]
|
||||
|
||||
def process(self, context):
|
||||
def process(self, instance):
|
||||
host = registered_host()
|
||||
current_file = host.get_current_workfile()
|
||||
|
||||
assert context.data["currentFile"] == current_file
|
||||
assert instance.context.data["currentFile"] == current_file
|
||||
if instance.data["productType"] == "maxrender":
|
||||
host.save_workfile(current_file)
|
||||
|
||||
if host.workfile_has_unsaved_changes():
|
||||
elif host.workfile_has_unsaved_changes():
|
||||
self.log.info(f"Saving current file: {current_file}")
|
||||
host.save_workfile(current_file)
|
||||
else:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue