mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
Validate containers.
This commit is contained in:
parent
d40ba5ebbd
commit
963d6fb18f
1 changed files with 28 additions and 0 deletions
28
pype/plugins/global/publish/validate_containers.py
Normal file
28
pype/plugins/global/publish/validate_containers.py
Normal 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.")
|
||||
Loading…
Add table
Add a link
Reference in a new issue