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

Python cmds.windowPref函数代码示例

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

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



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

示例1: gui

def gui ():
	try:	cmds.deleteUI ("Stabilizer")
	except: pass

	try:	cmds.windowPref("Stabilizer", remove = True)
	except: pass

	cmds.window( 'Stabilizer',
						sizeable			= True,
						resizeToFitChildren	= True,
						retain				= False,
						topLeftCorner		= (10, 700)
						)
	cmds.columnLayout	('cl')
	cmds.button( 'button_stabilizer',
						label				= "stabilize",
						width				= 120,
						backgroundColor		= (0, 0.5, 0),
						command				= 'fstab.stabilizer("start")'
						)
	cmds.button( 'add_eye_btn',
						enable				= False,
						label				= "add eye",
						width				= 120,
						backgroundColor		= (0.3, 0.3, 0.3),
						command				= 'fstab.add_eye()'
						)
	cmds.showWindow( 'Stabilizer' )
开发者ID:danielforgacs,项目名称:code-dump,代码行数:28,代码来源:ford_stabilizer.py


示例2: gui

def gui():
    """
    # creates the gui
    """
    win = "fsa_uvtransfertool"
    if cmds.window(win, ex=True):
        cmds.deleteUI(win)

    if cmds.windowPref(win, ex=True):
        cmds.windowPref(win, remove=True)
    global source_field  #  global textFieldButtonGrp for source mesh

    my_win = cmds.window(win, title="transfer_uvs", sizeable=False, mnb=True, width=200, height=200)
    cmds.columnLayout(adjustableColumn=True, width=200)

    source_field = cmds.textFieldButtonGrp(
        text="Source Mesh",
        buttonLabel="<<SOURCE<<",
        columnWidth=([1, 115], [2, 85]),
        annotation="add source",
        buttonCommand=add_source_mesh,
    )

    cmds.button(
        width=200,
        height=100,
        label="Transfer To Selected Meshes",
        command=button_cmd,
        annotation="select target meshes after " + "source has been added",
    )

    cmds.showWindow(my_win)
开发者ID:creuter23,项目名称:fs-tech-artist,代码行数:32,代码来源:transfer_uvs.py


示例3: about

def about():
    """Displays the CMT About dialog."""
    name = 'cmt_about'
    if cmds.window(name, exists=True):
        cmds.deleteUI(name, window=True)
    if cmds.windowPref(name, exists=True):
        cmds.windowPref(name, remove=True)
    window = cmds.window(name, title='About CMT', widthHeight=(600, 500), sizeable=False)
    form = cmds.formLayout(nd=100)
    text = cmds.scrollField(editable=False, wordWrap=True, text=cmt.__doc__.strip())
    button = cmds.button(label='Documentation', command='import cmt.menu; cmt.menu.documentation()')
    margin = 8
    cmds.formLayout(form, e=True,
                    attachForm=(
                        (text, 'top', margin),
                        (text, 'right', margin),
                        (text, 'left', margin),
                        (text, 'bottom', 40),
                        (button, 'right', margin),
                        (button, 'left', margin),
                        (button, 'bottom', margin),
                    ),
                    attachControl=(
                        (button, 'top', 2, text)
                    ))
    cmds.showWindow(window)
开发者ID:SplineO,项目名称:cmt,代码行数:26,代码来源:menu.py


示例4: cameraZoomControls_window

def cameraZoomControls_window():
	"""
	Creates the 'Camera Zoom Controls' main window.
	"""

	cmds.windowPref(enableAll=False)

	if (cmds.window("cameraZoomControls_window", exists=True)):
		cmds.deleteUI("cameraZoomControls_window")

	cmds.window("cameraZoomControls_window",
		title="Camera Zoom Controls",
		sizeable=True,
		width=320)

	spacing = 5

	cmds.columnLayout(adjustableColumn=True, rowSpacing=spacing)

	cmds.floatSliderGrp("overscan_floatSliderGrp", label="Overscan", field=True, min=0.01, max=2.5, value=1, sliderStep=0.001, dragCommand=overscan_floatSliderGrp_OnValueChanged)

	cmds.floatSliderGrp("horizontalOffset_floatSliderGrp", label="Horizontal Offset", field=True, min=-2.5, max=2.5, value=0, sliderStep=0.001, dragCommand=horizontalOffset_floatSliderGrp_OnValueChanged)

	cmds.floatSliderGrp("verticalOffset_floatSliderGrp", label="Vertical Offset", field=True, min=-2.5, max=2.5, value=0, sliderStep=0.001, dragCommand=verticalOffset_floatSliderGrp_OnValueChanged)

	cmds.button("resetZoomCtrls_button", label="Reset Zoom Controls", command=resetZoomControls_button_OnClicked)

	cmds.showWindow("cameraZoomControls_window")
	cmds.windowPref(enableAll=True);
开发者ID:KelSolaar,项目名称:Snippets,代码行数:29,代码来源:cameraZoomControls.py


示例5: gui

def gui():
	'''
	Generates the gui for the script.
	'''
	if( cmds.window(win, q=True, ex=True)):
		cmds.deleteUI(win)
		
	if( cmds.windowPref(win, q=True, ex=True) ):
		# cmds.windowPref(win, r=True, wh=[winWidth, winHeight])
		cmds.windowPref(win, r=True)
		
	cmds.window(win, title="Photoshop Tool", w=winWidth, h=winHeight)	
	cmds.columnLayout()
	
	cmds.textScrollList("mecPhTSL", w=winWidth-15, h=150)

	cmds.button(label="Refresh", w=winWidth-15,
		c="mecPh.phAddTSL()")
	cmds.rowColumnLayout( nc=2, 
		cw=[[1,80],[2,105]])
	cmds.button(label="Close All",
		c="mecPh.phCloseAll()")
	cmds.button(label="Close Selected",
		c="mecPh.phCloseSel()")
	cmds.showWindow(win)
开发者ID:creuter23,项目名称:fs-tech-artist,代码行数:25,代码来源:mecPh.py


示例6: create

 def create(self):
     if cmds.window(self.window, exists=True):
         cmds.deleteUI(self.window);
     self.window = cmds.loadUI(uiFile=self.uiFile, verbose=False)
     
     cmds.showWindow(self.window);
     try:
         initPos = cmds.windowPref( self.window, query=True, topLeftCorner=True )
         if initPos[0] < 0:
             initPos[0] = 0
         if initPos[1] < 0:
             initPos[1] = 0
         cmds.windowPref( self.window, edit=True, topLeftCorner=initPos )
     except :
         pass
     
     ctrlPath = '|'.join([self.window, 'radioButton']);
     cmds.radioButton(ctrlPath, edit=True, select=True);
     
     ctrlPath = '|'.join([self.window, 'groupBox_4']);
     cmds.control(ctrlPath, edit=True, enable=False);
     
     ctrlPath = '|'.join([self.window, 'groupBox_2', 'pushButton_7']);
     cmds.button(ctrlPath, edit=True, enable=False);
     
     ctrlPath = '|'.join([self.window, 'groupBox_2', 'lineEdit']);
     cmds.textField(ctrlPath, edit=True, text="-u --oiio");
开发者ID:Quazo,项目名称:breakingpoint,代码行数:27,代码来源:txManager.py


示例7: windowChooseCam

    def windowChooseCam(self):
        if cmds.window("ChooseRenderCam", exists=True):
            cmds.deleteUI("ChooseRenderCam", window=True)
        try:
            cmds.windowPref("ChooseRenderCam", r=True)
        except:
            pass

        chooseCamWin = cmds.window("ChooseRenderCam", h=220, w=300, te=300, le=900, s=1, title="Choose Camera")

        AllrowColumnLayout = cmds.columnLayout(w=200)

        CamtexTScrollList = cmds.textScrollList(
            "CamtexTScrollList",
            allowMultiSelection=False,
            showIndexedItem=4,
            dcc=self.lockTroughtCamera,
            sc=self.lockTroughtCamera,
        )
        renderButton = cmds.button("Render", c=self.submitRender)

        self.addIntoTextScrollList()

        cmds.setParent("..")
        cmds.showWindow(chooseCamWin)
开发者ID:k0k0c,项目名称:scripts,代码行数:25,代码来源:animRenderPreview.py


示例8: activateBlendshapes_window

def activateBlendshapes_window():
	"""
	This definition creates the 'Activate Blendshapes' main window.
	"""

	cmds.windowPref(enableAll=False)

	if (cmds.window("activateBlendshapes_window", exists=True)):
		cmds.deleteUI("activateBlendshapes_window")

	cmds.window("activateBlendshapes_window",
		title="Activate Blendshapes",
		width=320)

	spacing = 5

	cmds.columnLayout(adjustableColumn=True, rowSpacing=spacing)

	cmds.separator(height=10, style="singleDash")

	cmds.floatSliderGrp("weight_floatSliderGrp", label="Weight", field=True, minValue=0, maxValue=1, fieldMinValue=0, fieldMaxValue=1, sliderStep=0.01, value=0, changeCommand=weight_floatSliderGrp_OnValueChanged, dragCommand=weight_floatSliderGrp_OnValueChanged)

	cmds.separator(height=10, style="singleDash")

	cmds.showWindow("activateBlendshapes_window")

	cmds.windowPref(enableAll=True)
开发者ID:maximveksler,项目名称:Snippets,代码行数:27,代码来源:activateBlendshapes.py


示例9: postInstallDialog

    def postInstallDialog():
        '''
        Displays a dialog window to confirm the installation for MRT.
        '''

        dialogWin = cmds.window(title='MRT Start Up', resizeToFitChildren=True, 
                                        maximizeButton=False, minimizeButton=False, sizeable=False)
        
        mainCol = cmds.columnLayout(width=500, rowSpacing=15)
        
        cmds.separator(style='none')
        cmds.text(label='Modular rigging tools has been installed.', align='center', width=400)
        cmds.text(label='Please restart maya.', font='boldLabelFont', align='center', width=400)
        
        cmds.rowLayout(numberOfColumns=2, columnWidth=[(1, 150), (2, 100)])
        
        cmds.separator(style='none')
        cmds.button(label='OK', command=('import maya.cmds; maya.cmds.deleteUI(\"'+dialogWin+'\")'), width=100, align='center')
        
        cmds.setParent(mainCol)
        cmds.separator(style='none')
        cmds.showWindow(dialogWin)
        
        try: cmds.windowPref(dialogWin, remove=True) 
        except: pass
开发者ID:animformed,项目名称:mrt,代码行数:25,代码来源:MRTstartup.py


示例10: process

def process():
    '''
        Brings up the Dome Light Rig UI.
    '''

    dlWin = "domeLightWin"

    if cmds.window(dlWin, exists=True):
        cmds.deleteUI(dlWin)
    if cmds.windowPref(dlWin, exists=True):
        cmds.windowPref(dlWin, remove=True)

    winWidth = 425
    winHeight = 485

    cmds.window(dlWin, width=winWidth, height=winHeight, sizeable=False, menuBar=True, 
        title="Dome Light Rig")

    cmds.menu(label="Help")
    cmds.menuItem(label="About...", 
        command="from project import domeLight; domeLight.aboutWin()")

    cmds.frameLayout(borderVisible=1, borderStyle="etchedIn", labelVisible=0)
    mainForm = cmds.formLayout("mainForm")

    _buildControls( dlWin )
    _positionControls( dlWin, mainForm )

    cmds.window(dlWin, edit=True, width=winWidth, height=winHeight)

    cmds.showWindow(dlWin)
开发者ID:tmowyang,项目名称:maya-tools,代码行数:31,代码来源:domeLight.py


示例11: gui

def gui():
	'''
	Generates the interface for the file sequencer.
	'''
	if( cmds.window(win, ex=True) ):
		cmds.deleteUI(win)
	if( cmds.windowPref(win, ex=True) ):
		cmds.windowPref(win, r=True)
		
	cmds.window(win, h=500, w=400)
	mainCol = cmds.columnLayout()
	
	cmds.rowColumnLayout(nc=2, cw=[[1,200],[2,200]])
	global targField, destField, tslTarget, tslDestin
	
	targField = cmds.scrollField( w=200, h=50, editable=False, wordWrap=True, text='Non editable with word wrap' )
	destField = cmds.scrollField( w=200, h=50, editable=False, wordWrap=True, text='Non editable with word wrap' )
	cmds.button(label="Load Target", c=Callback(getTarget))
	cmds.button(label="Load Destination", c=Callback(getDestin))
	
	cmds.text(label = "Target Files")
	cmds.text(label = "Destination Files")
	
	tslTarget = TextScrollList(200, 200)

	tslDestin = TextScrollList(200, 200)
	cmds.setParent(mainCol)
	
	# Inputs
	fieldsGUI(mainCol)
	
	cmds.showWindow(win)
	
	print("Interface executed.")
开发者ID:creuter23,项目名称:fs-tech-artist,代码行数:34,代码来源:fileSeq.py


