maybe you could just paste your group here to make clearer what you are after.
with python pull down choices return the string not the index number of the current choice. but the knob has the function .values() which returns a list of each option in the pulldown. does this help you? cheers, VIncent 2017-02-11 22:24 GMT+01:00 Vincent Langer <[email protected]>: > I am not sure if that is what you are looking for: > > set cut_paste_input [stack 0] > version 10.0 v4 > push $cut_paste_input > Group { > name Group1 > knobChanged "\nthis = nuke.thisNode()\nk = nuke.thisKnob()\n\nif k.name() > == \"UseRGBKnob\":\n if k.value() == \"Yes\":\n > this\[\"RGB\"].setEnabled(True)\n else:\n > this\[\"RGB\"].setEnabled(False)\n" > selected true > xpos 168 > ypos -18 > addUserKnob {20 User} > addUserKnob {4 UseRGBKnob M {Yes No}} > addUserKnob {18 RGB} > RGB {0 0 0} > addUserKnob {6 RGB_panelDropped l "panel dropped state" -STARTLINE > +HIDDEN} > } > Input { > inputs 0 > name Input1 > xpos 123 > ypos -67 > } > NoOp { > name NoOp1 > xpos 123 > ypos -27 > } > Output { > name Output1 > xpos 123 > ypos 73 > } > end_group > > > 2017-02-11 8:41 GMT+01:00 adam jones <[email protected]>: > >> Dear all >> >> So I really tried to work this out myself but I am stuck >> >> I have set up a RGB knob and a check box to enable and disable it using >> >> this snippet (frank posted it years back, thank you) >> >> node = nuke.toNode('NoOp1') >> code = '''nuke.thisNode()['pickDS'].setEnabled(nuke.thisNode()['ena >> blePick'].value())''' >> node['knobChanged'].setValue(code) >> >> this works great, >> >> interesting thing could not create it inside a group, created it outside >> of the group and cut and pasted into the group and all good >> >> then I placed and expression on the check box to connect it to a pull >> down choice >> >> switch1 > 3 ? 1 : 0 this switch node is connected to a pulldown choice on >> the groups GUI >> >> it first appeared as though it was not working, the checkBox would update >> but nothing would (RGB) knob would not update its state in the GUI of the >> group unless I closed and re opened the NoOp1 node inside the group. >> >> and it does what is expected, so I guess the question is how do I get the >> interface to update with out doing what I explained >> >> Does that make sense >> >> Kind Regards >> -adam_______________________________________________ >> Nuke-users mailing list >> [email protected], http://forums.thefoundry.co.uk/ >> http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users >> > > > > -- > Vincent Langer > Uhlandstr. 29 > 71634 Ludwigsburg > +49 176 965 177 61 <+49%20176%2096517761> > www.vincentlanger.com > -- Vincent Langer Uhlandstr. 29 71634 Ludwigsburg +49 176 965 177 61 www.vincentlanger.com
_______________________________________________ Nuke-users mailing list [email protected], http://forums.thefoundry.co.uk/ http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users
