• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Python core.checkBox函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: multi_BasicSettings

def multi_BasicSettings():
	# Basic Settings
	pm.text(l='', h=5)
	multi_nameField = pm.textFieldGrp('hp3dNameField', l='Name', text='', cw=[2, 150], cc=fun.partial(multi_nameChange, 'hp3dNameField'), fcc=True)

	pm.rowColumnLayout(nc=2)
	pm.text(l='Basic Settings', w=75, al='left', en=False)
	pm.separator(w=marginWidth-75, h=14)
	pm.setParent(multiLight_layout)

	multi_color = pm.colorSliderGrp('hp3dColorSlider', label='Color', rgb=(1, 1, 1), cw=[3, 20], dc=fun.partial(multi_colorChange, '.color', 'all', 'hp3dColorSlider'))
	multi_intensity = pm.floatSliderGrp('hp3dIntensitySlider', label='Intensity', field=True, v=1.000, fmx=1000000000, pre=3, cw=[3, 20], dc=fun.partial(multi_floatChange, '.intensity', 'all', 'hp3dIntensitySlider'))

	# pm.text(l='', h=3) # GUI SPACER
	pm.rowColumnLayout(nc=2)
	pm.text(l='', w=142) # GUI SPACER
	global multi_illDefault_box
	multi_illDefault_box = pm.checkBox(l='Illuminates by Default', v=1, cc=multi_illDefault)
	pm.setParent(multiLight_layout)

	pm.rowColumnLayout(nc=3)
	pm.text(l='', w=142) # GUI SPACER
	multi_emitDiff_box = pm.checkBox('hp3dEmitDiffCheckbox', l='Emit Diffuse', v=1, w=120, cc=fun.partial(multi_checkboxChange, '.emitDiffuse', 'all', 'hp3dEmitDiffCheckbox'))
	multi_emitSpec_box = pm.checkBox('hp3dEmitSpecCheckbox', l='Emit Specular', v=1, cc=fun.partial(multi_checkboxChange, '.emitSpecular', 'all', 'hp3dEmitSpecCheckbox'))
	pm.setParent(multiLight_layout)

	pm.rowColumnLayout(nc=3)
	pm.text(l='Decay Rate', w=140, al='right')
	pm.text(l='', w=3)
	multi_decayRate_menu = pm.optionMenu('hp3dDecayRateMenu', bgc=primary_componentColor, cc=fun.partial(multi_menuChange, '.decayRate', 'not directional', 'hp3dDecayRateMenu'))
	pm.menuItem(l='No Decay', da=0)
	pm.menuItem(l='Linear', da=1)
	pm.menuItem(l='Quadratic', da=2)
	pm.menuItem(l='Cubic', da=3)
	pm.setParent(multiLight_layout)
开发者ID:Huston94,项目名称:Simple_Lights_GUI,代码行数:35,代码来源:simple_lights_GUI.py


示例2: doExecution

def doExecution(*args):
    is_find = pm.checkBox( UI_name[0], q=True, value=True )
    is_fix = pm.checkBox( UI_name[1], q=True, value=True )
    is_fixLayer = pm.checkBox( UI_name[2], q=True, value=True )
    
    shader_info_all_layers = []   
    
    if( is_find ):
        findErrorShape()
    
    if( is_fixLayer ):
        #// collect shaders info in each layer
        shader_info_all_layers = collectShaderInfoInLayer()                        

    if( is_fix ):
        fixComponentShading()
        
        if( is_fixLayer ):
            for shd_layer in shader_info_all_layers:
                
                #// switch to a specified layer
                curr_layer = shd_layer[0]
                pm.editRenderLayerGlobals( currentRenderLayer=curr_layer )
                
                #// parsing string for mesh & shader from list
                #// assign shader to mesh from list
                for shd in shd_layer[1]:                 
                    obj = shd[0]
                    SG = shd[1]
                    pm.sets( SG, edit=True, forceElement=obj )
                    
    pm.editRenderLayerGlobals( currentRenderLayer='defaultRenderLayer' )                          
    return 1
开发者ID:kzchen,项目名称:Maya_TD_tools,代码行数:33,代码来源:fixFaceAssignment_v05.py


