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


Python cmds.checkBox函数代码示例

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


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

示例1: mainModule

    def mainModule(self):
        cmds.rowColumnLayout(nc=2,cw =[(1,130),(2,285)]) #etchedOut rowlumnLayout.str#
        cmds.frameLayout(label=self.moduleLabel,mw =1 ,mh =3,bs="etchedOut",cl= 0,cll=0 ,h=self.hgt)
        cmds.symbolButton(h= 80,image= 'sphere.png' )
        #cmds.rowColumnLayout( numberOfRows=1 ) #Side rowlumnLayout.str#

        #cmds.setParent('..')   #Side rowlumnLayout.end#
        cmds.setParent('..')   #etchedOut rowlumnLayout.end#

        cmds.frameLayout(label='options:',mw =1 ,mh =3,bs="etchedOut",cl= 0,cll=0 ,h= self.hgt)
        #optionsForm = cmds.formLayout()
        cmds.rowColumnLayout(nc=5,cw =[(1,50),(2,50),(3,50),(4,50),(5,50)])
        cmds.text(l='joint:')
        cmds.text(l='fingers:')
        cmds.text(l='no:')
        cmds.text(l='segment:')
        cmds.text(l='symmetry:')
        cmds.textField()
        cmds.checkBox(l ="" )
        cmds.textField()
        cmds.textField()
        cmds.checkBox(l ="" )
        #cmds.formLayout(optionsForm ,e=1,)
        cmds.setParent('..')

        cmds.rowColumnLayout( numberOfRows=1 )#Side: .str
        cmds.text(l=' Side: ')
        cmds.radioButtonGrp(nrb=2 ,la2=["L","R"] ,cw2=[30 ,30],sl =1)
        cmds.scrollField(wordWrap =1,text ="creates arm skeleton template setup. ideal use: any arm Humans, Insects.." ,editable= 0,h=80,w=180)
        cmds.setParent('..')##Side: .end

        cmds.setParent('..')
        cmds.setParent('..')
        cmds.separator(height =3 ,style= "none" )
开发者ID:wangqinghuaTudou,项目名称:test,代码行数:34,代码来源:Ui.py

示例2: drawCheckBox

    def drawCheckBox(self,elem,x,y,w=None,h=None):
        """ Draw a checkBox 
        @type  elem: dictionary
        @param elem: the button dictionary
        @type  x: int
        @param x: position on x in the gui windows
        @type  y: int
        @param y: position on y in the gui windows
        @type  w: int
        @param w: force the width of the item
        @type  h: int
        @param h: force the height of the item
        """             
#        cmds.iconTextCheckBox( label='Sticks',style='iconAndTextHorizontal', 
#                                       image1=ICONSDIR+'bs.xpm', cc=self._displayBS )
        name = elem["name"]
        if elem["label"] != None:
            name = elem["label"]
        if elem["value"] is None :  
            elem["value"] = False
        print (name,elem["value"],bool(elem["value"]),elem["width"]*self.scale,elem["height"]*self.scale,self.scale) 
        if elem["action"] is not None :
            elem["id"] = cmds.checkBox(label=name,cc=elem["action"],
                            v=bool(elem["value"]),w=elem["width"]*self.scale,
                            h=elem["height"]*self.scale,recomputeSize=False)
        else  :
            elem["id"] = cmds.checkBox(label=name,v=bool(elem["value"]), 
                        w=elem["width"]*self.scale,
                        h=elem["height"]*self.scale,recomputeSize=False)
开发者ID:gj210,项目名称:upy,代码行数:29,代码来源:mayaUI.py

示例3: OnKeyChange

	def OnKeyChange( self, *args ):
		checks  = [ cmds.checkBox( self.cXKey, query = True, value = True ), cmds.checkBox( self.cYKey, query = True, value = True ), cmds.checkBox( self.cZKey, query = True, value = True ) ]
		attribs = [ ".translateX", ".translateY", ".translateZ" ]
		
		# ... se quieren cambios? ...
		sequence  = next( ( seq for seq in self.SequenceInfo if seq.GetNode() == self.ActiveNode ), None )
		frameInfo = sequence.GetFrameInfo( self.ActiveManip.GetFrame() )
		
		# ...
		refreshCurve = False
		frame        = self.ActiveManip.GetFrame() + self.StartFrame
		
		for i in range( 0, 3 ):
			if ( checks[ i ] != frameInfo.HasTranslationKeyAxis( i ) ):
				if ( checks[ i ] ): # ... se crea la key ...
					cmds.setKeyframe( self.ActiveNode + attribs[ i ], insert = True, time = ( frame, frame ) )
					frameInfo.SetTranslationKey( i )
				else: # ... se borra la key ...
					#cmds.selectKey( self.ActiveNode + attribs[ i ], add = True, keyframe = True, time = ( frame, frame ) )
					cmds.cutKey( self.ActiveNode + attribs[ i ], time = ( frame, frame ), option = "keys" )
					frameInfo.RemoveTranslationKey( i )
					
				refreshCurve = True
				
		# ...
		if ( refreshCurve ):
			self.CreateCurve()
