Hi 

I am having some problems here. I made a Maya UI window with QtDesigner and I'm 
trying to get it to dock at the side. Everytime I run the script, it will 
appear. However, once I close the UI window and rerun the script, the window 
will not appear again. I am thinking maybe I need to reinitialise the script 
but I'm not sure about that. Any advice on how to fix this? Here is my code.

def getMayaWindow():
    ptr = apiUI.MQtUtil.mainWindow()
    if ptr is not None:
        return shiboken.wrapInstance(long(ptr), QtGui.QMainWindow)
 
class pipeWindow(formClass,baseClass):

    def __init__(self, parent=getMayaWindow()):
        super(pipeWindow,self).__init__(parent) 
        
        self.setupUi(self)
        self.setObjectName('pipe_window')

        self.project = ""
        
        try:
            cmds.deleteUI('dockPane')
        except:
            pass 
               
        self.pane = cmds.paneLayout('dockPane', cn='single')
        
        if 'pipeDock' not in cmds.lsUI(ctl=1) :
            cmds.dockControl('pipeDock', con=self.pane, area='right', 
allowedArea = ['right','left'], label = "ANMD_Pipeline", w=365)            
        else:
            pass
        cmds.control( 'pipe_window', e=True, p=self.pane)

Eunice

-- 
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/45b5e20e-27c5-412d-9805-d9da488df7ad%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to