OK, my question hasn't shown up in the newsgroups, yet, but I found the answer to my question...
I just needed to changed all the if statements (e.g. -- "if a_knob:" ) to "if nuke.thisKnob() == a_knob:" Sorry for the bandwidth! 8^) Rich Begin forwarded message: > From: Richard Bobo <richb...@mac.com> > Subject: knobChanged question... > Date: May 7, 2013 12:58:05 PM EDT > To: Nuke-Users Mailing List List Postings > <nuke-us...@support.thefoundry.co.uk>, Nuke Python discussion > <nuke-python@support.thefoundry.co.uk> > > 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