示例12: nu

	def nu(self):
		if(cmds.window(self.win, q = 1, ex = 1)):
			cmds.deleteUI(self.win)
		if(cmds.windowPref(self.win, ex = True)):
			cmds.windowPref(self.win, r = True)

		cmds.window(self.win, t = "Export as FBX", h = 170, w = 250,rtf=1,s=0)
		mainCol = cmds.columnLayout()
		cmds.columnLayout()
		cmds.image( image="//10.10.35.93/data/_3dAppDomain/_images/maya_export_fbx.png",w=250,h=45 )
		cmds.text(label="")
		uRow = cmds.columnLayout()
		#zRow = cmds.rowLayout(numberOfColumns=1,cl1="left",cw1=170,ct1="left")
		cmds.button(label='click to set preset file')		
		#cmds.setParent(zRow)
		tRow = cmds.rowLayout(numberOfColumns=2,cl2=("right","left"),cw2=(170,70),ct2=("right","left"))

		self.expPath = cmds.textField()
		cmds.textField( self.expPath , edit=True, width = 140, enterCommand=('cmds.setFocus(\"' + self.expPath + '\")') )
		cmds.button(label='Browse',command='obj.abc()')
		cmds.setParent(tRow)
		cmds.setParent(uRow)
		cmds.text(label = " ")
		sRow = cmds.rowLayout(numberOfColumns=2,cl2=("center","center"),cw2=(120,130),ct2=("both","both"),co2=(10,05))
		butExp = cmds.button( label='Push Export', command='obj.sortAndExport()')
		cmds.button( label=" Close ", command=("obj.close()"))
		cmds.setParent(sRow)
		cmds.setParent(mainCol)
#		cmds.text(label="")
		cmds.showWindow(self.win)
开发者ID:teddygo,项目名称:codha,代码行数:30,代码来源:+maya_Stereo_Fbx.py


示例13: create

    def create(self):
        if cmds.window(self.window, exists=True):
            cmds.deleteUI(self.window);
        
        self.window = cmds.window(self.window, widthHeight=(800, 600), title="Light Manager")
        self.refreshList()
        
        self.createUI()
        

        cmds.setParent(menu=True)

        cmds.showWindow(self.window)
        
        try:
            initPos = cmds.windowPref( self.window, query=True, topLeftCorner=True )
            if initPos[0] < 0:
                initPos[0] = 0
            if initPos[1] < 0:
                initPos[1] = 0
            cmds.windowPref( self.window, edit=True, topLeftCorner=initPos )
        except :
            pass
            
        self.refreshList()
开发者ID:Quazo,项目名称:breakingpoint,代码行数:25,代码来源:lightManager.py


示例14: gui

def gui():
    if (cmds.window('dk_pipe_gui_001', ex=True)):
        cmds.deleteUI('dk_pipe_gui_001')
    # This clears any window preferences on our GUI
    if (cmds.windowPref('dk_pipe_gui_001', ex=True)):
        cmds.windowPref('dk_pipe_gui_001', r=True)

    cmds.window('dk_pipe_gui_001', t="Build Pipes")
    cmds.columnLayout('MAIN')
    cmds.rowColumnLayout(nc=2)

    cmds.iconTextStaticLabel(st='textOnly', l='No. Pipes')
    cmds.intField('n_pipes_int', w=150, min=1, max=20, v=8)

    cmds.iconTextStaticLabel(st='textOnly', l='Min Pipe Size')
    cmds.floatSlider('min_pipe_size_int', min=1, max=4, value=1, step=1)

    cmds.iconTextStaticLabel(st='textOnly', l='Max Pipe Size')
    cmds.floatSlider('max_pipe_size_int', min=1, max=4, value=1, step=1)

    cmds.iconTextStaticLabel(st='textOnly', l='Art Radius')
    cmds.intField('main_radius_int', value=3)

    cmds.button(w=150, l='Create Pipes', c=handle_input)

    cmds.setParent('MAIN')
    cmds.columnLayout('SECOND')
    cmds.button(w=300, l='Delete History (All)', c=handle_delete_button)

    cmds.showWindow('dk_pipe_gui_001')
开发者ID:KairiNabai,项目名称:digikinesis,代码行数:30,代码来源:pipes.py


