当前位置: 首页>>代码示例>>Python>>正文


Python cmds.deleteUI方法代码示例

本文整理汇总了Python中maya.cmds.deleteUI方法的典型用法代码示例。如果您正苦于以下问题:Python cmds.deleteUI方法的具体用法?Python cmds.deleteUI怎么用?Python cmds.deleteUI使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在maya.cmds的用法示例。


在下文中一共展示了cmds.deleteUI方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: donateWin

# 需要导入模块: from maya import cmds [as 别名]
# 或者: from maya.cmds import deleteUI [as 别名]
def donateWin(self, *args):
        """ Simple window with links to donate in order to support this free and openSource code via PayPal.
        """
        # declaring variables:
        self.donate_title       = 'dpAutoRig - v'+DPAR_VERSION+' - '+self.langDic[self.langName]['i167_donate']
        self.donate_description = self.langDic[self.langName]['i168_donateDesc']
        self.donate_winWidth    = 305
        self.donate_winHeight   = 300
        self.donate_align       = "center"
        # creating Donate Window:
        if cmds.window('dpDonateWindow', query=True, exists=True):
            cmds.deleteUI('dpDonateWindow', window=True)
        dpDonateWin = cmds.window('dpDonateWindow', title=self.donate_title, iconName='dpInfo', widthHeight=(self.donate_winWidth, self.donate_winHeight), menuBar=False, sizeable=True, minimizeButton=False, maximizeButton=False)
        # creating text layout:
        donateColumnLayout = cmds.columnLayout('donateColumnLayout', adjustableColumn=True, columnOffset=['both', 20], rowSpacing=5, parent=dpDonateWin)
        cmds.separator(style='none', height=10, parent=donateColumnLayout)
        infoDesc = cmds.text(self.donate_description, align=self.donate_align, parent=donateColumnLayout)
        cmds.separator(style='none', height=10, parent=donateColumnLayout)
        brPaypalButton = cmds.button('brlPaypalButton', label=self.langDic[self.langName]['i167_donate']+" - R$ - Real", align=self.donate_align, command=partial(utils.visitWebSite, DONATE+"BRL"), parent=donateColumnLayout)
        #usdPaypalButton = cmds.button('usdPaypalButton', label=self.langDic[self.langName]['i167_donate']+" - USD - Dollar", align=self.donate_align, command=partial(utils.visitWebSite, DONATE+"USD"), parent=donateColumnLayout)
        # call Donate Window:
        cmds.showWindow(dpDonateWin) 
开发者ID:nilouco,项目名称:dpAutoRigSystem,代码行数:24,代码来源:dpAutoRig.py

示例2: downloadUpdate

# 需要导入模块: from maya import cmds [as 别名]
# 或者: from maya.cmds import deleteUI [as 别名]
def downloadUpdate(self, url, ext, *args):
        """ Download file from given url adrees and ask user to choose folder and file name to save
        """
        extFilter = "*."+ext
        downloadFolder = cmds.fileDialog2(fileFilter=extFilter, dialogStyle=2)
        if downloadFolder:
            cmds.progressWindow(title='Download Update', progress=50, status='Downloading...', isInterruptable=False)
            try:
                urllib.urlretrieve(url, downloadFolder[0])
                self.info('i094_downloadUpdate', 'i096_downloaded', downloadFolder[0]+'\n\n'+self.langDic[self.langName]['i018_thanks'], 'center', 205, 270)
                # closes dpUpdateWindow:
                if cmds.window('dpUpdateWindow', query=True, exists=True):
                    cmds.deleteUI('dpUpdateWindow', window=True)
            except:
                self.info('i094_downloadUpdate', 'e009_failDownloadUpdate', downloadFolder[0]+'\n\n'+self.langDic[self.langName]['i097_sorry'], 'center', 205, 270)
            cmds.progressWindow(endProgress=True) 
开发者ID:nilouco,项目名称:dpAutoRigSystem,代码行数:18,代码来源:dpAutoRig.py

示例3: dpIkFkSnapUI

