本文整理汇总了Python中maya.cmds.rowColumnLayout方法的典型用法代码示例。如果您正苦于以下问题:Python cmds.rowColumnLayout方法的具体用法?Python cmds.rowColumnLayout怎么用?Python cmds.rowColumnLayout使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类maya.cmds
的用法示例。
在下文中一共展示了cmds.rowColumnLayout方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: ui
# 需要导入模块: from maya import cmds [as 别名]
# 或者: from maya.cmds import rowColumnLayout [as 别名]
def ui():
'''
User interface for convert rotation order
'''
with utl.MlUi('ml_convertRotationOrder', 'Convert Rotation Order', width=400, height=140, info='''Select objects to convert and press button for desired rotation order.
Use the "Get Tips" button to see suggestions for a single object on the current frame.''') as win:
mc.button(label='Get tips for selection', command=loadTips, annotation='')
mc.scrollField('ml_convertRotationOrder_nodeInfo_scrollField', editable=False, wordWrap=True, height=60)
mc.rowColumnLayout(numberOfColumns=2, columnWidth=[(1,100), (2,400)], columnAttach=[2,'both',1])
for each in ROTATE_ORDERS:
_BUTTON[each] = win.buttonWithPopup(label=each, command=globals()[each], annotation='Convert selected object rotate order to '+each+'.', shelfLabel=each)
mc.textField('ml_convertRotationOrder_'+each+'_textField', editable=False)
resetTips()
示例2: dpMain
# 需要导入模块: from maya import cmds [as 别名]
# 或者: from maya.cmds import rowColumnLayout [as 别名]
def dpMain(self, *args):
self.edgeList = []
self.baseCurve = []
self.baseCurveA = []
self.baseCurveB = []
self.mainCurveA = []
self.mainCurveB = []
self.curveLenght = 0
self.maxIter = 0
self.clusterList = []
self.receptList = []
self.optionCtrl = "Option_Ctrl"
self.wireNodeList = []
if cmds.window('sqStickyLipsWindow', query=True, exists=True):
cmds.deleteUI('sqStickyLipsWindow', window=True)
cmds.window('sqStickyLipsWindow', title='sqStickyLips - v'+str(SQSL_VERSION)+' - UI', widthHeight=(300, 200), menuBar=False, sizeable=False, minimizeButton=True, maximizeButton=False)
cmds.showWindow('sqStickyLipsWindow')
slLayoutColumn = cmds.columnLayout('slLayoutColumn', adjustableColumn=True)
cmds.text("Load meshes:", align="left", parent=slLayoutColumn)
slLayoutA = cmds.rowColumnLayout('slLayoutA', numberOfColumns=2, columnWidth=[(1, 100), (2, 160)], parent=slLayoutColumn)
cmds.button(label="Recept A >>", command=partial(self.sqSLLoad, "A"), parent=slLayoutA)
self.receptA_TF = cmds.textField(parent=slLayoutA)
cmds.button(label="Recept B >>", command=partial(self.sqSLLoad, "B"), parent=slLayoutA)
self.receptB_TF = cmds.textField(parent=slLayoutA)
cmds.text("Select a closed edgeLoop and press the run button", parent=slLayoutColumn)
cmds.button(label="RUN - Generate Sticky Lips", command=self.sqGenerateStickyLips, backgroundColor=[0.3, 1, 0.7], parent=slLayoutColumn)
示例3: floatUI
# 需要导入模块: from maya import cmds [as 别名]
# 或者: from maya.cmds import rowColumnLayout [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)
示例4: dpGetLangStringUI
# 需要导入模块: from maya import cmds [as 别名]
# 或者: from maya.cmds import rowColumnLayout [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()
示例5: dpTargetMirrorUI
# 需要导入模块: from maya import cmds [as 别名]
# 或者: from maya.cmds import rowColumnLayout [as 别名]
def dpTargetMirrorUI(self, *args):
""" Create a window in order to load the original model and targets to be mirrored.
"""
# creating targetMirrorUI Window:
if cmds.window('dpTargetMirrorWindow', query=True, exists=True):
cmds.deleteUI('dpTargetMirrorWindow', window=True)
targetMirror_winWidth = 305
targetMirror_winHeight = 250
dpTargetMirrorWin = cmds.window('dpTargetMirrorWindow', title=self.langDic[self.langName]["m055_tgtMirror"]+" "+DPTM_VERSION, widthHeight=(targetMirror_winWidth, targetMirror_winHeight), menuBar=False, sizeable=True, minimizeButton=False, maximizeButton=False, menuBarVisible=False, titleBar=True)
# creating layout:
targetMirrorLayout = cmds.columnLayout('targetMirrorLayout')
doubleLayout = cmds.rowColumnLayout('doubleLayout', numberOfColumns=2, columnWidth=[(1, 120), (2, 190)], columnAlign=[(1, 'left'), (2, 'left')], columnAttach=[(1, 'left', 10), (2, 'left', 20)], parent=targetMirrorLayout)
cmds.button(label=self.langDic[self.langName]["i043_origModel"]+" >", annotation=self.langDic[self.langName]["i044_origDesc"], backgroundColor=(1.0, 1.0, 0.7), width=120, command=self.dpLoadOriginalModel, parent=doubleLayout)
self.originalModelTextField = cmds.textField('originalModelTextField', width=160, text="", parent=doubleLayout)
listMirrorLayout = cmds.columnLayout('listMirrorLayout', columnOffset=('left', 10), width=310, parent=targetMirrorLayout)
cmds.text(label=self.langDic[self.langName]["i047_targetList"], height=30, parent=listMirrorLayout)
self.targetScrollList = cmds.textScrollList('targetScrollList', width=290, height=100, allowMultiSelection=True, parent=listMirrorLayout)
cmds.separator(style='none', parent=listMirrorLayout)
middleLayout = cmds.rowColumnLayout('middleLayout', numberOfColumns=2, columnWidth=[(1, 150), (2, 150)], columnAlign=[(1, 'left'), (2, 'left')], columnAttach=[(1, 'left', 0), (2, 'left', 0)], parent=listMirrorLayout)
cmds.button(label=self.langDic[self.langName]["i045_add"], annotation=self.langDic[self.langName]["i048_addDesc"], width=140, command=self.dpAddSelect, parent=middleLayout)
cmds.button(label=self.langDic[self.langName]["i046_remove"], annotation=self.langDic[self.langName]["i051_removeDesc"], width=140, command=self.dpRemoveSelect, parent=middleLayout)
cmds.separator(style='none', height=15, parent=middleLayout)
renameLayout = cmds.rowColumnLayout('renameLayout', numberOfColumns=3, columnWidth=[(1, 100), (2, 100), (3, 100)], columnAlign=[(1, 'left'), (2, 'left'), (3, 'left')], columnAttach=[(1, 'left', 0), (2, 'left', 0), (3, 'left', 0)], parent=listMirrorLayout)
self.autoRenameCB = cmds.checkBox('autoRenameCB', label=self.langDic[self.langName]["i056_autoRename"], value=1, onCommand=partial(self.dpChangeRename, 1), offCommand=partial(self.dpChangeRename, 0), parent=renameLayout)
self.fromTxt = cmds.text('fromTxt', label="from", parent=renameLayout)
self.toTxt = cmds.text('toTxt', label="to", parent=renameLayout)
cmds.separator(style='none', height=15, parent=renameLayout)
self.fromNameTF = cmds.textField('fromNameTF', width=80, text="L_", parent=renameLayout)
self.toNameTF = cmds.textField('toNameTF', width=80, text="R_", parent=renameLayout)
cmds.text(label="Axis:", height=20, parent=listMirrorLayout)
tripleLayout = cmds.rowColumnLayout('tripleLayout', numberOfColumns=3, columnWidth=[(1, 100), (2, 100), (3, 100)], columnAlign=[(1, 'left'), (2, 'left'), (3, 'left')], columnAttach=[(1, 'left', 0), (2, 'left', 0), (3, 'left', 0)], parent=listMirrorLayout)
self.mirrorAxisRC = cmds.radioCollection('mirrorAxisRC', parent=tripleLayout)
rbX = cmds.radioButton("rbX", label="X = YZ", annotation="X", align="left", collection="mirrorAxisRC", parent=tripleLayout)
rbY = cmds.radioButton("rbY", label="Y = XZ", annotation="Y", align="left", collection="mirrorAxisRC", parent=tripleLayout)
rbZ = cmds.radioButton("rbZ", label="Z = XY", annotation="Z", align="left", collection="mirrorAxisRC", parent=tripleLayout)
cmds.radioCollection('mirrorAxisRC', edit=True, select="rbX")
cmds.separator(style='none', height=15, parent=listMirrorLayout)
self.mirrorPosCB = cmds.checkBox('mirrorPosCB', label=self.langDic[self.langName]["i057_mirrorPosition"], value=1, parent=listMirrorLayout)
self.cleanUndoCB = cmds.checkBox('cleanUndoCB', label=self.langDic[self.langName]["i049_clearUndo"], annotation=self.langDic[self.langName]["i050_clearUndoDesc"], align="left", value=1, parent=listMirrorLayout)
self.checkHistoryCB = cmds.checkBox('checkHistoryCB', label=self.langDic[self.langName]["i162_checkHistory"], annotation=self.langDic[self.langName]["i161_historyMessage"], align="left", value=0, parent=listMirrorLayout)
cmds.button(label=self.langDic[self.langName]["i054_targetRun"], annotation=self.langDic[self.langName]["i053_targetRunDesc"], width=290, backgroundColor=(0.6, 1.0, 0.6), command=self.dpRunMirror, parent=listMirrorLayout)
# call targetMirrorUI Window:
cmds.showWindow(dpTargetMirrorWin)
示例6: dpRivetUI
# 需要导入模块: from maya import cmds [as 别名]
# 或者: from maya.cmds import rowColumnLayout [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)
示例7: ui
# 需要导入模块: from maya import cmds [as 别名]
# 或者: from maya.cmds import rowColumnLayout [as 别名]
def ui(self):
'''
Launch a UI to display the marks that were recorded.
'''
with utl.MlUi('ml_stopwatchReport', 'Stopwatch Report', width=400, height=400, info='''This is the report from the stopwatch you just ran.
Adjust the start frame, and then press the frame buttons to jump to that frame.
The fields on the right can be used for notes.''', menu=False) as win:
self.uiSlider = mc.intSliderGrp(field=True, label='Start Frame', value=self.startFrame,
minValue=((-0.5*self.frameMarks[-1])+self.startFrame), maxValue=(self.frameMarks[-1]/2)+self.startFrame,
fieldMinValue=-1000, fieldMaxValue=1000,
changeCommand=self.uiUpdateStartFrame)
self.frameRateField = mc.intFieldGrp(label='Frame Rate', value1=self.frameRate, enable1=False, extraLabel='fps', annotation='')
mc.scrollLayout()
mc.rowColumnLayout(numberOfColumns=3, columnWidth=[(1, 50), (2, 80), (3, 340)])
mc.text('Frame')
mc.text('Duration')
mc.text('Notes')
for i in range(3):
mc.separator(style='single', height=15)
self.uiButton = list()
for i in range(len(self.frameMarks)):
#frame button
frame = self.frameMarks[i]+self.startFrame
self.uiButton.append(mc.button(label=str(frame), annotation='Go to frame %i' % frame,command='import maya.cmds;maya.cmds.currentTime(%i,edit=True)' % frame))
#duration text
if i:
mc.text(label=str(self.frameMarks[i]-self.frameMarks[i-1]))
else:
mc.text(label='Start')
#notes field
mc.textField()
#add the stop
mc.text(label='')
mc.text(label='Stop')
mc.setParent('..')
mc.setParent('..')
#next and prev buttons!
mc.paneLayout(configuration='vertical2',separatorThickness=1)
mc.button(label='<< Previous', command=self.previousFrame, annotation='Go to the previous frame in the list.')
mc.button(label='Next >>', command=self.nextFrame, annotation='Go to the next frame in the list.')