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


Python core.checkBoxGrp函数代码示例

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


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

示例1: update_size_ui

 def update_size_ui(self):
     if self.dock_ui and self.dock[0]:
         kwargs = self.__dock_kwargs()
         kwargs["e"] = True
         pmc.dockControl(self.dock_ui, **kwargs)
     else:
         self.win.setWidthHeight(self.sizes[:2])
     
     paneSizes = []
     tmp = self.sizes[2:8]
     j = 1
     for i in range(0, len(tmp) - 1, 2):
         paneSizes.append([j, tmp[i], tmp[i + 1]])
         j += 1
     pmc.paneLayout(self.main_layout, e=True, paneSize=paneSizes)
     
     pmc.paneLayout(self.script_layout, e=True,
                    paneSize=[
                              [1, self.sizes[8], self.sizes[10]],
                              [2, self.sizes[9], self.sizes[11]],
                              ]
                    )
     
     pmc.checkBoxGrp(self.order_ui, e=True, v1=self.order)
     pmc.checkBoxGrp(self.order_ui, e=True, v2=self.show_doc)
     
     pmc.optionMenuGrp(self.filter_test_ui, e=True, v=self.filter_test)
开发者ID:michimussato,项目名称:PyPELyNE,代码行数:27,代码来源:dockable_sciptwindow.py

示例2: initUI

    def initUI(self):
        pm.setUITemplate("DefaultTemplate", pushTemplate=True)
        form = pm.formLayout()

        binMeshExportPath = pm.optionVar.get('mtap_binMeshExportPath', pm.workspace.path + "/geo/export.binarymesh")
        prefix = pm.optionVar.get('mtap_binMeshExportPathPrefix', "prefix")
        createProxy = pm.optionVar.get('mtap_binMeshCreateProxy', True)
        percentage = pm.optionVar.get('mtap_binMeshPercentage', 0.1)
        createStandin = pm.optionVar.get('mtap_binMeshCreateStandin', True)
        oneFilePerMesh = pm.optionVar.get('mtap_binMeshOneFilePerMesh', False)
        useTransform = pm.optionVar.get('mtap_binMeshUseTransform', False)

        with pm.columnLayout('StandinLayout') as StandinLayout:
            with pm.frameLayout('StandinLayout', label="Standin export options", collapsable=False):
                with pm.columnLayout('StandinColumnLayout'):
                    self.pathUI = pm.textFieldButtonGrp(label="Standin directory", text=binMeshExportPath, buttonLabel="File", buttonCommand=self.fileBrowser)
                    self.prefixUI = pm.textFieldGrp(label="Prefix", text=prefix)
                    self.createProxyUI = pm.checkBoxGrp(label="Create proxy", value1=createProxy)
                    self.percentageUI = pm.floatFieldGrp(label="Percentage", value1=percentage)
                    self.createStdInUI = pm.checkBoxGrp(label="Create StandIn", value1=createStandin)
                    self.oneFilePerMeshUI = pm.checkBoxGrp(label="One File Per Mesh", value1=oneFilePerMesh)
                    self.doTransformUI = pm.checkBoxGrp(label="Use Transform", value1=useTransform)
            with pm.rowColumnLayout(numberOfColumns=2):
                pm.button(label="Create BinaryMesh", c=self.doit)
                pm.button(label="Cancel", c=self.cancel)

        pm.formLayout(form, edit=True, attachForm=[(StandinLayout, 'top', 5), (StandinLayout, 'bottom', 5), (StandinLayout, 'right', 5), (StandinLayout, 'left', 5)])
        pm.setUITemplate("DefaultTemplate", popTemplate=True)
开发者ID:dictoon,项目名称:appleseed-maya,代码行数:28,代码来源:appleseedmenu.py

