mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-25 21:32:15 +01:00
21 lines
527 B
Python
21 lines
527 B
Python
import pyblish.api
|
|
|
|
|
|
class FusionSaveComp(pyblish.api.ContextPlugin):
|
|
"""Save current comp"""
|
|
|
|
label = "Save current file"
|
|
order = pyblish.api.ExtractorOrder - 0.49
|
|
hosts = ["fusion"]
|
|
families = ["saver"]
|
|
|
|
def process(self, context):
|
|
|
|
comp = context.data.get("currentComp")
|
|
assert comp, "Must have comp"
|
|
|
|
current = comp.GetAttrs().get("COMPS_FileName", "")
|
|
assert context.data['currentFile'] == current
|
|
|
|
self.log.info("Saving current file..")
|
|
comp.Save()
|