ID 158281 - OCIOCDLTransform node needs to be open to be updated

Follow

Problem summary

The OCIOCDLTransform node relies on Op level knob_changed calls to update the node with what ever CDL file the user has set. However the knobs which deal with CDL selection to not have the Knob::KNOB_CHANGED_ALWAYS flag set. This means that the OCIOCDLTransform::knob_changed is only called when the OCIOCDLTransform node is actually shown in the node panel. Consequently this means that you cant change an existing OCIOCDLTransform node in python without first having the node open.

From Nuke 9.0v1 you will receive the following error 'Setting knob values from validate is not supported and may cause unexpected behavior.'

 

Customer reported version
nuke.10.5v5

 

Customer reported platform
centos6

 

Steps to reproduce


1) Create a OCIOCDLTransform node in the node graph
2) Close its properties
3) Download the attached ccc file (or create your own) and run the following bit of python code in the script editor.


filePath = "/path/to/test-cdl.ccc"node = nuke.toNode("OCIOCDLTransform1") # or whatever the node created in 1) is callednode['read_from_file'].setValue(True)node['file'].setValue(filePath)

4) Open up the node and notice that slope/offset/power/saturation knobs are still at their defaults.

If you repeat these steps but skip 2) you should see that the knobs get updated.

 

Workaround

- Try setting the KNOB_CHANGED_ALWAYS flag on the requisite knobs before calling setValue().

- Try to avoid referencing OCIOCDLTransform knob_changed operations Pythonically and use through the GUI

 

Reproduced by support

This problem has been reproduced on:

Nuke 11.0v1 - CentOS 6.9 - Windows 7 - MacOSX 10.12
Nuke 10.5v5 - CentOS 6.9 - Windows 7 - MacOSX 10.12
Nuke 10.5v1 - CentOS 6.9
Nuke 10.0v6 - CentOS 6.9
Nuke 10.0v1 - CentOS 6.9 - Windows 7 - MacOSX 10.12
Nuke 9.0v9 - CentOS 6.9
Nuke 9.0v1 - CentOS 6.9 - Windows 7 - MacOSX 10.12

 

Earliest version tested
Nuke 9.0v1 - 'Setting knob values from validate is not supported and may cause unexpected behavior' error message not present before this version.

 

Expected behaviour

OCIOCDLTransform's knob_changed value should be able to be called through terminal.

 

Actual behaviour

OCIOCDLTransform's knob_changed value can only called when OCIOCDLTransform node it open in the node panel in the GUI, this means that when launching through terminal the user will get unexpected results.

    We're sorry to hear that

    Please tell us why