Hi,
I am having issues with accessing UI elements when having created a panel
in a script which creates both regular windows and panels.
I need to access the UI elements, from both windows and panels, like this:
gui.listWidget.addItem('hello')
...and that works perfectly fine if I create a regular floating window (
dockedWindow = False), but I can't make it to work when I create panels (
dockedWindow = True).
Any ideas?
class HelloWorld(form, base):
def __init__(self, parent=None):
super(HelloWorld, self).__init__(parent)
# ...
def run():
dockedWindow = True
if dockedWindow:
pane = nuke.getPaneFor('Properties.1')
global gui
*gui* = panels.registerWidgetAsPanel( moduleName + 'HelloWorld' ,
windowTitle, ('uk.co.thefoundry.'+windowObject+'Window'),
True).addToPane(pane)
else:
global gui
*gui* = HelloWorld()
gui.show()
Regards,
Fredrik
_______________________________________________
Nuke-python mailing list
[email protected], http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python