示例3: KrayRendererUpdateTab

    def KrayRendererUpdateTab(self, dummy=None):
        self.createGlobalsNode()
        #self.updateEnvironment()
        log.debug("KrayRendererUpdateTab()")
        
        sDict = self.rendererTabUiDict['sampling']
        sType = self.renderGlobalsNode.samplingType.get()
        
        if sType != 1: #grid
            pm.intFieldGrp(sDict['gridSize'], edit=True, enable=False)
            pm.checkBoxGrp(sDict['gridRotate'], edit=True, enable=False)
        else:
            pm.intFieldGrp(sDict['gridSize'], edit=True, enable=True)
            pm.checkBoxGrp(sDict['gridRotate'], edit=True, enable=True)

        fType = self.renderGlobalsNode.filtertype.get()
        if fType in [4, 5, 6]:
            pm.floatFieldGrp(sDict['filterSize'], edit=True, enable=False)
        else:
            pm.floatFieldGrp(sDict['filterSize'], edit=True, enable=True)
            
        iFormat = self.renderGlobalsNode.imageFormat.get()    
        if iFormat in [2, 3]:
            pm.attrEnumOptionMenuGrp(sDict['bitdepth'], edit=True, enable=True) 
        else:
            pm.attrEnumOptionMenuGrp(sDict['bitdepth'], edit=True, enable=False) 
            
        if iFormat == 1:
            pm.intFieldGrp(sDict['jpgQuality'], edit=True, enable=True)
        else:
            pm.intFieldGrp(sDict['jpgQuality'], edit=True, enable=False)
开发者ID:MassW,项目名称:OpenMaya,代码行数:31,代码来源:mtkr_initialize.py

示例4: addUIElement

def addUIElement(uiType, attribute, uiLabel, callback, renderGlobalsNodeName):
    ui = None
    if uiType == 'bool':
        ui = pm.checkBoxGrp(label=uiLabel)
        if callback is not None:
            pm.checkBoxGrp(ui, edit=True, cc=callback)
    if uiType == 'int':
        ui = pm.intFieldGrp(label=uiLabel, numberOfFields = 1)
        if callback is not None:
            pm.intFieldGrp(ui, edit=True, cc = callback)
    if uiType == 'float':
        ui = pm.floatFieldGrp(label=uiLabel, numberOfFields = 1)
        if callback is not None:
            pm.floatFieldGrp(ui, edit=True, cc= callback)
    if uiType == 'enum':
        ui = pm.attrEnumOptionMenuGrp(label = uiLabel, at=attribute, ei = getEnumList(attribute)) 
        # attrEnumOptionGrp has no cc callback, so I create a script job
        if callback is not None:
            attribute = pm.Attribute(renderGlobalsNodeName + "." + attribute)
            pm.scriptJob(attributeChange=[attribute, callback], parent=ui)           
    if uiType == 'color':
        ui = pm.attrColorSliderGrp(label=uiLabel, at=attribute)
    if uiType == 'string':
        ui = pm.textFieldGrp(label=uiLabel)
        if callback is not None:
            pm.textFieldGrp(ui, edit=True, cc=callback)
    if uiType == 'vector':
        ui = pm.floatFieldGrp(label=uiLabel, nf=3)
        if callback is not None:
            pm.floatFieldGrp(ui, edit=True, cc=callback)
    return ui
开发者ID:MassW,项目名称:OpenMaya,代码行数:31,代码来源:uiUtils.py

示例5: createCamerasUI

 def createCamerasUI(self, uiDict):
     with pm.columnLayout(adjustableColumn=True, width=400) as uiDict["camerasCL"]:
         for cam in pm.ls(type="camera"):
             pm.checkBoxGrp(
                 label=cam.name(), value1=cam.renderable.get(), cc=pm.Callback(self.switchCamRenderable, cam)
             )
             self.cameras.append(cam.name())
开发者ID:dictoon,项目名称:appleseed-maya,代码行数:7,代码来源:commonglobals.py

示例6: rename

    def rename(self, *args):
        v1 = pm.checkBoxGrp(self.cbFld, q=1, v1=1)
        v2 = pm.checkBoxGrp(self.cbFld, q=1, v2=1)
        if v1 and v2:
            pm.warning('Only select one Type: FK or IK. No action taken.')
            return

        name = pm.textFieldGrp( self.nameFld, q=1, text=1)

        # Rename base control
        baseCnt = pm.PyNode('vks_explicit1')
        baseCnt.rename('%s_baseCnt' % name)

        # Get joints
        pm.select('vks_skin_joint_1', hi=1)
        jnts = pm.ls(sl=1, type='joint')
        count = 1
        for each in jnts:
            pc = each.listConnections(et=1, type='parentConstraint')[0]
            print pc
            pc.rename('%s_joint_%s_parentConstraint' % (name, count))
            each.rename('%s_joint_%s' % (name, count))
            pm.select(each, r=1)
            pm.mel.eval('ToggleLocalRotationAxes;')
            count += 1

        # FK parametric controls
        if v1:
            pm.select('vks_parametric*Shape')
            sel = pm.ls(sl=1)
            count = 1
            for each in sel:
                prnt = each.getParent()
                prnt.rename('%s_cnt_%s' % (name, count))
                count += 1
开发者ID:Mauricio3000,项目名称:MSH_Maya,代码行数:35,代码来源:RigToolsRename.py

示例7: updateCamerasUI

 def updateCamerasUI(self):
     if self.rendererTabUiDict.has_key('common'):            
         uiDict = self.rendererTabUiDict['common']
         pm.deleteUI(uiDict['camerasCL'])
         with pm.columnLayout(adjustableColumn=True, width=400, parent=uiDict['camerasFrame']) as uiDict['camerasCL']:
             for cam in pm.ls(type="camera"):
                 pm.checkBoxGrp(label=cam.name(), value1=cam.renderable.get(), cc=pm.Callback(self.switchCamRenderable, cam))
开发者ID:haggi,项目名称:OpenMaya,代码行数:7,代码来源:commonGlobals.py

示例8: KrayFinalGatheringCreateTab

 def KrayFinalGatheringCreateTab(self):
     log.debug("KrayFinalGatheringCreateTab()")
     self.createGlobalsNode()
     parentForm = pm.setParent(query=True)
     pm.setUITemplate("attributeEditorTemplate", pushTemplate=True)
     scLo = self.rendererName + "PhotonsScrollLayout"
     with pm.scrollLayout(scLo, horizontalScrollBarThickness=0):
         with pm.columnLayout(self.rendererName + "ColumnLayout", adjustableColumn=True, width=400):
             with pm.frameLayout(label="Photons frame", collapsable=True, collapse=False):
                 with pm.columnLayout(self.rendererName + "ColumnLayout", adjustableColumn=True, width=400):
                     ui = pm.floatFieldGrp(label="Threshold:", numberOfFields=1)
                     pm.connectControl(ui, self.renderGlobalsNodeName + ".fgThreshold", index=2)
                     pm.separator()                     
                     ui = pm.intFieldGrp(label="Min Rays:", numberOfFields=1)
                     pm.connectControl(ui, self.renderGlobalsNodeName + ".fgMinRays", index=2) 
                     ui = pm.intFieldGrp(label="Max Rays:", numberOfFields=1)
                     pm.connectControl(ui, self.renderGlobalsNodeName + ".fgMaxRays", index=2) 
                     ui = pm.floatFieldGrp(label="Prerender:", numberOfFields=1)
                     pm.connectControl(ui, self.renderGlobalsNodeName + ".fgPrerender", index=2)                     
                     ui = pm.intFieldGrp(label="Passes:", numberOfFields=1)
                     pm.connectControl(ui, self.renderGlobalsNodeName + ".fgPasses", index=2) 
                     pm.separator()                     
                     ui = pm.floatFieldGrp(label="Sploth Detect:", numberOfFields=1)
                     pm.connectControl(ui, self.renderGlobalsNodeName + ".fgSplotchDetect", index=2)                     
                     ui = pm.floatFieldGrp(label="Sensitivity:", numberOfFields=1)
                     pm.connectControl(ui, self.renderGlobalsNodeName + ".fgSensitivity", index=2)  
                     pm.separator()                     
                     ui = pm.checkBoxGrp(label="FG Reflections:", value1=False)
                     pm.connectControl(ui, self.renderGlobalsNodeName + ".fgReflections", index=2) 
                     ui = pm.checkBoxGrp(label="FG Refractions:", value1=False)
                     pm.connectControl(ui, self.renderGlobalsNodeName + ".fgRefractions", index=2)                   
                     pm.separator()                     
                     ui = pm.floatFieldGrp(label="Spatial Tolerance:", numberOfFields=1)
                     pm.connectControl(ui, self.renderGlobalsNodeName + ".fgSpatialTolerance", index=2)  
                     ui = pm.floatFieldGrp(label="Angular Tolerance:", numberOfFields=1)
                     pm.connectControl(ui, self.renderGlobalsNodeName + ".fgAngularTolerance", index=2)  
                     ui = pm.floatFieldGrp(label="FG Min Dist:", numberOfFields=1)
                     pm.connectControl(ui, self.renderGlobalsNodeName + ".fgDistMin", index=2)  
                     ui = pm.floatFieldGrp(label="FG Dist Max:", numberOfFields=1)
                     pm.connectControl(ui, self.renderGlobalsNodeName + ".fgDistMax", index=2)  
                     ui = pm.floatFieldGrp(label="Density/Brightness:", numberOfFields=1)
                     pm.connectControl(ui, self.renderGlobalsNodeName + ".fgBrightness", index=2)  
                     pm.separator()                     
                     ui = pm.intFieldGrp(label="Path Passes:", numberOfFields=1)
                     pm.connectControl(ui, self.renderGlobalsNodeName + ".fgPathPasses", index=2)  
                     ui = pm.floatFieldGrp(label="Corner Dist:", numberOfFields=1)
                     pm.connectControl(ui, self.renderGlobalsNodeName + ".fgCornerDist", index=2)  
                     ui = pm.checkBoxGrp(label="Show Samples:", value1=False)
                     pm.connectControl(ui, self.renderGlobalsNodeName + ".fgShowSamples", index=2) 
                     
     pm.setUITemplate("attributeEditorTemplate", popTemplate=True)
     pm.formLayout(parentForm, edit=True, attachForm=[ (scLo, "top", 0), (scLo, "bottom", 0), (scLo, "left", 0), (scLo, "right", 0) ])
