Hi,

This is probably a very elementary question, but I can't quite wrap my head 
around it…

I have a Python_Panel with four knobs on it: three Enumeration_Pulldown knobs 
and a PyScript_Knob. I have added them all to a knobChanged method. I am using 
something like this for my checking:

def knobChanged(self, knob):
        if a_knob:
                set_something = a_knob.value()
        if b_knob:
                set_something_else = b_knob.value()
        if c_knob:
                set_another_thing = c_knob.value()
        if d_knob:
                run_a_method()

You will probably notice that each time a knob is changed, all of the 
statements are executed, including the run_a_function(). I'm sure this is from 
"Programming 101", but how do I isolate the knob changed events, so that *only* 
the one that has been changed is executed…?

Thanks for any help!


Rich

Rich Bobo
Senior VFX Compositor
Armstrong-White
http://armstrong-white.com/

Email:  richb...@mac.com
Mobile:  (248) 840-2665
Web:  http://richbobo.com/

"We are fallible. We certainly haven't attained perfection. But we can strive 
for it, and the virtue is in the striving."
- Carlos P. Romulo







_______________________________________________
Nuke-python mailing list
Nuke-python@support.thefoundry.co.uk, http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python

Reply via email to