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


Python cmds.separator方法代码示例

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


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

示例1: info

# 需要导入模块: from maya import cmds [as 别名]
# 或者: from maya.cmds import separator [as 别名]
def info(self, title, description, text, align, width, height, *args):
        """ Create a window showing the text info with the description about any module.
        """
        # declaring variables:
        self.info_title       = title
        self.info_description = description
        self.info_text        = text
        self.info_winWidth    = width
        self.info_winHeight   = height
        self.info_align       = align
        # creating Info Window:
        if cmds.window('dpInfoWindow', query=True, exists=True):
            cmds.deleteUI('dpInfoWindow', window=True)
        dpInfoWin = cmds.window('dpInfoWindow', title='dpAutoRig - v'+DPAR_VERSION+' - '+self.langDic[self.langName]['i013_info']+' - '+self.langDic[self.langName][self.info_title], iconName='dpInfo', widthHeight=(self.info_winWidth, self.info_winHeight), menuBar=False, sizeable=True, minimizeButton=False, maximizeButton=False)
        # creating text layout:
        infoColumnLayout = cmds.columnLayout('infoColumnLayout', adjustableColumn=True, columnOffset=['both', 20], parent=dpInfoWin)
        cmds.separator(style='none', height=10, parent=infoColumnLayout)
        infoLayout = cmds.scrollLayout('infoLayout', parent=infoColumnLayout)
        if self.info_description:
            infoDesc = cmds.text(self.langDic[self.langName][self.info_description], align=self.info_align, parent=infoLayout)
        if self.info_text:
            infoText = cmds.text(self.info_text, align=self.info_align, parent=infoLayout)
        # call Info Window:
        cmds.showWindow(dpInfoWin) 
开发者ID:nilouco,项目名称:dpAutoRigSystem,代码行数:26,代码来源:dpAutoRig.py

示例2: donateWin

# 需要导入模块: from maya import cmds [as 别名]
# 或者: from maya.cmds import separator [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

示例3: dpReorderAttrUI

# 需要导入模块: from maya import cmds [as 别名]
# 或者: from maya.cmds import separator [as 别名]
def dpReorderAttrUI(self, *args):
        """ Create a window in order to load the original model and targets to be mirrored.
        """
        # creating dpReorderAttrUI Window:
        self.dpCloseReorderAttrUI()
        reorderAttr_winWidth  = 175
        reorderAttr_winHeight = 75
        dpReorderAttrWin = cmds.window('dpReorderAttrWindow', title=self.langDic[self.langName]["m087_reorderAttr"]+" "+DPRA_VERSION, widthHeight=(reorderAttr_winWidth, reorderAttr_winHeight), menuBar=False, sizeable=True, minimizeButton=False, maximizeButton=False, menuBarVisible=False, titleBar=True)

        # creating layout:
        reorderAttrLayout = cmds.columnLayout('reorderAttrLayout', columnOffset=("left", 30))
        cmds.separator(style='none', height=7, parent=reorderAttrLayout)
        cmds.button(label=self.langDic[self.langName]["i154_up"], annotation=self.langDic[self.langName]["i155_upDesc"], width=110, backgroundColor=(0.45, 1.0, 0.6), command=partial(self.dpMoveAttr, 1, None, None, True), parent=reorderAttrLayout)
        cmds.separator(style='in', height=10, width=110, parent=reorderAttrLayout)
        cmds.button(label=self.langDic[self.langName]["i156_down"], annotation=self.langDic[self.langName]["i157_downDesc"], width=110, backgroundColor=(1.0, 0.45, 0.45), command=partial(self.dpMoveAttr, 0, None, None, True), parent=reorderAttrLayout)
        
        # call dpReorderAttrUI Window:
        cmds.showWindow(dpReorderAttrWin) 
开发者ID:nilouco,项目名称:dpAutoRigSystem,代码行数:20,代码来源:dpReorderAttr.py

示例4: ui

# 需要导入模块: from maya import cmds [as 别名]
# 或者: from maya.cmds import separator [as 别名]
def ui():
    '''
    User interface for ml_softWeights
    '''

    with utl.MlUi('ml_softWeights', 'Soft Weights', width=400, height=180, info='''Set deformer weights based on current soft-selection.
Follow the instructions below for either cluster or skin.
''') as win:

        mc.text(label='Select vertices with soft selection.')
        win.buttonWithPopup(label='Create Cluster', command=softSelectionClusterWeights,
                            annotation='Select a vertex with soft selection to create a cluster.')
        mc.separator(height=20)
        mc.text(label='Select vertices with soft selection, followed by a joint.')
        win.buttonWithPopup(label='Set Joint Weights', command=softSelectionSkinWeights,
                            annotation='Select vertices with soft selection, followed by a joint.') 
开发者ID:morganloomis,项目名称:ml_tools,代码行数:18,代码来源:ml_softWeights.py

示例5: ui

# 需要导入模块: from maya import cmds [as 别名]
# 或者: from maya.cmds import separator [as 别名]
def ui():
    '''
    User interface for breakdown
    '''

    with utl.MlUi('ml_breakdown', 'Breakdown Tools', width=400, height=180, info='''Select objects.
Press Breakdown Dragger to create a new key and weight it by dragging in the viewport.
Otherwise use the increment buttons to nudge a key's value toward the next or previous key.''') as win:

        win.buttonWithPopup(label='Breakdown Dragger', command=drag, annotation='Drag in the viewport to weight a breakdown toward the next or previous frame.',
                            shelfLabel='BDD')

        mc.separator(height=20)
        mc.floatSliderGrp('ml_breakdown_value_floatSlider', value=0.2, field=True, minValue=0, maxValue=2)
        mc.paneLayout(configuration='vertical3',separatorThickness=1)
        win.ButtonWithPopup(label='<<', command=weightPrevious, annotation='Weight toward the previous frame.', shelfLabel='<', shelfIcon='defaultTwoStackedLayout',
                            readUI_toArgs={'weight':'ml_breakdown_value_floatSlider'})
        win.ButtonWithPopup(label='Average', command=weightAverage, annotation='Weight toward the average of the next and previous frame.', shelfLabel='><', shelfIcon='defaultTwoStackedLayout',
                            readUI_toArgs={'weight':'ml_breakdown_value_floatSlider'})
        win.ButtonWithPopup(label='>>', command=weightNext, annotation='Weight toward the next frame.', shelfLabel='>', shelfIcon='defaultTwoStackedLayout',
                            readUI_toArgs={'weight':'ml_breakdown_value_floatSlider'}) 
开发者ID:morganloomis,项目名称:ml_tools,代码行数:23,代码来源:ml_breakdown.py

示例6: updateWin

# 需要导入模块: from maya import cmds [as 别名]
# 或者: from maya.cmds import separator [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

示例7: dpGetUserInfoUI

# 需要导入模块: from maya import cmds [as 别名]
# 或者: from maya.cmds import separator [as 别名]
def dpGetUserInfoUI(self, *args):
        """ First window UI to get the basic user info for sentence ids starting with "_".
        """
        self.dpClearTranslatorUI(1)
        # starting window:
        dpARTranslatorWin1 = cmds.window('dpARTranslatorWin1', title=self.translatorString, iconName='dpAutoRig', widthHeight=(500, 180), menuBar=False, sizeable=True, minimizeButton=True, maximizeButton=True)
        dpARTranslatorLayout1 = cmds.columnLayout('dpARTranslatorLayout1', adjustableColumn=True, columnOffset=('both', 10), rowSpacing=10, parent=dpARTranslatorWin1)
        cmds.separator(style='none', parent=dpARTranslatorLayout1)
        self.authorTFG = cmds.textFieldGrp('authorTFG', label=self.langDic[self.langName]['t002_yourName'], text='', adjustableColumn2=1, parent=dpARTranslatorLayout1)
        self.emailTFG = cmds.textFieldGrp('emailTFG', label=self.langDic[self.langName]['t003_emailContact'], text='', adjustableColumn2=1, parent=dpARTranslatorLayout1)
        self.websiteTFG = cmds.textFieldGrp('websiteTFG', label=self.langDic[self.langName]['t004_websiteContact'], text='', adjustableColumn2=1, parent=dpARTranslatorLayout1)
        self.newLanguageTFG = cmds.textFieldGrp('newLanguageTFG', label=self.langDic[self.langName]['t005_langName'], text='', adjustableColumn2=1, parent=dpARTranslatorLayout1)
        cmds.button('startTranslationBT', label=self.langDic[self.langName]['t006_startTranslator'], command=self.dpCollectUserInfo, parent=dpARTranslatorLayout1)
        # show UI:
        cmds.showWindow(dpARTranslatorWin1) 
