mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-02 00:44:52 +01:00
skip instances without visible layers
This commit is contained in:
parent
df4ecca987
commit
426bc1e92b
1 changed files with 7 additions and 3 deletions
|
|
@ -56,9 +56,6 @@ class ExtractSequence(pyblish.api.Extractor):
|
|||
)
|
||||
|
||||
# Get all layers and filter out not visible
|
||||
# TODO what to do if all are invisible?
|
||||
# - skip without output?
|
||||
# - still render but empty output?
|
||||
layers = instance.data["layers"]
|
||||
filtered_layers = [
|
||||
layer
|
||||
|
|
@ -66,6 +63,13 @@ class ExtractSequence(pyblish.api.Extractor):
|
|||
if layer["visible"]
|
||||
]
|
||||
layer_ids = [str(layer["layer_id"]) for layer in filtered_layers]
|
||||
if not layer_ids:
|
||||
self.log.info(
|
||||
f"None of the layers from the instance"
|
||||
" are visible. Extraction skipped."
|
||||
)
|
||||
return
|
||||
|
||||
self.log.debug(
|
||||
"Instance has {} layers with ids: {}".format(
|
||||
len(layer_ids), ", ".join(layer_ids)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue