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


Python core.textFieldGrp函数代码示例

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


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

示例1: rh_dynamicJoint

def rh_dynamicJoint():
    #Create a variable for the window name
    winName = 'DynamicJoint'
    winTitle = 'rh_DynamicJoint_prototype_v0.23'
    #Delete the window if it exists
    if pm.window(winName, exists = True):
        pm.deleteUI(winName, window = True)
    #Build the main window
    pm.window(winName, title = winTitle, sizeable = True)
    #name field
    pm.textFieldGrp('NameTFG',label = 'Set up name:', text = 'Ribbon45hp', ed = True)
    pm.columnLayout(adjustableColumn = True)
    #side
    pm.radioButtonGrp('ColSel',nrb = 3,label = 'Side:',la3 = ['l','m','r'],sl = 1)    
    pm.columnLayout(adjustableColumn = True)
    #axis
    pm.radioButtonGrp('AxisSel',nrb = 3,label = 'Axis:',la3 = ['x','y','z'],sl = 1)    
    pm.columnLayout(adjustableColumn = True)
    #ccSize
    pm.floatSliderGrp('Cc_Size',label = 'Control Size:',f = True,min = 1,max = 10,fmn = 1,fmx = 100,v = 1)
    pm.columnLayout(adjustableColumn = True)
    #joint number
    pm.intSliderGrp('Joint_Num',label = 'Number Of Joints:',f = True,min = 4,max = 49,fmn = 1,fmx = 100,v = 4)
    pm.columnLayout(adjustableColumn = True)
    
    #inbound
    pm.button(label = 'Ready For Tasking', command = 'inbound()')
    pm.columnLayout(adjustableColumn = True)
    #bringTheRain
    pm.button(label = 'Target Acquire', command = 'bringTheRain()')
    pm.columnLayout(adjustableColumn = True)    
    
    #Show the window
    pm.showWindow(winName)
    pm.window(winName, edit = True, width = 378, height = 210)
开发者ID:RyugasakiHu,项目名称:Maya-tools,代码行数:35,代码来源:rh_dynamicJoint.py

示例2: __init__

 def __init__(self):
     winName = 'SineRigWin333'
     if pm.window(winName, exists=1):
         pm.deleteUI(winName,window=1)
     win = pm.window(winName, t='SineRig')
     
     pm.columnLayout(adj=1)
     pm.text('X Axis should be joint chain aim axis.')
     # Control
     self.cnt_fld = pm.textFieldButtonGrp(l='Control',bl='Load')
     pm.textFieldButtonGrp( self.cnt_fld, e=1, bc=lambda: pm.textFieldButtonGrp(self.cnt_fld,e=1,text=pm.ls(sl=1)[0]) )
     
     # Name
     self.name_fld = pm.textFieldGrp(l='Name')
     
     # Base jnt
     self.base_fld = pm.textFieldButtonGrp(l='Base Joint',bl='Load')
     pm.textFieldButtonGrp( self.base_fld, e=1, bc=lambda: pm.textFieldButtonGrp(self.base_fld,e=1,text=pm.ls(sl=1)[0]) ) 
     
     # Tip jnt
     self.tip_fld = pm.textFieldButtonGrp(l='Tip Joint',bl='Load')
     pm.textFieldButtonGrp( self.tip_fld, e=1, bc=lambda: pm.textFieldButtonGrp(self.tip_fld,e=1,text=pm.ls(sl=1)[0]) )        
     
     # Create button
     pm.button(l="Create",c=self.createRig)
     
     ##### Development Aide
     pm.textFieldButtonGrp(self.cnt_fld,e=1,text='TopFin_Base_ctrlA')
     pm.textFieldGrp(self.name_fld,e=1,text='Fin')
     pm.textFieldButtonGrp(self.base_fld,e=1,text='TopFinA_jnt_1')        
     pm.textFieldButtonGrp(self.tip_fld,e=1,text='TopFinA_jnt_12')        
     
     pm.showWindow(win)
开发者ID:Mauricio3000,项目名称:MSH_Maya,代码行数:33,代码来源:SineRig_ui.py

示例3: renaming

def renaming():
    preName = pm.textFieldGrp('pre',q = 1,tx = 1)
    
    sideB = pm.radioButtonGrp('side',q = 1,sl = 1)
    sideList = ['l','r','m']
    
    objName = pm.textFieldGrp('obj',q = 1,tx = 1)
    startNum = pm.textFieldGrp('starNum',q = 1,tx = 1)
    paddingNum = pm.textFieldGrp('paddingNum',q = 1,tx = 1)
    suffixName = pm.textFieldGrp('suffix',q = 1,tx = 1)
    jointEnd = pm.checkBox('je',q = 1,v = 1)
    
    sels = pm.ls(sl = 1)
    
    for num,sel in enumerate(sels):
    
        if len(str(startNum)) < paddingNum:
            number = str(0) + str(startNum)
        
        preNames = ''
        
        if preName != '':
            preNames = preName + '_'
            
        name = preNames + objName + '_' + sideList[sideB] + '_' + number + '_' + suffixName
         
        pm.rename(sel,name)
    
        if jointEnd == 1:
            name = preNames + objName + '_' + sideList[sideB] + '_' + number + '_' + 'je'
            pm.rename(sels[-1],name)
            print name
        startNum = int(startNum) + 1
开发者ID:RyugasakiHu,项目名称:Maya-tools,代码行数:33,代码来源:renamer.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: 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

示例6: multi_nameChange

def multi_nameChange(component, *args):
	sel_lights = pm.ls(sl=True, lights=True, dag=True)

	newName = pm.textFieldGrp(component, q=True, text=True)
	newName = re.sub('\s+', '_', newName)

	for light in sel_lights:
		trans = pm.listRelatives(light, parent=True, fullPath=True)[0]
		pm.rename(trans, newName)

	pm.textFieldGrp(component, e=True, text='')
	refreshWindow(*args)
