am new to python..I try to create a button with a ui..for the first time 
its ok.. if i try to run the script for the 2nd time its shows 
myrigshortcut is not unique. please help me to rectify this

import maya.cmds as christy

if christy.dockControl('MyRigShortcut', exists=True):
    christy.deleteUI('MyRigShortcut', window=True)

myWindow = christy.window( iconName='Short Name', widthHeight=(200, 55) )
christy.columnLayout( adjustableColumn=True )
christy.button (label = 'Show/Hide Joint', c = 'HideShow()')

def HideShow():
    jointList = []
    jointList = = 'joint' )
    for j in jointList:
        n = christy.getAttr (j+'.drawStyle')
        if (n==0):
buttonForm = christy.formLayout( parent = myWindow)             

christy.dockControl( 'MyRigShortcut',area='left', content= myWindow , 
allowedArea='left' )

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 view this discussion on the web visit
For more options, visit

Reply via email to