Skip to content

validate_scene_saved

ValidateSceneSaved

Bases: InstancePlugin

Validate that workfile was saved.

Source code in client/ayon_max/plugins/publish/validate_scene_saved.py
 7
 8
 9
10
11
12
13
14
15
16
17
18
class ValidateSceneSaved(pyblish.api.InstancePlugin):
    """Validate that workfile was saved."""

    order = pyblish.api.ValidatorOrder
    families = ["workfile"]
    hosts = ["max"]
    label = "Validate Workfile is saved"

    def process(self, instance):
        if not rt.maxFilePath or not rt.maxFileName:
            raise PublishValidationError(
                "Workfile is not saved", title=self.label)