示例3: __init__

    def __init__(self):
        title = 'pbRenderableCurve'
        version = 1.02

        if pm.window('pbRCurve', exists=True):
            pm.deleteUI('pbRCurve')

        with pm.window('pbRCurve', title='{0} | {1}'.format(title, version), s=False) as window:
            with pm.columnLayout():
                with pm.frameLayout(l='Selection:', cll=True, bs='out'):
                    with pm.columnLayout():
                        self.selField = pm.textFieldGrp(text='No Curves Selected', ed=False, l='Curve:', cw2=[72, 192])
                        with pm.rowLayout(nc=2):
                            self.bRenderable = pm.checkBox(l='Renderable', cc=self.bcRenderable)

                with pm.frameLayout(l='Mesh Settings:', cll=True, bs='out') as self.meshUI:
                    with pm.columnLayout():
                        with pm.rowLayout(nc=4):
                            self.useNormal = pm.checkBox(l='Use Normal', cc=self.bcUseNormal)
                            self.normalVector = [pm.intField(width=62, en=False, value=0, cc=self.setNormal),
                                                 pm.intField(width=62, en=False, value=1, cc=self.setNormal),
                                                 pm.intField(width=62, en=False, value=0, cc=self.setNormal)]
                        self.meshAttrs = [AttrSlider(maxValue=128, name='Thickness', obj=getCurves, type_='float', fmn=0.0001),
                                          AttrSlider(value=3, minValue=3, maxValue=64, name='Sides', obj=getCurves, fmn=3, fmx=100),
                                          AttrSlider(minValue=1, maxValue=32, name='Samples', obj=getCurves, fmn=1, fmx=128)]

                with pm.frameLayout('Shell Settings:', cll=True, bs='out') as self.shellUI:
                    with pm.columnLayout():
                        self.bShell = pm.checkBox(l='Enable Shell', cc=self.bcShell)
                        self.shellAttrs = [AttrSlider(value=1, minValue=-64, maxValue=64, name='ShellThickness', obj=getCurves, type_='float'),
                                           AttrSlider(value=1, minValue=1, maxValue=64, name='ShellDivisions', obj=getCurves, fmn=1, fmx=32)]

        window.show()
        pm.scriptJob(event=['SelectionChanged', self.refresh], protected=True, p=window)
        self.refresh()
开发者ID:cmcpasserby,项目名称:pbRenderableCurve,代码行数:35,代码来源:pbRenderableCurve.py


示例4: UI_custom

	def UI_custom(self):
		
		numJoints = len(self.jointInfo)
		
		pm.rowLayout(numberOfColumns = 2, columnWidth = [1, 100], adjustableColumn = 2)
		pm.text(label = "Number of Joints: ")
		self.numberOfJointsField = pm.intField(value = numJoints, minValue = 2, changeCommand = self.ChangeNumberOfJoints)
		
		pm.setParent('..')
		
		joints = self.GetJoints()
		self.CreateRotationOrderUIControl(joints[0])
		
		pm.separator(style = 'in')
		
		pm.text(label = "Orientation: ", align = "left")
		pm.rowLayout(numberOfColumns = 3)
		pm.attrEnumOptionMenu(attribute = "%s:module_grp.sao_local" %self.moduleNamespace, label = "Local: ")
		pm.text(label = " will be oriented to ")
		pm.attrEnumOptionMenu(attribute = "%s:module_grp.sao_world" %self.moduleNamespace, label = "World: ")
		
		pm.setParent('..')
		
		pm.separator(style = 'in')
		
		interpolating = False
		if pm.objExists("%s:interpolation_container" %self.moduleNamespace):
			interpolating = True
		
		
		pm.rowLayout(numberOfColumns = 2, columnWidth = [1, 80], adjustableColumn = 2)
		pm.text(label = "Interpolate: ")
		pm.checkBox(label = "", value = interpolating, onCommand = partial(self.SetupInterpolation, True), offCommand = self.DeleteInterpolation)
开发者ID:Shadowtags,项目名称:ModularRiggingTool,代码行数:33,代码来源:spline.py


示例5: __init__

    def __init__(self, opts):
        self.opts = opts
        with pm.frameLayout('Export Meshes (.FBX)', collapsable=True, cl=False, bs='out'):
            with pm.columnLayout(width=250):
                pm.text(l='Export List:')
                pm.separator(height=4)
                self.meshList = pm.textScrollList(height=250, width=250, ams=True, dkc=self._remove)
                with pm.rowColumnLayout(nc=3, cw=[(1, 82), (2, 82), (3, 82)]):
                    pm.button(l='Add', c=self._add)
                    pm.button(l='Remove', c=self._remove)
                    pm.button(l='Clear', c=self._clear)

                with pm.rowColumnLayout(nc=2, cw=[(1, 124), (2,124)]):
                    self.prefix = pm.checkBox(label='Prefix', value=self.opts['prefix'], cc=self.save)
                    self.suffix = pm.checkBox(label='Suffix', value=self.opts['suffix'], cc=self.save)
                    self.prefix_text = pm.textField(en=self.prefix.getValue(), text=self.opts['prefix_text'], cc=self.save)
                    self.suffix_text = pm.textField(en=self.suffix.getValue(), text=self.opts['suffix_text'], cc=self.save)

                pm.text(l='Export Path:')
                with pm.rowColumnLayout(nc=2, cw=[(1, 215), (2, 32)]):
                    self.fbxPath = pm.textField(text=self.opts['fbxPath'], cc=self._pathRefreash)
                    pm.button(l='...', c=self._path)

                with pm.rowColumnLayout(nc=3):
                    self.center = pm.checkBox(label='Move to Orgin', v=self.opts['center'], cc=self.save)
                    self.child = pm.checkBox(label='Export Childern', v=self.opts['child'], cc=self.save)
                    pm.button(l='FBXPreset', c=self._fbxPreset)

                with pm.rowColumnLayout(nc=2, cw=[(1, 124), (2, 124)]):
                    pm.button(l='Selected', c=self._selected)
                    pm.button(l='All', c=self._all)

        self._refresh()
开发者ID:cmcpasserby,项目名称:pbUDK,代码行数:33,代码来源:pbUDK.py


示例6: __init__

    def __init__(self):
        respresets = [4096, 2048, 1024, 512, 256, 128, 64, 32]
        with pm.frameLayout(l='Options', cll=True, cl=False, bs='out'):
            with pm.columnLayout():
                pm.text('Map Size:')
                pm.separator(st='in', width=160, height=8)
                with pm.rowColumnLayout(nc=3, cw=[20, 60]):
                    pm.text(l='Width:')
                    self.width = pm.intField(v=1024, width=42)
                    with pm.optionMenu():
                        for i in respresets:
                            pm.menuItem(l=i)
                    pm.text(l='Height:')
                    self.height = pm.intField(v=1024, width=42)
                    with pm.optionMenu():
                        for i in respresets:
                            pm.menuItem(l=i)
                pm.button(l='Get Map Size')

                pm.separator(st='in', width=160, height=8)
                with pm.columnLayout():
                    self.compSpace = pm.checkBox(l='Retain Component Spaceing',
                                                 cc=lambda *args: pm.texMoveContext('texMoveContext', e=True,
                                                                                    scr=self.compSpace.getValue()),
                                                 v=pm.texMoveContext('texMoveContext', q=True, scr=True))
                    self.pixelUnits = pm.checkBox(l='Transform In Pixels')
开发者ID:aaronfang,项目名称:pbUV,代码行数:26,代码来源:pbUV.py


示例7: __init__

 def __init__(self):
     '''
     # class to sort and give info on shaders
     '''
     
     self.layout = pm.rowColumnLayout(numberOfColumns= 3, columnWidth=([1, 150],
                                             [2, 150], [3, 250]))
     pm.columnLayout()
     pm.text(label= 'Shaders')
     self.shader_list = pm.textScrollList(width= 150, height= 200,
                    selectCommand= pm.Callback(self.update_connections_list))
     pm.button(label= 'Refresh', width= 150,
               command= pm.Callback(self.update_shader_list))
     
     pm.setParent(self.layout)
     pm.columnLayout()
     pm.text(label='Connections')
     self.connections_list = pm.textScrollList(width= 150, height= 200,
                    selectCommand= pm.Callback(self.write_info))
     self.check_box = pm.checkBox(label= 'Select Node')
     
     pm.setParent(self.layout)
     pm.columnLayout()
     pm.text(label='Node Info')
     self.info_field = pm.scrollField(wordWrap= True, width= 250, height= 200)
     
     self.attr_check_box = pm.checkBox(label= 'Show All')
     
     
     self.update_shader_list()
开发者ID:creuter23,项目名称:fs-tech-artist,代码行数:30,代码来源:shader_grading.py


示例8: get_check_box_states_and_run

def get_check_box_states_and_run(*args, **kwargs):
    """Gets the data from UI and runs the script
    """
    freeze = pm.checkBox("FBJ_checkBox1", q=True, v=True)
    apply_to_children = pm.checkBox("FBJ_checkBox2", q=True, v=True)
    selection_list = pm.ls(sl=1, type="joint")
    do_fix(selection_list, freeze, apply_to_children)
    pm.select(selection_list)
开发者ID:sergeneren,项目名称:anima,代码行数:8,代码来源:fix_bound_joint.py


示例9: lcObj_exportObjs

def lcObj_exportObjs(*args, **kwargs):
  ''' Export .obj files from selected geometry, either as one combined file or as individual files per object.  Will recognize and convert poly smooth preview to geometry for export '''
  global prefix
  path = pm.textField(prefix+'_textField_export_path', query=True, text=True)
  objPrefix = pm.textField(prefix+'_textField_prefix', query=True, text=True)
  if objPrefix:
    objPrefix+='_'

  if path:

    sel = pm.ls(sl=True)

    if sel:
      sel = geometry.filterForGeometry(sel)
      print sel

      #undo is the easiest way to work on geometry temporarily
      pm.undoInfo(openChunk=True)

      if pm.checkBox(prefix+'_checkBox_use_smooth', query=True, v=True):
        for obj in sel:
          pm.select(obj)
          #find the objects currently displayed as smooth and create converted poly copies
          if pm.displaySmoothness(q=True, polygonObject=True)[0] == 3:
            pm.mel.performSmoothMeshPreviewToPolygon()

      if pm.checkBox(prefix+'_checkBox_export_indi', query=True, v=True):
        #export objects individually
        for obj in sel:
          pm.select(obj)
          name = str(obj)
          exportString = path+'/'+objPrefix+name+'.obj'
          pm.exportSelected(exportString, force=True, options='groups=1;ptgroups=1;materials=0;smoothing=1;normals=1', type='OBJexport', pr=True, es=True)

      else:
        #export as one object
        pm.select(sel)
        name = ''
        while name == '':
          dialog = pm.promptDialog(title='OBJ Name', message='Enter Name:', button=['OK', 'Cancel'], defaultButton='OK', cancelButton='Cancel', dismissString='Cancel')
          if dialog == 'OK':
            name = pm.promptDialog(query=True, text=True)
            if name:
              exportString = path+'/'+objPrefix+name+'.obj'
              pm.exportSelected(exportString, force=True, options='groups=1;ptgroups=1;materials=0;smoothing=1;normals=1', type='OBJexport', pr=True, es=True)
            else:
              pm.warning("You didn't type a name for your obj")
          if dialog == 'Cancel':
            break

      pm.undoInfo(closeChunk=True)
      pm.undo()
      pm.select(clear=True)

  else:
    pm.warning('Did you specify a path?')
