mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-01 16:34:53 +01:00
Fix Validate Asset Docs filename and class name
This commit is contained in:
parent
32f6418c4b
commit
f9df89dc0d
1 changed files with 1 additions and 1 deletions
|
|
@ -1,31 +0,0 @@
|
|||
import pyblish.api
|
||||
from openpype.pipeline import PublishValidationError
|
||||
|
||||
|
||||
class ValidateContainers(pyblish.api.InstancePlugin):
|
||||
"""Validate existence of asset asset documents on instances.
|
||||
|
||||
Without asset document it is not possible to publish the instance.
|
||||
|
||||
If context has set asset document the validation is skipped.
|
||||
|
||||
Plugin was added because there are cases when context asset is not defined
|
||||
e.g. in tray publisher.
|
||||
"""
|
||||
|
||||
label = "Validate Asset docs"
|
||||
order = pyblish.api.ValidatorOrder
|
||||
|
||||
def process(self, instance):
|
||||
context_asset_doc = instance.context.data.get("assetEntity")
|
||||
if context_asset_doc:
|
||||
return
|
||||
|
||||
if instance.data.get("assetEntity"):
|
||||
self.log.info("Instance have set asset document in it's data.")
|
||||
|
||||
else:
|
||||
raise PublishValidationError((
|
||||
"Instance \"{}\" don't have set asset"
|
||||
" document which is needed for publishing."
|
||||
).format(instance.data["name"]))
|
||||
Loading…
Add table
Add a link
Reference in a new issue