Hi

I'm wanting to write a 3-way radio button sort of thing.

I have 3 pulldowns (with lots of options) and through knob changed I'd like to 
pick up which one has been touched and set the other 2 to a null setting ('-'),
so that only one knob can be active at any time. No doubt very basic but I'm 
stuck (again).

This test code will always (of course) set the others based on A unless I 
manually change A to '-' first then change the others. But I'd like which ever 
knob was changed to set the others.
Is there some logic that can do this or am I into saving the previous states 
and 
comparing the difference. At first glance it looks like a 3-way switch but I'm 
not sure it is.

n=nuke.selectedNode()
if n['A'].value() != '-':
    n[ 'B'].setValue(0)
    n['C'].setValue(0)
elif n['B'].value() != '-':
    n[ 'A'].setValue(0)
    n['C'].setValue(0)
elif n['C'].value() != '-':
    n[ 'A'].setValue(0)
    n['B'].setValue(0)




Any help greatly appreciated.
  
Howard
_______________________________________________
Nuke-python mailing list
[email protected]
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python

Reply via email to