本文整理汇总了Python中maya.cmds.separator函数的典型用法代码示例。如果您正苦于以下问题:Python separator函数的具体用法?Python separator怎么用?Python separator使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了separator函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: _buildSettings
def _buildSettings(s, *args):
"""
Load the settings page
"""
s.page = "settings"
s._clear()
cmds.columnLayout(adj=True, p=s.wrapper)
cmds.iconTextButton(
h=30,
ann="Click to return to your Todo list.",
image="revealSelected.png",
label="<- Todo",
style="iconAndTextHorizontal",
c=s._buildTodo)
cmds.separator()
cmds.text(label="Settings are unique to each Maya scene.", h=50)
frame = cmds.frameLayout(l="Archive options:")
# Settings module
s.fireHook("settings.archive", settings=s._buildSettings, callback=lambda x: cmds.setParent(frame))
cmds.setParent("..")
cmds.frameLayout(l="Feedback:")
cmds.iconTextButton(
image="party.png",
ann="Have any feedback? Good or bad. Love to hear it! :)",
l="Leave Feedback...",
style="iconAndTextHorizontal",
c=lambda: universalOpen("mailto:[email protected]?subject=Todo Feedback")) # TODO errors when no folder is chosen because of 0 index
示例2: __enter__
def __enter__(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(wikiURL+'#'+self.name)))
mc.text(label=self.info)
mc.setParent('..')
mc.separator(height=8, style='single')
return self
示例3: setAttributeVectorUI
def setAttributeVectorUI():
global tfXIn, tfXOut, tfYIn, tfYOut, tfZIn, tfZOut, tslVectorList, tfXAdd, tfYAdd, tfZAdd, vectorUI
vectorUI = 'vectorUI'
closeUI(vectorUI)
cmds.window(vectorUI, title = 'vectorUI')
cmds.columnLayout(columnAttach = ['both', 5], rowSpacing = 5, columnWidth = 210)
cmds.text('..: random range :..', backgroundColor = [0.15, 0.15, 0.0])
cmds.gridLayout(numberOfColumns = 6, cellWidthHeight = (33, 20))
tfXIn = cmds.textField(text = '0.0', backgroundColor = [0.15, 0.1, 0.0])
tfXOut = cmds.textField(text = '1.0', backgroundColor = [0.15, 0.1, 0.0])
tfYIn = cmds.textField(text = '0.0', backgroundColor = [0.0, 0.15, 0.1])
tfYOut = cmds.textField(text = '1.0', backgroundColor = [0.0, 0.15, 0.1])
tfZIn = cmds.textField(text = '0.0', backgroundColor = [0.0, 0.1, 0.15])
tfZOut = cmds.textField(text = '1.0', backgroundColor = [0.0, 0.1, 0.15])
cmds.setParent('..')
cmds.button('ok', command = 'setAttributeVectorRandom()')
cmds.separator(style = 'out')
cmds.text('..: vector list :..', backgroundColor = [0.0, 0.15, 0.15])
tslVectorList = cmds.textScrollList(allowMultiSelection = True)
cmds.button('remove', command = 'removeScrollListVector()')
cmds.gridLayout(numberOfColumns = 4, cellWidthHeight = (50, 20))
tfXAdd = cmds.textField(text = '0.0', backgroundColor = [0.15, 0.1, 0.0])
tfYAdd = cmds.textField(text = '0.0', backgroundColor = [0.0, 0.15, 0.1])
tfZAdd = cmds.textField(text = '0.0', backgroundColor = [0.0, 0.1, 0.15])
cmds.button('add..', command = 'addScrollListVector()')
cmds.setParent('..')
cmds.button('random', command = 'setAttributeListVectorRandom()')
cmds.button('increment %', command = 'setAttributeListVectorInc()')
cmds.setParent('..')
cmds.showWindow()
示例4: enterTimecodeUI
def enterTimecodeUI(self, buttonlabel='set', buttonfunc=None):
'''
generic UI to enter timecode
:param buttonlabel' = label to add to the button
:param buttonfunc' = function to bind to the button on exit
'''
self.win='Timecode_UI'
if cmds.window(self.win, exists=True):
cmds.deleteUI(self.win, window=True)
cmds.window(self.win, title=self.win)
cmds.columnLayout(adjustableColumn=True)
cmds.text(label='Timecode Reference')
cmds.separator(h=10, style='in')
cmds.rowColumnLayout(nc=8)
cmds.text(label=' smpte : ')
cmds.textField('tchrs', tx='00', w=40, cc=lambda x:self.__uicb_checkfield('tchrs'))
cmds.text(label=' : ')
cmds.textField('tcmins', tx='00', w=40, cc=lambda x:self.__uicb_checkfield('tcmins'))
cmds.text(label=' : ')
cmds.textField('tcsecs', tx='00', w=40, cc=lambda x:self.__uicb_checkfield('tcsecs'))
cmds.text(label=' : ')
cmds.textField('tcfrms', tx='00', w=40, cc=lambda x:self.__uicb_checkfield('tcfrms'))
cmds.setParent('..')
cmds.button(label=buttonlabel, command=lambda x:self.__uicb_gatherTimecode(buttonfunc))
cmds.showWindow(self.win)
示例5: transfertSelectionToTarget_window
def transfertSelectionToTarget_window():
"""
This definition creates the 'Transfert Selection To Target' main window.
"""
cmds.windowPref(enableAll=False)
if (cmds.window("transfertSelectionToTarget_window", exists=True)):
cmds.deleteUI("transfertSelectionToTarget_window")
cmds.window("transfertSelectionToTarget_window",
title="Transfert Selection To Target",
width=320)
spacing = 5
cmds.columnLayout(adjustableColumn=True, rowSpacing=spacing)
cmds.rowLayout(numberOfColumns=3, columnWidth3=(125, 150, 130), adjustableColumn=2, columnAlign=(2, "left"), columnAttach=[(1, "both", spacing), (2, "both", spacing), (3, "both", spacing)])
cmds.text(label="Target:")
sources_textField = cmds.textField("target_textField")
cmds.button("pickTarget_button", label="Pick Target!", command=pickTarget_button_OnClicked)
cmds.setParent(topLevel=True)
cmds.separator(style="single")
cmds.button("transfertSelection_button", label="Transfert Selection!", command=transfertSelection_button_OnClicked)
setUnsetContextHotkeys()
scriptJob = cmds.scriptJob(uiDeleted=("transfertSelectionToTarget_window", setUnsetContextHotkeys), runOnce=True)
cmds.showWindow("transfertSelectionToTarget_window")
cmds.windowPref(enableAll=True)
示例6: installConvertOption
def installConvertOption(self):
""""""
cmds.rowLayout(nc=2, adj=2)
cmds.text(l=' Convert:', fn='boldLabelFont')
self.keepCheck = cmds.iconTextCheckBox( st='textOnly', l='Keep original', v=True )
cmds.setParent( '..' )
cmds.separator( style='none' )
示例7: windowSHM
def windowSHM(*args):
if cmds.window("shdrmnWin", exists = 1):
cmds.deleteUI("shdrmnWin")
win = cmds.window("shdrmnWin", title = "Shader manager", w = 500, sizeable = 0)
mainLayout = cmds.columnLayout (w = 500)
cmds.rowColumnLayout(w = 500, nc = 4, parent = mainLayout )
cmds.textFieldGrp( 'getAiAttrField', text = 'mColor')
cmds.button(label = "GET TX", w= 83, h = 50, c = getTextureFromShader )
cmds.button(label = "SHOW TX", w= 83, h = 50, c = assignPREVShader)
cmds.button(label = "TILE UV", w= 83, h = 50, c = setTileUV)
cmds.rowColumnLayout(w = 500, nc = 1, parent = mainLayout )
cmds.button(label = "DELETE PREVIEW", w= 500, h = 50, c = deleteShaders, parent = mainLayout )
cmds.separator(height=10, parent = mainLayout)
cmds.rowColumnLayout(w = 500, nc = 2, parent = mainLayout )
cmds.button(label = "GET MATERIALS", w= 250, h = 50, c = getMaterial )
cmds.button(label = "ASSIGN MATERIALS", w= 250, h = 50, c = asignMaterial )
cmds.showWindow(win)
示例8: createUI
def createUI (pWindowTitle, pApplyCallback):
windowID = 'MyWindowID'
if cmds.window(windowID, exists=True):
cmds.deleteUI(windowID)
cmds.window(windowID, title=pWindowTitle, sizeable=False, resizeToFitChildren=True)
cmds.rowColumnLayout(numberOfColumns=3, columnWidth=[(1,75),(2,60),(3,60)], columnOffset=[(1,'right',3)])
cmds.text(label='Time Range:')
startTimeField = cmds.intField()
endTimeField = cmds.intField()
cmds.text(label='Attribute:')
targetAttributeField = cmds.textField()
cmds.separator(h=10, style='none')
cmds.separator(h=10, style='none')
cmds.separator(h=10, style='none')
cmds.separator(h=10, style='none')
cmds.separator(h=10, style='none')
cmds.button(label='Apply', command=pApplyCallback)
def cancelCallback(*pArgs):
if cmds.window(windowID, exists=True):
cmds.deleteUI(windowID)
cmds.button(label='Cancel', command=cancelCallback)
cmds.showWindow()
示例9: switch_module
def switch_module(self,dishName,dishFile,*args):
archive = zipfile.ZipFile(dishFile, 'r')
jsonFile = archive.read('dish.ini')
jsondata = json.loads(jsonFile)
archive.close()
#Clear chld
chldrn = mc.layout( self.InfosTab, query=True, childArray=True )
for chld in chldrn:
mc.deleteUI(chld)
#-------------------------------------------------------------------
mc.columnLayout( adjustableColumn=True ,p=self.InfosTab ,rs=5)
header = """<html>
<body>
<h1>%s</h1></body>
</html>
"""%(dishName )
self.dishType = dishName
mc.text( self.module,e=True,l=header,font='boldLabelFont')
mc.scrollField( editable=False, wordWrap=True, text=jsondata['moduleInfos'] ,h=140)
mc.separator()
mc.text( l='name bank')
mc.columnLayout( adjustableColumn=True)
LimbMenu = mc.optionMenu( label='',w=224 )
mc.menuItem( label='NONE')
mc.setParent('..')
mc.button(l='Open name composer',h=28)
mc.optionMenu( LimbMenu ,e=True,changeCommand=partial(self.composePrfX,LimbMenu))
self.dishPrfx = mc.textField()
mc.button(l='Import', h=42,c=self.validate_dish_before_merge )
示例10: buildMainLayout
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('..')
示例11: audioUI
def audioUI():
"""UI for the whole thing"""
if (cmds.window("audioWin", exists=True)):
cmds.deleteUI("audioWin")
widgets["win"] = cmds.window("audioWin", t="zbw_audioManager", w=300, h=260)
widgets["mainCLO"] = cmds.columnLayout()
widgets["getAudioBut"] = cmds.button(l="Get All Audio In Scene", w=300, h=30, bgc=(.6, .6, .8), c=getAudio)
cmds.text("Double-click item in list to enable sound and select it", al="left")
widgets["audioTSL"] = cmds.textScrollList(h=100, w=300, dcc=selectAudio)
widgets["buttonRCLO"] = cmds.rowColumnLayout(nc=2)
widgets["deleteSelBut"] = cmds.button(l="Delete Selected", w=150, h=20, bgc=(.8,.6,.6), c=deleteSelected)
widgets["deleteAllBut"] = cmds.button(l="Delete All Audio", w=150, h=20, bgc=(.8,.4,.4), c=deleteAll)
cmds.setParent(widgets["mainCLO"])
cmds.separator(h=20)
widgets["newAudioBut"] = cmds.button(l="Import New Audio File!", w=300, h=30, bgc=(.6,.8,.6), c=importAudio)
cmds.separator(h=20)
widgets["offsetRCLO"] = cmds.rowColumnLayout(nc=2, cw=([1,175], [2, 125]), cal=([1,"left"], [2,"left"]))
widgets["offsetIFG"] = cmds.intFieldGrp(l="Offset Selected By ", v1=1, cal=([1,"left"], [2,"left"]), cw=([1,100],[2,50]))
widgets["offsetBut"] = cmds.button(l="Offset!", w=100, h=30, bgc=(.6,.8,.8), c=offsetAudio)
cmds.showWindow(widgets["win"])
cmds.window(widgets["win"], e=True, w=300, h=260)
示例12: remappingWindow
def remappingWindow(self,exsitingData,importedData):
#if (cmds.window(MainSkinUI.RemapWindowID,ex=True)):
#cmds.deleteUI(MainSkinUI.RemapWindowID, wnd=True)
#cmds.window(MainSkinUI.RemapWindowID,w=500,h=340,title='Influence Remapping Dialog')
formLayout=cmds.setParent(q=True)
cmds.formLayout(formLayout,e=True,w=500,h=340)
mainColumnLayout = cmds.columnLayout(w=500,h=340)
cmds.columnLayout(h=5)
cmds.setParent('..')
cmds.columnLayout(cat=['left',25])
cmds.text(l='The following influences hace no corresponding influence from the imported weight\n'\
' data. You can remap the influences or skip them',al='left', w=450,h=40)
cmds.setParent('..')
cmds.separator(w=500, st='in')
formLayout = cmds.formLayout()
exsitingInfluences = cmds.columnLayout()
cmds.frameLayout(l='Exsiting Influences:')
self.exsitingInfluencesBox = cmds.textScrollList(w=230,h=230)
cmds.setParent('..')
cmds.setParent('..')
importedInfluences = cmds.columnLayout()
cmds.frameLayout(l='Imported Influences:')
self.importedInfluencesLayout = cmds.columnLayout(w=230,h=230)
cmds.columnLayout(h=5)
cmds.setParent('..')
#self.importedInfluencesLayout = cmds.columnLayout(cat=['left',40])
cmds.formLayout(formLayout,e=True,af=[(exsitingInfluences,'left',10)],ac=[(importedInfluences,'left',10,exsitingInfluences)])
cmds.setParent(mainColumnLayout)
cmds.columnLayout(h=5)
cmds.setParent('..')
cmds.columnLayout(cat=['left',150])
cmds.button(l='Import Remapped Skin Weight', w=200, c=self.passRemappingData)
self.setInfluenceDialog(exsitingData,importedData)
示例13: buildGUI
def buildGUI(self):
if cmds.window(self.name, q=True, exists=True):
cmds.deleteUI(self.name)
cmds.window(self.name, title=self.title, sizeable=False, mxb=False, mnb=False, toolbox=False, w=100, h=30)
cmds.columnLayout("mainLayout", adj=True, parent=self.name, co=("left", 5))
# Add onClose Event
cmds.scriptJob(uiDeleted=(self.name, self.onClose))
# Help Menu
cmds.menuBarLayout("menuBar")
cmds.menu(label="Show Help", helpMenu =True, pmc=self.showHelp)
# Import paths
cmds.textFieldButtonGrp("tfbDBPath", label="Links: ", bl="Set Link Path", cw=(1,50), parent="mainLayout", bc=self.setDBPath)
cmds.textFieldButtonGrp("tfbShaderPath", label="Shaders: ", bl="Set Shader Path", cw=(1,50), parent="mainLayout", bc=self.setShaderPath)
cmds.checkBox("cbSelection", label="Use Selection", parent="mainLayout")
cmds.checkBox("cbSubstring", label="Substring prefix", parent="mainLayout", value=True)
cmds.textField("tfSubstring", parent="mainLayout", text="s100_char")
cmds.separator(h=10, style="none", parent="mainLayout")
# Buttons
cmds.rowColumnLayout("buttonsLayout", numberOfColumns=2, parent="mainLayout")
cmds.button("bExportLinks", label = "Export Links", w=200, h=30, parent="buttonsLayout", c=self.exportLinks)
cmds.button("bImportShader", label="Link Shaders", w=200, h=30, parent="buttonsLayout", c=self.linkShaders)
cmds.showWindow(self.name)
示例14: exportAssets_UI
def exportAssets_UI(self, *args):
self.UIElements = {}
# If the window exists, delete it.
if cmds.window("ExportAssets", exists=True):
cmds.deleteUI("ExportAssets")
# Create the main window
self.UIElements["window"] = cmds.window("ExportAssets", widthHeight=(240, 200), s=True )
# Create a flow layout to hold the UI Elements
self.UIElements["radioFlowLayout"] = cmds.flowLayout(v=True, w=220)
cmds.setParent( '..' )
cmds.setParent(self.UIElements["radioFlowLayout"])
cmds.radioCollection()
self.UIElements['rigRadioButton'] = cmds.radioButton(l='Export Rig?')
cmds.radioCollection()
self.UIElements['setupRadioButton'] = cmds.radioButton(l='Export Setup?')
cmds.separator( height=7, style='in' )
cmds.text(l=' Rename the Setup?')
self.UIElements['nameTxt'] = cmds.textField(w=220, tx=self.characterName)
self.UIElements['exportButton'] = cmds.button(label='Export Game Assets', width=220, c=self.exportGameAssets)
cmds.showWindow(self.UIElements["window"])
示例15: snapOnClosestVertex_window
def snapOnClosestVertex_window():
"""
Creates the 'Snap On Closest Vertex' vertex window.
"""
cmds.windowPref(enableAll=False)
if (cmds.window("snapOnClosestVertex_window", exists=True)):
cmds.deleteUI("snapOnClosestVertex_window")
cmds.window("snapOnClosestVertex_window",
title="Snap On Closest Vertex",
width=320)
spacing = 5
cmds.columnLayout(adjustableColumn=True, rowSpacing=spacing)
cmds.rowLayout(numberOfColumns=3, columnWidth3=(125, 150, 130), adjustableColumn=2, columnAlign=(2, "left"), columnAttach=[(1, "both", spacing), (2, "both", spacing), (3, "both", spacing)])
cmds.text(label="Reference Object:")
referenceObject_textField = cmds.textField("referenceObject_textField")
cmds.button("getReferenceObject_button", label="Get Reference Object!", command=getReferenceObject_button_OnClicked)
cmds.setParent(topLevel=True)
cmds.separator(style="single")
cmds.button("snapIt_button", label="Snap It!", al="center", command=snapIt_button_OnClicked)
cmds.showWindow("snapOnClosestVertex_window")
cmds.windowPref(enableAll=True)