开发者ID:malandrin,项目名称:maya-scripts,代码行数:27,代码来源:MTRuntimeKeyTransform.py

示例4: 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

示例5: loadHotkeys

 def loadHotkeys(self, defaults=False):
     
     allHotkeys  = hotkeys.getHotkeys()
     hotkeysDict = []
     
     for n, loopHotkey in enumerate(allHotkeys):  
         for loopItem in loopHotkey:
             hotkeysDict.append(loopItem)
             
     
     for loopIndex, loopCommand in enumerate(hotkeysDict):  
         
                   
         command = loopCommand["command"]
         name    = loopCommand["name"] 
         key     = loopCommand["hotkey"]
         alt     = loopCommand["alt"]
         ctl     = loopCommand["ctl"]  
         toolTip = loopCommand["toolTip"]  
         
         if not defaults:
             hotkeyData = aToolsMod.loadInfoWithUser("hotkeys", name) 
             if hotkeyData != None: 
                 key     = hotkeyData[0]
                 alt     = hotkeyData[1]
                 ctl     = hotkeyData[2]
         
         
         cmds.checkBox('ctl%s'%name, edit=True, value=ctl)
         cmds.checkBox('alt%s'%name, edit=True, value=alt)
         cmds.scrollField('key%s'%name, edit=True, text=key)
         
         self.updateHotkeyCheck(name)
开发者ID:Italic-,项目名称:maya-prefs,代码行数:33,代码来源:generalToolsUI.py

示例6: assignCustomMateColorUI

	def assignCustomMateColorUI( self, colorMat = 'RL_SOMECOLOR', col = (1,1,1)):
		mc.columnLayout()
		mc.colorSliderGrp( 'customColorColorSlider', rgb = col )
		mc.checkBox( 'customAlpha_chb', l = 'With Alpha', v = True )
		mc.rowColumnLayout( nc = 2 )
		mc.button( l = 'Create', w = 120, c = self.assignNewMateColorUi )
		mc.button( l = 'Cancel', w = 120, c = self.dismissCustomColorUI )
开发者ID:skarone,项目名称:PipeL,代码行数:7,代码来源:lighterHelperUI.py

示例7: create

 def create(self):
     
     if cmds.window( self.winName, ex=1 ):
         cmds.deleteUI( self.winName, wnd=1 )
     cmds.window( self.winName, title=self.title )
     
     form = cmds.formLayout()
     form_cloneTarget = self.uiCloneTargets.create()
     form_cloneLabel  = self.uiCloneLabel.create()
     chk_shapeOn      = cmds.checkBox( l='Shape On', v=1 )
     chk_connectionOn = cmds.checkBox( l='Connection On', v=0 )
     bt_createClone   = cmds.button( l='C R E A T E   C L O N E', h=25, c = WinA_Cmd.cmdCreateClone )
     cmds.setParent( '..' )
     
     cmds.formLayout( form, e=1,
                      af = [( form_cloneTarget, 'top', 5 ), ( form_cloneTarget, 'left', 5 ), ( form_cloneTarget, 'right', 5 ),
                            ( form_cloneLabel, 'top', 5 ), ( form_cloneLabel, 'left', 5 ), ( form_cloneLabel, 'right', 5 ), 
                            ( chk_shapeOn, 'left', 50 ),
                            ( bt_createClone, 'left', 0 ),( bt_createClone, 'right', 0 )],
                      ac = [( form_cloneLabel, 'top', 10, form_cloneTarget ), 
                            ( chk_shapeOn, 'top', 10, form_cloneLabel ), 
                            ( chk_connectionOn, 'top', 10, form_cloneLabel ), ( chk_connectionOn, 'left', 30, chk_shapeOn ),
                            ( bt_createClone, 'top', 10, chk_connectionOn )] )
     
     cmds.window( self.winName, e=1, wh=[ self.width, self.height ], rtf=1 )
     cmds.showWindow( self.winName )
     
     WinA_Global.ui_clones = self.uiCloneTargets
     WinA_Global.chk_shapeOn = chk_shapeOn
     WinA_Global.chk_connectionOn = chk_connectionOn
开发者ID:jonntd,项目名称:mayadev-1,代码行数:30,代码来源:makeCloneObject.py

示例8: read_windowInfo

 def read_windowInfo():
     
     import cPickle
     import sgBFunction_fileAndPath
     
     sgBFunction_fileAndPath.makeFile( WinA_Global.keyExportInfoFile, False )
     sgBFunction_fileAndPath.makeFile( WinA_Global.cacheExportInfoFile, False )
     sgBFunction_fileAndPath.makeFile( WinA_Global.infoPath, False )
     
     import sgBModel_aniScene
     
     upFolderNum, addPath = sgBModel_aniScene.exportCachePathFromAni
     sceneName = cmds.file( q=1, sceneName=1 )
     sceneFolder = '/'.join( sceneName.split( '/' )[:-1+upFolderNum] )
     cacheExportPath = sceneFolder + addPath
     
     upFolderNum, addPath = sgBModel_aniScene.exportKeyPathFromAni
     sceneName = cmds.file( q=1, sceneName=1 )
     sceneFolder = '/'.join( sceneName.split( '/' )[:-1+upFolderNum] )
     keyExportPath = sceneFolder + addPath
     
     cmds.textField( WinA_Global.exportKeyPath_txf, e=1, tx=keyExportPath )
     cmds.textField( WinA_Global.exportCachePath_txf, e=1, tx=cacheExportPath )
     
     try:
         f = open( WinA_Global.infoPath, 'r' )
         data = cPickle.load( f )
         f.close()
         
         cacheTypeIndex = data[0]
         exportByMatrix = data[1]
         
         cmds.optionMenu( WinA_Global.optionMenu, e=1, sl=cacheTypeIndex )
         cmds.checkBox( WinA_Global.chk_exportByMatrix , e=1, v=exportByMatrix )
     except: return None
开发者ID:jonntd,项目名称:mayadev-1,代码行数:35,代码来源:sgPWindow_file_keyAndCache_export.py

示例9: floatUI

def floatUI():
  # Check to see if window exists
  if cmds.window("PBQuality", exists=True):
    cmds.deleteUI("PBQuality")

  # Create window
  window = cmds.window("PBQuality", title="DPA Playblast", w=300, h=100, mnb=False, mxb=False, sizeable=False)

  # Create a main layout
  mainLayout = cmds.columnLayout(adj=True)
  blastLayout = cmds.columnLayout("blastLayout", p=mainLayout, w=260, adj=False, rs=5, cat=('left', 5))
  cmds.separator(p=blastLayout)

  cmds.text(label="Enter desired playbast quality:", p=blastLayout)
  qualityField = cmds.floatField("playblastValue", p=blastLayout, w=250, min=50, max=100, pre=0, step=1, v=90, ed=True)
  qualitySlider = cmds.floatSlider("playblastPercentage", p=blastLayout, w=250, min=50, max=100, step=1, v=90, dc=updatePercent)
  cmds.separator(p=blastLayout)

  sequenceOption = cmds.checkBox("sequenceOption", label="From Sequence", value=False)
  reviewOption = cmds.checkBox("reviewOption", label="Auto-bot review submission", value=False)
  cmds.separator(p=blastLayout)

  confirmLayout = cmds.rowColumnLayout("confirmLayout", p=mainLayout, w=250, nc=2, rs=(5, 5), co=[(1, 'left', 5), (2, 'right', 5)], cw=[(1, 125), (2, 125)])
  cancelButton = cmds.button("cancelButton", p=confirmLayout, label="Cancel", c="cmds.deleteUI('PBQuality')", w=80, h=30)
  pbButton = cmds.button("pbButton", p=confirmLayout, label="Playblast", c=handlePB, w=100, h=30)
  cmds.separator(p=confirmLayout)

  cmds.showWindow(window)
开发者ID:chippey,项目名称:dpa-pipe,代码行数:28,代码来源:playblast.py