开发者ID:kotchin,项目名称:mayaSettings,代码行数:56,代码来源:lcObjTools.py


示例10: value

 def value(self, value=None):
     """returns or set the check box value
     """
     from pymel.core import checkBox
     if value is not None:
         # set the value
         checkBox(self, e=1, v=value)
     else:
         # get the value
         return checkBox(self, q=1, v=1)
开发者ID:eoyilmaz,项目名称:anima,代码行数:10,代码来源:extension.py


示例11: create

    def create(self):
        
        
        
        self.main_layout = pm.columnLayout(adjustableColumn= True, width= 400)
       
        main_frame = pm.frameLayout( label='%s' % (self.light), collapsable= True)
        pm.frameLayout( label='Light Attributes', collapsable= True)
        pm.attrColorSliderGrp( at='%s.color' % (self.light), columnWidth4= [100, 75, 175, 50])
        pm.attrFieldSliderGrp(at='%s.intensity' % (self.light), columnWidth4= [100, 75, 175, 50])
        pm.attrFieldSliderGrp(at='%s.coneAngle' % (self.light), columnWidth4= [100, 75, 175, 50])
        pm.attrFieldSliderGrp(at='%s.penumbraAngle' % (self.light), columnWidth4= [100, 75, 175, 50])
        pm.attrFieldSliderGrp(at='%s.dropoff' % (self.light), columnWidth4= [100, 75, 175, 50])
        pm.attrEnumOptionMenu( label='Decay Rate', attribute='%s.decayRate' % (self.light) )
        
        pm.setParent(main_frame)
        pm.frameLayout(label= 'Shadows', collapsable= True)
        pm.attrColorSliderGrp( at='%s.shadowColor' % (self.light),
                              columnWidth4= [100, 75, 175, 50])
        self.check_box = pm.checkBox(label= 'Use Ray Trace Shadows',
                        changeCommand= pm.Callback(self.shadows))
        
        self.light_radius = pm.attrFieldSliderGrp( at='%s.lightRadius' % (self.light),
                                enable= False, columnWidth4= [100, 75, 175, 50])
        
        self.shadow_rays = pm.attrFieldSliderGrp( at='%s.shadowRays' % (self.light),
                                enable= False, columnWidth4= [100, 75, 175, 50])
        
        self.ray_depth = pm.attrFieldSliderGrp( at='%s.rayDepthLimit' % (self.light),
                                enable= False, columnWidth4= [100, 75, 175, 50])

        pm.setParent(main_frame)
        pm.frameLayout(label= 'Decay Regions', collapsable= True)
        # useDecayRegions
        decay_regions_value = pm.getAttr('%s.useDecayRegions' % (self.light))
        self.decay_check_box = pm.checkBox(label= 'Use Decay Regions',
                        value= decay_regions_value, 
                    changeCommand= pm.Callback(self.chane_decay_regions))

        pm.attrControlGrp(attribute= '%s.startDistance1' % (self.light))
        pm.attrControlGrp(attribute= '%s.endDistance1' % (self.light))

        pm.attrControlGrp(attribute= '%s.startDistance2' % (self.light))
        pm.attrControlGrp(attribute= '%s.endDistance2' % (self.light))

        pm.attrControlGrp(attribute= '%s.startDistance3' % (self.light))
        pm.attrControlGrp(attribute= '%s.endDistance3' % (self.light))
       
        pm.setParent(main_frame)
        pm.rowColumnLayout(numberOfColumns= 2, columnWidth= [200, 200])
        pm.button(label= 'Select Light', width= 200, command= pm.Callback(self.select))
        pm.button(label= 'Save Preset', width= 200, command= pm.Callback(self.preset))
        pm.button(label= 'Hide', command= pm.Callback(self.hide))
        pm.button(label= 'Show',  command= pm.Callback(self.show))
        return self.main_layout
开发者ID:creuter23,项目名称:fs-tech-artist,代码行数:55,代码来源:lights.py


示例12: placeHighLight

def placeHighLight(*args):
    ### UI setup 
    global UI_name
    UI_name = [ 'txtBtn_light', 'txtBtn_camera', 'txtBtn_object', 'txtBtn_HLitPoint', 'btn_placeHLit', 'chk_interaction' ]
    
    if pm.window( 'winPlaceHLit', exists=True ):
        pm.deleteUI( 'winPlaceHLit', window=True )
        
    ui_layout['window'] = pm.window( 'winPlaceHLit', title='Place Highlight', sizeable=False, h=100, w=250 )
    ui_layout['mainLayout'] = pm.columnLayout( columnAlign='left', columnAttach=['left', 0] )
    
    #// get active camera
    activeViewCamera = getActiveCam()
    
    '''loc_light_probe = pm.createNode('locator', name='light_probe')
    pm.lockNode(loc_light_probe, lock=False)'''

    #// sub layout
    #// sub1
    ui_layout['ui_sub1'] = pm.rowLayout(nc=2, cw=[(1, 210), (2, 40)], p=ui_layout['mainLayout'] )
    pm.textFieldButtonGrp( UI_name[0], label='Light: ', text='', buttonLabel='Pick',editable=False, buttonCommand='pickLit()', cw=[(1,50), (2,120), (3,40)], p=ui_layout['ui_sub1'] )
    pm.button( 'btn_sel_light' ,label='Sel', command=pm.Callback( doSelItem, UI_name[0] ), p=ui_layout['ui_sub1'] )
    
    #// sub2
    ui_layout['ui_sub2'] = pm.rowLayout(nc=2, cw=[(1, 210), (2, 40)], p=ui_layout['mainLayout'] )
    pm.textFieldButtonGrp( UI_name[1], label='Camera: ', text=activeViewCamera, buttonLabel='Pick', editable=False, buttonCommand='pickCam()', cw=[(1,50), (2,120), (3,40)], p=ui_layout['ui_sub2'] )
    pm.button( 'btn_sel_camera' ,label='Sel', command=pm.Callback( doSelItem, UI_name[1] ), p=ui_layout['ui_sub2'] )
    
    #// sub3
    ui_layout['ui_sub3'] = pm.rowLayout(nc=2, cw=[(1, 210), (2, 40)], p=ui_layout['mainLayout'] )
    pm.textFieldButtonGrp( UI_name[2], label='Object: ', text='', buttonLabel='Pick', editable=False, buttonCommand='pickTgtObj()', cw=[(1,50), (2,120), (3,40)], p=ui_layout['ui_sub3'] )
    pm.button( 'btn_sel_obj' ,label='Sel', command=pm.Callback( doSelItem, UI_name[2] ), p=ui_layout['ui_sub3'] )
    
    #// sub4
    ui_layout['ui_sub4'] = pm.rowLayout(nc=2, cw=[(1, 210), (2, 40)], p=ui_layout['mainLayout'] )    
    pm.textFieldButtonGrp( UI_name[3], label='Point: ', text='', buttonLabel='Pick', editable=False, buttonCommand='pickHLitPt()', cw=[(1,50), (2,120), (3,40)], p=ui_layout['ui_sub4'] )
    pm.button( 'btn_sel_point' ,label='Sel', command=pm.Callback( doSelItem, UI_name[3] ), p=ui_layout['ui_sub4'] )
    
    #// sub5
    ui_layout['ui_sub5'] = pm.rowLayout(nc=2, cw=[(1, 70), (2, 50)], p=ui_layout['mainLayout'] )
    pm.button( UI_name[4] ,label='Place Light!', command='doPlaceHLight()', p=ui_layout['ui_sub5'] )    
    pm.checkBox( UI_name[5], label='interactive mode', onCommand=pm.Callback( doInteractionON ), offCommand=pm.Callback( doInteractionOFF ), p=ui_layout['ui_sub5'] )
    
    
    pm.showWindow( ui_layout['window'] )
    
    pm.spaceLocator( name='light_probe' )
    pm.lockNode( 'light_probe', lock=True )
    pm.textFieldButtonGrp( 'txtBtn_HLitPoint', edit=True, text='light_probe' )
    
    #// clean make live and scriptJob after exit script
    pm.scriptJob( uiDeleted=[ ui_layout['window'], pm.Callback( flushScript ) ] )
开发者ID:kzchen,项目名称:Maya_TD_tools,代码行数:52,代码来源:placeHlighLight_v16.py


示例13: checkbox_state

                    def checkbox_state(*args):
                        check_cnt = 0
                        while pm.checkBox('%s%s' % ('shotCheckBox', str(check_cnt)), ex=1):
                            check_cnt += 1

                        for k in range(0, check_cnt):
                            state = pm.checkBox('shotCheckBox%s' % str(k), q=1, v=1)
                            if not state:
                                pm.textField('%s%s' % (shot_num_name, str(k)), e=1, en=0)
                                pm.textField('%s%s' % (shot_name_name, str(k)), e=1, en=0)
                            else:
                                pm.textField('%s%s' % (shot_num_name, str(k)), e=1, en=1)
                                pm.textField('%s%s' % (shot_name_name, str(k)), e=1, en=1)
开发者ID:eoyilmaz,项目名称:anima,代码行数:13,代码来源:previs.py


示例14: toggleEnable

