ID 585701 - Changing the file path and Input Transform of a clip via Python does not correctly update the colorspace in the Viewer

Follow

Problem summary
Changing the file path and input transform of a clip via Python does not correctly update the colorspace in the Viewer.
 
Customer reported version
N/A
 
Customer reported platform
N/A
 
Steps to reproduce
 
1) Open Nuke Studio.
 
2) Import a file (File > Import File(s)...
 
3) Double click the Bin item, to open its Properties and display it in the Viewer.
 
4) Run the following code in the Script Editor:

### a different image sequences, to the one currently in the project Binclip = "C:/_test_footage/frame_count.####.exr"   hiero.core.projects()[0].clips()[0].readNode()["file"].setValue(clip) hiero.core.projects()[0].clips()[0].readNode()["colorspace"].setValue("color_timing") ### set to some colorspace 
 
Expected behaviour
The value of the Input Transform knob should reflected in the Viewer. 
 
Actual behaviour
When updating the file path and input transform of a clip via Python, the value of the Input Transform knob is not reflected in the Viewer. The Thumbnail of the clip does appear to update though.
 
Workaround
You can use the refresh() function to force the update, however, this only seems to work when called inside a QTimer:
### a different image sequences, to the one currently in the project Bin clip = "C:/_test_footage/frame_count.####.exr"   hiero.core.projects()[0].clips()[0].readNode()["file"].setValue(clip) hiero.core.projects()[0].clips()[0].readNode()["colorspace"].setValue("color_timing") ### set to some colorspace ### workaround from PySide2.QtCore import QTimer QTimer.singleShot(100, lambda:hiero.core.projects()[0].clips()[0].refresh())
 
Reproduced by support
This bug has been reproduced in:
Nuke Studio 15.1v2 - Windows 11 - macOS 11
Nuke Studio 12.0v1 - Windows 11 - macOS 11
 
Earliest version tested
Nuke Studio 12.0v1
- This issue appears to be in all tested versions of the product

    We're sorry to hear that

    Please tell us why