本文整理汇总了Python中maya.cmds.columnLayout方法的典型用法代码示例。如果您正苦于以下问题:Python cmds.columnLayout方法的具体用法?Python cmds.columnLayout怎么用?Python cmds.columnLayout使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类maya.cmds
的用法示例。
在下文中一共展示了cmds.columnLayout方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: info
# 需要导入模块: from maya import cmds [as 别名]
# 或者: from maya.cmds import columnLayout [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)
示例2: donateWin
# 需要导入模块: from maya import cmds [as 别名]
# 或者: from maya.cmds import columnLayout [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)
示例3: dpIkFkSnapUI
# 需要导入模块: from maya import cmds [as 别名]
# 或者: from maya.cmds import columnLayout [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)
示例4: dpReorderAttrUI
# 需要导入模块: from maya import cmds [as 别名]
# 或者: from maya.cmds import columnLayout [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)
示例5: createSpiralWin
# 需要导入模块: from maya import cmds [as 别名]
# 或者: from maya.cmds import columnLayout [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 )
示例6: quickBreakDownUI
# 需要导入模块: from maya import cmds [as 别名]
# 或者: from maya.cmds import columnLayout [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)
示例7: dpARLoadingWindow
# 需要导入模块: from maya import cmds [as 别名]
# 或者: from maya.cmds import columnLayout [as 别名]
def dpARLoadingWindow():
""" Just create a Loading window in order to show we are working to user when calling dpAutoRigSystem.
"""
loadingString = "Loading dpAutoRigSystem v%s ... " %DPAR_VERSION
print loadingString,
path = os.path.dirname(__file__)
randImage = random.randint(0,7)
clearDPARLoadingWindow()
cmds.window('dpARLoadWin', title='dpAutoRigSystem', iconName='dpAutoRig', widthHeight=(285, 203), menuBar=False, sizeable=False, minimizeButton=False, maximizeButton=False)
cmds.columnLayout('dpARLoadLayout')
cmds.image('loadingImage', image=(path+"/Icons/dp_loading_0%i.png" %randImage), backgroundColor=(0.8, 0.8, 0.8), parent='dpARLoadLayout')
cmds.text('versionText', label=loadingString, parent='dpARLoadLayout')
cmds.showWindow('dpARLoadWin')
示例8: updateWin
# 需要导入模块: from maya import cmds [as 别名]
# 或者: from maya.cmds import columnLayout [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]
示例9: dpMain
# 需要导入模块: from maya import cmds [as 别名]
# 或者: from maya.cmds import columnLayout [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)
示例10: copyPasteAttrUI
# 需要导入模块: from maya import cmds [as 别名]
# 或者: from maya.cmds import columnLayout [as 别名]
def copyPasteAttrUI(self, *args):
""" UI (window).
"""
self.closeCopyPasteAttrUI()
# UI:
dpCopyPasteAttrWin = cmds.window('dpCopyPasteAttrWin', title='CopyPasteAttr - v'+DPCP_VERSION, width=200, height=75, sizeable=True, minimizeButton=False, maximizeButton=False)
# UI elements:
mainLayout = cmds.columnLayout('mainLayout', width=150, height=75, adjustableColumn=True, parent=dpCopyPasteAttrWin)
copyButton = cmds.button('copyButton', label=self.langDic[self.langName]['i122_copyAttr'], command=partial(self.ctrls.copyAttr, verbose=True), backgroundColor=(0.7, 1.0, 0.7), parent=mainLayout)
pasteButton = cmds.button('pasteButton', label=self.langDic[self.langName]['i123_pasteAttr'], command=partial(self.ctrls.pasteAttr, verbose=True), backgroundColor=(1.0, 1.0, 0.7), parent=mainLayout)
copyAndPasteButton = cmds.button('copyAndPasteButton', label=self.langDic[self.langName]['i124_copyPasteAttr'], command=partial(self.ctrls.copyAndPasteAttr, True), backgroundColor=(0.7, 0.9, 1.0), parent=mainLayout)
# calling UI:
cmds.showWindow(dpCopyPasteAttrWin)
示例11: __init__
# 需要导入模块: from maya import cmds [as 别名]
# 或者: from maya.cmds import columnLayout [as 别名]
def __init__(self, *args, **kwargs):
if cmds.window("CopyPasteShapes", query=True, exists=True):
cmds.deleteUI("CopyPasteShapes")
win = cmds.window('sqCopyPasteShapesWindow', title='CopyPasteShapes', widthHeight=(200, 100), menuBar=False, sizeable=True, minimizeButton=True, maximizeButton=False, menuBarVisible=False, titleBar=True)
layout = cmds.columnLayout('sqCopyPasteShapesLayout', adjustableColumn=True, parent=win)
cmds.button('sqCopyPasteShapesBtnSave', label="Save", backgroundColor=(0.8, 0.8, 1.0), command=self.onBtnSavePressed, parent=layout)
cmds.button('sqCopyPasteShapesBtnLoad', label="Load", backgroundColor=(1.0, 0.8, 0.8), command=self.onBtnLoadPressed, parent=layout)
cmds.showWindow(win)
示例12: createModuleLayout
# 需要导入模块: from maya import cmds [as 别名]
# 或者: from maya.cmds import columnLayout [as 别名]
def createModuleLayout(self, *args):
""" Create the Module Layout, so it will exists in the right as a new options to editModules.
"""
# MODULE LAYOUT:
self.moduleLayout = self.langDic[self.langName][self.title]+" - "+self.userGuideName
self.moduleFrameLayout = cmds.frameLayout(self.moduleLayout , label=self.moduleLayout, collapsable=True, collapse=False, parent="modulesLayoutA")
self.topColumn = cmds.columnLayout(self.moduleLayout+"_TopColumn", adjustableColumn=True, parent=self.moduleFrameLayout)
# here we have just the column layouts to be populated by modules.
示例13: floatUI
# 需要导入模块: from maya import cmds [as 别名]
# 或者: from maya.cmds import columnLayout [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)
示例14: create_property_ui
# 需要导入模块: from maya import cmds [as 别名]
# 或者: from maya.cmds import columnLayout [as 别名]
def create_property_ui(self, *_, **__):
"""
override this in derived classes to create gui.
You'll need to attach your gui to the results of set_ui_parent() and then
close by activating the tab using set_active() as shown below
"""
prop_sheet = self.set_ui_parent()
cmds.columnLayout(self.name)
cmds.text("no properties")
cmds.setParent("..")
self.set_active()
示例15: buildUI
# 需要导入模块: from maya import cmds [as 别名]
# 或者: from maya.cmds import columnLayout [as 别名]
def buildUI(self):
column = cmds.columnLayout()
cmds.text(label="Use this slider to set the tween amount")
cmds.rowLayout(numberOfColumns=2)
self.slider = cmds.floatSlider(min=0, max=100, value=50, step=1, changeCommand=tweener.tween)
cmds.button(label="Reset", command=self.reset)
cmds.setParent(column)
cmds.button(label="Close", command=self.close)
# And again, we just need to override the reset method
# We don't need to define the close, or show methods because it gets those from BaseWindow