mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-25 05:14:40 +01:00
ignore missing layers in unrelated validators
This commit is contained in:
parent
f26b44a2aa
commit
08e2d36f19
2 changed files with 9 additions and 1 deletions
|
|
@ -20,6 +20,9 @@ class ValidateLayersGroup(pyblish.api.InstancePlugin):
|
|||
duplicated_layer_names = []
|
||||
for layer_name in layer_names:
|
||||
layers = layers_by_name.get(layer_name)
|
||||
# It is not job of this validator to handle missing layers
|
||||
if layers is None:
|
||||
continue
|
||||
if len(layers) > 1:
|
||||
duplicated_layer_names.append(layer_name)
|
||||
|
||||
|
|
|
|||
|
|
@ -11,8 +11,13 @@ class ValidateLayersVisiblity(pyblish.api.InstancePlugin):
|
|||
families = ["review", "render"]
|
||||
|
||||
def process(self, instance):
|
||||
layers = instance.data["layers"]
|
||||
# Instance have empty layers
|
||||
# - it is not job of this validator to check that
|
||||
if not layers:
|
||||
return
|
||||
layer_names = set()
|
||||
for layer in instance.data["layers"]:
|
||||
for layer in layers:
|
||||
layer_names.add(layer["name"])
|
||||
if layer["visible"]:
|
||||
return
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue