ID 420676 - Colorspace knobs do not update on a KnobChanged callback.

Follow

Problem summary
Colorspace knobs do not update on a KnobChanged callback.

 

Customer reported version
Nuke 12.0v3

 

Customer reported platform
Ubuntu

 

Steps to reproduce

 

1) Open Nuke.

2) Run the following code in the Script Editor:


def onUpdateRootColorspaceKnob():     k = nuke.thisKnob()    root = nuke.thisNode()    try:        if (k.name() == 'colorManagement' and k.value() == 'OCIO'):            root['floatLut'].setValue('ACES - ACES2065-1')    except:        passnuke.addKnobChanged(onUpdateRootColorspaceKnob, nodeClass='Root')

3) Open the Project Settings and set OCIO config to aces_1.0.3

4) Change the color management knob to OCIO. Notice that the float files knob is not updated.

 

Expected behaviour
The working space knob should be updated, as it previously did in Nuke 11.

 

Actual behaviour
The colorspace knobs are not updated on the KnobChanged callback.

 

Workaround
You can workaround this by using QTimers when setting the knob values, like so:


from PySide2.QtCore import QTimerdef onUpdateRootColorspaceKnob():  k = nuke.thisKnob() root = nuke.thisNode() try:  if (k.name() == 'colorManagement' and k.value() == 'OCIO'):      QTimer.singleShot(0, lambda: root['floatLut'].setValue('ACES - ACES2065-1') ) except:  passnuke.addKnobChanged(onUpdateRootColorspaceKnob, nodeClass='Root')

 

Reproduced by support

This bug has been reproduced in:
Nuke 12.0v3 - Windows 10 - Linux CentOS 7 - macOS 10.13 (High Sierra)

Nuke 12.0v1 - Windows 10 - Linux CentOS 7 - macOS 10.13 (High Sierra) - Regression

 

Unable to reproduce bug in:
Nuke 11.3v6 - Windows 10 - Linux CentOS 7 - macOS 10.13 (High Sierra)

 

Earliest version tested
Nuke 11.3v6 
- This issue doesn't appear in this version and has regressed

 

 

    We're sorry to hear that

    Please tell us why