示例10: __init__

 def __init__(self):
     self.name = "pythant"
     self.title = "Pythant"
     #creates the ui window, replacing any existing ui windows
     if (cmds.window(self.name, q=1, exists=1)):
         cmds.deleteUI(self.name)
     self.window = cmds.window(self.name, title=self.title)
     self.form = cmds.columnLayout(adjustableColumn=True, columnAlign="center", rowSpacing=10)
     cmds.intFieldGrp("numAnts", label="Number of ants:", value1=1, cal=[1,"left"])
     cmds.intFieldGrp("startFrame", label="Start frame:", value1=1, nf=1,cal=[1,"left"])
     cmds.intFieldGrp("endFrame", label="End frame:",nf=1,value1=50,cal=[1,"left"])
     cmds.text( label="Select the curves:",align="left")
     cmds.textScrollList("curves",numberOfRows=3,allowMultiSelection=True,h=100)
     cmds.button(label="OK",w=20, align="left",c=self.getCurves)
     cmds.textFieldButtonGrp("groundObj", label="Select the Ground:",buttonLabel='OK', bc=self.getGround,cal=[1,"left"])
     cmds.checkBox("isFlat",label="Is this a flat ground",value=1)        
     cmds.floatSliderGrp("Velocity",field=True, label="Velocity (mm/s):",min=1, max=40,value=20, cal=[1,"left"])        
     #cmds.floatSliderGrp("strideFreq",field=True, label="Stride Frequency:",min=1, max=10,value=5, cal=[1,"left"])        
     cmds.floatSliderGrp("load",field=True, label="Load (mg):",min=0, max=4,value=0, cal=[1,"left"])        
     # cmds.textFieldButtonGrp("force", label="External Force", buttonLabel='OK', bc = self.getForce, cal=[1, "left"])        
     cmds.text( label='The external force is setup with a directional light named forceVector.')
     cmds.text( label='The force magnitude (N) is specified with the custom attribute "Force Magnitude".') 
     cmds.text(label='The lighting direction is the force direction.')
     cmds.button(label='Run', w=100, c=self.accept)        
     cmds.button(label='Reset', w=100, c=self.reset)
     
     
     
     cmds.showWindow(self.window)
     cmds.window(self.window, edit = True, widthHeight=(415, 580))        
开发者ID:shihuiguo,项目名称:pythant,代码行数:30,代码来源:pythant.py

示例11: unfoldBand_window

def unfoldBand_window():
	"""
	This definition creates the 'Unfold Band' main window.
	"""

	cmds.windowPref(enableAll=False)

	if (cmds.window("unfoldBand_window", exists=True)):
		cmds.deleteUI("unfoldBand_window")

	cmds.window("unfoldBand_window",
		title="Unfold Band",
		width=384)

	spacing = 5

	cmds.columnLayout(adjustableColumn=True, rowSpacing=spacing)

	cmds.separator(height=10, style="singleDash")

	cmds.intSliderGrp("divisions_intSliderGrp", label="Divisions", field=True, minValue=0, maxValue=10, fieldMinValue=0, fieldMaxValue=65535, value=2)

	cmds.separator(style="single")

	cmds.columnLayout(columnOffset=("left", 140))
	cmds.checkBox("keepConstructionHistory_checkBox", label="Keep Construction History", v=True)
	cmds.setParent(topLevel=True)

	cmds.separator(height=10, style="singleDash")

	cmds.button("unfoldBand_button", label="Unfold Band!", command=unfoldBand_button_OnClicked)

	cmds.showWindow("unfoldBand_window")

	cmds.windowPref(enableAll=True)
开发者ID:elanifegnirf,项目名称:Snippets,代码行数:35,代码来源:unfoldBand.py

示例12: checkEachEdit

 def checkEachEdit( *args ):
     
     for chk in WinA_Global.checkList:
         if not cmds.checkBox( chk, q=1, v=1 ):
             cmds.checkBox( WinA_Global.chk_all, e=1, v=0 )
             return None
     cmds.checkBox( WinA_Global.chk_all, e=1, v=1 )
开发者ID:jonntd,项目名称:mayadev-1,代码行数:7,代码来源:sgPWindow_file_alembic_import.py

