Skip to content

validate_workfile

ValidateCurrentWorkFile

Bases: InstancePlugin

There must be workfile to publish.

Source code in client/ayon_openrv/plugins/publish/validate_workfile.py
 6
 7
 8
 9
10
11
12
13
14
15
16
17
class ValidateCurrentWorkFile(pyblish.api.InstancePlugin):
    """There must be workfile to publish."""

    label = "Validate Workfile"
    order = pyblish.api.ValidatorOrder - 0.1
    hosts = ["openrv"]
    families = ["workfile"]

    def process(self, instance):
        current_file = instance.context.data["currentFile"]
        if not current_file:
            raise PublishValidationError("There is no workfile to publish.")