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


Python cmds.intFieldGrp函数代码示例

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


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

示例1: gradeTotalsFrame

def gradeTotalsFrame():	
	cmds.frameLayout( label='Grade Totals', cll=True, labelAlign='center', borderStyle='etchedIn', w=480 )
	cmds.columnLayout()
	gradeFrm = cmds.formLayout()
	global gradeTotal
	global cflDeductGradeTotal
	global aanDeductGradeTotal
	global proDeductGradeTotal
	global lateGradeTotal
	global totalGradeTotal
	# Create the Output Grades and Comments to Text File button
	textOutputButton=cmds.button( label='Output Grades and Comments to Text File', align='center', command=textOutputButtonFunction )
	cmds.formLayout( gradeFrm, edit=1, attachForm=[[textOutputButton, "left", 5], [textOutputButton, "top", 5]])
	# Create the Art Grade Total label and intField
	gradeGradeField=cmds.intFieldGrp( "gradeIntField", numberOfFields=1, label='Grade Total', changeCommand=updateGradeTotal)
	cmds.formLayout( gradeFrm, edit=1, attachOppositeControl=[[gradeGradeField, "top", 35, textOutputButton], [gradeGradeField, "left", 0, textOutputButton]])
	# Create the Antialias/Noise Deductions Grade Total label and intField
	aanDeductGradeField=cmds.intFieldGrp( "aanDeductGradeIntField", numberOfFields=1, label='Alias/Noise Deductions', changeCommand=updateGradeTotal)
	cmds.formLayout( gradeFrm, edit=1, attachOppositeControl=[[aanDeductGradeField, "top", 35, gradeGradeField], [aanDeductGradeField, "left", 0, gradeGradeField]])
	# Create the Professionalism Deductions Grade Total label and intField
	proDeductGradeField=cmds.intFieldGrp( "proDeductGradeIntField", numberOfFields=1, label='Prof Deductions', changeCommand=updateGradeTotal)
	cmds.formLayout( gradeFrm, edit=1, attachOppositeControl=[[proDeductGradeField, "top", 35, aanDeductGradeField], [proDeductGradeField, "left", 0, aanDeductGradeField]])
	# Create the Late Deductions Grade Total label and intField
	lateGradeField=cmds.intFieldGrp( "lateGradeIntField", numberOfFields=1, label='Late Deductions', changeCommand=updateGradeTotal)
	cmds.formLayout( gradeFrm, edit=1, attachOppositeControl=[[lateGradeField, "top", 35, proDeductGradeField], [lateGradeField, "left", 0, proDeductGradeField]])
	# Create the Overall Grade Total label and intField
	totalGradeField=cmds.intFieldGrp( "totalGradeIntField", numberOfFields=1, label='Final Grade Total')
	cmds.formLayout( gradeFrm, edit=1, attachOppositeControl=[[totalGradeField, "top", 35, lateGradeField], [totalGradeField, "left", 0, lateGradeField]])
	cmds.setParent('..')
	cmds.setParent('..')
	cmds.setParent('..')
开发者ID:creuter23,项目名称:fs-tech-artist,代码行数:31,代码来源:SAL_GradingScript_Project_02_v4.py

示例2: zbw_offsetAnim

def zbw_offsetAnim(*args):
    """creates offset from first obj sel to last based on the entered offset value"""
    def zbw_runOffsetAnim(*args):
        #get frame range!!!!!!
        #get selection, check that they are tranforms
        sel = cmds.ls(sl=True,type="transform")
        selSize = int(len(sel))
        #for each selection mult the index by the offset value
        for i in range(0,selSize):
            obj = sel[i]
            offsetRaw = cmds.intFieldGrp('zbw_offsetValue', q=True, v=True)
            offset = offsetRaw[0]
            multFactor = i * offset
            #shift the entire anim curve by the offset mult value
            cmds.keyframe(obj, edit=True,relative=True,timeChange=multFactor,time=(1,24))

    #create UI, get offset value, frame range or all anim
    if (cmds.window('zbw_offsetAnimUI', exists=True)):
        cmds.deleteUI('zbw_offsetAnimUI', window=True)
        cmds.windowPref('zbw_offsetAnimUI', remove=True)
    window=cmds.window('zbw_offsetAnimUI', widthHeight=(350,200), title='zbw_offsetAnim')
    cmds.columnLayout(cal='center')
    cmds.intFieldGrp('zbw_offsetValue', cal=(1,'left'), label='frequency(frames)', value1=5)
    #CREATE FRAME RANGE AREA (WHICH FRAMES ARE WE DOING?)
    #WHEN THAT HAPPENS, WHAT DO WE DO WITH THE FRAMES AFTER THAT? (PROBABLY NOTHING. . . LET USER WORRY ABOUT IT)
    #checkbox for random freq (to give a random amount to offset each object)
    #cmds.checkBoxGrp('zbw_animNoiseRandom', cal=(1,'left'), cw=(1, 175),label='random frequency on', value1=0, cc=zbw_animNoiseRandom)
    cmds.button('zbw_offsetAnimGo', label='offset!', width=75, command=zbw_runOffsetAnim)

    cmds.showWindow(window)
开发者ID:zethwillie,项目名称:zbw_python_tools,代码行数:30,代码来源:zbw_animTools.py

示例3: accept

 def accept(self, *args):        
     numAnts = int(cmds.intFieldGrp("numAnts",query=True,value=True)[0])                    
     startFrame = int(cmds.intFieldGrp("startFrame",query=True,value=True)[0])                    
     endFrame = int(cmds.intFieldGrp("endFrame",query=True,value=True)[0])                    
     
     curves = cmds.textScrollList("curves",q=True,ai=True)
     if curves == None:
         curves = ["curve1"]
     isFlat = cmds.checkBox("isFlat", query = True, value = True)        
     vel = cmds.floatSliderGrp("Velocity", query=True, value=True)        
     load = cmds.floatSliderGrp("load", query=True, value=True)
     
     ground = cmds.textFieldButtonGrp("groundObj",q=True,text=True)
     if ground == None:
         ground = "nurbsPlane1"
         
     
     numCurves = len(curves)
     
     if (numAnts > 1) and (numAnts != numCurves):
         cmds.warning("the number of ants and curves must be the same")
         return 0
     else:
         if (numAnts > 1):
             self.duplicateAnts(numAnts-1)
         for ind in range(numAnts):                
             arcLen = cmds.arclen(curves[ind])
             # rebuiltCurve = cmds.rebuildCurve(curves[ind], kr=1)[0]            
             ct.walking(ind+1, startFrame, endFrame, curves[ind], ground, vel, load, isFlat)
开发者ID:shihuiguo,项目名称:pythant,代码行数:29,代码来源:pythant.py

示例4: get_ui_values

def get_ui_values():
    global engine_path, folder, file_name, export_batch, resolution_x, resolution_y, exposure, gamma, \
        ray_number, time, seed, export_animation, start_frame, end_frame, export_normals, invert_normals, check_Z, materials
        
    engine_path = cmds.textFieldButtonGrp(engine_field, query=True, text=True)
    folder = cmds.textFieldButtonGrp(directory_field, query=True, text=True)
    file_name = cmds.textFieldGrp(file_field, query=True, text=True)
    
    export_batch = cmds.checkBoxGrp(batch_field, query=True, value1=True)
    
    resolution_x = cmds.intFieldGrp(resolution_field, query=True, value1=True)
    resolution_y = cmds.intFieldGrp(resolution_field, query=True, value2=True)
    exposure = cmds.floatSliderGrp(exposure_field, query=True, value=True)
    gamma = cmds.floatSliderGrp(gamma_field, query=True, value = True)
    ray_number = cmds.intSliderGrp(rays_field, query=True, value=True)
    seed = cmds.intSliderGrp(seed_field, query=True, value=True)
    time = cmds.intSliderGrp(time_field, query=True, value=True)
    export_animation = cmds.checkBoxGrp(animation_field, query=True, value1=True)
    start_frame =  cmds.intFieldGrp(frame_range_field, query=True, value1=True)
    end_frame =  cmds.intFieldGrp(frame_range_field, query=True, value2=True)
    export_normals = cmds.checkBoxGrp(normals_export_field, query=True, value1=True)
    invert_normals = cmds.checkBoxGrp(normals_invert_field, query=True, value1=True)
    check_Z = cmds.checkBoxGrp(check_Z_field, query = True, value1=True)
    
    materials = []
    for mat in range(5):
        materials.append(cmds.floatFieldGrp(eval('material_%i_field' % (mat)), query=True, value=True))