示例13: changeAssetStatus

    def changeAssetStatus(self,stageVar):
        #get asset name
        assetNameVar=cmds.textScrollList('assetTextScroll',q=True,si=True)
        if assetNameVar==None:
            cmds.confirmDialog(icn='warning', t='Error', m='No asset selected from asset list.', button=['Ok'])
            self.populateTable()
            raise StandardError, 'error : no asset selected from asset list'
        assetNameVar=assetNameVar[0]

        #parsing stage and change the status respectively
        if stageVar=='model':
            statusVar=cmds.checkBox('assetTrackModelCheck',q=True,v=True)
            if statusVar==True:
                statusVar=2
            else:
                statusVar=0
            veRegCore.updateAssetRecord(name=assetNameVar,modelStat=statusVar)
        elif stageVar=='shader':
            statusVar=cmds.checkBox('assetTrackShaderCheck',q=True,v=True)
            if statusVar==True:
                statusVar=2
            else:
                statusVar=0
            veRegCore.updateAssetRecord(name=assetNameVar,shaderStat=statusVar)
        elif stageVar=='rig':
            statusVar=cmds.checkBox('assetTrackRigCheck',q=True,v=True)
            if statusVar==True:
                statusVar=2
            else:
                statusVar=0
            veRegCore.updateAssetRecord(name=assetNameVar,rigStat=statusVar)
        self.listLegacyAndPicture()
        return
开发者ID:andrewwillish,项目名称:veRegistrarFileManager,代码行数:33,代码来源:veRegAssetManager.py

示例14: setObjectToShatterCmd

 def setObjectToShatterCmd(self, *args):
     '''
     
     '''
     if not (cmds.draggerContext(self._IScontextTool._mContext, exists = True)):
         
         iMinTime = cmds.playbackOptions(query = True, minTime = True)
         cmds.currentTime(iMinTime, edit = True)       
         
         polySelection = cmds.filterExpand(selectionMask = 12)
         if polySelection:            
             
             if len(polySelection) > 0:                   
                 
                 mBreakNode = cmds.listConnections(polySelection[0], sh = True, type = 'fxBreakGeometry')
                 if not mBreakNode:
                     
                     cmds.button(self._ISaddBtn, edit = True, label = 'Please wait... checking mesh toplogy')
                     self._IScontextTool.checkForNonManifoldMeshes(polySelection[0])
                     cmds.delete(polySelection[0], ch = True)                    
                 
                 self.resetIShatterGUI()
                 self._IScontextTool._mVoroObject = polySelection[0]                
                 cmds.button(self._ISaddBtn, edit = True, label = polySelection[0])
                 cmds.button(self._ISdelBtn, edit = True, enable = True)
                 cmds.button(self._ISprocessBtn, edit = True, enable = True)
                 cmds.checkBox(self._ISborderEdgesCbx, edit = True, enable = True)
                 cmds.checkBox(self._IShideObjectsCbx, edit = True, enable = True)                                                                                                  
                 
         else:
             cmds.confirmDialog(title = 'Oups... IShatter Error', message = 'You must select one mesh object first !', button = 'OK', defaultButton = 'Yes', cancelButton = 'No', dismissString = 'No')            
开发者ID:jeffhong21,项目名称:scripts,代码行数:31,代码来源:IShatterGUI.py

示例15: loadUI

    def loadUI(self, ui_file):
        """
        Loads the UI and does an post-load commands
        """

        # monkey patch the cmds module for use when the UI gets loaded
        cmds.submit_callb = partial(self.get_initial_value, self)
        cmds.do_submit_callb = partial(self.submit, self)

        if cmds.window('SubmitDialog', q=True, ex=True):
            cmds.deleteUI('SubmitDialog')
        name = cmds.loadUI(f=ui_file)

        cmds.textScrollList('layers', e=True, append=self.layers)

        # check for existing projects to determine how project selection should
        # be displayed
        num_existing_projs = cmds.optionMenu('existing_project_name', q=True, ni=True)
        if num_existing_projs == 0:
            cmds.radioButton('existing_project', e=True, en=False)
        else:
            cmds.radioButton('existing_project', e=True, en=True)

        # callbacks
        cmds.checkBox('upload_only', e=True, changeCommand=self.upload_only_toggle)
        cmds.checkBox('distributed', e=True, changeCommand=self.distributed_toggle)
        cmds.optionMenu('renderer', e=True, changeCommand=self.change_renderer)
        cmds.radioButton('new_project', e=True, onCommand=self.select_new_project)
        cmds.radioButton('existing_project', e=True, onCommand=self.select_existing_project)
        self.change_renderer( self.renderer )
        self.select_new_project( True )

        return name
开发者ID:justin-wood,项目名称:zync-maya,代码行数:33,代码来源:zync_maya.py


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