def toggleEnable(control, *args):
    
    # Get the state of the control
    state = pc.checkBox(uiWidgets[control], q=1, enable=1)
    
    if (state):
        # If enabled, we grey it
        state = pc.checkBox(uiWidgets[control], edit=1, enable=0)
        # Button update
        pc.button(uiWidgets[control+'Button'], edit=1, label='Unlock')
        
    else:
        state = pc.checkBox(uiWidgets[control], edit=1, enable=1)
        pc.button(uiWidgets[control+'Button'], edit=1, label='Lock')
开发者ID:ma55acre,项目名称:MayaDev,代码行数:14,代码来源:render_renderstats.py


示例15: __init__

    def __init__(self, title, widthHeight, tabs_names, frameLayoutPerTab, collapseStyle=0, descr=''):
        super(Exporter, self).__init__(title, widthHeight, tabs_names, frameLayoutPerTab)
        self.localProject = os.environ[ 'MAYA_PROJECT' ]
        self.localUser=os.environ[ 'USER' ]
        self.path = os.path.join(self.localProject+ "/export/GEO")
        self.scene_name = cmds.file(q=True, sn=True, shn=True).split('.')[0]
        self.folder_path = os.path.join(self.path, 'OBJ', self.localUser, self.scene_name)
        self.type = 'OBJ'
        self.extension = 'obj'
        self.curFr=1001
        # GUI BUILDING #
        self.fl = self.frameLayouts[0][0].columnLayout
        col = pm.columnLayout(p=self.fl, h=self.wh[1]/2)
        flow_1=pm.flowLayout(p=col, w=self.wh[0])
        self.type_om = win.AW_optionMenu(label="File Type",
                                         options=['OBJ','ZBRUSH', 'MUDBOX', 'FBX', 'MB', 'MA', 'ALEMBIC'],
                                         parent=flow_1,
                                         cc=self._updateDirectory)
        self.autoCheck = pm.checkBox(l='Auto-detect Folder', p=flow_1, v=1)
        
        pm.flowLayout(p=col, w=self.wh[0])
        pm.text(l='Directory:')
        self.path_tf=pm.textField(w=self.wh[0]/1.3,cc=self._update_path_tf)
        pm.button(label='Browse',w=80, c=self._browser, bgc=self.col_fls[1])
        
        self.path_tf.setText(self.folder_path)

        flow_3 = pm.flowLayout(w=self.wh[0], p=col)
        self.combined_cb = pm.checkBox(l='Export Per Object', v=1, cc=self._change_combined_cb, p=flow_3)
        pm.text(l='Combined Name:',p=flow_3,w=200)
        self.combined_tf = pm.textField(tx='', p=flow_3,w=300, editable=False)
        
        flow_4 = pm.flowLayout(w=self.wh[0],p=col)
        self.framesCheck = pm.checkBox(l='Frame Range', w=200,p=flow_4, v=0, cc=self._framesCallback)
        self.fr_st = pm.textField(editable=False,w=100,tx=str(int(pm.playbackOptions(ast=True, q=True))),p=flow_4)
        self.fr_end = pm.textField(editable=False,w=100,tx=str(int(pm.playbackOptions(aet=True, q=True))),p=flow_4)
        
        pm.text(l='\n', p=col)
        flow_col = pm.flowLayout(p=col, w=self.wh[0])
        col_1 = pm.columnLayout(p=flow_col, w=self.wh[0]/2)
        col_2 = pm.columnLayout(p=flow_col, w=self.wh[0]/2)
        self.export_btn = pm.button(label='Export', bgc=self.col_fls[4], c=self._export, p=col_1, w=self.wh[0]/4)
        
        flow_5 = pm.flowLayout(w=self.wh[0],p=col_2)
        self.recursiveCheck = pm.checkBox(l='Check all folders inside', v=1, p=flow_5)
        self.list_btn = pm.button(label='List Files in Directory', bgc=self.col_fls[5], c=partial(self._getDirectoryFiles,True), p=flow_5, w=self.wh[0]/4)
        
        self.import_btn = pm.button(label='Import Directory', bgc=self.col_fls[5], c=self._customImport, p=col_2, w=self.wh[0]/2.5)
        pm.text(l='\n',p=col)
        pm.button(label='Swap Namespace with Name', bgc=self.col_fls[6], c=self._swapNamespace, p=col_2,w=self.wh[0]/2.5)
开发者ID:AndresMWeber,项目名称:aw,代码行数:50,代码来源:aw_exporter.py


示例16: __init_window__

 def __init_window__(self):
     self.window = pm.window(menuBar=False, widthHeight=[200, 100], title="PYMHUD by Daniel S�nchez Quir�s")
     self.columna = pm.columnLayout(adjustableColumn=True)
     # Name row
     self.row1 = pm.rowLayout(numberOfColumns=3, adjustableColumn=True, parent=self.columna)
     pm.text("Name:", al="left", parent=self.row1)
     self.nameQ = pm.textField(parent=self.row1)
     pm.checkBox(
         label="", parent=self.row1, offCommand=Callback(self.nameHud, False), onCommand=Callback(self.nameHud, True)
     )
     # Scene row
     self.row2 = pm.rowLayout(numberOfColumns=3, adjustableColumn=True, parent=self.columna)
     pm.text("Scene Name:", al="left")
     self.sceneNameQ = pm.textField(parent=self.row2)
     pm.checkBox(
         label="",
         parent=self.row2,
         offCommand=Callback(self.sceneHud, False),
         onCommand=Callback(self.sceneHud, True),
     )
     # Date row
     self.row3 = pm.rowLayout(numberOfColumns=3, adjustableColumn=True, parent=self.columna)
     pm.text("Date:", al="left")
     pm.checkBox(
         label="", parent=self.row3, offCommand=Callback(self.dateHud, False), onCommand=Callback(self.dateHud, True)
     )
     # rame counter row
     self.row4 = pm.rowLayout(numberOfColumns=3, adjustableColumn=True, parent=self.columna)
     pm.text("Frame Counter:", al="left")
     pm.checkBox(label="", parent=self.row4, offCommand=Callback(self.frameHud), onCommand=Callback(self.frameHud))
     pm.showWindow(self.window)
开发者ID:danimanimal,项目名称:PYMHUD,代码行数:31,代码来源:pymhud.py


示例17: _buildPrefUi

    def _buildPrefUi(self):
       
        # delete previous UI
        if pmc.window(self.uiPrefName, exists=True):
            pmc.deleteUI(self.uiPrefName, window=True)
     
     
        # create UI
        self.uiPref['win']          = pmc.window(self.uiPrefName, title=self.uiPrefTitle, menuBar=True, width=300, height=200, sizeable=False)

        self.uiPref['mainLay']      = pmc.columnLayout()
        self.uiPref['titleTxt']     = pmc.text(label='Preferences', backgroundColor=[0,0,0], enableBackground=True, height=20, width=200)
       
        self.uiPref['optLay']       = pmc.rowLayout(numberOfColumns=2, columnWidth2=(125, 75))
        self.uiPref['optTxt']       = pmc.text(label='Format filter')
       
        self.uiPref['chkLay']       = pmc.columnLayout()
        
        v=False
        if '.obj' in self.filtersList:
            v=True
        self.uiPref['objChb']       = pmc.checkBox(label='Obj', value=v)
        v=False
        if '.ma' in self.filtersList:
            v=True
        self.uiPref['maChb']        = pmc.checkBox(label='Ma', value=v)
        v=False
        if '.mb' in self.filtersList:
            v=True
        self.uiPref['mbChb']        = pmc.checkBox(label='Mb', value=v)
        v=False
        if '.fbx' in self.filtersList:
            v=True
        self.uiPref['fbxChb']       = pmc.checkBox(label='Fbx', value=v)
        
        pmc.setParent('..')
        pmc.setParent('..')
        
        pmc.rowLayout(numberOfColumns=2, columnWidth2=(100, 100))
        self.uiPref['cancelBtn'] = pmc.button(label='Cancel', height=30, width=95)
        self.uiPref['saveBtn']   = pmc.button(label='Save',   height=30, width=95)
        
        
        # command
        self.uiPref['cancelBtn'].setCommand(pmc.Callback(self._deletePrefUi))
        self.uiPref['saveBtn'].setCommand(pmc.Callback(self._getNewFilter))
        
        
        # show main ui
        pmc.showWindow(self.uiPref['win'])
开发者ID:loichuss,项目名称:maya,代码行数:50,代码来源:test.py


示例18: create_ui

 def create_ui(self):
     self.layout = pm.columnLayout(adjustableColumn= True)
     self.root_joint = pm.checkBox(label='Create Root Joint')
     self.export = pm.checkBox(label='Export When Finished')
     self.delete = pm.checkBox(label='Delete When Finished')
     self.visibility = pm.checkBox(label='Visibility State', value= 1)
     self.start_end_fields = pm.intFieldGrp( numberOfFields=2,
                     label=u'Start & End Frames', value1=0, value2=100,
                     columnWidth3= [105,90,90])
     pm.text(label= '')
     pm.button(label= 'Bake Simulation', height= 190,
                         command= pm.Callback(self.bake_simulation))
     
     return self.layout
开发者ID:creuter23,项目名称:fs-tech-artist,代码行数:14,代码来源:rigid_body.py


示例19: binMeshTranslatorOpts

def binMeshTranslatorOpts(parent, action, initialSettings, resultCallback):
    print "Parent", parent
    print "Action", action
    print "InitialSettings", initialSettings
    print "ResultCallback", resultCallback
    
    useTransform = True
    oneFilePerMesh = False
    createProxies = True
    proxyRes = 0.1
    exportDir = ""
    
    if initialSettings is not None and len(initialSettings) > 0:
        #oneFilePerMesh=0;createProxies=1;proxyRes=0.1;exportDir=;createProxies=1
        opts = initialSettings.split(";")
        for opt in opts:
            name, value = opt.split("=")
            if name == "oneFilePerMesh":
                oneFilePerMesh = int(value)
            if name == "createProxies":
                createProxies = int(value)
            if name == "useTransform":
                useTransform = int(value)
            if name == "proxyRes":
                proxyRes = float(proxyRes)
                
    if action == "post":
        print "post action"
        
        pm.setParent(parent)
        with pm.columnLayout(adj = True):
            pm.checkBox("MSH_OPTS_DOTRANSFORM", label = "Use Transform", v=useTransform)
            pm.checkBox("MSH_OPTS_ONEFILE", label = "One File Per Mesh", v=oneFilePerMesh)
            pm.checkBox("MSH_OPTS_DOPROX", label = "Create ProxyFiles", v=createProxies)
            pm.floatFieldGrp("MSH_OPTS_PROXPERC", label="Proxy Resolution", v1 = proxyRes)
            #pm.textFieldGrp("MSH_OPTS_PATH", label="ExportDir:", text=exportDir) 
        
    if action == "query":
        resultOptions = ""
        print "Query action"
        oneFilePerMesh = pm.checkBox("MSH_OPTS_ONEFILE", query=True, v=True)
        resultOptions += "oneFilePerMesh={0}".format(int(oneFilePerMesh))
        doProx = pm.checkBox("MSH_OPTS_DOPROX", query=True, v=True)
        resultOptions += ";createProxies={0}".format(int(doProx))
        proxyRes = pm.floatFieldGrp("MSH_OPTS_PROXPERC", query=True, v1 = True)
        resultOptions += ";proxyRes={0}".format(proxyRes)
        #exportDir = pm.textFieldGrp("MSH_OPTS_PATH", query=True, text = True)
        #resultOptions += ";exportDir='{0}'".format(exportDir)
        doTransform = pm.checkBox("MSH_OPTS_DOTRANSFORM", query=True, v=True)
        resultOptions += ";useTransform={0}".format(int(doTransform))
        
        melCmd = '{0} "{1}"'.format(resultCallback,resultOptions)
        pm.mel.eval(melCmd)
        
    return 1
开发者ID:MassW,项目名称:OpenMaya,代码行数:55,代码来源:binMeshTranslator.py


示例20: lcObjToolsUI

def lcObjToolsUI(dockable=False, *args, **kwargs):
  ''' '''
  global prefix
  ci = 0 #color index iterator
  windowName = 'lcObjTools'
  shelfCommand = 'import lct.src.lcObjTools.lcObjTools as lcObj\nreload(lcObj)\nlcObj.lcObjToolsUI()'
  icon = basePath+'lcObjTools.png'
  winWidth  = 204
  winHeight = 158
  
  mainWindow = lcWindow(windowName=windowName, width=winWidth, height=winHeight, icon=icon, shelfCommand=shelfCommand, annotation=annotation, dockable=dockable, menuBar=True)
  mainWindow.create()

  #
  pm.columnLayout(prefix+'_columLayout_main')

  #
  pm.rowColumnLayout(nc=2, cw=([1,150], [2,50]) )
  pm.textField(prefix+'_textField_export_path', w=150)
  pm.button(prefix+'_button_browse_path', l='Browse', bgc=colorWheel.getColorRGB(ci), annotation='Choose an export directory', w=50, command=lambda *args: path.browsePathTextField(prefix+'_textField_export_path', "Wavefront Obj (*.obj)", 'Obj Export Location') )
  ci+=1
  pm.setParent(prefix+'_columLayout_main')

  #
  pm.checkBox(prefix+'_checkBox_export_indi', l='Export Individual', v=False)
  pm.checkBox(prefix+'_checkBox_use_smooth', l='Use Smooth Preview', v=True)

  #
  pm.rowColumnLayout(nc=2, cw=([1,100], [2,100]) )
  pm.textField(prefix+'_textField_prefix', w=100)
  pm.text(l='   Prefix_', al='left')
  pm.setParent(prefix+'_columLayout_main')

  #
  pm.rowColumnLayout(nc=2, cw=([1,169], [2,31]) )
  pm.columnLayout(w=169)
  pm.button(prefix+'_button_export', l='Export OBJ', bgc=colorWheel.getColorRGB(ci), annotation='Export the selected geometry', w=168, h=30, command=lambda *args: lcObj_exportObjs() )
  ci+=1
  pm.button(prefix+'_button_Import', l='Import Multiple OBJs', bgc=colorWheel.getColorRGB(ci), annotation='Clean import more than one obj', w=168, h=20, command=lambda *args: lcObj_importMultiple() )
  ci+=1
  pm.setParent('..')
  pm.columnLayout(w=31)
  pm.iconTextButton(prefix+'_button_open_folder', style='iconOnly', image=iconBasePath+'folder_30x50.png', annotation='Open the export folder', w=30, h=50, command=lambda *args: path.openFilePath(pm.textField(prefix+'_textField_export_path', query=True, text=True) ) )
  ci+=1
  
  #
  mainWindow.show()
  
  plugin.reloadPlugin(plugin='objExport', autoload=True)
开发者ID:kotchin,项目名称:mayaSettings,代码行数:49,代码来源:lcObjTools.py



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Python core.group函数代码示例发布时间:2022-05-27
下一篇:
Python core.button函数代码示例发布时间:2022-05-27
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap