mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-02 00:44:52 +01:00
Correctly ignore nodes inside rendering instance that do not match expected naming
- A warning is still logged
This commit is contained in:
parent
056a237c84
commit
488c0000da
1 changed files with 14 additions and 12 deletions
|
|
@ -102,22 +102,24 @@ class CollectMayaRender(pyblish.api.ContextPlugin):
|
|||
}
|
||||
|
||||
for layer in collected_render_layers:
|
||||
try:
|
||||
if layer.startswith("LAYER_"):
|
||||
# this is support for legacy mode where render layers
|
||||
# started with `LAYER_` prefix.
|
||||
expected_layer_name = re.search(
|
||||
r"^LAYER_(.*)", layer).group(1)
|
||||
else:
|
||||
# new way is to prefix render layer name with instance
|
||||
# namespace.
|
||||
expected_layer_name = re.search(
|
||||
r"^.+:(.*)", layer).group(1)
|
||||
except IndexError:
|
||||
if layer.startswith("LAYER_"):
|
||||
# this is support for legacy mode where render layers
|
||||
# started with `LAYER_` prefix.
|
||||
layer_name_pattern = r"^LAYER_(.*)"
|
||||
else:
|
||||
# new way is to prefix render layer name with instance
|
||||
# namespace.
|
||||
layer_name_pattern = r"^.+:(.*)"
|
||||
|
||||
# todo: We should have a more explicit way to link the renderlayer
|
||||
match = re.match(layer_name_pattern, layer)
|
||||
if not match:
|
||||
msg = "Invalid layer name in set [ {} ]".format(layer)
|
||||
self.log.warning(msg)
|
||||
continue
|
||||
|
||||
expected_layer_name = match.group(1)
|
||||
|
||||
self.log.info("processing %s" % layer)
|
||||
# check if layer is part of renderSetup
|
||||
if expected_layer_name not in maya_render_layers:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue