本文整理汇总了Python中maya.cmds.radioCollection函数的典型用法代码示例。如果您正苦于以下问题:Python radioCollection函数的具体用法?Python radioCollection怎么用?Python radioCollection使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了radioCollection函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。
示例1: create
def create(self):
if mc.window(self.window,exists=True):
mc.deleteUI(self.window,window=True)
self.window = mc.window(self.window, title=self.title,widthHeight=self.size,menuBar=True)
self.mainForm = mc.formLayout(nd=100)
self.commandMenu()
self.commonButtons()
self.secondForm = mc.formLayout(nd=100)
self.lightRigTypeText = mc.text( label = "Rig Type:", height = 15)
radBtnCollection1 = mc.radioCollection()
self.indoorRadBtn = mc.radioButton( "indoorRadBtn", label = "Indoor", onCommand = partial(self.rigBtnToggle,1) )
self.outdoorRadBtn = mc.radioButton( "outdoorRadBtn",label = "Outdoor", onCommand = partial(self.rigBtnToggle,2) )
self.timeOfDayText = mc.text( label = "Time of Day:", height = 15)
radBtnCollection2 = mc.radioCollection()
self.morningRadBtn = mc.radioButton( "morningRadBtn", label = "Morning", enable = True, onCommand = partial(self.dayBtnToggle,1) )
self.noonRadBtn = mc.radioButton( "noonRadBtn", label = "Noon", enable = True, onCommand = partial(self.dayBtnToggle,2) )
self.nightRadBtn = mc.radioButton( "nightRadBtn", label = "Night", enable = True, onCommand = partial(self.dayBtnToggle,3) )
mc.formLayout( self.secondForm, e = True, attachForm = ( [self.lightRigTypeText,"left", 135],[self.lightRigTypeText, "bottom", 500],
[self.indoorRadBtn, "left", 185],[self.indoorRadBtn, "bottom", 497],
[self.outdoorRadBtn, "left", 185],[self.outdoorRadBtn, "bottom", 477],
[self.timeOfDayText,"left", 120], [self.timeOfDayText, "bottom", 452],
[self.morningRadBtn, "left", 185],[self.morningRadBtn, "bottom", 449],
[self.noonRadBtn, "left", 185],[self.noonRadBtn, "bottom", 429],
[self.nightRadBtn, "left", 185],[self.nightRadBtn, "bottom", 409]))
mc.radioCollection( radBtnCollection1, edit=True, select = self.indoorRadBtn )
self.displayOptions()
mc.showWindow()
开发者ID:JimmyFrando,项目名称:Scripts,代码行数:34,代码来源:lightRig.py
示例2: createBrushSettingsGroup
def createBrushSettingsGroup(self,parent):
group = self.createUIGroup(parent, 'Brush Settings')
self.createTitledRow(group, 'Brush Shape')
brushWidth = 35;
cmds.rowLayout(nc=4,cw4=[brushWidth,brushWidth,brushWidth,brushWidth])
self.createBrushShapeButtons()
cmds.setParent("..")
def innerLayout():
return cmds.rowColumnLayout( numberOfColumns=2,columnWidth=[(1,100),(2,100)])
self.createTitledRow(group, 'Mode',innerContentConstructor=innerLayout)
cmds.radioCollection()
for index,i in enumerate(['Replace','Add','Scale','Smooth']):
ctrl = self.controls.__dict__['paintMode'+i] = RadioButtonField(self.VAR_PREFIX+'paintMode'+i,defaultValue=1 if index==0 else 0,label=i)
ctrl.changeCommand.addHandler(self.paintValuesChanged)
self.controls.intensitySlider = FloatSliderField()
self.controls.intensitySlider.flexibleRange = True
self.createTitledRow(group, 'Intensity',self.controls.intensitySlider.create)
self.controls.intensitySlider.onChange.addHandler(self.paintValuesChanged)
self.controls.brushRadiusSlider = FloatSliderField(range=[0,30])
self.controls.brushRadiusSlider.flexibleRange = True
self.createTitledRow(group, 'Brush Radius',self.controls.brushRadiusSlider.create)
self.controls.brushRadiusSlider.onChange.addHandler(self.changeBrushRadius)
开发者ID:leandropim,项目名称:Tapp,代码行数:29,代码来源:tabPaint.py
示例3: buildAttributeTool
def buildAttributeTool(self,parent,vis=True):
OptionList = ['Tools','Manager','Utilities']
RadioCollectionName ='AttributeMode'
RadioOptionList = 'AttributeModeSelectionChoicesList'
ShowHelpOption = mc.optionVar( q='cgmVar_TDToolsShowHelp' )
self.AttributeModeOptionVar = OptionVarFactory( 'cgmVar_AttributeMode',defaultValue = OptionList[0])
MelSeparator(parent,ut = 'cgmUIHeaderTemplate',h=5)
#Mode Change row
self.ModeSetRow = MelHLayout(parent,ut='cgmUISubTemplate',padding = 0)
MelLabel(self.ModeSetRow, label = 'Choose Mode: ',align='right')
self.RadioCollectionName = MelRadioCollection()
self.RadioOptionList = []
#build our sub section options
self.ContainerList = []
self.ContainerList.append( self.buildAttributeEditingTool(parent,vis=False) )
self.ContainerList.append( self.buildAttributeManagerTool( parent,vis=False) )
self.ContainerList.append( self.buildAttributeUtilitiesTool( parent,vis=False) )
for item in OptionList:
self.RadioOptionList.append(self.RadioCollectionName.createButton(self.ModeSetRow,label=item,
onCommand = Callback(guiFactory.toggleModeState,item,OptionList,self.AttributeModeOptionVar.name,self.ContainerList)))
self.ModeSetRow.layout()
mc.radioCollection(self.RadioCollectionName,edit=True, sl=self.RadioOptionList[OptionList.index(self.AttributeModeOptionVar.value)])
开发者ID:GuidoPollini,项目名称:MuTools,代码行数:31,代码来源:attrTools.py
示例4: 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
示例5: read_windowInfo
def read_windowInfo():
import cPickle
import sgBFunction_fileAndPath
if not os.path.exists( WinA_Global.infoPath ):
sgBFunction_fileAndPath.makeFile( WinA_Global.infoPath )
sgBFunction_fileAndPath.makeFile( WinA_Global.infoPathPath )
try:
f = open( WinA_Global.infoPath, 'r' )
data = cPickle.load( f )
f.close()
except: return None
if not data: return None
try:exportPath, exportType, searchFor, searchForType, splitStringAndSerchCheck, splitStringAndSearchString = data
except: return None
cmds.textField( WinA_Global.exportPath_txf, e=1, tx= exportPath )
items = cmds.radioCollection( WinA_Global.exportType_radio, q=1, cia=1 )
cmds.radioButton( items[ exportType ], e=1, sl=1 )
cmds.textField( WinA_Global.searchFor_txf, e=1, tx=searchFor )
items = cmds.radioCollection( WinA_Global.searchForType_radio, q=1, cia=1 )
cmds.radioButton( items[ searchForType ], e=1, sl=1 )
cmds.checkBox( WinA_Global.searchForType_check, e=1, v=splitStringAndSerchCheck )
cmds.textField( WinA_Global.searchForType_txf, e=1, tx=splitStringAndSearchString )
开发者ID:jonntd,项目名称:mayadev-1,代码行数:27,代码来源:sgPWindow_data_mesh_exportGroup.py
示例6: 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
示例7: 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
示例8: searchNameChangeCmd
def searchNameChangeCmd( self, *args ):
searchName = cmds.textField( self._searchField, q=1, tx=1 )
cia = cmds.radioCollection( self._fileTypeCollection, q=1, cia=1 )
sel = cmds.radioCollection( self._fileTypeCollection, q=1, sl=1 )
for i in range( 3 ):
if cia[i].split( '|' )[-1] == sel:
if i == 0:
extList = ['.motion']
elif i == 1:
extList = ['.hik' ]
else:
extList = ['.motion', '.hik']
fileNames = []
self._realFileNames = []
for filePath in command.getFiles( extList, searchName ):
filePath = os.path.abspath( filePath )
folder, fileName = os.path.split( filePath )
lastFolderName = folder.split( '\\' )[-1]
fileNames.append( "../"+lastFolderName+"/"+fileName )
self._realFileNames.append( filePath )
cmds.textScrollList( self._fileNameScrollList, e=1, ra=1, a=fileNames )
开发者ID:jonntd,项目名称:mayadev-1,代码行数:29,代码来源:uiShow.py
示例9: editUiInfo
def editUiInfo(self, *args ):
cia = cmds.radioCollection( self._nameCollection, q=1, cia=1 )
sel = cmds.radioCollection( self._nameCollection, q=1, sl=1 )
for i in range( 2 ):
if cia[i].split( '|' )[-1] == sel:
if i == 0:
mainInfo.namespaceOption = 'prefix'
else:
mainInfo.namespaceOption = 'namespace'
if cmds.optionMenu( self._frontNameOptionMenu, q=1, sl=1 ) == 1:
mainInfo.frontNameOption = 'fileName'
cmds.textField( self._thisStringField, e=1, en=0 )
else:
mainInfo.frontNameOption = 'thisString'
cmds.textField( self._thisStringField, e=1, en=1 )
mainInfo.thisString = cmds.textField( self._thisStringField, q=1, tx=1 )
fileString = mainInfo.fileTypeOption + '\n' + mainInfo.namespaceOption +'\n' + mainInfo.frontNameOption + '\n' + mainInfo.thisString
f = open( mainInfo.uiInfoPath, 'w' )
f.write( fileString )
f.close()
self._namespaceOption = mainInfo.namespaceOption
self._frontNameOption = mainInfo.frontNameOption
self._thisString = mainInfo.thisString
开发者ID:jonntd,项目名称:mayadev-1,代码行数:29,代码来源:uiShow.py
示例10: createClosestJointGroup
def createClosestJointGroup(self,layout):
group = self.createUIGroup(layout,"From Closest Joint")
# influence chooser group
influenceFiltersForm = cmds.formLayout(parent=group)
l = cmds.text(label='Influences to choose from: ')
cmds.formLayout(influenceFiltersForm,e=True,attachForm=[(l,'left',0),(l,'top',0)],attachNone=[(l,'bottom'),(l,'right')])
radios = cmds.columnLayout();
cmds.radioCollection()
cmds.formLayout(influenceFiltersForm,e=True,attachForm=[(radios,'left',Constants.MARGIN_BLOCK_INDENT),(radios,'right',0),(radios,'bottom',0)],attachControl=[(radios,'top',0,l)])
RadioButtonField(self.VAR_CJ_PREFIX+'useAllInfluences',defaultValue=1,label='All influences available in skin cluster',
annotation='Use all influences present in skin cluster for closest joint search')
self.controls.rdioUseListerInfluences = RadioButtonField(self.VAR_CJ_PREFIX+'useSelectedInfluences',
defaultValue=0,label='Selected influences in lister',
annotation='Use only those influences that are selected in "List Influences" tab')
cmds.setParent(group)
self.controls.cjIntensity = IntensitySlider(
'amount of effect to apply',
self.VAR_CJ_PREFIX+'Intensity')
self.createTitledRow(group, "Intensity",innerContentConstructor=self.controls.cjIntensity.create)
self.controls.cjSoftSelection = SoftSelectionRow(self.VAR_CJ_PREFIX+'softSelection')
self.controls.cjSoftSelection.create(group)
cmds.setParent(group)
cmds.rowLayout(nc=2,adjustableColumn=2,columnWidth2=[Constants.BUTTON_WIDTH_SMALL,50], columnAttach2=["both","both"],columnAlign2=["center","center"])
BaseTab.createHelpButton(SkinToolsDocs.ASSIGNWEIGHTS_CLOSESTJOINT_INTERFACE)
cmds.button(height=Constants.BUTTON_HEIGHT,label='Assign',command=lambda *args:self.execClosestJointAssign())
开发者ID:BigMacchia,项目名称:ngSkinTools,代码行数:31,代码来源:tabAssignWeights.py
示例11: 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"])
开发者ID:griffinanimator,项目名称:MPR,代码行数:30,代码来源:altSetupTools.py
示例12: uvSetOptions
def uvSetOptions(self):
window_name = "uvSetOptions"
if cmds.window(window_name, q=True, exists=True):
cmds.deleteUI(window_name)
self.optionWindow = cmds.window(window_name, title="Lightmap Options")
tabs = cmds.tabLayout(innerMarginWidth=5, innerMarginHeight=5)
standardLayout = cmds.columnLayout(parent=self.optionWindow, adj=True)
self.uvSetChoice = cmds.optionMenuGrp(label="Source UV Set")
for uvSet in self.uvList: #lists selections' uv sets
cmds.menuItem(label=uvSet)
self.lightmapBox = cmds.textFieldGrp(label="New UV Set Name", text=self.lightmap)
self.presetSelect = cmds.optionMenuGrp(self.presetSelect, label="Spacing Presets", cc=self.presetValue)
for preset in self.spacingPresets:
cmds.menuItem(label=preset)
cmds.floatSliderGrp(self.shellSpacingSlider, label="Percentage Space:", v=3.200, step=0.001, max=5.000, field=True)
print cmds.floatSliderGrp(self.shellSpacingSlider, q=True, v=True)
cmds.button(label="Generate Lightmap", width=200, c=self.copyAndLayoutCheck)
advancedLayout = cmds.columnLayout(parent=self.optionWindow, adj=True)
layoutObjectsCollection = cmds.radioCollection() #radial button, creates new layout
layoutObjectsCollection_layout = cmds.columnLayout()
cmds.text(label = "Layout objects:", p=layoutObjectsCollection_layout)
rbl = cmds.radioButton(label="Per object(overlapping)", p=layoutObjectsCollection_layout, onc=lambda *args: self.perObjectLayout(0))
rbl = cmds.radioButton(label="Single or multiple objects(non-overlapping)", p=layoutObjectsCollection_layout, onc=lambda *args: self.perObjectLayout(1), sl=True )
prescaleCollection = cmds.radioCollection() #radial button, creates new layout
prescaleCollection_layout = cmds.columnLayout()
cmds.text(label = "Prescale:", p=prescaleCollection_layout)
rbl = cmds.radioButton(label="None", p=prescaleCollection_layout, onc=lambda *args: self.prescaleLayout(0))
rbl = cmds.radioButton(label="Object", p=prescaleCollection_layout, onc=lambda *args: self.prescaleLayout(1))
rbl = cmds.radioButton(label="World", p=prescaleCollection_layout, onc=lambda *args: self.prescaleLayout(2), sl=True)
collection = cmds.radioCollection() #radial button, creates new layout
collection_layout = cmds.columnLayout()
cmds.text(label = "Shell Layout:", p=collection_layout)
rbl = cmds.radioButton(label="Into region", p=collection_layout, onc=lambda *args: self.shellLayout(0), sl=True)
rbl = cmds.radioButton(label="Along U", p=collection_layout, onc=lambda *args: self.shellLayout(1))
rbl = cmds.radioButton(label="None", p=collection_layout, onc=lambda *args: self.shellLayout(2))
collection = cmds.radioCollection() #radial button, creates new layout
collection_layout = cmds.columnLayout()
cmds.text(label = "Scale:", p=collection_layout)
rbl = cmds.radioButton(label="None", p=collection_layout, onc=lambda *args: self.scaleLayout(0))
rbl = cmds.radioButton(label="Uniform", p=collection_layout, onc=lambda *args: self.scaleLayout(1), sl=True)
rbl = cmds.radioButton(label="Stretch", p=collection_layout, onc=lambda *args: self.scaleLayout(2))
rotateCollection = cmds.radioCollection() #radial button, creates new layout
rotateCollection_layout = cmds.columnLayout()
cmds.text(label = "Rotate:", p=rotateCollection_layout)
rbl = cmds.radioButton(label="None", p=rotateCollection_layout, onc=lambda *args: self.rotationLayout(0))
rbl = cmds.radioButton(label="90 degrees", p=rotateCollection_layout, onc=lambda *args: self.rotationLayout(1), sl=True)
rbl = cmds.radioButton(label="Free", p=rotateCollection_layout, onc=lambda *args: self.rotationLayout(2))
cmds.tabLayout( tabs, edit=True, tabLabel=((standardLayout, 'General'), (advancedLayout, 'Advanced')) )
cmds.showWindow(self.optionWindow)
开发者ID:RinglingGameArt,项目名称:GADTools,代码行数:58,代码来源:dcollins_uvLightmap.py
示例13: ui
def ui(self):
if mc.window(self.winName,ex=True):
mc.deleteUI(self.winName,window=True)
else:
pass
#----- window -----#
mc.window(self.winName , t = 'Edit Crv v1.0',w = 235,h = 160 , sizeable=False)
# main
self.form = mc.formLayout()
#1 rowColumnLayout
row = mc.rowColumnLayout(nc = 2,cat = [1,'right',5],ro = [(1,'both',2),(2,'both',2),(3,'both',2),(4,'both',2)])
self.rotateBN = mc.iconTextButton( style='textOnly' , w=150 , bgc=[0.5, 0.4, 0.33] , label='r o t a t e - c r v' , c=lambda *args:self.uiRunCmd('rotate') )
self.rotateFLE = mc.textField( 'rotateText' , w=70 , ed=True , text='45' )
self.scaleBN = mc.iconTextButton( style='textOnly' , w=150 , bgc=[0.5, 0.4, 0.33] , label='s c a l e - c r v' , c=lambda *args:self.uiRunCmd('scale') )
self.scaleFLE = mc.textField( 'scaleText' , w=70 , ed=True ,text='0.5' )
mc.setParent('..')
#2 columnLayout
column = mc.columnLayout(adj = True)
mc.separator( style="in" , h=10 )
#2.1 rowLayout
self.RIDRow = mc.rowLayout(nc = 3,cat = [1,'left',30])
self.AxisRID = mc.radioCollection()
self.xAxisTypeRID = mc.radioButton('x' , l='X', w=60)
self.yAxisTypeRID = mc.radioButton('y' , l='Y', w=60)
self.zAxisTypeRID = mc.radioButton('z' , l='Z', w=60)
mc.radioCollection( self.AxisRID, edit=True, select=self.xAxisTypeRID )
mc.setParent('..')
self.runBN = mc.iconTextButton( style='textOnly' , h=30 , bgc=[0.23,0.33,0.39] , label='m i r r o r' , c=lambda *args:self.uiRunCmd('mirror'))
mc.separator( style="in" , h=10 )
#2.2 rowLayout
self.eximRow = mc.rowLayout(nc = 2)
self.exportBN = mc.iconTextButton( style='textOnly' , w=110 , bgc=[0.5, 0.4, 0.33] , label='e x p o r t - s h a p e' , c=lambda *args:self.exportCurveShape() )
self.importBN = mc.iconTextButton( style='textOnly' , w=110 , bgc=[0.5, 0.4, 0.33] , label='i m p o r t - s h a p e' , c=lambda *args:self.importCurveShape() )
mc.setParent('..')
mc.formLayout(self.form, edit=True,
attachForm=[(row, 'top', 5), (row, 'left', 5), (row, 'right', 5), (column, 'bottom', 5), (column, 'right', 5), (column, 'left', 5) ],
attachControl=[(row, 'bottom', 5, column)])
mc.showWindow(self.winName)
开发者ID:wangqinghuaTudou,项目名称:test,代码行数:57,代码来源:rosa_EditCrvTool.py
示例14: __init__
def __init__(self):
#liste des attributs
self.listNamespace = []
self.listEmptyNamespace = []
self.listSelectedNamespace = []
#If the window already exists, erase it
if cmds.window('InE_NSMWin', exists=True):
cmds.deleteUI('InE_NSMWin')
#Create the window
#s : Can window be resized?
#rtf : Resize to fit childrens?
self.window = cmds.window('InE_NSMWin', title = "Namespace Manager", widthHeight=(520, 435), s = False, rtf=True)
#Main layout
cmds.formLayout("InE_NSMFlowLayout", p = 'InE_NSMWin', w = 50, h = 50)
cmds.image(image="R:\Benoit\Scripts\maya\icons\NSMBackground.png")
#Layout that draws an empty space at the top to see the beautyful flowers
cmds.columnLayout('InE_NSMEmptyLayout', p = "InE_NSMFlowLayout", columnAttach=('both', 14), rowSpacing=5, columnWidth=520, cal="left" )
cmds.text(label = "", p = 'InE_NSMEmptyLayout')
cmds.text(label = "", p = 'InE_NSMEmptyLayout')
cmds.text(label = "", p = 'InE_NSMEmptyLayout')
cmds.text(label = "", p = 'InE_NSMEmptyLayout')
cmds.text(label = "", p = 'InE_NSMEmptyLayout')
#Real main layout containing all the UI
cmds.rowColumnLayout( 'InE_NSMMainLayout', p = "InE_NSMEmptyLayout", numberOfColumns=2, columnWidth=[(1, 300), (2, 190)], h = 330, ro = [[1, "both", 20], [2, "both", 10]], co = [[1, "both", 10], [2, "both", 0]])
cmds.treeView('InE_NSMTextScrollList', parent = "InE_NSMMainLayout", numberOfButtons = 0, h= 150, abr = False, ams = True, adr = True, arp = True, idc = self.emptyMethod, sc = self.selectNamespace )
cmds.treeView('InE_NSMTextScrollList', edit = True, enk = True)
cmds.columnLayout('InE_NSMInformations', p = "InE_NSMMainLayout", columnAttach=('both', 0), cw = 250, rowSpacing=5, cal="left" , ebg = True)
cmds.text(p = 'InE_NSMInformations', label = "Informations")
cmds.text('InE_NSMNameInformations', p = 'InE_NSMInformations', label = "")
cmds.text('InE_NSMEmptyInformations', p = 'InE_NSMInformations', label = "")
cmds.columnLayout('InE_NSMModifications', p = "InE_NSMMainLayout", columnAttach=('both', 20), co = ("both", 10), cw = 250, rowSpacing=6, cal="left" , ebg = True)
cmds.text(p = 'InE_NSMModifications', label = "Rename selected to: ")
cmds.textField('InE_NSMNameInput', p = 'InE_NSMModifications')
cmds.radioCollection('InE_NSMRadioCollection', p = 'InE_NSMModifications')
cmds.radioButton('InE_NSMRadioButton1', label='and keep namespace hierarchy', select=True )
cmds.radioButton('InE_NSMRadioButton2', label='and move namespace to root' )
cmds.button('InE_NSMRenameSelected', p = 'InE_NSMModifications', label = "Rename selected", en = True, command = self.renameSelected)
cmds.columnLayout('InE_NSMButtons', p = "InE_NSMMainLayout", columnAttach=('both', 20), co = ("both", 10), rowSpacing=23, cal="left" , ebg = True)
cmds.button('InE_NSMRemoveSelected', p = 'InE_NSMButtons', label = "Remove selected", w = 128, en = True, command = self.removeSelected)
cmds.button('InE_NSMRemoveEmpty', p = 'InE_NSMButtons', label = "Remove empty", w = 128, en = True, command = self.removeEmpty)
cmds.button('InE_NSMRemoveAll', p = 'InE_NSMButtons', label = "Remove all", w = 128, en = True, command = self.removeAll)
cmds.showWindow()
self.updateTreeView()
print self.listNamespace
开发者ID:BenoitValdes,项目名称:PipelineTools_Maya,代码行数:56,代码来源:NamespaceManager.py
示例15: testApp
def testApp(self, *args ):
title = cmds.textField( self.pWindow.titleField, q=1, tx=1 )
selItem = cmds.radioCollection( self.pWindow.collection, q=1, sl=1 )
collectionItems = cmds.radioCollection( self.pWindow.collection, q=1, collectionItemArray=1 )
selItems = ['mel','python']
for i in range( len( collectionItems ) ):
if collectionItems[i].find( selItem ) != -1:
break
cmdTestApp( self.pWindow.tab, title, selItems[i] )
开发者ID:jonntd,项目名称:mayadev-1,代码行数:11,代码来源:cmdModel.py
示例16: cmdLoadBeforeSetting
def cmdLoadBeforeSetting( pWindow, textField, tabLayout, radioCollection, packageFolderPath ):
packageFolderPath = packageFolderPath.replace( '\\', '/' )
packageFolderName = packageFolderPath.split( '/' )[-1]
codeNames = []
codePaths = []
codeTypeIndex = 0
for root, dirs, names in os.walk( packageFolderPath ):
if not names:
return None
else:
for name in names:
codeName, extension = name.split( '.' )
if codeName == '__init__': continue
if extension == 'mel':
codeTypeIndex = 0
elif extension == 'py':
codeTypeIndex = 1
else:
continue
codeNames.append( codeName )
codePaths.append( root+'/'+name )
break
items = []
cmds.setParent( tabLayout )
mainCommandField = cmds.tabLayout( tabLayout, q=1, ca=1 )[0]
uiCmdInst = uiCmd( pWindow )
for i in range( len( codeNames ) ):
codeName = codeNames[i]
codePath = codePaths[i]
f = open( codePath, 'r' )
data = f.read()
f.close()
if codeName == 'MainCommand':
scrollField = mainCommandField
else:
scrollField = uiCmdInst.addChild(tabLayout, codeName)
cmds.scrollField( scrollField, e=1, tx=data )
cmds.setParent( '..' )
childItems = cmds.radioCollection( radioCollection, q=1, cia=1 )
cmds.radioCollection( radioCollection, e=1, sl=childItems[codeTypeIndex] )
cmds.textField( textField, e=1, tx=packageFolderName )
cmds.tabLayout( tabLayout, e=1, tabLabel=items )
开发者ID:jonntd,项目名称:mayadev-1,代码行数:54,代码来源:cmdModel.py
示例17: resetSettings
def resetSettings(self, *args):
cmds.optionVar(stringValue = ('kT_aPT_alignAxis', 'Y'))
cmds.optionVar(intValue = ('kT_aPT_direction', 2))
cmds.optionVar(intValue = ('kT_aPT_centerAxis', 1))
self.alignAxis = cmds.optionVar(query = 'kT_aPT_alignAxis')
self.direction = cmds.optionVar(query = 'kT_aPT_direction')
self.centerAxis = cmds.optionVar(query = 'kT_aPT_centerAxis')
cmds.radioCollection('n_aPT_rC_align', edit = True, sl = self.axisY)
cmds.optionMenu('n_oM_direction', edit = True, sl = self.direction)
cmds.checkBox('n_cB_centerAxis', edit = True, v = self.centerAxis)
开发者ID:Kainev,项目名称:kToolset_OBSOLETE,代码行数:12,代码来源:kT_alignPivotTool.py
示例18: generate_mirror_function_controls
def generate_mirror_function_controls(self, module_name, scroll_width):
rotation_radio_collection = "rotation_radioCollection_all"
translation_radio_collection = "translation_radioCollection_all"
text_label = "Mirror Settings:"
behavior_name = "behavior__"
orientation_name = "orientation__"
mirrored_name = "mirrored__"
worldspace_name = "worldSpace__"
if module_name != None:
rotation_radio_collection = "rotation_radioCollection_"+module_name
translation_radio_collection = "translation_radioCollection_"+module_name
text_label = module_name+" Mirror Settings:"
behavior_name = "behavior__"+module_name
orientation_name = "orientation__"+module_name
mirrored_name = "mirrored__"+module_name
worldspace_name = "worldSpace__"+module_name
cmds.text(label=text_label)
mirror_settings_text_width = 100
mirror_settings_column_width = (scroll_width - mirror_settings_text_width / .55)
cmds.rowColumnLayout(
nc=3,
columnAttach=(1, "right", 0),
columnWidth=[
(1, mirror_settings_text_width),
(2, mirror_settings_column_width),
(3, mirror_settings_column_width)
]
)
cmds.text(label="Rotation Mirror: ")
self.ui_elements[rotation_radio_collection] = cmds.radioCollection()
cmds.radioButton(behavior_name, label="Behavior", select=True)
cmds.radioButton(orientation_name, label="Orientation", select=False)
cmds.text(label="Translation Mirror: ")
self.ui_elements[translation_radio_collection] = cmds.radioCollection()
cmds.radioButton(mirrored_name, label="Mirrored", select=True)
cmds.radioButton(worldspace_name, label="World Space", select=False)
cmds.setParent(self.ui_elements["top_column_layout"])
cmds.text(label="")
开发者ID:firstPeterParker,项目名称:mlRig,代码行数:53,代码来源:mirror_module.py
示例19:
def smartOrient ():
_axis = cmds.radioCollection ( 'radioCollection_axis', query = True, select = True )
if _axis == 'axisX': _axis = 0
elif _axis == 'axisY': _axis = 1
else: _axis = 2
_direction = cmds.radioCollection ( 'radioCollection_direction', query = True, select = True )
if _direction == 'plus': _direction = 1
else: _direction = -1
_keepShape = cmds.checkBox ( 'check_keepShape', query = True, value = True )
_selList = cmds.ls ( selection = True, long = True )
_rotation = [ ( 90 * _direction, 0, 0 ),
( 0, 90 * _direction, 0 ),
( 0, 0, 90 * _direction ) ]
if len ( _selList ) > 0:
for _selected in _selList:
if cmds.nodeType ( _selected ) == 'joint':
cmds.select ( _selected + '.rotateAxis', replace = True )
cmds.xform ( rotation = _rotation[_axis], relative = True )
elif cmds.nodeType ( _selected ) == 'transform':
_offsetGroup = cmds.listRelatives ( parent = True )
if _offsetGroup != None:
cmds.xform ( _offsetGroup[0], rotation = _rotation[_axis],
relative = True, objectSpace = True )
if _keepShape:
mm.eval ( 'SelectCurveCVsAll;' )
cmds.xform ( rotation = (_rotation[_axis][0] * -1,
_rotation[_axis][1] * -1,
_rotation[_axis][2] * -1 ),
relative = True, objectSpace = True )
print; print; print '>>> SO FAR SO GOOD'; print # <<< DEBUG ONLY LINE, CAN BE DELETED <<< ##########
else:
raiseWarning ( 'Group selected' )
else:
raiseWarning ( 'this works only on control transForms and joints' )
cmds.select ( _selList )
else:
raiseWarning ( 'Nothing selected' )
开发者ID:danielforgacs,项目名称:code-dump,代码行数:50,代码来源:ford_riggingAid_lastOK.py
示例20: BuildUI
def BuildUI( self ):
self.Window = cmds.window( title = self.WINDOW_NAME + " " + self.PLUGIN_VERSION, sizeable = True, resizeToFitChildren = True, widthHeight = ( 1, 1 ) )
HalfWidth = ( self.WINDOW_WIDTH / 2 )
# main column
cmds.columnLayout()
# rotate around layout
cmds.radioCollection()
cmds.frameLayout( label = "Rotate Around", collapsable = False, width = self.WINDOW_WIDTH )
cmds.columnLayout()
cmds.rowColumnLayout( numberOfColumns = 1, columnWidth = [ ( 1, self.WINDOW_WIDTH ) ] )
self.rbRotateAroundCenterBB = cmds.radioButton( label = "Center of objects", onCommand = self.OnRotateAroundCenterBBoxSelected, select = True )
cmds.setParent( ".." ) #rowColumnLayout
cmds.rowColumnLayout( numberOfColumns = 2, columnWidth = [ ( 1, HalfWidth ), ( 2, HalfWidth - 5 ) ] )
self.rbRotateAroundObject = cmds.radioButton( label = "Object Pivot", onCommand = self.OnRotateAroundObjectSelected )
self.bPickObjectToRotateAround = cmds.button( label = "Pick", command = self.OnPickObject )
cmds.setParent( ".." ) #rowColumnLayout
cmds.rowColumnLayout( numberOfColumns = 2, columnWidth = [ ( 1, HalfWidth ), ( 2, HalfWidth - 5 ) ] )
self.rbRotateAroundPosition = cmds.radioButton( label = "Position (XYZ)", onCommand = self.OnRotateAroundPositionSelected )
cmds.rowColumnLayout( numb
|
请发表评论