开发者ID:nilouco,项目名称:dpAutoRigSystem,代码行数:17,代码来源:dpTranslator.py

示例8: dpColorizeUI

# 需要导入模块: from maya import cmds [as 别名]
# 或者: from maya.cmds import separator [as 别名]
def dpColorizeUI(self, *args):
        """ Show a little window to choose the color of the button and the override the guide.
        """
        #Get Maya colors
        #Manually add the "none" color
        colorList = [[0.627, 0.627, 0.627]]
        #WARNING --> color index in maya start to 1
        colorList += [cmds.colorIndex(iColor, q=True) for iColor in range(1,32)]
        
        # creating colorOverride Window:
        if cmds.window('dpColorOverrideWindow', query=True, exists=True):
            cmds.deleteUI('dpColorOverrideWindow', window=True)
        colorOverride_winWidth  = 170
        colorOverride_winHeight = 115
        dpColorOverrideWin = cmds.window('dpColorOverrideWindow', title='Color Override '+DPCO_VERSION, iconName='dpColorOverride', widthHeight=(colorOverride_winWidth, colorOverride_winHeight), menuBar=False, sizeable=True, minimizeButton=False, maximizeButton=False, menuBarVisible=False, titleBar=True)
        
        # creating layout:
        colorTabLayout = cmds.tabLayout('colorTabLayout', innerMarginWidth=5, innerMarginHeight=5, parent=dpColorOverrideWin)
        
        # Index layout:
        colorIndexLayout = cmds.gridLayout('colorIndexLayout', numberOfColumns=8, cellWidthHeight=(20,20), parent=colorTabLayout)
        # creating buttons
        for colorIndex, colorValues in enumerate(colorList):
            cmds.button('indexColor_'+str(colorIndex)+'_BT', label=str(colorIndex), backgroundColor=(colorValues[0], colorValues[1], colorValues[2]), command=partial(self.dpSetColorIndexToSelect, colorIndex), parent=colorIndexLayout)
        
        # RGB layout:
        colorRGBLayout = cmds.columnLayout('colorRGBLayout', adjustableColumn=True, columnAlign='left', rowSpacing=10, parent=colorTabLayout)
        cmds.separator(height=10, style='none', parent=colorRGBLayout)
        self.colorRGBSlider = cmds.colorSliderGrp('colorRGBSlider', label='Color', columnAlign3=('right', 'left', 'left'), columnWidth3=(30, 60, 50), columnOffset3=(10, 10, 10), rgbValue=(0, 0, 0), changeCommand=self.dpSetColorRGBToSelect, parent=colorRGBLayout)
        
        # renaming tabLayouts:
        cmds.tabLayout(colorTabLayout, edit=True, tabLabel=((colorIndexLayout, "Index"), (colorRGBLayout, "RGB")))
        # call colorIndex Window:
        cmds.showWindow(dpColorOverrideWin) 
开发者ID:nilouco,项目名称:dpAutoRigSystem,代码行数:36,代码来源:dpColorOverride.py

示例9: floatUI

