当前位置: 首页>>代码示例>>Python>>正文


Python cmds.radioCollection函数代码示例

本文整理汇总了Python中maya.cmds.radioCollection函数的典型用法代码示例。如果您正苦于以下问题:Python radioCollection函数的具体用法?Python radioCollection怎么用?Python radioCollection使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了radioCollection函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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


注:本文中的maya.cmds.radioCollection函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。