You could create a global var to hold the instance of your panel every time
you create it.
def addMyPanel():
global myPanel
myPanel = myPanelClass()
return myPanel.addToPane()
Then you can check whether the global var exists, and whether it currently
holds an instance of your Panel.
Probably not the cleanest way, but that should work.
On Wed, Dec 14, 2011 at 6:04 PM, Jim Berndt <
[email protected]> wrote:
> **
> I would like to restrict a custom pane to only one instance of itself. If
> one already exists, destroy it before rebuilding it. Any ideas?
>
> Right now I execute a 'self.destroy()' once the program runs... so I
> imagine it is on the same lines.
>
> Thanks much,
>
> Jim
>
> _______________________________________________
> Nuke-python mailing list
> [email protected], http://forums.thefoundry.co.uk/
> http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python
>
>
_______________________________________________
Nuke-python mailing list
[email protected], http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python