开发者ID:Huston94,项目名称:Simple_Lights_GUI,代码行数:12,代码来源:simple_lights_GUI.py

示例7: _newAssetInfoConfirmed

 def _newAssetInfoConfirmed(self, args):
     sceneName = _pmCore.textFieldGrp(self._sceneName, query=True, text=True)
     directory = _pmCore.textFieldGrp(self._filePath, query=True, text=True)
     description = _pmCore.scrollField(self._description, query=True, text=True)
     category = _pmCore.optionMenuGrp(self._category, value=True, query=True)
     if not sceneName or not directory or not description:
         _pmCore.confirmDialog(title='Invalid Asset Info', message='Asset info for "Scene Name", "Directory" and "Description" can not be empty.', button='OK')
         return
     self._newAssetInfoClose()
     fileID = _MayaFunctions.saveScene(sceneName, directory, description, category)
     if self._addedCallback:
         self._addedCallback(fileID, category)
开发者ID:juewang,项目名称:AssetManager2,代码行数:12,代码来源:MayaUI.py

示例8: update_velocity_grid_export

 def update_velocity_grid_export(self, param_name):
     grp = "OpenVDBVelocityGrids"
     attr_value = pm.getAttr(param_name)
     pm.textFieldGrp(grp, edit=True,
                     text="" if attr_value is None else attr_value,
                     changeCommand=lambda val: pm.setAttr(param_name, val))
     pm.scriptJob(parent=grp,
                  replacePrevious=True,
                  attributeChange=[param_name,
                                   lambda: pm.textFieldGrp(grp, edit=True,
                                                           text=pm.getAttr(param_name))])
     self.setup_velocity_grid_popup(grp, param_name)
开发者ID:redpawfx,项目名称:openvdb-render,代码行数:12,代码来源:AEvdb_visualizerTemplate.py

示例9: __init__

    def __init__(self, mainUI):
        self.mainUI = mainUI
        with pm.window(title='Create') as self.window:
            with pm.columnLayout():
                self.name = pm.textFieldGrp(label='Name:')
                self.value = pm.textFieldGrp(label='Value:')

                with pm.rowColumnLayout(nc=2):
                    pm.button(label='create', c=self._apply)
                    pm.button(label='Cancel', c=self._cancel)

        self.window.show()
开发者ID:cmcpasserby,项目名称:optionVarViewer,代码行数:12,代码来源:optionVarEditor.py

示例10: update_channel

 def update_channel(self, channel_name, param_name):
     grp = "OpenVDB%sChannelGrp" % channel_name
     attr_value = pm.getAttr(param_name)
     pm.textFieldGrp(grp, edit=True,
                     text="" if attr_value is None else attr_value,
                     changeCommand=lambda val: pm.setAttr(param_name, val))
     pm.scriptJob(parent=grp,
                  replacePrevious=True,
                  attributeChange=[param_name,
                                   lambda : pm.textFieldGrp(grp, edit=True,
                                                           text=pm.getAttr(param_name))])
     self.clear_popups(grp)
     pm.popupMenu(parent=grp, postMenuCommand=lambda popup, popup_parent: AEvdb_visualizerTemplate.setup_popup_menu_elems(popup, popup_parent, param_name))
开发者ID:redpawfx,项目名称:openvdb-render,代码行数:13,代码来源:AEvdb_visualizerTemplate.py

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

示例12: createRig

 def createRig(self, *args):
     BlendSineRig.BlendSineRig(control=pm.textFieldButtonGrp(
                               self.cnt_fld, q=1, text=1),
                               name=pm.textFieldGrp(
                               self.name_fld, q=1, text=1),
                               numJnts=pm.textFieldGrp(
                               self.numJnts_fld, q=1, text=1),
                               curve=pm.textFieldButtonGrp(
                               self.crv_fld, q=1, text=1),
                               fwdBackCrvs=pm.textScrollList(
                                   self.fwd_sFld, q=1, ai=1),
                               sideToSideCrvs=pm.textScrollList(
                                   self.side_sFld, q=1, ai=1),)
开发者ID:Mauricio3000,项目名称:MSH_Maya,代码行数:13,代码来源:BlendSineRig_ui.py

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

示例14: _updateAssetClicked

 def _updateAssetClicked(self):
     if self._currentSelectedAsset == None:
         raise RuntimeError('Nothing selected.')
     sceneName = _pmCore.textFieldGrp(self._uiWidget[_UiWidgetEnum.sceneNameTextField], query=True, text=True)
     filePath = _pmCore.textFieldGrp(self._uiWidget[_UiWidgetEnum.filePathTextField], query=True, text=True)
     category = _pmCore.optionMenuGrp(self._uiWidget[_UiWidgetEnum.categoryCombox], query=True, value=True)
     description = _pmCore.scrollField(self._uiWidget[_UiWidgetEnum.descriptionTextField], query=True, text=True)
     _Database.setFileCategory(self._currentSelectedAsset, category)
         
     _Database.setFileDescription(self._currentSelectedAsset, description)
     _Database.setFilename(self._currentSelectedAsset, sceneName)
     _Database.setFilePath(self._currentSelectedAsset, filePath)
     _pmCore.iconTextButton(self._uiWidget[_UiWidgetEnum.assetBtnList][self._assetBtnName(self._currentSelectedAsset)], edit=True, label=sceneName)
 
     self._refreshAssetButtonView()
开发者ID:juewang,项目名称:AssetManager2,代码行数:15,代码来源:MayaUI.py

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


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