# 需要导入模块: from maya import cmds [as 别名]
# 或者: from maya.cmds import separator [as 别名]
def floatUI():
  # Check to see if window exists
  if cmds.window("PBQuality", exists=True):
    cmds.deleteUI("PBQuality")

  # Create window
  window = cmds.window("PBQuality", title="DPA Playblast", w=300, h=100, mnb=False, mxb=False, sizeable=False)

  # Create a main layout
  mainLayout = cmds.columnLayout(adj=True)
  blastLayout = cmds.columnLayout("blastLayout", p=mainLayout, w=260, adj=False, rs=5, cat=('left', 5))
  cmds.separator(p=blastLayout)

  cmds.text(label="Enter desired playbast quality:", p=blastLayout)
  qualityField = cmds.floatField("playblastValue", p=blastLayout, w=250, min=50, max=100, pre=0, step=1, v=90, ed=True)
  qualitySlider = cmds.floatSlider("playblastPercentage", p=blastLayout, w=250, min=50, max=100, step=1, v=90, dc=updatePercent)
  cmds.separator(p=blastLayout)

  sequenceOption = cmds.checkBox("sequenceOption", label="From Sequence", value=False)
  reviewOption = cmds.checkBox("reviewOption", label="Auto-bot review submission", value=False)
  cmds.separator(p=blastLayout)

  confirmLayout = cmds.rowColumnLayout("confirmLayout", p=mainLayout, w=250, nc=2, rs=(5, 5), co=[(1, 'left', 5), (2, 'right', 5)], cw=[(1, 125), (2, 125)])
  cancelButton = cmds.button("cancelButton", p=confirmLayout, label="Cancel", c="cmds.deleteUI('PBQuality')", w=80, h=30)
  pbButton = cmds.button("pbButton", p=confirmLayout, label="Playblast", c=handlePB, w=100, h=30)
  cmds.separator(p=confirmLayout)

  cmds.showWindow(window) 
开发者ID:Clemson-DPA,项目名称:dpa-pipe,代码行数:30,代码来源:playblast.py

示例10: buildMainLayout

# 需要导入模块: from maya import cmds [as 别名]
# 或者: from maya.cmds import separator [as 别名]
def buildMainLayout(self):
        '''Build the main part of the ui
        '''

        #tabs = mc.tabLayout()

        #tab1 = mc.columnLayout(adj=True)
        #self.swatch_selected = self.colorControlLayout()
        #mc.button(label='Color Selected', command=self.colorSelected)
        #mc.setParent('..')

        #tab2 = mc.columnLayout(adj=True)
        self.swatch_range1 = self.colorControlLayout(label='First Selected')
        self.swatch_range2 = self.colorControlLayout(label='Last Selected')
        mc.separator(horizontal=True, height=10)
        mc.button(label='Color Selected Nodes', command=self.colorSelectedRange)
        #mc.setParent('..')

        #tab3 = mc.columnLayout(adj=True)
        #self.positionWidgets = {}
        #for xyz in 'XYZ':
            #for m in ['Min','Max']:
                #self.positionWidgets[m+xyz] = self.colorControlLayout(label='{} {}'.format(m,xyz))

        mc.setParent('..')

        #mc.tabLayout( tabs, edit=True, tabLabel=((tab1, 'Color Control'), (tab2, 'Color Range')) ) 
开发者ID:morganloomis,项目名称:ml_tools,代码行数:29,代码来源:ml_colorControl.py

示例11: buildMainLayout

# 需要导入模块: from maya import cmds [as 别名]
# 或者: from maya.cmds import separator [as 别名]
def buildMainLayout(self):
        '''Build the main part of the ui
        '''

        tabs = mc.tabLayout()
        tab1 = mc.columnLayout(adj=True)

        mc.scrollLayout(cr=True)
        self.shelfLayout = mc.shelfLayout()

        self.refreshShelfLayout()

        mc.setParent(tabs)

        tab2 = mc.columnLayout(adj=True)

        mc.separator(height=8, style='none')
        mc.text('Select curve(s) to export. Multiple selected curves will be combined.')
        mc.text('Center and fit the curve in the viewport,')
        mc.text('and make sure nothing else is visible for best icon creation.')
        mc.separator(height=16, style='in')

        mc.button('Export Selected Curve', command=self.exportControl, annotation='Select a nurbsCurve to export.')

        mc.tabLayout( tabs, edit=True, tabLabel=((tab1, 'Import'),
                                                 (tab2, 'Export')
                                                 ))

        if not mc.shelfLayout(self.shelfLayout, query=True, numberOfChildren=True):
            mc.tabLayout( tabs, edit=True, selectTab=tab2) 
开发者ID:morganloomis,项目名称:ml_tools,代码行数:32,代码来源:ml_controlLibrary.py

示例12: buildWindow