示例15: create

 def create(self, *args ):
     
     top, left = cmds.window( WindowInfo._window, q=1, topLeftCorner=1 )
     
     top  +=70
     left +=19
     
     itemIndex = cmds.textScrollList( FolderUIInfo._scrollListUI, q=1, sii=1 )
     if not itemIndex: return None
     
     top += itemIndex[0]*13
     
     if cmds.window( FolderSubDeleteUiInfo._winName, ex=1 ):
         cmds.deleteUI( FolderSubDeleteUiInfo._winName )
     cmds.window( FolderSubDeleteUiInfo._winName, titleBar=0 )
     
     cmds.columnLayout()
     cmds.rowColumnLayout( nc=1, cw=[(1,200)] )
     cmds.text( l='Are You Sure?', al='center', h=22 )
     cmds.setParent( '..' )
     cmds.rowColumnLayout( nc=2, cw=[(1,100),(2,100)])
     cmds.button( l='Delete', c=FolderSubDeleteUiInfo.cmdDelete, h=22 )
     cmds.button( l='Cancel', c=self.cmdDeleteWindow, h=22 )
     cmds.setParent( '..' )
     
     cmds.windowPref( FolderSubDeleteUiInfo._winName, e=1,
                      widthHeight = [ FolderSubDeleteUiInfo._width, FolderSubDeleteUiInfo._height ],
                      topLeftCorner = [ top, left ] )
     cmds.showWindow( FolderSubDeleteUiInfo._winName )
开发者ID:jonntd,项目名称:mayadev-1,代码行数:29,代码来源:view_sub.py


示例16: unfoldBand_window

def unfoldBand_window():
	"""
	This definition creates the 'Unfold Band' main window.
	"""

	cmds.windowPref(enableAll=False)

	if (cmds.window("unfoldBand_window", exists=True)):
		cmds.deleteUI("unfoldBand_window")

	cmds.window("unfoldBand_window",
		title="Unfold Band",
		width=384)

	spacing = 5

	cmds.columnLayout(adjustableColumn=True, rowSpacing=spacing)

	cmds.separator(height=10, style="singleDash")

	cmds.intSliderGrp("divisions_intSliderGrp", label="Divisions", field=True, minValue=0, maxValue=10, fieldMinValue=0, fieldMaxValue=65535, value=2)

	cmds.separator(style="single")

	cmds.columnLayout(columnOffset=("left", 140))
	cmds.checkBox("keepConstructionHistory_checkBox", label="Keep Construction History", v=True)
	cmds.setParent(topLevel=True)

	cmds.separator(height=10, style="singleDash")

	cmds.button("unfoldBand_button", label="Unfold Band!", command=unfoldBand_button_OnClicked)

	cmds.showWindow("unfoldBand_window")

	cmds.windowPref(enableAll=True)
开发者ID:elanifegnirf,项目名称:Snippets,代码行数:35,代码来源:unfoldBand.py


示例17: alignComponents_window

def alignComponents_window():
	"""
	Creates the 'Align Components' main window.
	"""

	cmds.windowPref(enableAll=False)

	if (cmds.window("alignComponents_window", exists=True)):
		cmds.deleteUI("alignComponents_window")

	cmds.window("alignComponents_window",
		title="Align Components",
		width=320)

	spacing = 5

	cmds.columnLayout(adjustableColumn=True, rowSpacing=spacing)

	cmds.button("selectAnchors_button", label="Select Anchors!", command=selectAnchors_button_OnClicked)

	cmds.separator(height=10, style="singleDash")

	cmds.button("alignSelection_button", label="Align Selection!", command=alignSelection_button_OnClicked)

	cmds.separator(height=10, style="singleDash")

	cmds.button("alignSelectionOnXAxis_button", label="Align Selection On X!", command=alignSelectionOnXAxis_button_OnClicked)
	cmds.button("alignSelectionOnYAxis_button", label="Align Selection On Y!", command=alignSelectionOnYAxis_button_OnClicked)
	cmds.button("alignSelectionOnZAxis_button", label="Align Selection On Z!", command=alignSelectionOnZAxis_button_OnClicked)

	cmds.showWindow("alignComponents_window")

	cmds.windowPref(enableAll=True)
开发者ID:KelSolaar,项目名称:Snippets,代码行数:33,代码来源:alignComponents.py


示例18: animTools

def animTools():
    #create simple button based GUI for now
    if (cmds.window('zbw_animToolsUI', exists=True)):
        cmds.deleteUI('zbw_animToolsUI', window=True)
        cmds.windowPref('zbw_animToolsUI', remove=True)
    window=cmds.window('zbw_animToolsUI', widthHeight=(350,200), title='zbw_animTools')
    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
    #cmds.checkBoxGrp('zbw_animNoiseRandom', cal=(1,'left'), cw=(1, 175),label='random frequency on', value1=0, cc=zbw_animNoiseRandom)
    cmds.text('zbw_offsetAnim')
    cmds.button('zbw_offsetAnimButton', label='offsetAnim', width=75, command=zbw_offsetAnim)
    cmds.text('zbw_pullDownAnimButton')
    cmds.button('zbw_pullDownAnim', label='pullDownAnim', width=75, command=zbw_pullDownAnim)
    cmds.text('zbw_pullUpAnimButton')
    cmds.button('zbw_pullUpAnimButton', label='pullUpAnim', width=75, command=zbw_pullUpAnim)
    cmds.text('zbw_randomizeKeys')
    cmds.button('zbw_randomizeKeysButton', label='randomizeKeys', width=75, command=zbw_randomizeKeys)
    cmds.text('zbw_animNoise')
    cmds.button('zbw_animNoiseButton', label='animNoise', width=75, command=zbw_animNoise)
    cmds.text('zbw_playblast')
    cmds.button('zbw_playblastButton', label='playblast', width=75, command=zbw_playblast)
    cmds.text('zbw_stepAll')
    cmds.button('zbw_stepAllButton', label='stepAll', width=75, command=zbw_stepAll)
    cmds.text('zbw_cleanKeys')
    cmds.button('zbw_cleanKeysButton', label='cleanKeys', width=75, command=zbw_stepAll)
    cmds.text('zbw_changeFrameRate')
    cmds.button('zbw_changeFrameRate', label='frameRate', width=75, command=zbw_changeFrameRate)

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


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


示例20: init

	def init(self):
		window = c.window(title='WeatherViz',widthHeight=(400,600));
		#form = c.formLayout(numberOfDivisions=100);
		c.rowColumnLayout(numberOfColumns=1);
		c.checkBoxGrp('weatherPanel', label='Weather');
		c.checkBox('snowCheck', label='Snow', onc=self.snow.init, ofc=self.snow.remove, p='weatherPanel');
		c.checkBox('rainCheck', label='Rain', onc=self.rain.init, ofc=self.rain.remove, p='weatherPanel');
		c.checkBox('windCheck', label='Wind', onc=self.wind.init, ofc=self.wind.remove, p='weatherPanel');
		c.button('collButton', label='Add collision', c=self.addCollision);


		#s1 = c.floatSliderGrp('snowTurb',label='Snow turbulence', field=True, value=5, dc=self.slider_drag_callback, min=0, max=10);
		c.floatSliderGrp('snowIntens',label='Snow Intencity', field=True, value=200, dc=self.slider_drag_callback, min=0, max=1000, en=False);
		c.floatSliderGrp('rainIntens',label='Rain Intencity', field=True, value=200, dc=self.slider_drag_callback, min=0, max=1000, en=False);
		c.floatSliderGrp('snowTurbSlider',label='Turbulence', field=True, value=1, dc=self.slider_drag_callback, min=0, max=100, en=False);
		c.floatSliderGrp('airMSlider',label='Wind Magnitude', field=True, value=30, dc=self.slider_drag_callback, min=0, max=100, en=False);
		c.floatSliderGrp('airMxdSlider',label='Wind Distance', field=True, value=20, dc=self.slider_drag_callback, min=0, max=100, en=False);
		#c.formLayout(form, edit=True, attachPosition=[(s1, 'top', 20, 1)]);
		#c.formLayout(form, edit=True, attachPosition=[(s2, 'top', 20, 1)]);
		
		c.textField("WeatherViz_HDR_Path_textField", cc=_WeatherViz_HDR_Path_textField__changeCommand)
		c.button("WeatherViz_HDR_Path_button", label="...", al="center", command=_WeatherViz_HDR_Path_button__command)
		
		WeatherViz_HDR_Path = c.optionVar(q="WeatherViz_HDR_Path")
		if WeatherViz_HDR_Path:
			c.textField("WeatherViz_HDR_Path_textField", edit=True, text=WeatherViz_HDR_Path)
			
		c.showWindow(window);
		c.windowPref(enableAll=True)
开发者ID:sebra729,项目名称:WeatherViz,代码行数:29,代码来源:WeatherViz.py



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
Python cmds.workspace函数代码示例发布时间:2022-05-27
下一篇:
Python cmds.window函数代码示例发布时间: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