开发者ID:B-Rich,项目名称:zenphoton,代码行数:27,代码来源:export_hqz_maya25.py

示例5: toggleBakeRange

def toggleBakeRange():
    """
    Toggle bake anim range input.
    """
    enable = cmds.checkBoxGrp('xferMocap_bakeRangeCBG', q=True, value1=True)
    cmds.intFieldGrp('xferMocap_startEndCBG', e=True, en=enable)
    if not enable: initializeBakeRange()
开发者ID:bennymuller,项目名称:glTools,代码行数:7,代码来源:mocapTransfer.py

示例6: initializeBakeRange

def initializeBakeRange():
    """
    Initialize bake anim range based on playback timeline min/max.
    """
    start = cmds.playbackOptions(q=True, min=True)
    end = cmds.playbackOptions(q=True, max=True)
    cmds.intFieldGrp('xferMocap_startEndCBG', e=True, v1=start, v2=end)
开发者ID:bennymuller,项目名称:glTools,代码行数:7,代码来源:mocapTransfer.py

示例7: extendUI

def extendUI(*args):
    """UI for the script"""
    #UI
    if cmds.window("curbWin", exists=True):
        cmds.deleteUI("curbWin")

    cmds.window("curbWin", t="zbw_polyExtender", w=200, h=200)
    cmds.columnLayout("colLO")
    cmds.frameLayout("topFrame", l="Covert Edge", cll=True, bgc=(.2,.2,.2))
    cmds.text("Select poly edge to convert")
    cmds.button("convertBut", l="Convert!", w=200, h=30, bgc=(.8, .8,.6), c=convertEdge)
    cmds.separator(h=5)

    cmds.setParent("colLO")

    cmds.frameLayout("midFrame", l="Create Poly", cll=True, bgc=(.2,.2,.2))
    cmds.text("Select curve")
    cmds.separator(h=5)
    cmds.textFieldGrp("name", l="Name", w=200, cw=[(1,30), (2,170)], tx="newPoly")
    cmds.checkBox("curbCB", l="Positive Direction", v=True)
    # cmds.checkBox("bumpCB", l="Add vertical hump?", v=True)
    cmds.floatFieldGrp("curbFFG", l="Curb Width", cal=((1, "left"),(2,"left")), cw=([1,75],[2,50]), v1=10)
    cmds.intFieldGrp("UDivIFG", l="Width Subdivisions", cal=((1, "left"),(2,"left")), cw=([1,75],[2,50]), v1=1)
    cmds.intFieldGrp("VDivIFG", l="Length Subdivisions", cal=((1, "left"),(2,"left")), cw=([1,75],[2,50]), v1=1)
    cmds.checkBox("polyHistory", l="Keep history on final poly?", v=False)
    cmds.checkBox("history", l="Keep history objects?", v=True, cc=enableHistory)

    cmds.separator(h=5)
    cmds.button("curbBut", l="Create Curb", h=40, w=200, bgc=(.6, .8, .6), c=extendPoly)

    cmds.showWindow("curbWin")
    cmds.window("curbWin", e=True, h=150, w=200)
