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


Python cmds.windowPref函数代码示例

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


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


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