mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-25 13:24:54 +01:00
added validation of layers visibility
# Conflicts: # pype/hosts/tvpaint/plugins/publish/validate_layers_visibility.py
This commit is contained in:
parent
e79c8c6a6d
commit
3360f996c4
1 changed files with 16 additions and 0 deletions
|
|
@ -0,0 +1,16 @@
|
|||
import pyblish.api
|
||||
|
||||
|
||||
class ValidateLayersVisiblity(pyblish.api.InstancePlugin):
|
||||
"""Validate existence of renderPass layers."""
|
||||
|
||||
label = "Validate Layers Visibility"
|
||||
order = pyblish.api.ValidatorOrder
|
||||
families = ["review", "renderPass", "renderLayer"]
|
||||
|
||||
def process(self, instance):
|
||||
for layer in instance.data["layers"]:
|
||||
if layer["visible"]:
|
||||
return
|
||||
|
||||
raise AssertionError("All layers of instance are not visible.")
|
||||
Loading…
Add table
Add a link
Reference in a new issue