What to do when publish from ACES Nuke script fails with Error Invalid LUT selected : Gamma2.2

We had the same issue with tk-nuke-quickreview FYI. In that scenario we ended up taking over the settings.py hook to set the output colorspace of the write node to something more sensible. In our case, since we wanted the OCIO profile to determine the appropriate colorspace we had to query for it like this:

    monitorLut = nuke.Root().knob("monitorLut").value()
    colorManagement = nuke.Root().knob("colorManagement").value()
    if colorManagement == 'OCIO':
        # OCIO displays either come in the form of view/display or display with an implicit 'default' view
        displayView = monitorLut.split('/')
        view = displayView.pop()
        display = displayView and displayView[0] or 'default'
        colorspace = nuke.Root().getOCIOColorspaceFromViewTransform(display, view)
    else:
        colorspace = monitorLut
6 Likes