ID 463721 - OCIO CDLTransform node's "read from file" knob incorrectly disabling knobs when it is parented by an expression

Follow

Problem summary
OCIO CDLTransform node's "read from file" knob incorrectly disabling knobs when it is parented by an expression.


Customer reported version
nuke.12.1v4


Customer reported platform
centos7


Steps to reproduce

1) In Nuke, paste the following script:

set cut_paste_input [stack 0]
version 12.1 v4
push $cut_paste_input
Group {
 name Group1
 selected true
 xpos 327
 ypos -97
 addUserKnob {20 User}
 addUserKnob {4 mode M {"read from file\t" "do not read from file"}}
}
 Input {
  inputs 0
  name Input1
  xpos 0
 }
 OCIOCDLTransform {
  working_space scene_linear
  read_from_file {{"parent.mode != 1"}}
  name OCIOCDLTransform1
  selected true
  xpos 0
  ypos 123
 }
 Output {
  name Output1
  xpos 0
  ypos 300
 }
end_group

2) Open the Group Node to view the contents, and double-click the OCIOCDLTransform node to view the Properties bin.

3) In the Group node Properties, toggle the dropdown mode for "read from file"/"do not read from file".

4) Observe functionality of the slope/offset/power knobs.


Expected behavior
The slope/offset/power/saturation knobs should be readily accessible when the "read from file" knob is disabled.


Actual behavior
The slope, offset, saturation, and power knobs become disabled while the parented "do not read from file" knob is enabled.



Workaround
Running the following Python snippet in the Script Editor allows the "do not read from file" knob to enable the OCIOCDLTransform properties to function:

def test():

knobs = ['slope', 'offset', 'power', 'saturation']


if nuke.thisKnob().name() == "mode":

with nuke.thisNode():

for k in knobs:


if nuke.toNode('OCIOCDLTransform1')['read_from_file'].value() == 0:

nuke.toNode('OCIOCDLTransform1')[k].setEnabled(True)


if nuke.toNode('OCIOCDLTransform1')['read_from_file'].value() == 1:

nuke.toNode('OCIOCDLTransform1')[k].setEnabled(False)


nuke.toNode('Group1')['knobChanged'].setValue("test()")


Reproduced by Support in:
Nuke 12.2v4 - Windows 10

Nuke 12.2v1 - Windows 10

Nuke 12.1v1 - Windows 10

Nuke 11.0v1 - Windows 10

Nuke 10.0v1 - Windows 10

Nuke 9.0v1 - Windows 10

Nuke 8.0v1 - Windows 10


Earliest version tested
Nuke 8.0v1 - This issue appears to be in all versions of the product

    We're sorry to hear that

    Please tell us why