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

Conversation

BigRoy
Copy link
Collaborator

@BigRoy BigRoy commented Aug 12, 2022

Brief description

This fixes #3410

Description

The file format check for AOVs is skipped for Cryptomatte AOVs because Redshift always write it as "Cryptomatte (EXR)" format.

Testing notes:

  1. Set up scene with Redshift + Cryptomatte AOV and others
  2. Ensure validation works as expected for file format (extension)

Comment on lines -187 to -188
default_ext = cmds.getAttr(
"redshiftOptions.imageFormat", asString=True)
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.

@BigRoy
Copy link
Collaborator Author

BigRoy commented Aug 12, 2022

It was mentioned here that the file format error isn't very clear

@m-u-r-p-h-y : the file format error is not very clear, as the user is not aware of 1 and 6 and what format it actually represents.

We could turn the integer into redshift image format labels (which is what the Attribute Editor shows) or the extensions with this:

from maya import mel

def redshift_get_image_format_ext(index, as_labels=False):
    if as_labels:
        key = "g_redshiftImageFormatLabels"
    else:
        key = "g_redshiftImageFormatExtensions"
    labels = mel.eval("${0}=${0}".format(key))
    return labels[index]

These get defined (on Redshift plug-in load or launch?) in Redshift's Plugins/Maya/Common/scripts/redshiftCreateImageFormats.mel.

Let me know if I should add it in this PR.

@antirotor antirotor self-requested a review September 2, 2022 16:30
@antirotor antirotor added type: bug Something isn't working host: Maya labels Sep 2, 2022
Copy link
Member

@antirotor antirotor left a comment

Choose a reason for hiding this comment

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

Let me know if I should add it in this PR.

I think we should add it even as static map mapping values to strings and showing it to the artist. Yes, I am traumatized by windows errors like Error 0x0004a2c12 has occured...

@BigRoy
Copy link
Collaborator Author

BigRoy commented Sep 8, 2022

Improved the logged messages to show the readable labels for the image formats:
afbeelding


Additionally squashed some other bugs:

  • cmds.getAttr("defaultRenderGlobals.imageFilePrefix") would return Noneif no value has ever been set, so I addedor ""` to ensure a string value.
  • Repair for defaultRenderGlobals.animation wasn't implemented - it now is.

Copy link
Member

@antirotor antirotor left a comment

Choose a reason for hiding this comment

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

I think it fine now, thanks for that!. Before merging, I would like @m-u-r-p-h-y to test it too as my current setup is pretty much broken on Redshift side.

@m-u-r-p-h-y
Copy link
Member

where is the global file format taken from?

image

@BigRoy
Copy link
Collaborator Author

BigRoy commented Sep 23, 2022

This validation checks the AOV file format of the AOV where the "global setting" is the setting on the Layer itself.
So basically you have:

  • OpenPype Settings: Output Image Format - unrelated to this error actually
  • Redshift Render Settings > Common > Image Format - this is the currently set 'global' file format for the layer.
  • Redshift Render Settings > Advanced > AOV - each AOV also has a file format of its own. That is the AOV file format.

Technically AOV file format I think is only relevant if you are not rendering multipart (merged AOVs)? But I'm not too sure out of the top of my head how that works in Redshift.

Any good ideas on how to better label this error?

@m-u-r-p-h-y
Copy link
Member

From my point of view, the wording is actually opposite.

OP settings is set to TIFF
Render Globals is set to TIFF
Beauty AOV is set OpenExr
Cryptomatte is set to OpenExr

so:
AOV file format OpenExr is not matching Global settings TIFF (OP + Render settings)

@BigRoy
Copy link
Collaborator Author

BigRoy commented Sep 23, 2022

You were right - the formatting was swapped. Fixed.

Copy link
Member

@m-u-r-p-h-y m-u-r-p-h-y left a comment

Choose a reason for hiding this comment

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

the check is correctly skipping cryptomatte file format check with Redshift renderer

image

@iLLiCiTiT iLLiCiTiT merged commit de0c33c into ynput:develop Sep 23, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
host: Maya type: bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Maya: Redshift Validate Render Settings for Cryptomatte reports invalid file format
4 participants