Skip to content

Commit

Permalink
Add ignore case for AOV ext depending on AovType
Browse files Browse the repository at this point in the history
  • Loading branch information
Theodoric JUILLET committed Feb 18, 2022
1 parent 6f79251 commit 6e97b89
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions openpype/hosts/maya/plugins/publish/validate_rendersettings.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,8 @@ def get_invalid(cls, instance):
rs_aovs = cmds.ls(type="RedshiftAOV", referencedNodes=False)
for aov in rs_aovs:
aov_prefix = cmds.getAttr("{}.filePrefix".format(aov))
aov_type = cmds.getAttr("{}.aovType".format(aov))
aov_extension_check_ignore_list = ["Cryptomatte"]
# check their image prefix
if aov_prefix != redshift_AOV_prefix:
cls.log.error(("AOV ({}) image prefix is not set "
Expand All @@ -183,12 +185,13 @@ def get_invalid(cls, instance):
default_ext = cmds.getAttr(
"redshiftOptions.imageFormat", asString=True)

if default_ext != aov_ext:
cls.log.error(("AOV file format is not the same "
"as the one set globally "
"{} != {}").format(default_ext,
aov_ext))
invalid = True
if aov_type not in aov_extension_check_ignore_list:
if default_ext != aov_ext:
cls.log.error(("AOV file format is not the same "
"as the one set globally "
"{} != {}").format(default_ext,
aov_ext))
invalid = True

if renderer == "renderman":
file_prefix = cmds.getAttr("rmanGlobals.imageFileFormat")
Expand Down

0 comments on commit 6e97b89

Please sign in to comment.