本文整理汇总了Python中maya.cmds.text函数的典型用法代码示例。如果您正苦于以下问题:Python text函数的具体用法?Python text怎么用?Python text使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了text函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。
示例1: selectedFilesFromFolder
def selectedFilesFromFolder(self, *args):
ctrlPath = '|'.join([self.window, 'groupBox_4', 'lineEdit_2']);
folder = cmds.textField(ctrlPath, query=True, text=True);
self.selectedFiles = []
self.filesToCreate = 0
self.filesCreated = 0
self.createdErrors = 0
ctrlPath = '|'.join([self.window, 'groupBox_4', 'checkBox']);
recursive = cmds.checkBox(ctrlPath, query=True, value=True);
if os.path.isdir(folder):
if recursive:
for root, dirs, files in os.walk(folder):
for texture in files:
if (isImage(texture)):
self.selectedFiles.append(os.path.join(root, texture))
self.filesToCreate += 1
else:
files = os.listdir(folder)
for texture in files:
if (isImage(texture)):
self.selectedFiles.append(os.path.join(folder, texture))
self.filesToCreate += 1
updateProgressMessage(self.window, self.filesCreated, self.filesToCreate, 0)
ctrlPath = '|'.join([self.window, 'groupBox_3', 'label_10']);
cmds.text(ctrlPath, edit=True, label="");
开发者ID:Quazo,项目名称:breakingpoint,代码行数:30,代码来源:txManager.py
示例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
开发者ID:Bumpybox,项目名称:Tapp,代码行数:35,代码来源:ml_utilities.py
示例3: build
def build(self):
if mc.window( self.win, ex=1 ): mc.deleteUI( self.win )
if mc.windowPref( self.win, ex=1 ): mc.windowPref( self.win, remove=1 )
mc.window(self.win, title=self.title, wh=(410,378))
mc.columnLayout( 'mainColumn', adj=True )
mc.separator( h=10 )
mc.rowLayout( numberOfColumns=2, columnWidth2=(200, 200), columnAttach=[(1, "both", 5),(2 ,"both", 5)] )
mc.columnLayout( adj=True, columnAlign="center" )
mc.text( l=self.textsk )
self.skcharacterList = mc.textScrollList( numberOfRows=20, allowMultiSelection=True )
mc.setParent('..')
mc.columnLayout( adj=True, columnAlign="center" )
mc.text( l=self.textqp )
self.qpcharacterList = mc.textScrollList( numberOfRows=20, allowMultiSelection=True )
mc.setParent( '..' )
mc.setParent('..')
mc.separator ( h=10 )
mc.rowLayout( numberOfColumns=4, columnWidth4=(100, 100, 100, 100), columnAttach=[(1, "both", 1),(2 ,"both", 1), (3 ,"both", 1), (4 ,"both", 1)] )
mc.button( l=self.buttonsk, c=self.selSKItem )
mc.button( l=self.buttonAllSk, c=self.mainSK )
mc.button( l=self.buttonqp, c=self.selQPItem )
mc.button( l=self.buttonAllQp, c=self.mainQP )
mc.setParent('..')
mc.columnLayout( adj=True, columnAlign="center" )
mc.separator ( h=10 )
mc.setParent('..')
self.addSKList()
开发者ID:chuckbruno,项目名称:Python_scripts,代码行数:27,代码来源:SKQP_new.py
示例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)
开发者ID:xavMikeHoward,项目名称:Red9_StudioPack,代码行数:26,代码来源:Red9_Audio.py
示例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)
开发者ID:elanifegnirf,项目名称:Snippets,代码行数:34,代码来源:others.py
示例6: add
def add(self, driverName, angleValues=[] ):
if not angleValues:
angleValues = [0,0,0]
defaultBgc = [ .1, .1, .1 ]
onBgc = [ .9, .9, .2 ]
enList = [0,0,0]
bgcList = [None,None,None]
for i in range( 3 ):
if math.fabs( angleValues[i] ) >= self._minValue:
bgcList[i] = onBgc
enList[i] = 1
else:
bgcList[i] = defaultBgc
enList[i] = 0
widthList = uifnc.setWidthByPerList( [70,15,15,15] , self._width )
cmds.rowColumnLayout( nc=4, cw=[(1,widthList[0]),(2,widthList[1]),(3,widthList[2]),(4,widthList[3])] )
cmds.text( l= driverName+' : ', al='right' )
cmds.floatField( precision=2, v=angleValues[0], bgc= bgcList[0] )
cmds.popupMenu(); cmds.menuItem( l='Add Driver', c= partial( self.addConnectDriver, driverName+' | angle0 : %3.2f' %angleValues[0] ) )
cmds.floatField( precision=2, v=angleValues[1], bgc= bgcList[1] )
cmds.popupMenu(); cmds.menuItem( l='Add Driver', c= partial( self.addConnectDriver, driverName+' | angle1 : %3.2f' %angleValues[1] ) )
cmds.floatField( precision=2, v=angleValues[2], bgc= bgcList[2] )
cmds.popupMenu(); cmds.menuItem( l='Add Driver', c= partial( self.addConnectDriver, driverName+' | angle2 : %3.2f' %angleValues[2] ) )
self.driverScrollAddPopupCmd()
cmds.setParent( '..' )
开发者ID:jonntd,项目名称:mayadev-1,代码行数:35,代码来源:part1_driverInfo.py
示例7: OnSelectionChange
def OnSelectionChange( self ):
self.SelectedNodes = mel.eval( "ls -sl" )
self.ActiveManip = None
# ... informacion del frame seleccionado ...
if ( ( self.SelectedNodes != None ) and ( len( self.SelectedNodes ) == 1 ) ):
selectManip = None
if ( self.TranslationManips != None ):
selectManip = next( ( manip for manip in self.TranslationManips if manip.GetGizmo() == self.SelectedNodes[ 0 ] ), None )
if ( selectManip != None ):
sequence = next( ( seq for seq in self.SequenceInfo if seq.GetNode() == self.ActiveNode ), None )
frameInfo = sequence.GetFrameInfo( selectManip.GetFrame() )
self.ActiveManip = selectManip
cmds.checkBox( self.cXKey, edit = True, value = frameInfo.HasTranslationKeyAxis( 0 ) )
cmds.checkBox( self.cYKey, edit = True, value = frameInfo.HasTranslationKeyAxis( 1 ) )
cmds.checkBox( self.cZKey, edit = True, value = frameInfo.HasTranslationKeyAxis( 2 ) )
cmds.text( self.txtSelectedFrame, edit = True, label = selectManip.GetFrame() + self.StartFrame )
# ...
self.EnableKeyInfo( ( selectManip != None ) )
else:
self.EnableKeyInfo( False )
开发者ID:malandrin,项目名称:maya-scripts,代码行数:25,代码来源:MTRuntimeKeyTransform.py
示例8: 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
示例9: 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
示例10: create
def create(self):
if cmds.window( WinMain.name, q=1, ex=1 ):
cmds.deleteUI( WinMain.name )
cmds.window( WinMain.name, title=WinMain.title )
form = cmds.formLayout()
textExplanation = cmds.text( l='1.컨트롤러 선택 \n2.컨트롤할 타겟들 선택'.decode( 'utf-8' ), al='center', h=50, bgc=[.3,.3,.3], font='fixedWidthFont' )
textAttr = cmds.text( l='Attribute Name', h=25 )
fieldAttrName = cmds.textField( tx='show', h=25)
buttonConnect = cmds.button( l='Connect', h=30, c=Cmd.connect )
cmds.formLayout( form, e=1,
af=[(textExplanation, 'top', 0), (textExplanation, 'left', 0), (textExplanation, 'right', 0),
(textAttr, 'left', 5), (fieldAttrName, 'right', 5),
(buttonConnect, 'left', 0), (buttonConnect, 'right', 0)],
ac=[(textAttr, 'top', 5, textExplanation),
(fieldAttrName, 'top', 5, textExplanation),
(fieldAttrName, 'left', 5, textAttr),
(buttonConnect, 'top', 5, textAttr)] )
cmds.window( WinMain.name, e=1, width=WinMain.width, height=WinMain.height )
WinMain.fieldAttrName = fieldAttrName
开发者ID:jonntd,项目名称:mayadev-1,代码行数:25,代码来源:visibilityConnect.py
示例11: _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
示例12: 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
示例13: __init__
def __init__(self):
self.name = "rsSubstituteAttribute"
self.title = "rs Substitute Attribute"
i_windowSize = (300, 110)
if (cmds.window(self.name, q=1, exists=1)):
cmds.deleteUI(self.name)
self.window = cmds.window(self.name, title=self.title)
s_winColPro2 = cmds.columnLayout(adjustableColumn=True, parent=self.window)
i_colum3 = (i_windowSize[0] / 6, i_windowSize[0] * 4 / 6, i_windowSize[0] / 6)
s_winRowField1 = cmds.rowLayout(numberOfColumns=3, adjustableColumn3=2, columnWidth3=(i_colum3), columnAlign=(1, 'center'), columnAttach=[(1, 'both', 0), (2, 'both', 0), (3, 'both', 0)], parent=s_winColPro2)
cmds.text(label='Source', align='center', parent=s_winRowField1)
self.sourceText = cmds.textField(cmds.textField(), edit=True, parent=s_winRowField1)
cmds.button(label='Pick up', c=self.rsPickUpSource, parent=s_winRowField1)
s_winRowField2 = cmds.rowLayout(numberOfColumns=3, adjustableColumn3=2, columnWidth3=(i_colum3), columnAlign=(1, 'center'), columnAttach=[(1, 'both', 0), (2, 'both', 0), (3, 'both', 0)], parent=s_winColPro2)
cmds.text(label='Target', align='center', parent=s_winRowField2)
self.targetText = cmds.textField(cmds.textField(), edit=True, parent=s_winRowField2)
cmds.button(label='Pick up', c=self.rsPickUpTarget, parent=s_winRowField2)
cmds.separator(height=5, style="none", hr=True, parent=s_winColPro2)
i_colum = i_windowSize[0] / 3
s_winRow1 = cmds.rowLayout(numberOfColumns=3, adjustableColumn3=2, columnWidth3=(5, i_colum, i_colum), columnAlign=(1, 'center'), columnAttach=[(1, 'both', 0), (2, 'both', 0), (3, 'both', 0)], parent=s_winColPro2)
cmds.separator(height=5, style="none", hr=True, parent=s_winRow1)
self.delAttr = cmds.checkBox("rsDelSourceAttr", label='Delete Source Attribute', align='right', v=True, parent=s_winRow1)
cmds.separator(height=5, style="none", hr=True, parent=s_winColPro2)
self.rsSubs = cmds.button(label='Substitute or Clone', w=100, c=self.rsSubs, parent=s_winColPro2)
cmds.window(self.window, e=1, w=430, h=103)
cmds.showWindow(self.window)
cmds.window(self.window, edit=True, widthHeight=(i_windowSize))
开发者ID:RigStudio,项目名称:rsSubstituteAttribute,代码行数:27,代码来源:rsSubstituteAttribute.py
示例14: deleteTx
def deleteTx(self, *args):
ctrlPath = '|'.join([self.window, 'radioButton']);
selection = cmds.radioButton(ctrlPath, query=True, select=True);
self.deletedFiles = 0
ctrlPath = '|'.join([self.window, 'groupBox_3', 'label_10']);
if selection:
self.selectedFilesFromList()
else:
self.selectedFilesFromFolder()
if not self.selectedFiles:
cmds.text(ctrlPath, edit=True, label="Deleted: {0}".format(self.deletedFiles));
return
for texture in self.selectedFiles:
if not texture:
continue;
if 'udim' in os.path.basename(texture):
udims = getUdims(texture)
for udim in udims:
txFile = os.path.splitext(udim)[0]+".tx"
if os.path.isfile(txFile):
os.remove(txFile)
self.deletedFiles += 1
else:
txFile = os.path.splitext(texture)[0]+".tx"
if os.path.isfile(txFile):
os.remove(txFile)
self.deletedFiles += 1
cmds.text(ctrlPath, edit=True, label="Deleted: {0}".format(self.deletedFiles));
self.updateList()
开发者ID:Quazo,项目名称:breakingpoint,代码行数:34,代码来源:txManager.py
示例15: build
def build(self):
if mc.windowPref(self.win, exists=1):
mc.windowPref(self.win, remove=1)
if mc.window(self.win,exists=1):
mc.deleteUI(self.win)
mc.window( self.win, title=self.title, widthHeight=(500, 210) )
cl1 = mc.columnLayout( columnAttach=('both', 2), rowSpacing=3, columnWidth=500, adjustableColumn = True)
mc.radioCollection()
self.mouth = mc.radioButton( l='user import', select=1, p=cl1 )
self.autoR = mc.radioButton( l='auto import', p=cl1 )
mc.separator()
mc.frameLayout('selected')
mc.rowLayout(numberOfColumns=3, columnWidth3=(80, 75, 150), adjustableColumn=2, columnAlign=(1, 'right'), columnAttach=[(1, 'both', 0), (2, 'both', 0), (3, 'both', 0)] )
mc.text(l='Mode')
mc.columnLayout()
mc.radioCollection()
self.prop = mc.radioButton( l='Prop', select=1 )
self.character = mc.radioButton( l='Character' )
mc.setParent( '..' )
mc.setParent( '..' )
self.numText = mc.floatFieldGrp( l='Num' )
self.txtProp = mc.textFieldButtonGrp( label='File Path', text='', buttonLabel='Browse', cw3 = (40,400,50), adjustableColumn3 = 2, cl3 = ('left', 'center', 'right'), bc = self.browse,cc=self.getPath )
#mc.separator()
#self.txtCharacter = mc.textFieldButtonGrp( label='Path', text='', buttonLabel='Browse', cw3 = (40,400,50), adjustableColumn3 = 2, cl3 = ('left', 'center', 'right'), bc = self.browse,cc=self.getPath )
#mc.separator()
mc.separator(p=cl1)
mc.button( 'importR', l='Import Reference File', p=cl1 )
mc.setParent( '..' )
开发者ID:chuckbruno,项目名称:Python_scripts,代码行数:28,代码来源:multiReference.py
示例16: 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
示例17: 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
示例18: secondaryUI
def secondaryUI():
sec_UIname = 'secondary'
if cmds.window(sec_UIname,exists = True):
cmds.deleteUI(sec_UIname)
cmds.window(sec_UIname,title = 'rosa_secondary')
clmLot = cmds.columnLayout( adjustableColumn=True)
cmds.textField('ctrl_name',text = 'ctrl_name')
cmds.button('createctrl',label = 'create ctrl',h = 30,c = 'ctrl()')
cmds.button('load_model',label = 'load "org" model',c = 'load_org()')
cmds.textField('org_model',text = '"org" model')
cmds.button('load_property_obj',label = 'loading property add object',c = 'load_vis()')
cmds.textField('vis',text = 'Visibility')
#
flLot = cmds.flowLayout(columnSpacing = 6)
cmds.text(label = 'ctrl axial:')
cmds.radioCollection()
cmds.radioButton('follic',label = 'follic',select = 0)
cmds.radioButton('Custom',label = 'Custom',select = 1)
#
cmds.setParent( clmLot)
cmds.button(label = 'Generate',c = 'secondary_add()')
cmds.button('add_ctrl',label = 'add controller',c = 'add_controller()')
cmds.button('Add_modelSec',label = 'Add_modelSec',c = 'Add_modelSec()')
cmds.button(label = 'inverse_connect',c = 'inverse_connect01()')
#
cmds.frameLayout( label='modify ctrl:',borderStyle='etchedOut')
cmds.setParent( clmLot)
cmds.button(label = 'loding want to modify the controller',c = 'load_ctrl()')
cmds.textField('sec_ctrl',text = 'secondary_ctrl')
cmds.button(label = 'modify the controller position',c = 'ctrl_modify()')
cmds.button(label = 'complete controller modifies',c = 'modify_complete()')
cmds.showWindow()
开发者ID:wangqinghuaTudou,项目名称:test,代码行数:32,代码来源:rosa_SecCtrl.py
示例19: UI
def UI():
if cmds.window("TressFXExporterUI", exists = True):
cmds.deleteUI("TressFXExporterUI")
windowTitle = 'TressFX Exporter' + ' ' + 'v' + tressfx_exporter_version
window = cmds.window("TressFXExporterUI", title = windowTitle, w=280, h = 260, mnb=False, sizeable=False)
mainLayout = cmds.columnLayout(w=280, h=260)
cmds.separator(h=8, style='in')
cmds.text(label='Number of vertices per strand (4, 8, 16, 32 or 64):', align='left')
cmds.intField("numVerticesPerStrand", w=30, minValue=4, maxValue=64, value=16 )
cmds.separator(h=8, style='in')
cmds.checkBox("bothEndsImmovable", label='Both ends immovable')
cmds.checkBox("InvertZ", label='Invert Z', value = True)
cmds.checkBox("exportSkinCheckBox", label='Export skin data', value = False)
cmds.checkBox("randomStrandCheckBox", label='Randomize strands for LOD', value = True)
cmds.separator(h=15)
cmds.button(label="Set the base mesh", w=170, h=30, command=SetBaseMesh)
cmds.textField("MeshNameLabel", w=170, editable=False)
cmds.separator(height=10, style='none')
cmds.button(label="Export as binary (*.tfx)", w=170, h=30, command=ExportBinary)
cmds.separator(h=15)
version_text = 'v' + tressfx_exporter_version
cmds.text(label=version_text, align='left')
global selected_mesh_shape_name
selected_mesh_shape_name = ''
cmds.showWindow(window)
开发者ID:GPUOpen-Effects,项目名称:TressFX,代码行数:34,代码来源:TressFX_Exporter.py
示例20: cmd
def cmd(self, *args):
fileExt = None
fileType = cmds.file(query=True, type=True)
if fileType[0] == 'mayaBinary':
fileExt = '.mb'
elif fileType[0] == 'mayaAscii':
fileExt = '.ma'
saveName = cmds.text(self.parent.parent.nameTxt, query=True, l=True) + fileExt
savePath = cmds.text(self.parent.pathTxt, query=True, l=True)
finalPath = os.path.join(savePath, saveName)
if self.mode == 'scene':
cmds.file(rename=finalPath)
cmds.file(save=True, type=fileType[0])
cmds.deleteUI(self.parent.intWinName, window=True)
elif self.mode == 'selected':
sel = cmds.ls(sl=True)
if len(sel) > 0:
cmds.file(os.path.join(savePath, saveName), exportSelected=True, type='mayaBinary')
cmds.deleteUI(self.parent.intWinName, window=True)
else:
from key_libs import key_sys_lib
key_sys_lib.printMayaWarning('Nothing is selected...')
开发者ID:boochos,项目名称:work,代码行数:28,代码来源:key_ui.py
注:本文中的maya.cmds.text函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论