Nathan, Thanks for the input, I'm fine with doing it the 'long way' if you don't think there's a neater way of doing it.
Michael On 2 November 2011 12:36, Michael Garrett <[email protected]> wrote: > I figured out how to toggle show/hide the UI grouping knob, eg. > > nuke.toNode('ColorCorrect1')['master'].setValue(False) > > But any thoguths on the other request would be appreciated > > > On 2 November 2011 12:16, Michael Garrett <[email protected]> wrote: > >> I'm dusting the cobwebs off my nascent python ability and I'd like to >> know if there is a smart way of affecting many gizmo knobs with one >> knobChanged callback without explicitly listing them all. >> >> So, right now I have something like this which is some code to hide some >> knob values in the UI with a toggle switch: >> >> c=nuke.toNode("Group3") >> >> code=''' >> >> k=nuke.thisKnob() >> >> n=nuke.thisNode() >> >> if k.name()=="blahh": >> >> n['yeah'].setVisible(k.value()==False) >> >> n['yeahhh'].setVisible(k.value()==False) >> >> #etc.... >> >> ''' >> >> c.knob('knobChanged').setValue(code) >> >> ...where I'm affecting two knob values, but if I had dozens there, can I >> do a 'for' loop or something? >> >> Also, is there a python way of toggle expand/collapsing the triangle >> widget of a group knob? >> >> Thanks, >> Michael >> > >
_______________________________________________ Nuke-python mailing list [email protected], http://forums.thefoundry.co.uk/ http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python
