Skip to content
This repository has been archived by the owner on Sep 20, 2024. It is now read-only.

Maya: Redshift Skip aov file format check for Cryptomatte #3654

Merged
merged 7 commits into from
Sep 23, 2022
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 @@ -180,14 +180,17 @@ def get_invalid(cls, instance):
redshift_AOV_prefix
))
invalid = True
# get aov format
aov_ext = cmds.getAttr(
"{}.fileFormat".format(aov), asString=True)

default_ext = cmds.getAttr(
"redshiftOptions.imageFormat", asString=True)
Comment on lines -187 to -188
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've removed the asString argument since the returned values were returned as integers anyway.

# check aov file format
aov_ext = cmds.getAttr("{}.fileFormat".format(aov))
default_ext = cmds.getAttr("redshiftOptions.imageFormat")
aov_type = cmds.getAttr("{}.aovType".format(aov))
if aov_type == "Cryptomatte":
# redshift Cryptomatte AOV always uses "Cryptomatte (EXR)"
# so we ignore validating file format for it.
pass

if default_ext != aov_ext:
elif default_ext != aov_ext:
cls.log.error(("AOV file format is not the same "
"as the one set globally "
"{} != {}").format(default_ext,
Expand Down