mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-26 05:42:15 +01:00
21 lines
505 B
Python
21 lines
505 B
Python
import pyblish.api
|
|
|
|
|
|
class SaveCurrentScene(pyblish.api.ContextPlugin):
|
|
"""Save current scene
|
|
|
|
"""
|
|
|
|
label = "Save current file"
|
|
order = pyblish.api.IntegratorOrder - 0.49
|
|
hosts = ["maya"]
|
|
families = ["renderlayer"]
|
|
|
|
def process(self, context):
|
|
import maya.cmds as cmds
|
|
|
|
current = cmds.file(query=True, sceneName=True)
|
|
assert context.data['currentFile'] == current
|
|
|
|
self.log.info("Saving current file..")
|
|
cmds.file(save=True, force=True)
|