try something like this after you set your new value:
node.knob('knobChanged').clearFlag(0) #assuming you don't have a flag 0
set on this knob!
basically, it could be any knob, but it's just to jiggle the panel into
refreshing.
jrab
Jean Mistrot wrote:
Nope as I mentioned below the data and the knob update fine
The new value doesn't update in the panel.
I have a bool in the panel whose name is updated via method in
my panel class. The new name isn't displayed unless the panel is
minimized and then restored.. I am looking for a way to force a redraw
of the panel.
BTW the panel is not modal..
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
--
Hugo Léveillé
TD Compositing, Vision Globale
_______________________________________________
Nuke-python mailing list
--
Hugo Léveillé
TD Compositing, Vision Globale
_______________________________________________
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
|
_______________________________________________
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