##so what i did was to bring it to another level. I inserted the info
into a gui and got the UI to open but i got another error. the reason
why i am putting everything into a method is so that I can save the
script and then source it in usersetup.mel
import maya.cmds as cmds

def mnProgRun():
        def mnDialog(*args):
                cmds.confirmDialog( title='Confirm', message='Are you sure?', 
button=
['Yes','No'], defaultButton='Yes',
cancelButton='No',dismissString='No' )
        def mnMakeWin():
                cmds.window( 'mnWin', title = 'testman', wh=(260,100))
                cmds.columnLayout(adjustableColumn=False, columnAlign='center')
                cmds.button( label="Yes,it works",align='center',width=120,
height=25, backgroundColor=[0.5,1,0.5],command='cmds.scriptJob( event=
["SelectionChanged","mnDialog"])')
                cmds.button( label="No, Thank You!",align='center',width=120,
height=25, backgroundColor=[1,0.5,0.5],command='cmds.deleteUI
("mnWin")')

                cmds.showWindow( 'mnWin' )
        mnMakeWin()

mnProgRun()


so on selection changed, i got an error, it said
# NameError: name 'mnDialog' is not defined #

-- 
http://groups.google.com/group/python_inside_maya

Reply via email to