Hi everyone,
I load a floating tab into Nuke, and I wish to a) delete this object on
window close and b) delete the UI if another instance of the UI is shown -
but can't quite figure out exactly how to achieve this.
This is how I launch the UI:
panel = panels.registerWidgetAsPanel(name, title, identifier,
create=True).addToPane(pane)
panel.show()
gui = panel.customKnob.getObject().widget
In my class, I have registered a closeEvent() method:
def closeEvent(self, event):
print 'closing ui...'
self.deleteLater()
And this is how I find which pane my UI resides in:
pane = nuke.getPaneFor(identifier)
if pane:
print 'the pane exists'
a) For some reason, the object is not deleted when I close the Nuke tab or
the Nuke pane and I do not see the ‘closing ui…’ printed out in the script
editor. What am I doing wrong here? Do I need to connect a trigger to the
closeEvent() method?
b) How can I not only detect the pane (or the Dock object, which Nuke also
calls it) but also detect whether the actual UI inside the tab exists?
Regards,
Fredrik
_______________________________________________
Nuke-python mailing list
[email protected], http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python