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


Python core.floatFieldGrp函数代码示例

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


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

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

示例2: addUIElement

 def addUIElement(self, uiType, attribute, uiLabel, callback):
     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 = self.getEnumList(attribute)) 
         # attrEnumOptionGrp has no cc callback, so I create a script job
         if callback is not None:
             attribute = pm.Attribute(self.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)
     return ui
开发者ID:UIKit0,项目名称:OpenMaya,代码行数:27,代码来源:__init__.py

示例3: ui

def ui():
    columnWidth1st = 120

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

    with pm.window('AlembicMasterUI',menuBar=True, s=True):
        with pm.columnLayout(adj=True):
            with pm.frameLayout( label='Export Alembic', mw=3, mh=3,cll=True, bs='etchedIn'):
                with pm.columnLayout(adj=True):
                    with pm.rowLayout(nc=3, adj=2):
                        pm.text(label='file :', w=columnWidth1st, align='right')
                        pm.textField('path_TFG', text="D:/")
                        pm.symbolButton( image='navButtonBrowse.png', c=pm.Callback( browseIt, 'path_TFG', 0, 'Alembic (*.abc)'  ) )
                        
                    with pm.rowLayout(nc=2, adj=2 ):
                        startFrame=pm.animation.playbackOptions(q=1, minTime=1)
                        EndFrame=pm.animation.playbackOptions(q=1, maxTime=1)
                        
                    with pm.rowLayout(nc=2, adj=2):
                        pm.text(l='',w=columnWidth1st)
                        pm.button(l='Export',bgc=(0.19,0.29,0.19),c=pm.Callback(exportScene))
                        
                    pm.radioButtonGrp( 'timeRange_RBG', label='Time range :', 
                        labelArray3=['Camera Setting','Time Slider', 'Start/End'], 
                        numberOfRadioButtons=3, 
                        select=1, 
                        cw = [1,columnWidth1st],
                        on1=pm.Callback( callback_timerangeSelect, 1), 
                        on2=pm.Callback( callback_timerangeSelect, 2),
                        on3=pm.Callback( callback_timerangeSelect, 3),
                        )
                        
                    pm.floatFieldGrp( 'timeRange_FFG', label='Start / End : ', value1=1, value2=24, numberOfFields=2, cw = [1,117], en=False)
            
            with pm.frameLayout( label='Rebuild Scene', mw=3, mh=3,cll=True, bs='etchedIn'):
                with pm.columnLayout(adj=True):
                    with pm.rowLayout(nc=2, adj=2):
                        pm.text(l='',w=columnWidth1st)
                        pm.button(l='New Scene', bgc=(0.24,0.49,0.24), c=pm.Callback(buildscene))
                    
            with pm.frameLayout( label='Import Alembic', mw=3, mh=3,cll=True, bs='etchedIn'):
                with pm.columnLayout(adj=True):
                    with pm.rowLayout(nc=3, adj=2):
                        pm.text(label='file :', w=columnWidth1st, align='right')
                        pm.textField('path_ABC2', text="D:/")
                        pm.symbolButton( image='navButtonBrowse.png', c=pm.Callback( browseIt, 'path_ABC2', 1, 'Alembic (*.abc)' ) )

                    with pm.rowLayout(nc=2, adj=2):
                        pm.text(l='',w=columnWidth1st)
                        pm.button(l='Import', bgc=(0.19,0.19,0.28), c=pm.Callback(importAbcFile))
                        
            with pm.frameLayout( label='Save Scene', mw=3, mh=3,cll=True, bs='etchedIn'):
                with pm.columnLayout(adj=True):
                    with pm.rowLayout(nc=3, adj=2):
                        pm.text(label='file :', w=columnWidth1st, align='right')
                        pm.textField('path_TFG2', text="D:/")
                        pm.symbolButton( image='navButtonBrowse.png', c=pm.Callback( browseIt, 'path_TFG2', 0 ) )
                    with pm.rowLayout(nc=2, adj=2):
                        pm.text(l='',w=columnWidth1st)
                        pm.button(l='Save Scene', w=64, bgc=(0.22,0.23,0.43), c=pm.Callback(saveScene))
开发者ID:kyuhoChoi,项目名称:mayaTools,代码行数:60,代码来源:AlembicMasterExporter_old.py

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

