ID 445064 - SHOT variable set within OCIO config does not call corresponding environment variable within the Viewer Process on MacOS

Follow

Problem summary
It is possible to call a custom environment variable within an OCIO config file using the SHOT environment variable, and use this to apply a custom LUT to the Viewer Process.
https://learn.foundry.com/nuke/content/comp_environment/color_correction/changing_viewer_colorspace.html#Adding

When the SHOT environment variable is set on a MacOS machine, the environment variable is not interpreted correctly to the specified value.

This works correctly within both Windows and Linux and happens with both .cc and .spi1d LUT files

Customer reported version
nuke.12.2v2

Customer reported platform
10.12

Steps to reproduce

1) On a MacOS machine, create a new environment variable called SHOT, giving it the value of testLook

2) Open up the attached config.zip file and extract it to your desktop

3) Open the nuke script, and relink the .ocio file in the ''Project Settings > Color > custom ocio config
Result: environment variable not reading correctly and provides an error.

4) To confirm the environment variable is being read in correctly, press 'x' in the node graph to call the TCL/Python command entry area and type in:
getenv SHOT

5) Repeat the above steps on a Windows or Linux machine
Result: Works correctly and the testLook.cc is applied as the Viewer Process.

Expected behaviour
SHOT environment variable should work the same over all operating systems when used in collaboration with ocio configs.

Actual behaviour
SHOT environment variable does not work in ocio configs within MacOS

Workaround
Unfortunately, it is not possible to use the environment variable on MacOS currently, but it is still possible to set the values to be called within Nuke.

The values can be added in manually by selecting the 'show panel' option within the Viewer Process, then entering in SHOT as the key value and the name of the value in the value field. e.g. testLook in our scenario in the Context tab.

As the Viewer Process's ocio context resets after each session, to make this change permanent, we would suggest adding the following functions before startup to initiate these in the Viewer Process. (This is using the testLook value as an example, but replace with your intended value)
nuke.ViewerProcess.node().knob("key1").setValue("SHOT")
nuke.ViewerProcess.node().knob("value1").setValue("testLook")

Reproduced by support
This bug has been reproduced in:
Nuke 12.2v2 - MacOS 10.14.6
Nuke 12.1v1 - MacOS 10.14.6
Nuke 11.1v1 - MacOS 10.14.6
Nuke 10.5v1- MacOS 10.14.6
Nuke 10.0v1- MacOS 10.14.6
Nuke 9.0v1 - MacOS 10.14.6

Unable to reproduce bug in:
Nuke 12.2v2 - Windows 10, CentOS 7
Nuke 12.1v1 - Windows 10
Nuke 11.1v1 - Windows 10
Nuke 10.5v1- Windows 10
Nuke 10.0v1 - Windows 10
Nuke 9.0v1 - Windows 10, CentOS 7


Earliest version tested
- This issue appears to be in all versions of the product for MacOS

    We're sorry to hear that

    Please tell us why