# 需要导入模块: from maya import cmds [as 别名]
# 或者: from maya.cmds import separator [as 别名]
def buildWindow(self):
        '''
        Initialize the UI
        '''

        if mc.window(self.name, exists=True):
            mc.deleteUI(self.name)

        mc.window(self.name, title='ml :: '+self.title, iconName=self.title, width=self.width, height=self.height, menuBar=self.menu)


        if self.menu:
            self.createMenu()

        self.form = mc.formLayout()
        self.column = mc.columnLayout(adj=True)


        mc.rowLayout( numberOfColumns=2, columnWidth2=(34, self.width-34), adjustableColumn=2,
                      columnAlign2=('right','left'),
                      columnAttach=[(1, 'both', 0), (2, 'both', 8)] )

        #if we can find an icon, use that, otherwise do the text version
        if self.icon:
            mc.iconTextStaticLabel(style='iconOnly', image1=self.icon)
        else:
            mc.text(label=' _ _ |\n| | | |')

        if not self.menu:
            mc.popupMenu(button=1)
            mc.menuItem(label='Help', command=(_showHelpCommand(TOOL_URL+self.name+'/')))

        mc.text(label=self.info)
        mc.setParent('..')
        mc.separator(height=8, style='single', horizontal=True) 
开发者ID:morganloomis,项目名称:ml_tools,代码行数:37,代码来源:ml_utilities.py

示例13: dpGetLangStringUI

# 需要导入模块: from maya import cmds [as 别名]
# 或者: from maya.cmds import separator [as 别名]
def dpGetLangStringUI(self, *args):
        """ Show main UI in order to get user translated input texts.
            It will call update UI to start using predefined list of user info.
        """
        self.dpClearTranslatorUI(2)
        
        # translator UI:
        dpARTranslatorWin2 = cmds.window('dpARTranslatorWin2', title=self.translatorString, iconName='dpAutoRig', widthHeight=(400, 400), menuBar=False, sizeable=True, minimizeButton=True, maximizeButton=True)
        dpARTranslatorLayout = cmds.columnLayout('dpARTranslatorLayout', adjustableColumn=True, columnOffset=('both', 10), rowSpacing=10, parent=dpARTranslatorWin2)
        cmds.separator(style='none', parent=dpARTranslatorLayout)
        langNameLayout = cmds.rowColumnLayout('langNameLayout', numberOfColumns=2, columnWidth=[(1, 70), (2, 200)], columnAlign=[(1, 'right'), (2, 'left')], columnAttach=[(1, 'right', 5), (2, 'left', 0)], parent=dpARTranslatorLayout)
        cmds.text('langNameTxt', label=self.langDic[self.langName]['i151_language']+":", parent=langNameLayout)
        cmds.text('newLangNameTxt', label=self.newLangName, parent=langNameLayout)
        # counter:
        counterLayout = cmds.rowColumnLayout('counterLayout', numberOfColumns=4, columnWidth=[(1, 70), (2, 20), (3, 10), (4, 30)], columnAlign=[(1, 'right'), (2, 'left'), (3, 'center'), (4, 'left')], columnAttach=[(1, 'right', 5), (2, 'left', 0), (3, 'left', 5), (4, 'left', 5)], parent=dpARTranslatorLayout)
        cmds.text('sentenceTxt', label=self.langDic[self.langName]['i136_sentence']+":", parent=counterLayout)
        self.curIndexTxt = cmds.text('curIndexTxt', label='0', parent=counterLayout)
        cmds.text('counterHifenTxt', label='/', parent=counterLayout)
        cmds.text('keyLenTxt', label=self.keyLen, parent=counterLayout)
        # lang Key Type:
        langKeyTypeLayout = cmds.rowColumnLayout('langKeyTypeLayout', numberOfColumns=2, columnWidth=[(1, 70), (2, 200)], columnAlign=[(1, 'right'), (2, 'left')], columnAttach=[(1, 'right', 5), (2, 'left', 0)], parent=dpARTranslatorLayout)
        cmds.text('langKeyTypeTxt', label=self.langDic[self.langName]['i138_type']+":", parent=langKeyTypeLayout)
        self.keyTypeTxt = cmds.text('keyTypeTxt', label='0', parent=langKeyTypeLayout)
        # lang Key ID:
        langKeyLayout = cmds.rowColumnLayout('langKeyLayout', numberOfColumns=2, columnWidth=[(1, 70), (2, 200)], columnAlign=[(1, 'right'), (2, 'left')], columnAttach=[(1, 'right', 5), (2, 'left', 0)], parent=dpARTranslatorLayout)
        cmds.text('langKeyIDTxt', label=self.langDic[self.langName]['i137_id']+":", parent=langKeyLayout)
        self.keyIDTxt = cmds.text('keyIDTxt', label='0', parent=langKeyLayout)
        # translator text scrollFields:
        textsPL = cmds.paneLayout('textsPL', configuration='horizontal2', parent=dpARTranslatorLayout)
        self.sourceTextSF = cmds.scrollField('sourceTextSF', editable=False, wordWrap=False, text='', parent=textsPL)
        self.newLangTextSF = cmds.scrollField('newLangTextSF', editable=True, wordWrap=False, text='', parent=textsPL)
        self.extraInfoTxt = cmds.text('extraInfoTxt', label='', parent=dpARTranslatorLayout)
        # translator buttons:
        buttonsPL = cmds.paneLayout('buttonsPL', configuration='vertical3', parent=dpARTranslatorLayout)
        self.backBT = cmds.button('backBT', label=self.langDic[self.langName]['i145_back'], backgroundColor=(0.3, 0.6, 0.7), command=self.dpTranslatorBack, parent=buttonsPL)
        self.sameBT = cmds.button('sameBT', label=self.langDic[self.langName]['i146_same'], backgroundColor=(0.2, 0.8, 0.9), command=self.dpTranslatorSame, parent=buttonsPL)
        self.nextBT = cmds.button('nextBT', label=self.langDic[self.langName]['i147_next'], backgroundColor=(0.1, 0.9, 1.0), command=self.dpTranslatorNext, parent=buttonsPL)
        self.finishBT = cmds.button('finishBT', label=self.langDic[self.langName]['i148_finish'], backgroundColor=(0.8, 0.8, 0.8), enable=False, command=self.dpTranslatorFinish, parent=dpARTranslatorLayout)
        cmds.separator(style='none', parent=dpARTranslatorLayout)
        cmds.showWindow(dpARTranslatorWin2)
        
        # update translator UI:
        self.dpTranslatorUpdateUI() 