# 需要导入模块: from maya import cmds [as 别名]
# 或者: from maya.cmds import deleteUI [as 别名]
def dpIkFkSnapUI(self, *args):
        """ Show a little window with buttons to change from Ik to Fk or from Fk to Ik snapping.
        """
        # creating ikFkSnap Window:
        if cmds.window('dpIkFkSnapWindow', query=True, exists=True):
            cmds.deleteUI('dpIkFkSnapWindow', window=True)
        ikFkSnap_winWidth  = 205
        ikFkSnap_winHeight = 50
        dpIkFkSnapWin = cmds.window('dpIkFkSnapWindow', title='IkFkSnap '+DPIKFK_VERSION, iconName='dpIkFkSnap', widthHeight=(ikFkSnap_winWidth, ikFkSnap_winHeight), menuBar=False, sizeable=True, minimizeButton=True, maximizeButton=False, menuBarVisible=False, titleBar=True)
        # creating layout:
        ikFkSnapLayout = cmds.columnLayout('ikFkSnapLayout', adjustableColumn=True, parent=dpIkFkSnapWin)
        # creating buttons:
        cmds.button('ikToFkSnap_BT', label="Ik --> Fk", backgroundColor=(0.8, 0.8, 1.0), command=self.IkToFkSnap, parent=ikFkSnapLayout)
        cmds.button('fkToIkSnap_BT', label="Fk --> Ik", backgroundColor=(1.0, 0.8, 0.8), command=self.FkToIkSnap, parent=ikFkSnapLayout)
        # call colorIndex Window:
        cmds.showWindow(dpIkFkSnapWin) 
开发者ID:nilouco,项目名称:dpAutoRigSystem,代码行数:18,代码来源:dpIkFkSnap.py

示例4: runPB

# 需要导入模块: from maya import cmds [as 别名]
# 或者: from maya.cmds import deleteUI [as 别名]
def runPB(quality, sequence, autoReview):
  #Get the file unix path of the maya file
  filePath = cmds.file(q=True, sceneName=True)
  #Parse the unix path and convert it into a dpa fspattern

  if quality < 50:
    print "Lower than 50 percent quality may result in very poor imaging..."
    cmds.deleteUI("PBQuality")
    return

  print "Percentage chosen: " + str(quality)
  print "From Sequence: " + str(sequence)
  print "AutoSubmit: " + str(autoReview)

  #Attempts to create a playblast of the current maya scene
  success = playblaster(quality, sequence, autoReview)

  if success:
    print "Successfully generated playblast :)"
  else:
    print "Failed to generate playblast :(" 
开发者ID:Clemson-DPA,项目名称:dpa-pipe,代码行数:23,代码来源:playblast.py

示例5: show

# 需要导入模块: from maya import cmds [as 别名]
# 或者: from maya.cmds import deleteUI [as 别名]
def show():
    """"""
    from DLS.widget import mainWindow
    reload(mainWindow)

    if cmds.window(MAIN_WINDOW, ex=1):
        cmds.deleteUI(MAIN_WINDOW)

    parent = getMayaWindow()
    win = mainWindow.MainWindow(parent)

    win.setWindowFlags(Qt.Window) # Make this widget a standalone window
    # identify a Maya-managed floating window, 
    # which handles the z order properly and saves its positions
    win.setProperty("saveWindowPref", True )  

    win.setAttribute(Qt.WA_DeleteOnClose)
    win.show()

#---------------------------------------------------------------------- 
开发者ID:WebberHuang,项目名称:DeformationLearningSolver,代码行数:22,代码来源:setup.py

示例6: shelf

# 需要导入模块: from maya import cmds [as 别名]
# 或者: from maya.cmds import deleteUI [as 别名]
def shelf():
    """
    Add a new shelf in Maya with all the tools that are provided in the
    SHELF_TOOLS variable. If the tab exists it will be deleted and re-created
    from scratch.
    """
    # get top shelf
    gShelfTopLevel = mel.eval("$tmpVar=$gShelfTopLevel")

    # get top shelf names
    shelves = cmds.tabLayout(gShelfTopLevel, query=1, ca=1)
    
    # delete shelf if it exists
    if SHELF_NAME in shelves:
        cmds.deleteUI(SHELF_NAME)

    # create shelf
    cmds.shelfLayout(SHELF_NAME, parent=gShelfTopLevel)
    
    # add modules
    for tool in SHELF_TOOLS:
        if tool.get("image1"):
            cmds.shelfButton(style="iconOnly", parent=SHELF_NAME, **tool)
        else:
            cmds.shelfButton(style="textOnly", parent=SHELF_NAME, **tool) 
开发者ID:robertjoosten,项目名称:maya-skinning-tools,代码行数:27,代码来源:install.py

示例7: createSpiralWin

# 需要导入模块: from maya import cmds [as 别名]
# 或者: from maya.cmds import deleteUI [as 别名]
def createSpiralWin():
    window = cmds.window( title="Create Spiral", widthHeight=(200, 300) )
    cmds.columnLayout( columnAttach=('both', 5), rowSpacing=5, adjustableColumn=True )
    
    amp = cmds.floatFieldGrp( numberOfFields=1, label='Amp', value1=1.0)
    spin = cmds.floatFieldGrp( numberOfFields=1, label='Spin', value1=30)
    count = cmds.intFieldGrp( numberOfFields=1, label='Count', value1=20)
    width = cmds.floatFieldGrp( numberOfFields=1, label='Width', value1=3)

    def click(value):
        doCreateSpiral(amp, spin, count, width)
        
    cmds.button( label='Create Spiral!', command=click )
    
    closeCmd = 'cmds.deleteUI("%s", window=True)' % window
    cmds.button( label='Close', command=closeCmd )
    
    cmds.showWindow( window ) 
开发者ID:justinfx,项目名称:tutorials,代码行数:20,代码来源:createSpiralWin.py

示例8: quickBreakDownUI

# 需要导入模块: from maya import cmds [as 别名]
# 或者: from maya.cmds import deleteUI [as 别名]
def quickBreakDownUI():
    winName = 'ml_quickBreakdownWin'
    if mc.window(winName, exists=True):
        mc.deleteUI(winName)

    mc.window(winName, title='ml :: QBD', iconName='Quick Breakdown', width=100, height=500)

    mc.columnLayout(adj=True)

    mc.paneLayout(configuration='vertical2', separatorThickness=1)
    mc.text('<<')
    mc.text('>>')
    mc.setParent('..')

    for v in (10,20,50,80,90,100,110,120,150):
        mc.paneLayout(configuration='vertical2',separatorThickness=1)

        mc.button(label=str(v)+' %', command=partial(weightPrevious,v/100.0))
        mc.button(label=str(v)+' %', command=partial(weightNext,v/100.0))
        mc.setParent('..')

    mc.showWindow(winName)

    mc.window(winName, edit=True, width=100, height=250) 
开发者ID:morganloomis,项目名称:ml_tools,代码行数:26,代码来源:ml_breakdown.py

示例9: mini

# 需要导入模块: from maya import cmds [as 别名]
# 或者: from maya.cmds import deleteUI [as 别名]
def mini():
    name = 'ml_arcTracer_win_mini'
    w = 100
    h = 50
    if mc.window(name, exists=True):
        mc.deleteUI(name)
    win = mc.window(name, width=w, height=h, title='arcs', iconName='arc')
    form = mc.formLayout()

    a1 = mc.button(label='camera', command=traceCamera)
    a2 = mc.button(label='world', command=traceWorld)
    b1 = mc.button(label='retrace', command=retraceArc)
    b2 = mc.button(label='clear', command=clearArcs)

    utl.formLayoutGrid(form, [[a1,a2],[b1,b2]], )

    mc.showWindow(win)
    mc.window(win, edit=True, width=w, height=h) 
开发者ID:morganloomis,项目名称:ml_tools,代码行数:20,代码来源:ml_arcTracer.py

示例10: clearDPARLoadingWindow

# 需要导入模块: from maya import cmds [as 别名]
# 或者: from maya.cmds import deleteUI [as 别名]
def clearDPARLoadingWindow():
    if cmds.window('dpARLoadWin', query=True, exists=True):
        cmds.deleteUI('dpARLoadWin', window=True) 
开发者ID:nilouco,项目名称:dpAutoRigSystem,代码行数:5,代码来源:dpAutoRig.py

示例11: deleteExistWindow

# 需要导入模块: from maya import cmds [as 别名]
# 或者: from maya.cmds import deleteUI [as 别名]
def deleteExistWindow(self, *args):
        """ Check if there are the dpAutoRigWindow and dpAutoRigSystem_Control to deleteUI.
        """
        if cmds.window('dpAutoRigWindow', query=True, exists=True):
            cmds.deleteUI('dpAutoRigWindow', window=True)
        if cmds.dockControl('dpAutoRigSystem', query=True, exists=True):
            cmds.deleteUI('dpAutoRigSystem', control=True) 
开发者ID:nilouco,项目名称:dpAutoRigSystem,代码行数:9,代码来源:dpAutoRig.py

示例12: jobWinClose

# 需要导入模块: from maya import cmds [as 别名]
# 或者: from maya.cmds import deleteUI [as 别名]
def jobWinClose(self, *args):
        #This job will ensure that the dock control is killed correctly
        if self.pDockCtrl:
            if cmds.objExists(self.pDockCtrl):
                if (not cmds.dockControl(self.pDockCtrl, vis=True, query=True)):
                    if cmds.dockControl('dpAutoRigSystem', exists=True):
                        cmds.deleteUI('dpAutoRigSystem', control=True) 
开发者ID:nilouco,项目名称:dpAutoRigSystem,代码行数:9,代码来源:dpAutoRig.py

示例13: updateWin