开发者ID:MassW,项目名称:OpenMaya,代码行数:52,代码来源:mtkr_initialize.py

示例9: animateExportUI

def animateExportUI():
    
    winName = 'animateUI'
    if(pm.window(winName,q=1,ex=1)):
        pm.deleteUI(winName)
    pm.window(winName,ret=1,mb=1)
    pm.columnLayout('columnLayout8',adj=1)
    pm.checkBoxGrp('exportType',ncb=3, label='export Type  :  ', 
                     la3=[':  transform', ':  rotate', ':  custom'])
    pm.textFieldGrp('exportPath',l = 'export Path  :  ',adj = 0,
                      cl2 = ['right','center'],tx = 'asdd')
    pm.button('export',c = 'animateExport()')
    
    pm.showWindow(winName)
开发者ID:RyugasakiHu,项目名称:Maya-tools,代码行数:14,代码来源:animateExport.py

示例10: getData

    def getData(self, *args):
        path = pm.textFieldButtonGrp(self.pathUI, query=True, text=True)
        prefix = pm.textFieldGrp(self.prefixUI, query=True, text=True)
        doProxy = pm.checkBoxGrp(self.createProxyUI, query=True, value1=True)
        percentage = pm.floatFieldGrp(self.percentageUI, query=True, value1=True)
        createStdin = pm.checkBoxGrp(self.createStdInUI, query=True, value1=True)
        oneFilePerMesh = pm.checkBoxGrp(self.oneFilePerMeshUI, query=True, value1=True)
        useTransform = pm.checkBoxGrp(self.doTransformUI, query=True, value1=True)

        pm.optionVar['mtap_binMeshExportPath'] = path
        pm.optionVar['mtap_binMeshExportPathPrefix'] = prefix
        pm.optionVar['mtap_binMeshCreateProxy'] = doProxy
        pm.optionVar['mtap_binMeshPercentage'] = percentage
        pm.optionVar['mtap_binMeshCreateStandin'] = createStdin
        pm.optionVar['mtap_binMeshOneFilePerMesh'] = oneFilePerMesh
        pm.optionVar['mtap_binMeshUseTransform'] = useTransform
