There's probably a better way but here's how I do it.
In all my PyQt apps, I have 2 functions for launching: 1 launches in Maya,
another one launches as standalone Python.
class myApp():
blah blah
def launchInMaya():
global appName
try:
appName.ui.close()
except:
pass
appName = myApp(parent=getMayaWindow())
Then within Maya I would call the xxx.launchInMaya() instead of calling the
class directly.
On Tuesday, September 17, 2013 2:39:13 PM UTC+7, Joe Weidenbach wrote:
> Sorry for even more questions, hopefully this one's a little more
>
> straightforward.
>
>
>
> In Maya's UI, I use the following general code to clean up any old
>
> windows I have lingering in memory:
>
>
>
> if cmds.window(<windowName>, exists=True):
>
> cmds.deleteUI(<windowName>)
>
> if cmds.windowPref(<windowName>, exists=True):
>
> cmds.windowPref(<windowName>, removeAll=True)
>
>
>
> I understand that in PyQt we don't necessarily need to do this (I think
>
> there's a garbage collector or something similar), but is there a rough
>
> equivalent? Or is it completely silly to do so?
>
>
>
> Thanks again,
>
>
>
> Joe
--
You received this message because you are subscribed to the Google Groups
"Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.