# 需要导入模块: from maya import cmds [as 别名]
# 或者: from maya.cmds import deleteUI [as 别名]
def updateWin(self, rawResult, text, *args):
        """ Create a window showing the text info with the description about any module.
        """
        # declaring variables:
        self.update_checkedNumber = rawResult[0]
        self.update_remoteVersion = rawResult[1]
        self.update_remoteLog     = rawResult[2]
        self.update_text          = text
        self.update_winWidth      = 305
        self.update_winHeight     = 300
        # creating Update Window:
        if cmds.window('dpUpdateWindow', query=True, exists=True):
            cmds.deleteUI('dpUpdateWindow', window=True)
        dpUpdateWin = cmds.window('dpUpdateWindow', title='dpAutoRigSystem - '+self.langDic[self.langName]['i089_update'], iconName='dpInfo', widthHeight=(self.update_winWidth, self.update_winHeight), menuBar=False, sizeable=True, minimizeButton=False, maximizeButton=False)
        # creating text layout:
        updateLayout = cmds.columnLayout('updateLayout', adjustableColumn=True, columnOffset=['both', 20], rowSpacing=5, parent=dpUpdateWin)
        if self.update_text:
            updateDesc = cmds.text("\n"+self.langDic[self.langName][self.update_text], align="center", parent=updateLayout)
            cmds.text("\n"+DPAR_VERSION+self.langDic[self.langName]['i090_currentVersion'], align="left", parent=updateLayout)
        if self.update_remoteVersion:
            cmds.text(self.update_remoteVersion+self.langDic[self.langName]['i091_onlineVersion'], align="left", parent=updateLayout)
            cmds.separator(height=30)
            if self.update_remoteLog:
                remoteLog = self.update_remoteLog.replace("\\n", "\n")
                cmds.text(self.langDic[self.langName]['i171_updateLog']+":\n", align="center", parent=updateLayout)
                cmds.text(remoteLog, align="left", parent=updateLayout)
                cmds.separator(height=30)
            whatsChangedButton = cmds.button('whatsChangedButton', label=self.langDic[self.langName]['i117_whatsChanged'], align="center", command=partial(utils.visitWebSite, DPAR_WHATSCHANGED), parent=updateLayout)
            visiteGitHubButton = cmds.button('visiteGitHubButton', label=self.langDic[self.langName]['i093_gotoWebSite'], align="center", command=partial(utils.visitWebSite, DPAR_GITHUB), parent=updateLayout)
            if (int(cmds.about(version=True)[:4]) < 2019) and platform.system() == "Darwin": #Maya 2018 or older on macOS
                upgradeSSLmacOSButton = cmds.button('upgradeSSLmacOSButton', label=self.langDic[self.langName]['i164_sslMacOS'], align="center", backgroundColor=(0.8, 0.4, 0.4), command=partial(utils.visitWebSite, SSL_MACOS), parent=updateLayout)
            downloadButton = cmds.button('downloadButton', label=self.langDic[self.langName]['i094_downloadUpdate'], align="center", command=partial(self.downloadUpdate, DPAR_MASTERURL, "zip"), parent=updateLayout)
            installButton = cmds.button('installButton', label=self.langDic[self.langName]['i095_installUpdate'], align="center", command=partial(self.installUpdate, DPAR_MASTERURL, self.update_remoteVersion), parent=updateLayout)
        # automatically check for updates:
        cmds.separator(height=30)
        self.autoCheckUpdateCB = cmds.checkBox('autoCheckUpdateCB', label=self.langDic[self.langName]['i092_autoCheckUpdate'], align="left", value=self.userDefAutoCheckUpdate, changeCommand=self.setAutoCheckUpdatePref, parent=updateLayout)
        cmds.separator(height=30)
        # call Update Window:
        cmds.showWindow(dpUpdateWin)
        print self.langDic[self.langName][self.update_text] 
开发者ID:nilouco,项目名称:dpAutoRigSystem,代码行数:42,代码来源:dpAutoRig.py

示例14: dpClearTranslatorUI

# 需要导入模块: from maya import cmds [as 别名]
# 或者: from maya.cmds import deleteUI [as 别名]
def dpClearTranslatorUI(self, win, *args):
        """ Check if the window exists then delete it if true.
        """
        if cmds.window('dpARTranslatorWin'+str(win), query=True, exists=True):
            cmds.deleteUI('dpARTranslatorWin'+str(win), window=True) 
开发者ID:nilouco,项目名称:dpAutoRigSystem,代码行数:7,代码来源:dpTranslator.py

示例15: __init__

# 需要导入模块: from maya import cmds [as 别名]
# 或者: from maya.cmds import deleteUI [as 别名]
def __init__(self, *args, **kwargs):
        # Try to kill the existing window
        try:
            if cmds.window("SpaceSwitcher", ex=True):
                cmds.deleteUI("SpaceSwitcher")
        except:
            pass

        self.pDialog = SpaceSwitcherDialog(getMayaWindow())
        self.centerDialog()
        self.pDialog.setWindowTitle("Space Switcher")
        self.pDialog.setObjectName("SpaceSwitcher")
        self.pDialog.show() 
开发者ID:nilouco,项目名称:dpAutoRigSystem,代码行数:15,代码来源:sqSpaceSwitcher.py


注:本文中的maya.cmds.deleteUI方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。