开发者ID:dictoon,项目名称:appleseed-maya,代码行数:16,代码来源:appleseedmenu.py

示例11: dimConnections

def dimConnections(element):
    print "DimConnections"
    if element['name'] in ['motionblur']:
        value = pm.checkBoxGrp( element['name'], query = True, v1 = True)
        print element['uielement']
        valueInv = value
        #groups = mantraGlobalsAttributes.mantraGlobalsAttributes
        #if el['name'] in ['xftimesamples', 'geotimesamples', 'motionfactor', 'mbtype']:
        if value:
            print "enabling ctrls"            
        else:
            print "disabling ctrls"
        pm.intFieldGrp('xftimesamples', edit = True, enable = valueInv)
        pm.intFieldGrp('geotimesamples', edit = True, enable = valueInv)
        pm.floatFieldGrp('motionfactor', edit = True, enable = valueInv)
        pm.attrEnumOptionMenu('mbtype', edit = True, enable = valueInv)
        pm.checkBoxGrp('imagemotionblur',  edit = True, enable = valueInv)
开发者ID:MassW,项目名称:OpenMaya,代码行数:17,代码来源:mtm_initialize.py

示例12: setValue

 def setValue(self, value):
     if value == "stdingfilename":
         self.fileName = pm.textFieldButtonGrp("stdingfilename", query=True, text=True)
     if value == "stdinshowpoints":
         self.showPoints = pm.checkBoxGrp("stdinshowpoints", query=True, value1=True)
     if value == "stdinptdensity":
         self.density = pm.floatFieldGrp("stdinptdensity", query=True, value1=True)          
     if value == "stdinptsize":
         self.pointSize = pm.intFieldGrp("stdinptsize", query=True, value1=True)
开发者ID:MassW,项目名称:OpenMaya,代码行数:9,代码来源:mtm_initialize.py

示例13: order_by_ui

 def order_by_ui(self, *args):
     self.order = pmc.checkBoxGrp(self.order_ui, q=True, v1=True)
     
     self.spp_.sort_objects(alphabetical=self.order,
                            filter_str=pmc.textFieldGrp(self.filter_ui, q=True, text=True),
                            filter_test=self.filter_test)
     
     pmc.textScrollList(self.infos_ui, e=True, ra=True)
     pmc.textScrollList(self.infos_ui, e=True, a=[o.repr_ for o in self.spp_.order_obj])
开发者ID:michimussato,项目名称:PyPELyNE,代码行数:9,代码来源:dockable_sciptwindow.py

示例14: AppleseedTranslatorCreateTab

    def AppleseedTranslatorCreateTab(self):
        log.debug("AppleseedTranslatorCreateTab()")
        self.createGlobalsNode()
        parentForm = pm.setParent(query=True)
        pm.setUITemplate("attributeEditorTemplate", pushTemplate=True)
        scLo = self.rendererName + "TrScrollLayout"
        
        with pm.scrollLayout(scLo, horizontalScrollBarThickness=0):
            with pm.columnLayout(self.rendererName + "TrColumnLayout", adjustableColumn=True, width=400):
                with pm.frameLayout(label="Translator", collapsable=True, collapse=False):
                    attr = pm.Attribute(self.renderGlobalsNodeName + ".translatorVerbosity")
                    ui = pm.attrEnumOptionMenuGrp(label="Translator Verbosity", at=self.renderGlobalsNodeName + ".translatorVerbosity", ei=self.getEnumList(attr)) 
                
                with pm.frameLayout(label="{0} export".format(self.rendererName), collapsable=True, collapse=False):
                    ui = pm.checkBoxGrp(label="Export {0} Scene file:".format(self.rendererName), value1=False)
                    pm.connectControl(ui, self.renderGlobalsNodeName + ".exportSceneFile", index=2)
