oops , I had a typo:

===============


class Test( nukescripts.PythonPanel):
    def __init__( self ):
        nukescripts.PythonPanel.__init__( self, 'Test',
'my.panel')
        self.x = 0
        self.push = nuke.PyScript_Knob("push","push")
        self.label = nuke.Text_Knob("0")
        self.pulldown =
nuke.Enumeration_Knob("test","test",["Hello"])
        self.addKnob(self.push)
        self.addKnob(self.label)
        self.addKnob(self.pulldown)
    def knobChanged(self,knob):
        if nuke.thisKnob().name() == "push":
            self.x+=1
            self.label.setLabel("%s" % self.x)
            self.pulldown.setValues(["World"])
Test().showModalDialog()




===================
















On Mon, Apr 16, 2012, at 18:22, Hugo Léveillé wrote:

quick exemple"
=============
class Test( nukescripts.PythonPanel):
    def __init__( self ):
        nukescripts.PythonPanel.__init__( self, 'Test',
'my.panel')
        self.x = 0
        self.push = nuke.PyScript_Knob("push","push")
        self.label = nuke.Text_Knob("0")
        self.pulldown =
nuke.Enumeration_Knob("test","test",["Hello"])
        self.addKnob(self.push)
        self.addKnob(self.label)
        self.addKnob(self.pulldown)
    def knobChanged(self,knob):
        if nuke.thisKnob().name() == "push":
            self.x+=1
            self.label.setLabel("%s" % self.x)
            self.pulldown.setValues(["World"])
Test().showModalDial
===============================

Is that what you are looking for ?

On Mon, Apr 16, 2012, at 16:01, Jean Mistrot wrote:


A bit of a nub question.
I have a PythonPanel that dynamically changes the name and label
of a list of boolean knobs it presents to the user after loading
a bunch of data during a separate UI event.
I.E
  * user pushes button to update data
  * Data collected
  * Boolean knob list updated

The data updates fine but the UI doesn’t refresh.  I want to
force the panel to update in the UI but am having a heck of a
time understanding how to register the panel with the global
updateUI callback.  Is this the correct way to do this?

Does anyone have a good example? I have gone through the docs but
they are not very enlightening.

Jm


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


--

Hugo Léveillé

TD Compositing, Vision Globale

[4]hu...@fastmail.net

_______________________________________________

Nuke-python mailing list

[5]Nuke-python@support.thefoundry.co.uk,
[6]http://forums.thefoundry.co.uk/

[7]http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-
python

References

1. mailto:Nuke-python@support.thefoundry.co.uk
2. http://forums.thefoundry.co.uk/
3. http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python
4. mailto:hu...@fastmail.net
5. mailto:Nuke-python@support.thefoundry.co.uk
6. http://forums.thefoundry.co.uk/
7. http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python


-- 
  Hugo Léveillé
  TD Compositing, Vision Globale
  hu...@fastmail.net

_______________________________________________
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