开发者ID:nilouco,项目名称:dpAutoRigSystem,代码行数:45,代码来源:dpTranslator.py

示例14: dpRivetUI

# 需要导入模块: from maya import cmds [as 别名]
# 或者: from maya.cmds import separator [as 别名]
def dpRivetUI(self, *args):
        """ Create a window in order to load the original model and targets to be mirrored.
        """
        # creating dpRivetUI Window:
        if cmds.window('dpRivetWindow', query=True, exists=True):
            cmds.deleteUI('dpRivetWindow', window=True)
        rivet_winWidth  = 305
        rivet_winHeight = 470
        dpRivetWin = cmds.window('dpRivetWindow', title=self.langDic[self.langName]["m083_rivet"]+" "+DPRV_VERSION, widthHeight=(rivet_winWidth, rivet_winHeight), menuBar=False, sizeable=True, minimizeButton=False, maximizeButton=False, menuBarVisible=False, titleBar=True)

        # creating layout:
        rivetLayout = cmds.columnLayout('rivetLayout', columnOffset=("left", 10))
        cmds.text(label=self.langDic[self.langName]["m145_loadGeo"], height=30, font='boldLabelFont', parent=rivetLayout)
        doubleLayout = cmds.rowColumnLayout('doubleLayout', numberOfColumns=2, columnWidth=[(1, 100), (2, 210)], columnAlign=[(1, 'left'), (2, 'left')], columnAttach=[(1, 'left', 10), (2, 'left', 20)], parent=rivetLayout)
        cmds.button(label=self.langDic[self.langName]["m146_geo"]+" >", annotation="Load the Geometry here in order to be used to attach.", backgroundColor=(1.0, 0.7, 1.0), width=100, command=self.dpLoadGeoToAttach, parent=doubleLayout)
        self.geoToAttachTF = cmds.textField('geoToAttachTF', width=180, text="", changeCommand=partial(self.dpLoadGeoToAttach, None, True), parent=doubleLayout)
        uvSetLayout = cmds.rowColumnLayout('uvSetLayout', numberOfColumns=2, columnWidth=[(1, 110), (2, 210)], columnAlign=[(1, 'right'), (2, 'left')], columnAttach=[(1, 'right', 1), (2, 'left', 10)], parent=rivetLayout)
        cmds.text(label="UV Set:", font='obliqueLabelFont', parent=uvSetLayout)
        self.uvSetTF = cmds.textField('uvSetTF', width=180, text="", editable=False, parent=uvSetLayout)
        cmds.separator(style='in', height=15, width=300, parent=rivetLayout)
        cmds.text(label=self.langDic[self.langName]["m147_itemsFollowGeo"], height=30, font='boldLabelFont', parent=rivetLayout)
        itemsLayout = cmds.columnLayout('itemsLayout', columnOffset=('left', 10), width=310, parent=rivetLayout)
        self.itemScrollList = cmds.textScrollList('itemScrollList', width=290, height=100, allowMultiSelection=True, parent=itemsLayout)
        cmds.separator(style='none', height=5, parent=itemsLayout)
        middleLayout = cmds.rowColumnLayout('middleLayout', numberOfColumns=2, columnWidth=[(1, 150), (2, 150)], columnAlign=[(1, 'left'), (2, 'left')], columnAttach=[(1, 'left', 0), (2, 'left', 0)], parent=itemsLayout)
        cmds.button(label=self.langDic[self.langName]["i045_add"], annotation=self.langDic[self.langName]["i045_add"], width=140, command=self.dpAddSelect, parent=middleLayout)
        cmds.button(label=self.langDic[self.langName]["i046_remove"], annotation=self.langDic[self.langName]["i046_remove"], width=140, command=self.dpRemoveSelect, parent=middleLayout)
        cmds.separator(style='in', height=15, width=300, parent=rivetLayout)
        cmds.text(label=self.langDic[self.langName]["i002_options"]+":", height=30, font='boldLabelFont', parent=rivetLayout)
        fatherLayout = cmds.columnLayout('fatherLayout', columnOffset=("left", 10), parent=rivetLayout)
        self.attachTCB = cmds.checkBox('attachTCB', label=self.langDic[self.langName]["m148_attach"]+" Translate", value=True, parent=fatherLayout)
        self.attachRCB = cmds.checkBox('attachRCB', label=self.langDic[self.langName]["m148_attach"]+" Rotate", value=False, parent=fatherLayout)
        self.fatherGrpCB = cmds.checkBox('fahterGrpCB', label=self.langDic[self.langName]["m149_createGroupConst"], value=True, parent=fatherLayout)
        invertLayout = cmds.columnLayout('invertLayout', columnOffset=("left", 10), parent=rivetLayout)
        self.addInvertCB = cmds.checkBox('addInvertCB', label=self.langDic[self.langName]["m150_avoidDoubleTransf"], height=20, value=True, changeCommand=self.dpChangeInvert, parent=invertLayout)
        translateLayout = cmds.rowColumnLayout('translateLayout', numberOfColumns=2, columnWidth=[(1, 30), (2, 150)], columnAlign=[(1, 'left'), (2, 'left')], columnAttach=[(1, 'left', 10), (2, 'left', 5)], height=20, parent=rivetLayout)
        cmds.separator(style='none', parent=translateLayout)
        self.invertTCB = cmds.checkBox('invertTCB', label=self.langDic[self.langName]["m151_invert"]+" Translate", value=True, parent=translateLayout)
        rotateLayout = cmds.rowColumnLayout('rotateLayout', numberOfColumns=2, columnWidth=[(1, 30), (2, 150)], columnAlign=[(1, 'left'), (2, 'left')], columnAttach=[(1, 'left', 10), (2, 'left', 5)], height=20, parent=rivetLayout)
        cmds.separator(style='none', parent=rotateLayout)
        self.invertRCB = cmds.checkBox('invertRCB', label=self.langDic[self.langName]["m151_invert"]+" Rotate", value=False, parent=rotateLayout)
        cmds.separator(style='none', height=15, parent=rivetLayout)
        createLayout = cmds.columnLayout('createLayout', columnOffset=("left", 10), parent=rivetLayout)
        cmds.button(label=self.langDic[self.langName]["i158_create"]+" "+self.langDic[self.langName]["m083_rivet"], annotation=self.langDic[self.langName]["i158_create"]+" "+self.langDic[self.langName]["m083_rivet"], width=290, backgroundColor=(0.20, 0.7, 1.0), command=self.dpCreateRivetFromUI, parent=createLayout)
        
        # call dpRivetUI Window:
        cmds.showWindow(dpRivetWin) 
