mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-03 01:14:54 +01:00
Fix Redshift appending .<aov> even when <aov> or <renderpass> was explicitly set.
This commit is contained in:
parent
8b0f60eaaa
commit
0516bb0f6f
1 changed files with 12 additions and 1 deletions
|
|
@ -80,6 +80,13 @@ IMAGE_PREFIXES = {
|
|||
}
|
||||
|
||||
|
||||
def has_tokens(string, tokens):
|
||||
"""Return whether any of tokens is in input string (case-insensitive)"""
|
||||
pattern = "({})".format("|".join(re.escape(token) for token in tokens))
|
||||
match = re.search(pattern, string, re.IGNORECASE)
|
||||
return bool(match)
|
||||
|
||||
|
||||
@attr.s
|
||||
class LayerMetadata(object):
|
||||
"""Data class for Render Layer metadata."""
|
||||
|
|
@ -950,7 +957,11 @@ class RenderProductsRedshift(ARenderProducts):
|
|||
|
||||
"""
|
||||
prefix = super(RenderProductsRedshift, self).get_renderer_prefix()
|
||||
prefix = "{}.<aov>".format(prefix)
|
||||
|
||||
# Only append .<aov> if no <renderpass> or <aov> is specified
|
||||
if not has_tokens(prefix, ["<aov>", "<renderpass>"]):
|
||||
prefix = "{}.<aov>".format(prefix)
|
||||
|
||||
return prefix
|
||||
|
||||
def get_render_products(self):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue