本文整理汇总了Python中maya.cmds.columnLayout函数的典型用法代码示例。如果您正苦于以下问题:Python columnLayout函数的具体用法?Python columnLayout怎么用?Python columnLayout使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了columnLayout函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。
示例1: j_MirrorBlendShape
def j_MirrorBlendShape():
'''
UI
'''
global text1
global text2
global text3
j_MainWindow = ""
if (mc.window(j_MainWindow, exists = 1 )):
mc.deleteUI(j_MainWindow)
j_MainWindow = mc.window(title = u"镜像表情", wh = (300,160))
mc.columnLayout()
mc.text(l = "")
text1 = mc.textFieldButtonGrp( l = u"BaseObject:", buttonLabel = u" < < < < ",
buttonCommand = 'xanthus.j_MirrorBlendShape.j_getObj(1)', cw3 = (90,120,100),h = 30)
text2 = mc.textFieldButtonGrp(l = u"In-Between:", buttonLabel = u" < < < < ",
buttonCommand = "xanthus.j_MirrorBlendShape.j_getObj(2)", cw3 = (90,120,100),h = 30,enable = 0)
text3 = mc.textFieldButtonGrp(l = u"BlendShape:", buttonLabel = u" < < < < ",
buttonCommand = "xanthus.j_MirrorBlendShape.j_getObj(3)", cw3 = (90,120,100),h = 30)
mc.text(l = "",h = 10)
mc.setParent('..')
mc.rowLayout(nc = 2 ,cw2= (150,150),ct2 = ("left","left") ,co2 = (8,0) )
mc.button(l = u" 镜 像 ", w = 135, h= 30,c = "xanthus.j_MirrorBlendShape.j_MakeMirror()")
mc.button(l = u" 重 置 ", w = 135, h= 30,c = "xanthus.j_MirrorBlendShape.j_Reset()")
mc.setParent('..')
mc.columnLayout
mc.text(l = " [email protected] xanthus by Jiangjishi ", enable = 0)
mc.showWindow(j_MainWindow)
开发者ID:auqeyjf,项目名称:pubTool,代码行数:31,代码来源:j_MirrorBlendShape.py
示例2: locatorParticlesUI
def locatorParticlesUI():
"""
"""
# Define window
locParticleUI = 'locatorParticleWindow'
if cmds.window(locParticleUI, q=True, ex=True): cmds.deleteUI(locParticleUI)
locParticleUI = cmds.window(locParticleUI, t='Generate Particles')
# UI Layout
cmds.columnLayout(adj=False, cal='left')
partiTFG = cmds.textFieldGrp('locParticle_particleTFG', label='Particle', text='', cw=[(1, 100)])
radiusFFG = cmds.floatSliderGrp('locParticle_radiusFSG', label='radius', f=True, min=0.1, max=10.0, fmn=0.01,
fmx=100.0, pre=2, v=1.0, cw=[(1, 100)])
rotateLocCBG = cmds.checkBoxGrp('locParticle_rotateCBG', label='Add rotatePP', ncb=1, v1=0, cw=[(1, 100)])
scaleLocCBG = cmds.checkBoxGrp('locParticle_scaleCBG', label='Add scalePP', ncb=1, v1=0, cw=[(1, 100)])
selfCollideCBG = cmds.checkBoxGrp('locParticle_selfCollideCBG', label='self collide', ncb=1, v1=0, cw=[(1, 100)])
cmds.button(l='Create Particles', c='glTools.tools.generateParticles.locatorParticlesFromUI()')
# Popup menu
cmds.popupMenu(parent=partiTFG)
for p in cmds.ls(type=['particle', 'nParticle']):
cmds.menuItem(p, c='cmds.textFieldGrp("' + partiTFG + '",e=True,text="' + p + '")')
# Show Window
cmds.showWindow(locParticleUI)
开发者ID:bennymuller,项目名称:glTools,代码行数:26,代码来源:generateParticles.py
示例3: zbw_offsetAnim
def zbw_offsetAnim(*args):
"""creates offset from first obj sel to last based on the entered offset value"""
def zbw_runOffsetAnim(*args):
#get frame range!!!!!!
#get selection, check that they are tranforms
sel = cmds.ls(sl=True,type="transform")
selSize = int(len(sel))
#for each selection mult the index by the offset value
for i in range(0,selSize):
obj = sel[i]
offsetRaw = cmds.intFieldGrp('zbw_offsetValue', q=True, v=True)
offset = offsetRaw[0]
multFactor = i * offset
#shift the entire anim curve by the offset mult value
cmds.keyframe(obj, edit=True,relative=True,timeChange=multFactor,time=(1,24))
#create UI, get offset value, frame range or all anim
if (cmds.window('zbw_offsetAnimUI', exists=True)):
cmds.deleteUI('zbw_offsetAnimUI', window=True)
cmds.windowPref('zbw_offsetAnimUI', remove=True)
window=cmds.window('zbw_offsetAnimUI', widthHeight=(350,200), title='zbw_offsetAnim')
cmds.columnLayout(cal='center')
cmds.intFieldGrp('zbw_offsetValue', cal=(1,'left'), label='frequency(frames)', value1=5)
#CREATE FRAME RANGE AREA (WHICH FRAMES ARE WE DOING?)
#WHEN THAT HAPPENS, WHAT DO WE DO WITH THE FRAMES AFTER THAT? (PROBABLY NOTHING. . . LET USER WORRY ABOUT IT)
#checkbox for random freq (to give a random amount to offset each object)
#cmds.checkBoxGrp('zbw_animNoiseRandom', cal=(1,'left'), cw=(1, 175),label='random frequency on', value1=0, cc=zbw_animNoiseRandom)
cmds.button('zbw_offsetAnimGo', label='offset!', width=75, command=zbw_runOffsetAnim)
cmds.showWindow(window)
开发者ID:zethwillie,项目名称:zbw_python_tools,代码行数:30,代码来源:zbw_animTools.py
示例4: 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()
开发者ID:diegoinacio,项目名称:coding,代码行数:30,代码来源:mayaAiAttribManager.py
示例5: doIt
def doIt( self, arglist ):
wnd = cmds.window( "kgmEngineWindow_" + str(time.time()), widthHeight = ( 200, 200 ) )
#cmds.columnLayout( adjustableColumn = True )
#cmds.button( label = 'Export Map', command = kgmEngine.exportMap )
#cmds.button( label = 'Export Mesh', command = kgmEngine.exportMesh )
#cmds.button( label = 'Export Skeleton', command = kgmEngine.exportSkeleton )
#cmds.button( label = 'Export Animation', command = kgmEngine.exportAnimation )
#cmds.button( label = 'Insert Node', command = kgmEngine.insertNode )
cmds.columnLayout()
cmds.rowColumnLayout( numberOfColumns = 2 )
cmds.checkBox( "Mesh", label="Mesh", value=False, onCommand=kgmEngine.enableMesh, offCommand=kgmEngine.enableMesh )
cmds.checkBox( "Material", label="Material", value=False, onCommand=kgmEngine.enableMaterial, offCommand=kgmEngine.enableMaterial )
cmds.checkBox( "Skeleton", label="Skeleton", value=False, onCommand=kgmEngine.enableSkeleton, offCommand=kgmEngine.enableSkeleton )
cmds.checkBox( "Animation", label="Animation", value=False, onCommand=kgmEngine.enableAnimation, offCommand=kgmEngine.enableAnimation )
cmds.columnLayout()
cmds.rowColumnLayout( numberOfColumns = 2 )
cmds.columnLayout( adjustableColumn=True )
cmds.button( label = 'Export', command = kgmEngine.export )
cmds.button( label = 'Insert Node', command = kgmEngine.insertNode )
cmds.columnLayout()
cmds.rowColumnLayout( numberOfColumns = 3 )
cmds.columnLayout( adjustableColumn=True )
cmds.radioCollection()
cmds.radioButton( label='Bin', align='left', select=False )
cmds.radioButton( label='Xml', align='left', select=True )
#cmds.radioButtonGrp( label='Format', labelArray3=['Bin', 'Txt', 'Xml'], numberOfRadioButtons=3 )
#cmds.radioButton( 'Format', label='Bin', )
cmds.showWindow( wnd )
开发者ID:nocs13,项目名称:kgmEngine,代码行数:31,代码来源:kgmExport.py
示例6: 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)
开发者ID:xavMikeHoward,项目名称:Red9_StudioPack,代码行数:26,代码来源:Red9_Audio.py
示例7: addMultiAttr
def addMultiAttr():
#Create a variable for the window name
winName = 'blend'
winTitle = 'rh_addMultiAttr'
#Delete the window if it exists
if cmds.window(winName, exists=True):
cmds.deleteUI(winName, window=True)
#Build the main window
cmds.window(winName, title=winTitle, sizeable=True)
cmds.textFieldButtonGrp('Obj',label='Object :', text='', ed = False,buttonLabel='Load Sel',bc = 'sel()')
cmds.columnLayout(adjustableColumn=True)
cmds.textFieldGrp('Attr',l='Attribute:',text='')
cmds.columnLayout(adjustableColumn=True)
cmds.floatFieldGrp('minAttr', numberOfFields=1, label='Min Value', value1=0)
cmds.columnLayout(adjustableColumn=True)
cmds.floatFieldGrp('maxAttr', numberOfFields=1, label='Max Value', value1=0)
cmds.columnLayout(adjustableColumn=True)
cmds.button(label='Contact', command='Connect()')
cmds.columnLayout(adjustableColumn=True)
#Show the window
cmds.showWindow(winName)
cmds.window(winName, edit=True, width=300, height=120)
开发者ID:RyugasakiHu,项目名称:Maya-tools,代码行数:25,代码来源:rh_addMultiAttr.py
示例8: _showUI
def _showUI(self):
if cmds.window(self.win, exists=True):
cmds.deleteUI(self.win, window=True)
cmds.window(self.win, title=self.win, widthHeight=(400, 220))
cmds.columnLayout('uicl_audioMain',adjustableColumn=True)
cmds.separator(h=15, style='none')
cmds.text(l='Select Audio to Offset')
cmds.separator(h=15, style='in')
cmds.rowColumnLayout(numberOfColumns=3, columnWidth=[(1, 100), (2, 90), (3, 100)])
cmds.button(label='<< Offset',
ann='Nudge selected Audio Backwards',
command=partial(self.offsetSelectedBy,'negative'))
cmds.floatField('AudioOffsetBy', value=10)
cmds.button(label='Offset >>',
ann='Nudge selected Audio Forwards',
command=partial(self.offsetSelectedBy,'positive'))
cmds.setParent('..')
cmds.separator(h=15, style='in')
cmds.rowColumnLayout(numberOfColumns=2, columnWidth=[(1, 200), (2, 90)])
cmds.button(label='Offset Range to Start at:',
ann='offset the selected range of audionodes such that they start at the given frame',
command=self.offsetSelectedTo)
cmds.floatField('AudioOffsetToo', value=10)
cmds.setParent('..')
cmds.separator(h=15, style='in')
cmds.button(label='Ripple selected',
ann="Ripple offset the selected audio nodes so they're timed one after another",
command=self.offsetRipple)
cmds.separator(h=15, style='none')
cmds.iconTextButton(style='iconOnly', bgc=(0.7, 0, 0), image1='Rocket9_buttonStrap2.bmp',
c=lambda *args: (r9Setup.red9ContactInfo()), h=22, w=200)
cmds.showWindow(self.win)
cmds.window(self.win, e=True, widthHeight=(290, 190))
开发者ID:hoorayfor3d,项目名称:Red9_StudioPack,代码行数:33,代码来源:Red9_Audio.py
示例9: AverageUI
def AverageUI(self):
import maya.cmds as cmds
import maya.mel as mel
import sys
if cmds.window('AverageTool',exists=True):
cmds.deleteUI('AverageTool')
cmds.window('AverageTool')
grid=cmds.gridLayout( numberOfColumns=2, cellWidthHeight=(120, 150) )
column=cmds.columnLayout()
cmds.button('Creat',c='creat()',h=100)
cmds.button('Key',c='key()',h=50)
cmds.columnLayout(column,edit=1,columnAttach=('both',0),adj=1,co=('both',50),columnWidth=120)
cmds.setParent(column)
cmds.setParent( '..' )
cmds.frameLayout( label='Average', borderStyle='in' )
cmds.columnLayout()
cmds.rowLayout( numberOfColumns=3, columnWidth3=(35, 30, 35), adjustableColumn=2, columnAlign=(1, 'right'), columnAttach=[(1, 'both', 0), (2, 'both', 0), (3, 'both', 0)] )
cmds.intField('min',minValue=0,value=0)
cmds.text('To')
cmds.intField('max',minValue=0, value=0)
cmds.setParent( '..' )
cmds.setParent( '..' )
cmds.frameLayout( label='Iterations', borderStyle='out' )
cmds.intField('iterations',minValue=0,maxValue=10,value=0)
cmds.frameLayout( label='Key', borderStyle='out' )
cmds.button('Delect',c='Delect()')
cmds.showWindow()
开发者ID:wangqinghuaTudou,项目名称:test,代码行数:35,代码来源:Average.py
示例10: ZvParentMaster
def ZvParentMaster(posX=56, posY=180, width=_defaultSize[0], height=_defaultSize[1]):
'''Main UI.'''
winName = 'ZvParentMasterWin'
if cmds.window(winName, exists=True):
cmds.deleteUI(winName, window=True)
cmds.window(winName, title='ZV', tlb=True)
cmds.columnLayout(adj=True, rs=0, bgc=(0.3, 0.3, 0.3))
#### PULSANTI ####
cmds.iconTextButton(style='iconOnly', h=34, bgc=(0.3, 0.3, 0.3), image=_pmpath + 'pm_attach.xpm', c='%s.attach()' % __name__, ann='Attach objects')
cmds.popupMenu(mm=True)
cmds.menuItem(l='Create parent groups - translation', c='%s.createParentGroups(True, False)' % __name__, rp='NE')
cmds.menuItem(l='Create parent groups - available attrs', c='%s.createParentGroups()' % __name__, rp='E')
cmds.menuItem(l='Create parent groups - rotation', c='%s.createParentGroups(False, True)' % __name__, rp='SE')
cmds.iconTextButton(style='iconOnly', h=34, bgc=(0.3, 0.3, 0.3), image=_pmpath + 'pm_detach.xpm', c='%s.detach()' % __name__, ann='Detach objects')
cmds.iconTextButton(style='iconOnly', h=34, bgc=(0.3, 0.3, 0.3), image=_pmpath + 'pm_destroy.xpm', c='%s.destroy()' % __name__, ann='Destroy constraints')
cmds.iconTextButton(style='iconOnly', h=34, bgc=(0.3, 0.3, 0.3), image=_pmpath + 'pm_fixsnap.xpm', c='%s.fixSnap()' % __name__, ann='Fix snap')
cmds.popupMenu(mm=True)
cmds.menuItem(l='Fix snaps in the active range', c='%s.fixSnap(True)' % __name__, rp='E')
cmds.iconTextButton(style='iconOnly', h=34, bgc=(0.3, 0.3, 0.3), image=_pmpath + 'pm_select.xpm', c='%s.selectConstraintNodes()' % __name__, ann='Select constraints and snap groups')
cmds.iconTextButton(style='iconOnly', h=34, bgc=(0.3, 0.3, 0.3), image=_pmpath + 'pm_timeline.xpm', c='%s.timeline()' % __name__, ann='Constraint timeline')
cmds.popupMenu(mm=True)
cmds.menuItem(l='<- Prev', c='%s.navigate(-1)' % __name__, rp='W')
cmds.menuItem(l='Next ->', c='%s.navigate(1)' % __name__, rp='E')
cmds.setParent('..')
cmds.showWindow(winName)
cmds.window(winName, edit=True, widthHeight=(width, height), topLeftCorner=(posY, posX))
sys.stdout.write('ZV Parent Master %s http://www.paolodominici.com [email protected]\n' % __version__)
开发者ID:jasperges,项目名称:ZvParentMaster,代码行数:32,代码来源:ZvParentMaster.py
示例11: displayUI
def displayUI(self):
windowName = 'LCMTUIWindow'
if cmds.window(windowName, exists=True):
cmds.deleteUI(windowName)
window = cmds.window(windowName, menuBar = True,t="LCMT v3.1.1")
fileMenu = cmds.menu( label='Manage Light Types')
cmds.menuItem( label='Add More Light Types',command=lambda *args:self.addLightTypes())
cmds.menuItem( label='See Current Light Types', command=lambda *args:self.displayLightTypes())
cmds.menuItem( label='Reset Light Types to Default Values', command=lambda *args:self.resetLightTypesToDefault())
cmds.paneLayout( configuration='vertical2' )
lightStageColumn = cmds.columnLayout(adjustableColumn=True)
cmds.text('Lights in the SCENE')
lights = cmds.ls(dag =True,visible=True,lights=True, type='mentalrayIblShape')
lightList = cmds.iconTextScrollList(allowMultiSelection=True, append=lights)
cmds.rowLayout(numberOfColumns = 2)
useGroupLights = cmds.checkBox( label='Group Lights', onCommand = lambda *args: self.updateScollList(True, lightList), offCommand = lambda *args: self.updateScollList(False, lightList))
cmds.checkBox( label='Save Images?', cc = lambda *args: self.toggleSaveImages())
cmds.setParent('..')
cmds.iconTextScrollList(lightList,edit=True,selectCommand=lambda *args: cmds.select(self.getElementsFromLightScrollList(lightList,useGroupLights),vis=True))
cmds.button(label='Render Lights!', command = lambda *args: self.renderAllLights(self.getElementsFromLightScrollList(lightList,useGroupLights),cmds.checkBox(useGroupLights, query=True, value=True)))
cmds.setParent('..')
renderLayersColumn = cmds.columnLayout(adjustableColumn=True)
#new column
cmds.text('Geometry in the SCENE')
geometry = cmds.ls(geometry=True)
#take out the ibl shapes from the geo selection
geometry = list(set(geometry) - set(lights))
geoList = cmds.iconTextScrollList(allowMultiSelection=True, append=geometry,selectCommand=lambda *args: cmds.select(cmds.iconTextScrollList(geoList, query=True, si=True )) )
cmds.text('Create Render Layers from selected geometry and lights')
cmds.button(label='Create Render Layers!', command = lambda *args: self.createLayersFromLights(cmds.iconTextScrollList(geoList, query=True, si=True ),self.getElementsFromLightScrollList(lightList,useGroupLights)))
cmds.setParent('..')
cmds.showWindow()
开发者ID:nestorprado,项目名称:light-contribution-management-tool,代码行数:34,代码来源:lcmtv311_stable.py
示例12: writeObj
def writeObj(self, file_name, progress = False, show_msg = True, scale = mcore.scene_scale()):
all_parts = self.parts()
part_num = len(all_parts)
if progress:
window = mc.window(t = 'Writing %s to obj' % self.set_name)
mc.columnLayout()
progressControl = mc.progressBar(maxValue = part_num, width = 300)
mc.showWindow(window)
f = open(file_name, 'w')
vo = 1
vto = 1
vno = 1
for i in range(len(all_parts)):
part = all_parts[i]
# part.toObjStream(f, group = part.name(reformat = True), v_offset = vo, vt_offset = vto, vn_offset = vno, show_msg = not progress)
part.toObjStream(f, group = part.partName(), v_offset = vo, vt_offset = vto, vn_offset = vno, show_msg = not progress, scale = scale)
vo += part.numPoints()
vto += part.numUVs()
vno += part.numNormals()
if progress:
mc.progressBar(progressControl, edit=True, step=1)
f.close()
if progress:
mc.deleteUI(window)
if show_msg:
print "Write %s to obj done." % self.set_name
return True
开发者ID:akoon,项目名称:OldPipeline,代码行数:30,代码来源:masset.py
示例13: __init__
def __init__(self):
if cmds.window('ms_info_window', query=True, exists=True):
cmds.deleteUI('ms_info_window')
window = cmds.window('ms_info_window', title='About Mayaseed', sizeable=False)
cmds.columnLayout(rs=10, columnOffset=['both', 20], width=600)
cmds.rowLayout(numberOfColumns=2)
cmds.text('', width=30)
cmds.image(image=os.path.join(ROOT_DIRECTORY, 'graphics', 'mayaseed.png'))
cmds.setParent('..')
cmds.text('Version ' + MAYASEED_VERSION)
cmds.text('Mayaseed is a Maya plugin for exporting scenes to the appleseed renderer.')
cmds.text('Written by Jonathan Topf.')
cmds.rowLayout(numberOfColumns=4)
cmds.button(label='Mayaseed website', command=('import webbrowser\nwebbrowser.open_new_tab("' + MAYASEED_URL + '")'))
cmds.button(label='appleseed website', command=('import webbrowser\nwebbrowser.open_new_tab("' + APPLESEED_URL + '")'))
cmds.text('', width=166)
cmds.button(label='Close', command=('import maya.cmds as cmds\ncmds.deleteUI(\"' + window + '\", window=True)'), width=100)
cmds.setParent('..')
cmds.text('')
cmds.setParent('..')
cmds.showWindow(window)
开发者ID:hipopotamo-hipotalamo,项目名称:appleseed,代码行数:29,代码来源:ms_commands.py
示例14: show
def show( self ) :
oSrch = 'LFT'
oRep = 'RGT'
oMul = 0
if mc.window( self.win , exists=True ) :
oSrch = mc.textField( '%sSrchTF'%self.ui , q=True , tx=True )
oRep = mc.textField( '%sRepTF'%self.ui , q=True , tx=True )
oMul = mc.floatField( '%sMultFF'%self.ui , q=True , v=True )
mc.deleteUI( self.win )
mc.window( self.win , t='pkWeightPuller' , rtf=True )
mc.columnLayout( '%sMainCL'%self.ui , adj=True )
mc.text( l='Search for' , align='center' )
mc.textField( '%sSrchTF'%self.ui , tx=oSrch )
mc.text( l='Replace with' , align='center' )
mc.textField( '%sRepTF'%self.ui , tx=oRep )
mc.button( '%sSwapBUT'%self.ui , l='Swap' , c=partial( self.swap ) )
mc.floatField( '%sMultFF'%self.ui , minValue=0 , maxValue=1 , v=oMul )
mc.button( '%sBUT'%self.ui , l='Pull' , c=partial( self.pull ) )
mc.showWindow( self.win )
mc.window( self.win , e=True , w=180 )
mc.window( self.win , e=True , h=180 )
开发者ID:myCodeTD,项目名称:pkmel,代码行数:27,代码来源:weightPuller.py
示例15: create_comment
def create_comment(self, *args):
cmds.window('comment_win')
cmds.columnLayout()
cmds.text(l='Enter in new comment')
self.new_comment_field = cmds.scrollField()
add = cmds.button(l='Add', c=self.add_comment)
cmds.showWindow('comment_win')
开发者ID:creuter23,项目名称:fs-tech-artist,代码行数:7,代码来源:threeDF_rig_check_v011.py
示例16: main
def main():
mc.python('from kmAnimImpExp import *')
if mc.window( 'AnimImpExpUI', exists=True ):
mc.deleteUI('AnimImpExpUI')
WinName = mc.window(
'AnimImpExpUI',
title='Anim Import/Export with select',
iconName='AnimImpExpUI',
width=100,
height=200,
menuBar=True
)
mc.menu( label='Menu', tearOff=False )
mc.menuItem( label='Reload',command='from kmAnimImpExp import *;main()')
mc.menuItem( divider=True )
mc.menuItem( label='Quit' )
mc.columnLayout(adj=True)
mc.button(label='Import Anim',command='kmAnimImp()')
mc.button(label='Export Anim',command='kmAnimExp()')
mc.setParent('..') #columnLayout
mc.showWindow(WinName)
开发者ID:smymc,项目名称:Maya-Python,代码行数:25,代码来源:kmAnimImpExp.py
示例17: ruMainWindow
def ruMainWindow():
ruWin = "riggUtils"
if mc.window(ruWin,q=True,ex=True):
mc.deleteUI(ruWin)
mc.window(ruWin,title = "Rigging Utilities")
mc.scrollLayout(horizontalScrollBarThickness=16)
ruMainColumn = mc.columnLayout(columnAttach=("both",5),rowSpacing=10,columnWidth=320)
mc.frameLayout(label="General",bs="etchedOut",w=300,mw=5,cll=1)
mc.button(label='Show Axis',command='mc.toggle(state=True, localAxis=True)')
mc.button(label='Hide Axis',command='mc.toggle(state=False, localAxis=True)')
mc.frameLayout(label="Non T-Pose joint placer",bs="etchedOut",w=300,mw=5,cll=1,p=ruMainColumn)
mc.columnLayout(rs=5,adj=1)
mc.button(l="Create Helper Locator",c =ruCreateLocator)
mc.button(l="Create Joint on Helper Locator",c =ruCreateJointLocator)
mc.floatSliderGrp("ruJointRadius",en=1,label="Joint Radius",field=True,minValue=0,maxValue=5,fieldMinValue=0,fieldMaxValue=5,value=0.5,cw3=(70,30,10),dc=ruJointRadius)
mc.frameLayout(label="Fingers Utils",bs="etchedOut",w=300,mw=5,cll=1,p=ruMainColumn)
mc.columnLayout(rs=5,adj=1)
mc.floatSliderGrp("ruJointOrientation",en=1,label="Finger Orient",field=True,minValue=0,maxValue=5,fieldMinValue=0,fieldMaxValue=5,value=0.5,cw3=(70,30,10),dc=ruOrientJoint)
mc.frameLayout(label="Finger Renaming",bs="etchedOut",w=300,mw=5,cll=1)
mc.optionMenu('ruFinger',l='Choose finger')
mc.menuItem(l='Thumb')
mc.menuItem(l='Index')
mc.menuItem(l='Middle')
mc.menuItem(l='Ring')
mc.menuItem(l='Pinky')
mc.textFieldButtonGrp( label='Template string', text='', buttonLabel='Rename', bc=ruRenameFinger, cw3=[120,70,70],ct3=['left','left','left'],co3=[2,2,2] )
mc.showWindow(ruWin)
开发者ID:Mortaciunea,项目名称:bdScripts,代码行数:31,代码来源:riggUtils.py
示例18: copyCrvShapeUI
def copyCrvShapeUI():
if cmds.window('copyCrvShapeWin', exists=True):
cmds.deleteUI('copyCrvShapeWin')
cmds.window('copyCrvShapeWin', t='CopyCurve', rtf=True)
cmds.columnLayout('mainCL', adj=True)
cmds.text(l='Search for', align='center')
cmds.textField('searchTF')
cmds.textField('searchTF', e=True, tx='_L_')
cmds.separator()
cmds.text(align='center', l='Replace with')
cmds.textField('replaceTF')
cmds.textField('replaceTF', e=True, tx='_R_')
cmds.separator()
cmds.button('copyBTN', l='copy', c=partial(copyCrvShape))
cmds.showWindow('copyCrvShapeWin')
cmds.window('copyCrvShapeWin', e=True, w=220, h=98)
开发者ID:firstPeterParker,项目名称:mlPipe,代码行数:29,代码来源:copyCurveShape.py
示例19: 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)
开发者ID:elanifegnirf,项目名称:Snippets,代码行数:34,代码来源:others.py
示例20: 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)
开发者ID:KelSolaar,项目名称:Snippets,代码行数:30,代码来源:snapOnClosestVertex.py
注:本文中的maya.cmds.columnLayout函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论