The Maya native UI doesn't really give you fine grained controls over mouse
down and up, but are you trying to do something like this?
from maya import utils
cmds.window('hi')
cmds.columnLayout()
cmds.button("Button 1")
cmds.popupMenu( button=1,postMenuCommand=win)
cmds.showWindow()
def win(*args):
utils.executeDeferred(deleteMain)
cmds.window('hi2')
cmds.columnLayout()
cmds.button("Button 2")
cmds.showWindow()
def deleteMain():
cmds.deleteUI('hi')
It deletes the first window when you click the button and it opens the
second window.
On Wed Nov 26 2014 at 12:42:23 PM max1 <[email protected]> wrote:
> #example:
> cmds.window()
> cmds.columnLayout()
> cmds.button()
> cmds.popupMenu( button=1,postMenuCommand='win()' )
> cmds.showWindow()
>
> def win():
> cmds.window('hi2')
> cmds.columnLayout()
> cmds.showWindow()
> i am running example script now.i want...when releasing the mouse button,maya
> runing deleteUI('hi') command....
> please help me...thanks!
>
> --
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/python_inside_maya/c350394c-8b86-43d9-9191-addd301f55c8%40googlegroups.com
> <https://groups.google.com/d/msgid/python_inside_maya/c350394c-8b86-43d9-9191-addd301f55c8%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>
--
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 view this discussion on the web visit
https://groups.google.com/d/msgid/python_inside_maya/CAPGFgA1xyM-Ptv7XQ%2BQ4MV9T46BJS6PA8TGRDek8WGMc5784Hw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.