开发者ID:nilouco,项目名称:dpAutoRigSystem,代码行数:49,代码来源:dpRivet.py

示例15: ui

# 需要导入模块: from maya import cmds [as 别名]
# 或者: from maya.cmds import separator [as 别名]
def ui():
    '''
    User interface for world bake
    '''

    with utl.MlUi('ml_worldBake', 'World Bake', width=400, height=175, info='''Select objects, bake to locators in world, camera, or custom space.
When you're ready to bake back, select locators
and bake "from locators" to re-apply your animation.''') as win:

        mc.checkBoxGrp('ml_worldBake_bakeOnOnes_checkBox',label='Bake on Ones',
                       annotation='Bake every frame. If deselected, the tool will preserve keytimes.')

        tabs = mc.tabLayout()
        tab1 = mc.columnLayout(adj=True)
        mc.radioButtonGrp('ml_worldBake_space_radioButton', label='Bake To Space', numberOfRadioButtons=3,
                          labelArray3=('World','Camera','Last Selected'), select=1,
                          annotation='The locators will be parented to world, the current camera, or the last selection.')
        mc.checkBoxGrp('ml_worldBake_constrain_checkBox',label='Maintain Constraints',
                       annotation='Constrain source nodes to the created locators, after baking.')

        win.ButtonWithPopup(label='Bake Selection To Locators', command=toLocators, annotation='Bake selected object to locators specified space.',
            readUI_toArgs={'bakeOnOnes':'ml_worldBake_bakeOnOnes_checkBox',
                           'spaceInt':'ml_worldBake_space_radioButton',
                           'constrainSource':'ml_worldBake_constrain_checkBox'},
            name=win.name)#this last arg is temp..
        mc.setParent('..')

        tab2 = mc.columnLayout(adj=True)
        win.ButtonWithPopup(label='Bake Selected Locators Back To Objects', command=fromLocators, annotation='Bake from selected locators back to their source objects.',
            readUI_toArgs={'bakeOnOnes':'ml_worldBake_bakeOnOnes_checkBox'}, name=win.name)#this last arg is temp..
        mc.setParent('..')

        tab3 = mc.columnLayout(adj=True)
        win.ButtonWithPopup(label='Re-Parent Animated', command=reparent, annotation='Parent all selected nodes to the last selection.',
            readUI_toArgs={'bakeOnOnes':'ml_worldBake_bakeOnOnes_checkBox'}, name=win.name)
        win.ButtonWithPopup(label='Un-Parent Animated', command=unparent, annotation='Parent all selected to world.',
            readUI_toArgs={'bakeOnOnes':'ml_worldBake_bakeOnOnes_checkBox'}, name=win.name)

        mc.separator()

        mc.checkBoxGrp('ml_worldBake_maintainOffset_checkBox',label='Maintain Offset',
                       annotation='Maintain the offset between nodes, rather than snapping.')
        win.ButtonWithPopup(label='Bake Selected', command=utl.matchBake, annotation='Bake from the first selected object directly to the second.',
            readUI_toArgs={'bakeOnOnes':'ml_worldBake_bakeOnOnes_checkBox',
                           'maintainOffset':'ml_worldBake_maintainOffset_checkBox'}, name=win.name)

        mc.tabLayout( tabs, edit=True, tabLabel=((tab1, 'Bake To Locators'), (tab2, 'Bake From Locators'), (tab3, 'Bake Selection')) )
#        win.ButtonWithPopup(label='Bake Selected With Offset', command=matchBake, annotation='Bake from the first selected object directly to the second, maintaining offset.',
#            readUI_toArgs={'bakeOnOnes':'ml_worldBake_bakeOnOnes_checkBox'}, name=win.name)#this last arg is temp.. 
开发者ID:morganloomis,项目名称:ml_tools,代码行数:51,代码来源:ml_worldBake.py


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