ignore that callbacks case comment - I misread a bit of the documentation then
________________________________
From: Howard Jones <[email protected]>
To: Nuke Python discussion <[email protected]>
Sent: Tue, 15 March, 2011 13:42:00
Subject: Re: [Nuke-python] equivalent of a 3-way radio button
Astually looking through the code - I guess the question is
does knobChanged know which knob was changed? or is this a callback case?
(I am rtfm-ing honest)
Howard
________________________________
From: Howard Jones <[email protected]>
To: Nuke Python discussion <[email protected]>
Sent: Tue, 15 March, 2011 9:16:08
Subject: [Nuke-python] equivalent of a 3-way radio button
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