From 284da78ccdbebc76fba70189bf9e8a9dd0a181a8 Mon Sep 17 00:00:00 2001 From: Milan Kolar Date: Sat, 22 Feb 2020 00:23:23 +0100 Subject: [PATCH] allow multichanel rendering --- .../maya/publish/validate_rendersettings.py | 20 +++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/pype/plugins/maya/publish/validate_rendersettings.py b/pype/plugins/maya/publish/validate_rendersettings.py index d6cbea8b2d..c98f0f8cdc 100644 --- a/pype/plugins/maya/publish/validate_rendersettings.py +++ b/pype/plugins/maya/publish/validate_rendersettings.py @@ -50,7 +50,7 @@ class ValidateRenderSettings(pyblish.api.InstancePlugin): ImagePrefixTokens = { - 'arnold': 'maya///_//_', 'redshift': 'maya///', 'vray': 'maya///', 'renderman': '_..' @@ -143,11 +143,19 @@ class ValidateRenderSettings(pyblish.api.InstancePlugin): dir_prefix)) else: - if not re.search(cls.R_AOV_TOKEN, prefix): - invalid = True - cls.log.error("Wrong image prefix [ {} ] - " - "doesn't have: '' or " - "token".format(prefix)) + multichannel = cmds.getAttr("defaultArnoldDriver.mergeAOVs") + if multichannel: + if re.search(cls.R_AOV_TOKEN, prefix): + invalid = True + cls.log.error("Wrong image prefix [ {} ] - " + "You can't use '' token " + "with merge AOVs turned on".format(prefix)) + else: + if not re.search(cls.R_AOV_TOKEN, prefix): + invalid = True + cls.log.error("Wrong image prefix [ {} ] - " + "doesn't have: '' or " + "token".format(prefix)) # prefix check if prefix.lower() != cls.ImagePrefixTokens[renderer].lower():