示例5: create

    def create(self):
        if pm.window(self.window, exists=True):
            pm.deleteUI(self.window)
        pm.window(self.window, t=self.title)

        # source & targets
        pm.rowColumnLayout(nc=3,cal=[(1,'right')], cw=[(1,80),(2,200),(3,100)])
        pm.text(l='Source: ')
        self.sourceObjTf = pm.textField()
        pm.button(l='Select', c=self.selectSource)
        pm.text(l='Target(s): ')
        self.targetObjsTf = pm.textField()
        pm.button(l='Select', c=self.selectTarget)
        pm.setParent('..')

        # number
        pm.rowColumnLayout(w=self.size[0])
        self.copyNum = pm.intSliderGrp(l='Copies: ', v=10, cw3=[80,80,220],
                                       min=1, max=500, fmx=5000, f=True)
        pm.separator(h=10, st='in')

        # rotation
        pm.rowColumnLayout(nc=2, cal=[(1,'right')], cw=[(1,80), (2,300)])
        pm.text(l='Rotation: ')
        self.rotationModeRC = pm.radioCollection()
        self.rotBtnFixed = pm.radioButton(l='Fixed', sl=True)
        pm.text(l='')
        self.rotBtnAlign = pm.radioButton(l='Align with Target')
        pm.text(l='')
        self.rotBtnRand = pm.radioButton(l='Random',
                                         onc=lambda *args: self.rotationRange.setEnable(True),
                                         ofc=lambda *args: self.rotationRange.setEnable(False))
        pm.setParent('..')
        self.rotationRange = pm.floatFieldGrp(l='Range: ', nf=3, v1=30, v2=30, v3=30,
                                              cw4=[80,100,100,100], en=False)
        pm.separator(h=10, st='in')

        # scale
        pm.rowColumnLayout(nc=2, cal=[(1,'right')], cw=[(1,80), (2,300)])
        pm.text(l='Scale: ')
        self.scaleModeRC = pm.radioCollection()
        self.scaleBtnFixed = pm.radioButton(l='Fixed', sl=True)
        pm.text(l='')
        self.scaleBtnRand = pm.radioButton(l='Random',
                                           onc=lambda *args: self.scaleRange.setEnable(True),
                                           ofc=lambda *args: self.scaleRange.setEnable(False))
        pm.setParent( '..' )
        self.scaleRange = pm.floatFieldGrp(l='Min Max: ', nf=2, v1=1, v2=1,
                                           cw3=[80,100,100], en=False)
        pm.separator(h=10, st='in')

        # disperse button
        pm.button(l='Disperse', c=self.disperse, w=380, al='center')

        pm.showWindow(self.window)
开发者ID:sundae24,项目名称:Maya,代码行数:55,代码来源:Disperser.py

示例6: exportScene

def exportScene():
    filePath= pm.textField('path_TFG', q=True, text=True )
    #pm.selected()
    #directory = 'C:/Users/Administrator/Desktop/alembic/'
    #fileName = 'B_02'
    deleteUnknownNodes()

    print u'"%s" 로 출력됩니다.' % filePath
    startFrame = pm.floatFieldGrp( 'timeRange_FFG', q=True, value1=True )
    endFrame   = pm.floatFieldGrp( 'timeRange_FFG', q=True, value2=True )
    export( filePath, startFrame, endFrame, 1 )
开发者ID:kyuhoChoi,项目名称:mayaTools,代码行数:11,代码来源:AlembicMasterExporter_old.py

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

示例8: getModuleInstance

    def getModuleInstance(self):
        
        baseNameT = pm.textFieldGrp(self.baseNameT,q = 1,text = 1)
        sideT = pm.textFieldGrp(self.sideT,q = 1,text = 1)
        cntAxisT = pm.textFieldGrp(self.cntAxisT,q = 1,text = 1)
        cntSizeBodyV = pm.floatFieldGrp(self.cntSizeBody,q = 1,value1 = 1)
        cntSizeIkV = pm.floatFieldGrp(self.cntSizeIk,q = 1,value1 = 1)
        segmentN = pm.intFieldGrp(self.segment,q = 1,v = 1)
        mainMetaNode = pm.optionMenu(self.mainMetaNodeM,q = 1,v = 1)

        self.__pointerClass = SpineModule(baseName = baseNameT,side = sideT,bodySize = cntSizeBodyV,ctrlAxis = cntAxisT,
                                          ikSize = cntSizeIkV,segment = segmentN,metaMain = mainMetaNode)
        return self.__pointerClass
开发者ID:RyugasakiHu,项目名称:AT_Rigging,代码行数:13,代码来源:spineModule.py

示例9: main