#                     xmlDict = {}
#                     self.rendererTabUiDict['xml'] = xmlDict
#                     defaultXMLPath = pm.workspace.path + "/" + pm.sceneName().basename().split(".")[0] + ".appleseed"
#                     if not defaultXMLPath.dirname().exists():
#                         defaultXMLPath.dirname().makedirs()
#                     with pm.rowLayout(nc=3):
#                         xmlDict['xmlFileText'] = pm.text(label="Export to")
#                         xmlDict['xmlFile'] = pm.textField(text=defaultXMLPath)
#                         pm.symbolButton(image="navButtonBrowse.png", c=self.xmlFileBrowse)
#                         pm.connectControl(xmlDict['xmlFile'], self.renderGlobalsNodeName + ".exportSceneFileName", index=2)
                        
                with pm.frameLayout(label="Optimize Textures", collapsable=True, collapse=False):
                    optiDict = {}
                    ui = pm.checkBoxGrp(label="Use Optimized Textures:", value1=False)
                    pm.connectControl(ui, self.renderGlobalsNodeName + ".useOptimizedTextures", index=2)
                    with pm.rowLayout(nc=3):
                        self.rendererTabUiDict['opti'] = optiDict
                        pm.text(label="OptimizedTex Dir:")
                        optiDict['optiField'] = pm.textField(text=self.renderGlobalsNode.optimizedTexturePath.get())
                        pm.symbolButton(image="navButtonBrowse.png", c=self.dirBrowse)
                        pm.connectControl(optiDict['optiField'], self.renderGlobalsNodeName + ".optimizedTexturePath", index=2)
                        
                with pm.frameLayout(label="Additional Settings", collapsable=True, collapse=False):
                    ui = pm.floatFieldGrp(label="Scene scale:", value1=1.0, numberOfFields=1)
                    pm.connectControl(ui, self.renderGlobalsNodeName + ".sceneScale", index=2)
                         
        pm.setUITemplate("attributeEditorTemplate", popTemplate=True)
        pm.formLayout(parentForm, edit=True, attachForm=[ (scLo, "top", 0), (scLo, "bottom", 0), (scLo, "left", 0), (scLo, "right", 0) ])
开发者ID:Stollentroll1984,项目名称:OpenMaya,代码行数:44,代码来源:mtap_initialize.py

示例15: __init__

 def __init__(self, inst):
     self.armModuleFrame = pm.frameLayout( parent = inst.simpleSetup_layout, w =244, label='simpleArm', borderStyle='out', cll = True, cl = True )
     self.armSide_RBGRP = pm.radioButtonGrp( label='Choose Arm Side', labelArray3=['Left', 'Center', 'Right'], numberOfRadioButtons=3 )
     self.armSpace_RBGRP = pm.radioButtonGrp( label='Choose Arm Space', labelArray3=['Top', 'Middle', 'Bottom'], numberOfRadioButtons=3 )
     self.armAttribute_ChkBoxGRP = pm.checkBoxGrp( parent = self.armModuleFrame, label = 'Arm Attributes   ', cw = ( [ 1, 90 ], [ 2, 70 ], [ 3, 100 ], [ 4, 60 ] ),numberOfCheckBoxes=3, labelArray3=['Stretchy', 'Elbow Pinning', 'Bendy Arms'], v1 = 1, v2 = 1, v3 =  1 )
     
     self.armModulebutton_layout = pm.rowColumnLayout(parent = self.armModuleFrame, nc = 3 )
     self.buildArm_Btn = pm.button(parent = self.armModulebutton_layout, w = 120, h = 24, label="Build Arm", command = self.build_armMod)
     self.mirrorArm_Btn = pm.button( parent = self.armModulebutton_layout, w = 120, h = 24, label = 'Mirror Arm', c = self.exe_MirrorArm )
     self.collapseArmModule_Btn = pm.button( parent = self.armModulebutton_layout, w = 120, h = 24, label = 'Collapse Arm Module', c = self.exe_collapseArmModule )
开发者ID:michaelanieves,项目名称:simpleRig,代码行数:10,代码来源:simRig_armMod_frame.py


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