State:New|TargetRelease:No Target|icon_bug|icon_nuke|database:public|Resolution:Fixed|BugID:533081|
setValue() is used on a Shuffle node's mappings knob from a custom Python panelclass TestPanel(nukescripts.PythonPanel): def __init__(self): nukescripts.PythonPanel.__init__(self, "Test Panel") self.testKnob = nuke.Enumeration_Knob("element1", "element1", ["Test1", "Test2"]) self.addKnob(self.testKnob) def knobChanged(self, knob): print("Knob changed: " + str(knob.name())) self.zconnect() def zconnect(self): zshuffle = nuke.createNode("Shuffle2") zshuffle.knob("out1").setValue("depth") zshufflemap = zshuffle.knob("mappings") zshufflemap.setValue("rgba.red", "depth.Z")pane = nuke.getPaneFor("DAG.1")p = TestPanel()p.addToPane(pane)
zconnect() function without issue.setValue() is attempted on the mappings knob from a custom Python Panel.zconnect() function is executed directly from the Script Editor and not from a custom Python panel, the crash does not occur. zconnect() function with the following example code that maps the rgba.green channel to depth.Z:def zconnect(self): zshuffle = nuke.createNode("Shuffle") zshuffle.knob("out").setValue("depth") zshuffle.knob("red").setValue("green")
Alternatively, the Shuffle2 node could be replaced with a Merge node that is set to the desired output channel, pictured below:
We're sorry to hear that
Please tell us why