开发者ID:zethwillie,项目名称:zbw_python_tools,代码行数:32,代码来源:zbw_polyExtend.py

示例8: initializeBakeRange

def initializeBakeRange():
	'''
	Initialize bake anim range based on playback timeline min/max.
	'''
	start = mc.playbackOptions(q=True,min=True)
	end = mc.playbackOptions(q=True,max=True)
	mc.intFieldGrp('xferMocap_startEndCBG',e=True,v1=start,v2=end)
开发者ID:auqeyjf,项目名称:glTools,代码行数:7,代码来源:mocapTransfer.py

示例9: updateStartAndEndFrame

    def updateStartAndEndFrame(self, startFrameField, endFrameField ):

        minTime = cmds.playbackOptions( q=1, minTime=1 )
        maxTime = cmds.playbackOptions( q=1, maxTime=1 )

        cmds.intFieldGrp( startFrameField, e=1, v1= -5, v2=minTime )
        cmds.intFieldGrp( endFrameField  , e=1, v1= maxTime, v2=5 )
开发者ID:jonntd,项目名称:mayadev-1,代码行数:7,代码来源:sgUISceneBake.py

示例10: continueOutputFunction

def continueOutputFunction():
	gradeOutputTotal=cmds.intFieldGrp( "gradeIntField", q=1, value1=1)
	lateGradeOutputTotal=cmds.intFieldGrp( "lateGradeIntField", q=1, value1=1)
	totalGradeOutputTotal=cmds.intFieldGrp( "totalGradeIntField", q=1, value1=1)
# Queries the Grade comments for output
	aanqTSListOutput=cmds.scrollField("aanqTSList", q=1, tx=1)
	cflTSListOutput=cmds.scrollField("cflTSList", q=1, tx=1)
	lightTSTSListOutput=cmds.scrollField("lightTSList", q=1, tx=1)
	proTSListOutput=cmds.scrollField("proTSList", q=1, tx=1)
# Formats the comments for output	
	sceneFileOutput=open(selectedFileName+".txt", 'w')
	sceneFileOutput.write("Grading for: "+sceneFileName+"\r\n")
	sceneFileOutput.write("-----------------------------------\r\n")
	sceneFileOutput.write("Lighting Comments: "+lightTSTSListOutput+"\r\n")
	sceneFileOutput.write("Lighting Grade: "+str(lightGradeTotal)+"\r\n")
	sceneFileOutput.write("\r\n")
	sceneFileOutput.write("Grade Total: "+str(gradeOutputTotal)+"\r\n")
	sceneFileOutput.write("-----------------------------------\r\n")
	sceneFileOutput.write("Deduction Comments:\r\n")
	sceneFileOutput.write("Composition & Focal Length Comments: "+cflTSListOutput+"\r\n")
	sceneFileOutput.write("Antialiasing & Noise Quality Comments: "+aanqTSListOutput+"\r\n")
	sceneFileOutput.write("Professionalism Comments: "+proTSListOutput+"\r\n")
	sceneFileOutput.write("-----------------------------------\r\n")
	sceneFileOutput.write("Comp/Focal Len Deductions (15%): -"+str(cflDisplayGradeTotal)+"\r\n")
	sceneFileOutput.write("Alias/Noise Deductions (15%): -"+str(aanqDisplayGradeTotal)+"\r\n")
	sceneFileOutput.write("Prof Deductions (10%): -"+str(proDisplayGradeTotal)+"\r\n")
	sceneFileOutput.write("Late Deductions: -"+str(lateGradeOutputTotal)+"\r\n")
	sceneFileOutput.write("-----------------------------------\r\n")
	sceneFileOutput.write("Overall Grade Total: "+str(totalGradeOutputTotal)+"\r\n")
	sceneFileOutput.close()
