State:Closed|icon_bug|icon_nuke|database:public|Resolution:Works For Me|TargetRelease:11.1v4|BugID:229953|
Problem summary
hiero.core.Project.beginUndo() prevents hiero.core.Clip.setSourceMediaColourTransform() from working inside the with statement.
Steps to reproduce
1) Open NukeStudio
2) Paste in the below code into the Script Editor, changing path for a valid image file path:
import hiero.coreimport hiero.uiproject = hiero.core.projects()[-1]with project.beginUndo("test"): # this line causes the setSourceMediaColourTransform() to not apply rt = project.clipsBin() try: comp_bin = rt['test'] except: comp_bin = rt.addItem(hiero.core.Bin('test')) # make some media sources path = "/valid/file/path.ext" ###Change the path for a valid image file source1 = hiero.core.MediaSource(path) # make some clips from the media sources clip1 = hiero.core.Clip(source1) # add the clips to the bins comp_bin.addItem(hiero.core.BinItem(clip1)) # apply the colour transform clip1.setSourceMediaColourTransform('Protune') ### Unindent this line, and it works 3) Run the code, it will import the image into the test bin, but the colour transform won't be set to Protune. Taking the setSourceMediaColourTransform() function out of the with statement make it work.
Workaround
Put the setSourceMediaColourTransform() outside of the beginUndo() statement
Reproduced by support
The problem has been reproduced in:
Nuke 10.0v3 - Windows 10 - CentOS 6.8
Nuke 10.0v1 - Windows 10
Nuke 9.0v9 - Windows 10
Nuke 9.0v1 - CentOS 6.8
Expected behaviour
For the Source Media Colour Transform to be set to Protune
Actual behaviour
It was left to the default Colour Transform
We're sorry to hear that
Please tell us why