ID 219506 - OCIO - Improper behaviour of Read's default colorspace when using 'aces_...' config files

Follow

Problem summary

When using OCIO color management with any OCIO config other than nuke-default, files will read in with an error: "Invalid LUT selected: Gamma2.2" and the colorspace in the properties is set to "Error: (Gamma2.2) not found" or similar.

MOV, MP4, MXF, BRAW files all read in with an error when aces configs are used for a colorspace configuration versus the nuke-default colorspaces.

 

Customer reported version
nuke.n/a

Customer reported platform
OS X 10.9.5

 

Steps to reproduce

1) Launch Nuke

2) In the Project Settings' Color Tab set Color Management to OCIO and OCIO config to something different from nuke-default, for example aces_1.0.1

3) Read in a .mov or .mp4 file

--> Result: Error in the viewer "Invalid LUT selected: Gamma2.2"

4) Open colorspace field in Read1 properties panel

--> There is "default: (Gamma2.2)" and " Error: (Gamma2.2 not found)"

5) Clicking on the "default: (Gamma2.2)" option a few times occasionally causes it to change to "Error: (linear) not found" and back

WorkAround

Add this code to your init.py or run it in the Script Editor

import nukedef OCIOColorspaceMapper(colorspaceName, dataTypeHint):    TargetColorspace = 'Output - Rec.709' # We want to set this instead of Gamma2.2    thisnode = nuke.thisNode()    allColorspaces = nuke.colorspaces.getColorspaceList( thisnode.knob('colorspace') )[1:]    nuke.tprint(colorspaceName) # Just for debug purposes      nuke.tprint(dataTypeHint)    if colorspaceName == 'Gamma2.2':        if TargetColorspace in allColorspaces:            return TargetColorspace    # If read doesn't ask for Gamma2.2 use default settings    return nuke.colorspaces._nukeDefaultColorSpaceMapper(colorspaceName, dataTypeHint)nuke.addDefaultColorspaceMapper( OCIOColorspaceMapper )

Reproduced by support
Nuke 14.0v2 - Windows 10, CentOS 7
Nuke 13.0v1 - Windows 10
Nuke 12.0v1 - Windows 10
Nuke 11.0v1 - Windows 10
Nuke 10.0v1 - Windows 7, OSX 10.11, Linux (RedHat)

Expected behavior
Read node's colorspace should be set to one that exists in the chosen configuration.

Actual behavior
Read nodes give an error and a suitable colorspace has to be chosen manually. Non-existing colorspace is appended to the dropdown menu as Error: (Gamma2.2) not found

    We're sorry to hear that

    Please tell us why