def main( *args ): 
    if( pm.window('selInvertNormalFace', exists=True) ):
       pm.deleteUI('selInvertNormalFace') 
                  
    uiLayout['window'] = pm.window('selInvertNormalFace', menuBar=True, title='select face with invert normal', sizeable=False, h=60, w=180)
    uiLayout['mainLayout'] = pm.columnLayout(columnAlign='left', columnAttach=['left', 0] )
    
    pm.floatFieldGrp( 'valDir', numberOfFields=3, label='Direction:', value1=0.0, value2=1.0, value3=0.0, cw4=[ 50, 30, 30, 30 ], parent=uiLayout['mainLayout'] )
      
    uiLayout['ui_sub1'] = pm.rowColumnLayout( w=180, nc=2, cw=[(1, 85), ( 2,80 ) ], parent=uiLayout['mainLayout'] )
    pm.floatFieldGrp( 'valOffset', numberOfFields=1, label='Offset:', value1=0.5, cw2=[ 50, 30 ], parent=uiLayout['ui_sub1'] )
    pm.button( label=' Select Face!  ', ebg=True, c=doSelInvNRMFace, parent=uiLayout['ui_sub1'] )   
    
    pm.showWindow( uiLayout['window'] )
开发者ID:kzchen,项目名称:Maya_TD_tools,代码行数:14,代码来源:(+out-of-dated+)autoSelReverseNRM_v0.6.py

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

示例11: MakeVectorField

def MakeVectorField(vectorAttribute, annotation=None):
    """
    Creates & returns an input field, linked to given Vector3Attribute, which allows user to input x,y,z values. 
    
    :param vectorAttribute: Vector3Attribute instance. 
    :param annotation: toolTip annotation, or None.
    """
    if(not isinstance(vectorAttribute, at.Vector3Attribute)):
        raise TypeError("Expected %s, got %s" % (at.Vector3Attribute, type(vectorAttribute)))
    
    rowLayout = MakeRowLayout(2)
    
    MakeText(vectorAttribute.attributeLabel, annotation)
    vectorField = pm.floatFieldGrp(numberOfFields=3, precision=3, columnWidth3=(__MIDDLE_COLUMN_WIDTH__, __MIDDLE_COLUMN_WIDTH__, __MIDDLE_COLUMN_WIDTH__),
                                   value1=vectorAttribute.x, value2=vectorAttribute.y, value3=vectorAttribute.z)
    vectorField.changeCommand(lambda *args: vectorAttribute._setValue(vectorField.getValue()))
    vectorAttribute.updateUiCommand = (lambda *args: vectorField.setValue((vectorAttribute.x, vectorAttribute.y, vectorAttribute.z, 0.0)))
    vectorAttribute.uiEnableMethod = vectorField.setEnable
    if(annotation is not None):
        vectorField.setAnnotation(annotation)
    elif(vectorAttribute.annotation is not None):
        vectorField.setAnnotation(vectorAttribute.annotation)
        
    SetAsChildLayout(rowLayout)
    
    return vectorField
开发者ID:joemuers,项目名称:pyswarm,代码行数:26,代码来源:uiBuilder.py

示例12: getModuleInstance

 def getModuleInstance(self):
     
     cName = pm.textFieldGrp(self.cNameT,q = 1,text = 1)
     side = pm.textFieldGrp(self.sideT,q = 1,text = 1)
     cntSizeV = pm.floatFieldGrp(self.cntSize,q = 1,value1 = 1)
     
     self.__pointerClass = Hierarchy(side,size = cntSizeV,characterName = cName)
     return self.__pointerClass
开发者ID:RyugasakiHu,项目名称:AT_Rigging,代码行数:8,代码来源:hierarchy.py

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

