mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-27 06:12:19 +01:00
17 lines
481 B
Python
17 lines
481 B
Python
import pyblish.api
|
|
|
|
from openpype.pipeline.publish import PublishValidationError
|
|
|
|
|
|
class ValidateCurrentSaveFile(pyblish.api.ContextPlugin):
|
|
"""File must be saved before publishing"""
|
|
|
|
label = "Validate File Saved"
|
|
order = pyblish.api.ValidatorOrder - 0.1
|
|
hosts = ["maya", "houdini", "nuke"]
|
|
|
|
def process(self, context):
|
|
|
|
current_file = context.data["currentFile"]
|
|
if not current_file:
|
|
raise PublishValidationError("File not saved")
|