开发者ID:creuter23,项目名称:fs-tech-artist,代码行数:30,代码来源:SAL_GradingScript_Project_03_v3.py

示例11: bakeDynamicCmd

def bakeDynamicCmd(*args):
    '''
    Bake the dynamic simulation as key frames on the joints rotations for the specified frame range
    '''
    # display warning message
    result = cmds.confirmDialog(messageAlign="left", title="Bake Simulation", message="Baking simulation will replace the dynamics\nfor keyframe animation. Action is undoable. Do you wish to continue?", button=["Yes", "No"])
     
    if result == "Yes":
        # get selected object
        selected = cmds.ls(sl=True)
         
        if selected:
            # manage the dynamic node
            dNode = lpDynamicChain(node=selected[0])
            startJoint = dNode.startJoint[0]
            endJoint = dNode.endJoint[0]
             
            # get frame range
            startFrame = cmds.intFieldGrp("frameRangeIFG", q=True, v1=True)
            endFrame = cmds.intFieldGrp("frameRangeIFG", q=True, v2=True)
             
            if cmds.checkBoxGrp("useTimeSliderCBG", q=True, v1=True):
                startFrame = cmds.playbackOptions(q=True, minTime=True)
                endFrame = cmds.playbackOptions(q=True, maxTime=True)
             
            # get the joints
            joints = [startJoint]
            joints.extend( findAllJointsFromTo(startJoint, endJoint) )
             
        # bake the simulation for the frame range - this action is undoable
        cmds.bakeResults(joints, t=(startFrame, endFrame), dic=False, preserveOutsideKeys=True, simulation=True)
开发者ID:Mortaciunea,项目名称:bdScripts,代码行数:31,代码来源:lpDynamicChains.py

示例12: __init__

    def __init__(self) :
        # now we create a window ready to populate the components
        self.m_window = cmds.window( title='Flock The System', )
        # create a layout
        form = cmds.formLayout()
        tabs = cmds.tabLayout(innerMarginWidth=10, innerMarginHeight=10)
        cmds.formLayout( form, edit=True, attachForm=((tabs, 'top', 0), (tabs, 'left', 0), (tabs, 'bottom', 0), (tabs, 'right', 0)) )
        
        child1 = cmds.rowColumnLayout(numberOfColumns=1)
        #cmds.image( image='/home/i7867155/Desktop/Screenshot.png' )
        cmds.intFieldGrp( numberOfFields=2, label='Start Frame',  extraLabel='End Frame', value1=3, value2=3,  )
        #cmds.button( label='Update Flock', bgc=(1,0,0)  )
        #cmds.iconTextButton( style='iconOnly', image1='/home/i7867155/Desktop/Screenshot.png', command='click()' )
        
        

        exportButton = cmds.button( label='Export/Update Curves', command='exportCurves()' )


        cmds.setParent( tabs )

        child2 = cmds.rowColumnLayout(numberOfColumns=2)
        cmds.button(width=50)
        cmds.button()
        cmds.button()
        cmds.setParent( tabs )

        cmds.tabLayout( tabs, edit=True, tabLabel=((child1, 'Pre-flock'), (child2, 'Post-flock')) )
        
        # finally show the window
        cmds.showWindow( self.m_window )
开发者ID:JeremyBooth,项目名称:What-the-Flock--,代码行数:31,代码来源:flock.py

示例13: exportGeoCombinedFromUI

