Merged in tokejepsen/pype/validate_containers (pull request #348)

Validate containers.
This commit is contained in:
Toke Jepsen 2019-11-13 13:20:58 +00:00 committed by Jakub Ježek
commit df29a22e87

View file

@ -0,0 +1,28 @@
import pyblish.api
import pype.lib
from avalon.tools import cbsceneinventory
class ShowInventory(pyblish.api.Action):
label = "Show Inventory"
icon = "briefcase"
on = "failed"
def process(self, context, plugin):
cbsceneinventory.show()
class ValidateContainers(pyblish.api.ContextPlugin):
"""Containers are must be updated to latest version on publish."""
label = "Validate Containers"
order = pyblish.api.ValidatorOrder
hosts = ["maya", "houdini", "nuke"]
optional = True
actions = [ShowInventory]
def process(self, context):
if pype.lib.any_outdated():
raise ValueError("There are outdated containers in the scene.")