mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-25 21:32:15 +01:00
28 lines
732 B
Python
28 lines
732 B
Python
import pyblish.api
|
|
|
|
import openpype.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", "harmony", "photoshop"]
|
|
optional = True
|
|
actions = [ShowInventory]
|
|
|
|
def process(self, context):
|
|
if openpype.lib.any_outdated():
|
|
raise ValueError("There are outdated containers in the scene.")
|