ID 492951 - The MonitorOutputNode's mode knob returns values that can not be set via Python

Follow

Problem summary
The MonitorOutputNode's mode knob returns values that can not be set via Python.

Customer reported version
Nuke 13.0v5

Customer reported platform
centos7

Steps to reproduce


NOTE: These steps have been tested with the formats available with the AJA Kona4 device.


1) Open Nuke on a machine which has a Monitor Out device installed.

2) Open the Script Editor and execute the following code:

k = nuke.toNode("MonitorOutNode")["mode"]
for i,v in enumerate(k.values()):
k.setValue(k.enumName(i))
print(i, v, "=>", k.value(), ",", k.getValue())
k.setValue(v)
print(i, v, "=>", k.value(), ",", k.getValue())
This should set the value of the knob and print what it has been set to. This will show the knob values that are not being set correctly.

Using the list index numbers that were returned in step 2, you can then see the issue by also doing the following:

3) Execute the following code, which should set the knob value to 4K DCI p/4K DCI 4096 x 2160 - 60p
k = nuke.toNode("MonitorOutNode")["mode"]
val = k.values()[44] #replace 44 with the index of a erroneous value
print(val)
nuke.toNode("MonitorOutNode")["mode"].setValue(val)

4) The following code is an alternative way of setting the knob value, which results in the same issue as step 3:
k = nuke.toNode("MonitorOutNode")["mode"]
k.setValue(44) #replace 44 with the index of a erroneous value

Expected behaviour
You should be able to set all available values on the MonitorOutputNode's mode knob via Python.

Actual behaviour
The MonitorOutputNode's mode knob returns values that can not be set via Python.

Workaround
You should be able to set all values by using the string label, for example:
nuke.toNode("MonitorOutNode").setValue("4K DCI p/4K DCI 4096 x 2160 - 60p")

Reproduced by support
This bug has been reproduced in:
Nuke 13.0v5 - Windows 10
Nuke 13.0v1 - Windows 10

Earliest version tested
Nuke 13.0v1 
- The MonitorOutNode did not exist before this version

    We're sorry to hear that

    Please tell us why