def exportGeoCombinedFromUI():
	'''
	writeGeoCombineCache from UI
	'''
	# Get UI info
	path = mc.textFieldButtonGrp('meshCache_pathTBG',q=True,text=True)
	name = mc.textFieldGrp('meshCache_nameTFG',q=True,text=True)
	start = mc.intFieldGrp('meshCache_rangeIFG',q=True,v1=True)
	end = mc.intFieldGrp('meshCache_rangeIFG',q=True,v2=True)
	pad = mc.intFieldGrp('meshCache_paddingIFG',q=True,v1=True)
	uvSet = mc.textFieldGrp('meshCache_uvSetTFG',q=True,text=True)
	worldSpace = bool(mc.radioButtonGrp('meshCache_spaceRBG',q=True,sl=True)-1)
	gz = mc.checkBoxGrp('meshCache_gzipCBG',q=True,v1=True)
	
	# Check Name
	if not name:
		print 'Provide valid cache name and try again!'
		return
	
	# Check UV Set
	if uvSet == 'default': uvSet = ''
	
	# Get selection
	sel = [i for i in mc.ls(sl=True,fl=True,o=True) if glTools.utils.mesh.isMesh(i)]
	if not sel:
		print 'No valid mesh objects selected for export!!'
		return
	
	# Write Combine Cache
	glTools.tools.meshCache.writeGeoCombineCache(path,name,sel,start,end,pad,uvSet,worldSpace,gz)
开发者ID:RiggingDojoAdmin,项目名称:glTools,代码行数:30,代码来源:meshCache.py

示例14: __init__

 def __init__(self,*args):
     if(cmds.window("rbbnChainBuilder",exists=True)):
         cmds.deleteUI("rbbnChainBuilder",window=True)
 	
     cmds.window("rbbnChainBuilder",title="Build Ribbon Rig v1.0", rtf=True)
     cmds.columnLayout()
     
 	self.prefixFld = cmds.textFieldGrp(label='Prefix',text='L_upLegRbbn_')	        
     self.ribbonFld = cmds.textFieldButtonGrp( label="Ribbon:", buttonLabel="Load", bc = self.loadRibbon)#,text='main_plane'  )
     self.startFld = cmds.textFieldButtonGrp( label="Start Control:", buttonLabel="Load", bc = self.loadStart,text='cnt_1'  )
     self.endFld = cmds.textFieldButtonGrp( label="End Control:", buttonLabel="Load", bc = self.loadEnd,text='cnt_2' )
     self.numFld = cmds.intFieldGrp(label='Controls:',nf=1,v1=5)
     self.skinFld = cmds.intFieldGrp(label='Skin Joints:',nf=1,v1=5)
     self.buildFld = cmds.radioButtonGrp(nrb=2,labelArray2=('U','V'),label='Build along:',sl=1)
     
     
     cmds.frameLayout(label='Control Options: ',fn='boldLabelFont',cll=False)
     cmds.columnLayout()
     self.crvCreateFld = cmds.radioButtonGrp(nrb=2,labelArray2=('Yes','No'),label='Create bend-bo controls?',sl=1)
     self.radFld = cmds.floatFieldGrp(label='Radius:',nf=1,v1=0.2)
     self.crvNrFld = cmds.radioButtonGrp(nrb=3,labelArray3=('X','Y','Z'),label='Controller normal Axis:',sl=2)
     cmds.setParent("..")
     cmds.setParent("..")
     
     cmds.rowLayout(nc=2,cw2=(200,100))
     cmds.text(' ')
     cmds.button(label = "          Create", c = self.buildRig,w=100 )
 	cmds.setParent('..')
 		
     cmds.showWindow("rbbnChainBuilder")
开发者ID:Mauricio3000,项目名称:MSH_Maya,代码行数:30,代码来源:ms_rbbnChainBuilder.py

示例15: intAttribute

def intAttribute(mainSetting, setting):
    cmds.intFieldGrp(str(setting.keys()[0])+'_attribute',
                    numberOfFields=1,
                    label=str(setting.keys()[0]).replace('_', ' '),
                    value1=setting.values()[0],
                    cc="import dmptools.setup.settingsWindow as settingsWindow;settingsWindow.updateIntAttr('"+mainSetting+"')"
                    )
开发者ID:jonntd,项目名称:dmptools,代码行数:7,代码来源:settingsWindow.py


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