示例14: AppleseedEnvironmentCreateTab

    def AppleseedEnvironmentCreateTab(self):
        self.createGlobalsNode()
        parentForm = pm.setParent(query=True)
        pm.setUITemplate("attributeEditorTemplate", pushTemplate=True)
        scLo = self.rendererName + "AOScrollLayout"
        envDict = {}
        self.rendererTabUiDict['environment'] = envDict
        uiDict = envDict
        with pm.scrollLayout(scLo, horizontalScrollBarThickness=0):
            with pm.columnLayout(self.rendererName + "ColumnLayout", adjustableColumn=True, width=400):
                with pm.frameLayout(label="Environment Lighting", collapsable=False):
                    with pm.columnLayout(self.rendererName + "ColumnLayout", adjustableColumn=True, width=400):
                        attr = pm.Attribute(self.renderGlobalsNodeName + ".environmentType")
                        envDict['environmentType'] = pm.attrEnumOptionMenuGrp(label="Environment Type", at=self.renderGlobalsNodeName + ".environmentType", ei=self.getEnumList(attr))

                with pm.frameLayout(label="Environment Colors", collapsable=False) as envDict['commonEnvFrame']:
                    with pm.columnLayout(self.rendererName + "ColumnLayout", adjustableColumn=True, width=400):
                        ui = pm.floatFieldGrp(label="Environment Intensity:", value1=1.0, numberOfFields=1)
                        pm.connectControl(ui, self.renderGlobalsNodeName + ".environmentIntensity", index=2)
                        envDict['environmentColor'] = pm.attrColorSliderGrp(label="Environment Color:", at=self.renderGlobalsNodeName + ".environmentColor")
                        envDict['gradientHorizon'] = pm.attrColorSliderGrp(label="Gradient Horizon Color:", at=self.renderGlobalsNodeName + ".gradientHorizon")
                        envDict['gradientZenit'] = pm.attrColorSliderGrp(label="Gradient Zenith Color:", at=self.renderGlobalsNodeName + ".gradientZenit")
                        envDict['environmentMap'] = pm.attrColorSliderGrp(label="Environment Map:", at=self.renderGlobalsNodeName + ".environmentMap")
                        self.addRenderGlobalsUIElement(attName='latlongHoShift', uiType='float', displayName='Lat-Long Horizontal Shift:', uiDict=uiDict)
                        self.addRenderGlobalsUIElement(attName='latlongVeShift', uiType='float', displayName='Lat-Long Vertical Shift:', uiDict=uiDict)

                with pm.frameLayout(label="Physical Sky", collapsable=False) as envDict['pysSkyFrame']:
                    with pm.columnLayout(self.rendererName + "ColumnLayout", adjustableColumn=True, width=400):
                        attr = pm.Attribute(self.renderGlobalsNodeName + ".skyModel")
                        envDict['pskModel'] = pm.attrEnumOptionMenuGrp(label="Sky Model:", at=self.renderGlobalsNodeName + ".skyModel", ei=self.getEnumList(attr))
                        uiDict['sunLightOptionMenu'] = pm.optionMenuGrp(label="Sun Light:", changeCommand=self.updateSunLightOptionMenu)
                        envDict['pskGrAlbedo'] = pm.floatFieldGrp(label="Ground Albedo:", value1=1.0, numberOfFields=1)
                        pm.connectControl(envDict['pskGrAlbedo'], self.renderGlobalsNodeName + ".ground_albedo", index=2)
                        envDict['pskGrHShit'] = pm.floatFieldGrp(label="Horizon Shift:", value1=1.0, numberOfFields=1)
                        pm.connectControl(envDict['pskGrHShit'], self.renderGlobalsNodeName + ".horizon_shift", index=2)
                        envDict['pskLumMulti'] = pm.floatFieldGrp(label="Luminance Multiplier:", value1=1.0, numberOfFields=1)
                        pm.connectControl(envDict['pskLumMulti'], self.renderGlobalsNodeName + ".luminance_multiplier", index=2)
                        envDict['pskSatMulti'] = pm.floatFieldGrp(label="Saturation Multiplier:", value1=1.0, numberOfFields=1)
                        pm.connectControl(envDict['pskSatMulti'], self.renderGlobalsNodeName + ".saturation_multiplier", index=2)
                        envDict['pskTurb'] = pm.floatFieldGrp(label="Turbidity:", value1=1.0, numberOfFields=1)
                        pm.connectControl(envDict['pskTurb'], self.renderGlobalsNodeName + ".turbidity", index=2)
                        envDict['pskTurbMin'] = pm.floatFieldGrp(label="Turbidity Min:", value1=1.0, numberOfFields=1)
                        pm.connectControl(envDict['pskTurbMin'], self.renderGlobalsNodeName + ".turbidity_min", index=2)
                        envDict['pskTurbMax'] = pm.floatFieldGrp(label="Turbidity Max:", value1=1.0, numberOfFields=1)
                        pm.connectControl(envDict['pskTurbMax'], self.renderGlobalsNodeName + ".turbidity_max", index=2)

                with pm.frameLayout(label="OSL", collapsable=False) as envDict['oslFrame']:
                    with pm.columnLayout(self.rendererName + "ColumnLayout", adjustableColumn=True, width=400):
                        envDict['environmentOSL'] = pm.attrColorSliderGrp(label="OSL Background", at=self.renderGlobalsNodeName + ".environmentOSL")

        pm.setUITemplate("attributeEditorTemplate", popTemplate=True)
        pm.formLayout(parentForm, edit=True, attachForm=[ (scLo, "top", 0), (scLo, "bottom", 0), (scLo, "left", 0), (scLo, "right", 0) ])
        pm.scriptJob(attributeChange=[self.renderGlobalsNode.environmentType, pm.Callback(self.uiCallback, tab="environment")])
        pm.scriptJob(attributeChange=[self.renderGlobalsNode.skyModel, pm.Callback(self.uiCallback, tab="environment")])
        self.updateEnvironment()
开发者ID:dictoon,项目名称:appleseed-maya,代码行数:55,代码来源:initialize.py

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


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