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

Python cmds.tabLayout函数代码示例

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

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



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

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


示例2: simpleTemplateEditorAddCallbacks

 def simpleTemplateEditorAddCallbacks( *args):
  currTab = str(cmds.tabLayout(tabs1,q=1, st=1))
  currColChld = cmds.columnLayout(str(cmds.tabLayout(tabs1,q=1, st=1)),q=1, ca=1)
  curList = ""
  for temp in currColChld:
  	if cmds.textScrollList(temp, exists= True):
  		curList= temp
  tempSelAttrs = cmds.textScrollList(curList, q=1, si= True)
  tempSelIndAttrs = cmds.textScrollList(curList, q=1, sii= True)
  
  if cmds.textScrollList(curList, q=1, nsi= True)!=0:
  	result = cmds.promptDialog(title='Add Callback', message='Enter The Callback command for the selected attributes:',button=['OK', 'Cancel'],defaultButton='OK', cancelButton='Cancel', dismissString='Cancel')
  	if result == 'OK':
  		text = str(cmds.promptDialog(query=True, text= True))
  		if text != "":
  			for tempAttrI in tempSelIndAttrs:
  				cmds.textScrollList(curList, e=1, sii=tempAttrI)
  				tempAttrs = cmds.textScrollList(curList, q=1, si= True)
  				tempAttr =  tempAttrs[0]
  				tempAttrStrp = tempAttr.replace("      ","")
  				tempAttrStrp = tempAttrStrp.replace(" *","")
  				dictCallbacks[currTab + "_" + tempAttrStrp] = text
				if (cmds.menuItem(verbMenuI, q=1, checkBox = True)) == True:
		  			print ('  - Callback created for ' + tempAttrStrp + ' in view "' + currTab + '"')
  				cmds.textScrollList(curList, e=1, rii=tempAttrI)
				cmds.textScrollList(curList, e=1, ap=[tempAttrI,"      " + tempAttrStrp+ " *"])
开发者ID:vipul-rathod,项目名称:lsapipeline,代码行数:26,代码来源:bt_aeTemplateBuilder.py


示例3: makeAppFolders

def makeAppFolders( tabLayout, title, cmdType, folderPath ):
    
    childArr  = cmds.tabLayout( tabLayout, q=1, ca=1 )
    tabLabels = cmds.tabLayout( tabLayout, q=1, tabLabel=1 )
    
    appFolder = folderPath+'/'+ title
    deletePath( appFolder )
    
    if cmdType == 'python':
        initPath = appFolder+'/__init__.py'
        makeFile( initPath )

        for i in range( len( childArr ) ):
            childUi  = childArr[i]
            tabLabel = tabLabels[i].replace( ' ', '_' )
            
            srcFile = appFolder+'/'+tabLabel+'.py'
            makeFile( srcFile )
            
            f = open( srcFile, 'w' )
            f.write( cmds.scrollField( childUi, q=1, tx=1 ) )
            f.close()
        
    elif cmdType == 'mel':
        for i in range( len( childArr ) ):
            childUi  = childArr[i]
            tabLabel = tabLabels[i].replace( ' ', '_' )
            
            srcFile = appFolder+'/'+tabLabel+'.mel'
            makeFile( srcFile )
            
            f = open( srcFile, 'w' )
            f.write( cmds.scrollField( childUi, q=1, tx=1 ) )
            f.close()
开发者ID:jonntd,项目名称:mayadev-1,代码行数:34,代码来源:cmdModel.py


示例4: tdTab

def tdTab(myPath, myDirs, parent):
	'''
	Depending upon how many directory are located in the folder,
		create tabs for each one.
	'''
	print("Create tabs")
	
	# On the nuke side this will be the folder that contain the render passes.
	
	cmds.setParent(parent)
	global tabs, mainTab
	tabs = []
	mainTab = cmds.tabLayout(w=winWidth, h=winWidth, p=parent)	
	# Just create the tabs
	for myDir in myDirs:

		# tabMainCol = cmds.columnLayout()
		tabMainCol = cmds.rowColumnLayout( nc=1, w=winWidth, h=winHeight, cw=[1,winWidth+10])
		# tabMainCol = cmds.formLayout()
		
		#cmds.text(l="This is tab: %s" %myDir, w=winWidth, h=winHeight)
		# Call frameLayout function
		framePath = os.path.join(myPath, myDir)
		frameDirs = os.walk(framePath).next()[1]
		#print(framePath)
		#print(frameDirs)
		tdFrame(framePath, frameDirs, tabMainCol )		
		
		tabs.append(tabMainCol)
		cmds.tabLayout(mainTab, e=True, tl=[tabMainCol, myDir])
		cmds.setParent(mainTab)
		
	cmds.setParent(parent)
	return tabs
开发者ID:creuter23,项目名称:fs-tech-artist,代码行数:34,代码来源:tdClubFiles2.py


示例5: _saveTab

    def _saveTab(self):
	'''
	The name of the tab 
	The frames included
	the attributes for each frame
	'''
	
	# Prompt where to save the file.

	# pack data
	

    	currTab = cmds.tabLayout( self.mainTab, q=True, selectTab=True)
    	tabIndex = cmds.tabLayout( self.mainTab, q=True, selectTabIndex=True) - 1 # tab index are 1 based.
	tabLabels = cmds.tabLayout( self.mainTab, q=True, tl=True )
	
	tabName = tabLabels[tabIndex]
	frameNames = []	
	frames = {}

	
	for frameInfo in self.tabs[self.tabNames[tabIndex]]:
		frameNames.append([frameInfo.frameName, frameInfo.mainLayout])
		frames[frameInfo.mainLayout] = frameInfo.attrs
	
	path = cmds.fileDialog(mode=1)
	if(path):
		fileInfo = open( path, "w" )
		pickle.dump( tabName, fileInfo  )
		pickle.dump( frameNames, fileInfo )
		pickle.dump( frames, fileInfo )
		fileInfo.close()
	else:
		print("Save Cancelled.")
开发者ID:creuter23,项目名称:fs-tech-artist,代码行数:34,代码来源:attr.py


示例6: _addTab

    def _addTab(self, name):
        '''
        Adds an additional tab to the system.
        '''
        
        # Make sure that a tab exists!
        # scroll = cmds.scrollLayout( h=450, parent=self.mainTab )       
        col = cmds.columnLayout(parent=self.mainTab)

        frm = cmds.formLayout( w=450 )
        path = os.path.split(__file__)[0]
	fullPath = lambda x : os.path.join( path, "icons", x )
	
	btn1 = cmds.symbolButton( image=fullPath('plus_16b.xpm'), h=20, 
			    command=Callback(self.addFramePrompt)) # self._attrGUI )
	
	btn2 = cmds.symbolButton( image=fullPath('delete_16b.xpm'), h=20, 
			    command=Callback(self._removeTab ))#command=self._removeAttrs )
			 
	btn3 = cmds.symbolButton( image=fullPath('save_16.xpm'), h=20, 
			    command=Callback(self._saveTab)) # self._attrGUI )
        
	txt = cmds.text( l="" )
	
	cmds.formLayout( frm, e=1, af=[[btn1, "top", 5],[btn1, "left", 5], [btn2, "top", 5],[btn3, "top", 5], [txt, "top", 5], [txt, "right", 0]],
		ac=[[btn2, "left", 0, btn1],[btn3, "left", 0, btn2]])
        cmds.setParent( col )
        # frm = cmds.formLayout( parent=self.mainTab, w=300, h=300 )
        
        
        cmds.tabLayout( self.mainTab, e=1, tl=[col, name])
        self.tabs[col] = []
        self.tabNames.append(col)
        return col
开发者ID:creuter23,项目名称:fs-tech-artist,代码行数:34,代码来源:attr.py


示例7: ModuleTemplateBuilderUI

def ModuleTemplateBuilderUI():
    MTB_UI='MTB_UI'
    if cmds.window(MTB_UI,q=1,ex=1 ):
        cmds.deleteUI(MTB_UI)
    cmds.window(MTB_UI,t='creatureRigs: Modules Builder ' +__version__,mb=1)
    cmds.menu(l='File')
    cmds.menuItem(l='install shelf button',c='')
    cmds.menuItem(label ="Close",c ="")
    cmds.menu(l='Edit')
    cmds.menuItem(l='Toggle Selectable',c='')
    cmds.menu(l='Tools')
    cmds.menuItem(l='Auto Rigger',c='')
    cmds.menuItem(l='Curve Utilities',c='')
    cmds.menu(l='Help')
    cmds.menuItem(label ="How to use",c ="")
    cmds.menuItem(label ="Close",c ="")
    cmds.menuItem(label ='')

    form = cmds.formLayout()
    tabs = cmds.tabLayout(innerMarginWidth=5, innerMarginHeight=5)
    #---------------------
    cmds.formLayout( form, edit=True, attachForm=((tabs, 'top', 0), (tabs, 'left', 0), (tabs, 'bottom', 0),(tabs, 'right', 0)) )
    child1 = cmds.rowColumnLayout(numberOfColumns=1)
    createSkeletonLayout()

    cmds.setParent( '..' )
    child2 = cmds.rowColumnLayout(numberOfColumns=1)
    createRigLayout()
    cmds.setParent( '..' )

    cmds.tabLayout( tabs, edit=True, tabLabel=((child1, ' Create Skeleton '), (child2, ' Create Rig ')))
    cmds.showWindow(MTB_UI)
开发者ID:wangqinghuaTudou,项目名称:test,代码行数:32,代码来源:Ui.py


示例8: buildMainLayout

 def buildMainLayout(self):
     '''Build the main part of the ui
     '''
     
     tabs = mc.tabLayout()
     tab1 = mc.columnLayout(adj=True)
     
     mc.scrollLayout(cr=True)
     self.shelfLayout = mc.shelfLayout()
     
     self.refreshShelfLayout()
     
     mc.setParent(tabs)
     
     tab2 = mc.columnLayout(adj=True)
 
     mc.separator(height=8, style='none')
     mc.text('Select curve(s) to export. Multiple selected curves will be combined.')
     mc.text('Center and fit the curve in the viewport,')
     mc.text('and make sure nothing else is visible for best icon creation.')
     mc.separator(height=16, style='in')
     
     mc.button('Export Selected Curve', command=self.exportControl, annotation='Select a nurbsCurve to export.')
     
     mc.tabLayout( tabs, edit=True, tabLabel=((tab1, 'Import'), 
                                              (tab2, 'Export')
                                              ))
     
     if not mc.shelfLayout(self.shelfLayout, query=True, numberOfChildren=True):
         mc.tabLayout( tabs, edit=True, selectTab=tab2)
开发者ID:Italic-,项目名称:maya-prefs,代码行数:30,代码来源:ml_controlLibrary.py


示例9: duplicateSpecialZ

def duplicateSpecialZ(*args):
    if cmds.window("dupSpecialZ", exists=True):
        cmds.deleteUI("dupSpecialZ")

    cmds.window("dupSpecialZ",title="Jelly Special Z",mnb=True, mxb=False,w=250,h=130,sizeable=False)
    form = cmds.formLayout()
    tabs = cmds.tabLayout(w=250, h=100, bgc = (0.3,0.3,0.3), innerMarginWidth=10, innerMarginHeight=5)
    cmds.formLayout( form, edit=True, attachForm=((tabs, 'top', 0), (tabs, 'left', 0), (tabs, 'bottom', 0), (tabs, 'right', 0)) )
    child1=cmds.columnLayout( columnAttach=('both', 0), rowSpacing=1,columnWidth=250,h=110)
    cmds.text(label="Permanent Distance", bgc=(0.5,0.7,0.5))
    cmds.text(label="Number of copies", align='left')
    cmds.textField('copiesZper',w=200)
    cmds.text(label="Translate", align='left')
    cmds.textField('translateZper',w=200)
    cmds.button(label="Duplicate", bgc=(0.5,0.7,0.5),command=translateZpermanent)
    cmds.setParent( '..' )

    child2=cmds.columnLayout( columnAttach=('both', 0), rowSpacing=1,columnWidth=250,h=110)
    cmds.text(label="Increasing Distance", bgc=(0.5,0.3,0.5))
    cmds.text(label="Number of copies", align='left')
    cmds.textField('copiesZinc',w=200)
    cmds.text(label="Translate", align='left')
    cmds.textField('translateZinc',w=200)
    cmds.button(label="Duplicate",bgc=(0.5,0.3,0.5),command=trasnlateZincreasing)
    cmds.setParent( '..' )

    cmds.tabLayout( tabs, edit=True, tabLabel=((child1, 'Permanent Distance'),(child2,'Increasing Distance')))
    cmds.setParent( '..' )
    cmds.showWindow()
开发者ID:alexanderrichter,项目名称:helga,代码行数:29,代码来源:dynamo.py


示例10: deletetab

def deletetab(*args):
    alltabs = mc.tabLayout ('tabs',q=1,st=1)
    chktabs = mc.tabLayout ('Animation',q=1,st=1)
    chktabs1= mc.tabLayout ('Poses',q=1,st=1)
    if alltabs == 'Animation':
        seltab = mc.tabLayout('Animation',q=1,st=1) 
        mc.deleteUI(seltab)
        Del_tab=savepathini+'Savepose/Animation/'+seltab
        Del1_in=Del_tab+'/'
        list_in=mc.getFileList(fld=Del1_in)
        for i in range(len(list_in)):
            mc.sysFile(Del1_in+'/'+list_in[i],delete=1)
        mc.sysFile(Del_tab,red=1)
        if chktabs=='':
            mc.confirmDialog (title='Error',message='No tabs to delete', button='OK',defaultButton='Yes')    
#        else :
#            return
    else :
        seltab = mc.tabLayout('Poses',q=1,st=1) 
        mc.deleteUI(seltab)
        Del_tab=savepathini+'Savepose/Poses/'+seltab
        Del1_in=Del_tab+'/'
        list_in=mc.getFileList(fld=Del1_in)
        for i in range(len(list_in)):
            mc.sysFile(Del1_in+'/'+list_in[i],delete=1)
        mc.sysFile(Del_tab,red=1)
        if chktabs1=='':
            mc.confirmDialog (title='Error',message='No tabs to delete', button='OK',defaultButton='Yes')    
        else :
            return          
开发者ID:sid2364,项目名称:Maya_Python,代码行数:30,代码来源:SR_AnimPoseLib.py


示例11: savepose

def savepose(*args):
    alltab  = mc.tabLayout('tabs',q=1,st=1)
    chktabs = mc.tabLayout ('Animation',q=1,st=1)
    chktabs1= mc.tabLayout ('Poses',q=1,st=1)
    sel_obj = mc.ls(sl=1)
    if len(sel_obj)==0:
        mc.confirmDialog (title = "Error",message ="Nothing is selected",button= "OK",defaultButton ="Yes")
    else :
        if alltab=='Animation':
            if chktabs=='':
                mc.confirmDialog (title = "Error",message ="Please create a tab first",button= "OK",defaultButton ="Yes")
            else:
                Animname = mc.confirmDialog(
                title='Frame chk',
                message='Pls chk : Start frame and End frame ',
                button=['OK', 'Cancel'],
                defaultButton='OK',
                cancelButton='Cancel',
                dismissString='Cancel')
                if Animname =='OK': 
                    Animposecam(sel_obj)  
        else:
            if chktabs1=='':
                mc.confirmDialog (title = "Error",message ="Please create a tab first",button= "OK",defaultButton ="Yes")
            else:
                Animposecam(sel_obj)
开发者ID:sid2364,项目名称:Maya_Python,代码行数:26,代码来源:SR_AnimPoseLib.py


示例12: mainWindow

def mainWindow(configData, assetsList, modules):
	layoutWidth = 450
	#check if the window already exists, if it does delete it.
	if cmds.window( 'pipeline', exists = True ):
		cmds.deleteUI( 'pipeline' )
	cmds.window( 'pipeline' )
	
	# create the base layouts for the UI
	form = cmds.formLayout( 'pipeline_mainFormLayout' )
	tabs = cmds.tabLayout('pipeline_mainTabsLayout', innerMarginWidth=5, innerMarginHeight=5)
	cmds.formLayout( form, edit=True, attachForm=((tabs, 'top', 0), (tabs, 'left', 0), (tabs, 'bottom', 0), (tabs, 'right', 0)) )
	
	# tab one contents start here
	tabOne = cmds.scrollLayout( horizontalScrollBarThickness=16, verticalScrollBarThickness=16)
	cmds.rowColumnLayout( 'pipeline_TabOne', width = layoutWidth, numberOfColumns = 1 )
	cmds.text( 'pipeline_tabOne_heading', label = 'manage pipline here' )
	
	# use the module names to create the work flow catagories
	for module in modules:
		# becuase the name of hte module is a string, use __import__ method to import it.
		currentModule = __import__(module)
		reload(currentModule)
		#based of the setting in config, create the module or not
		if module + '=True' in configData:
			currentModule.FMlayout(layoutWidth,configData,assetsList)
			cmds.setParent( '..' )
		if module + '=False' in configData:
			currentModule.disabledMessage()
	cmds.setParent('..'), cmds.setParent('..')
	
	# tab two starts here, it contains the options from the config file
	tabTwo = cmds.rowColumnLayout( width = layoutWidth, numberOfColumns = 1 )
	#cmds.text( label = 'This is intenationally blank.' )
	cmds.text( label = '' )
	# loop over the config data, creating relevant checkboxes and textfields
	for data in configData:
		dataName, dataType, property = pipe_func.findDataType(data)
		#print dataName
		if dataType == 'booleanData':
			if property == 'True':
				propertyValue = True
			if property == 'False':
				propertyValue = False
			cmds.checkBox( dataName + 'CB', label = dataName, value = propertyValue)
		if dataType == 'string':
			cmds.text( label = dataName )
			cmds.textField( dataName + 'TF', text = property, width = (layoutWidth -100) )
	# the save button goes here
	cmds.button( label = 'Save settings', command = lambda arg : pipe_func.saveOptionsSettings(configData) )
	cmds.setParent('..'), cmds.setParent('..')
	
	# tab names
	cmds.tabLayout( tabs, edit=True, tabLabel=((tabOne, 'pipeline'), (tabTwo, 'Options')) )
	
	# This line docks the window as tool palette or utility window, so it sits nicey nice at the side
	if cmds.dockControl( 'pipeline', exists = True ):
		cmds.deleteUI( 'pipeline' )
	cmds.dockControl( 'pipeline', label = 'Fire Monkeys Pipline Manager', area='right', content='pipeline', allowedArea='right' )
开发者ID:ALstair,项目名称:styleExample,代码行数:58,代码来源:pipeline_mainWindow.py


示例13: uvSetOptions

    def uvSetOptions(self):
        window_name = "uvSetOptions"
        if cmds.window(window_name, q=True, exists=True):
            cmds.deleteUI(window_name)
        self.optionWindow = cmds.window(window_name, title="Lightmap Options")
        tabs = cmds.tabLayout(innerMarginWidth=5, innerMarginHeight=5)
        
        standardLayout = cmds.columnLayout(parent=self.optionWindow, adj=True)
        self.uvSetChoice = cmds.optionMenuGrp(label="Source UV Set")
        for uvSet in self.uvList:    #lists selections' uv sets
            cmds.menuItem(label=uvSet)
        self.lightmapBox = cmds.textFieldGrp(label="New UV Set Name", text=self.lightmap)
        self.presetSelect = cmds.optionMenuGrp(self.presetSelect, label="Spacing Presets", cc=self.presetValue)
        for preset in self.spacingPresets:
            cmds.menuItem(label=preset)
        cmds.floatSliderGrp(self.shellSpacingSlider, label="Percentage Space:", v=3.200, step=0.001, max=5.000, field=True)
        print cmds.floatSliderGrp(self.shellSpacingSlider, q=True, v=True)
        cmds.button(label="Generate Lightmap", width=200, c=self.copyAndLayoutCheck)
        
        advancedLayout = cmds.columnLayout(parent=self.optionWindow, adj=True)
        
        layoutObjectsCollection = cmds.radioCollection()                        #radial button, creates new layout
        layoutObjectsCollection_layout = cmds.columnLayout()
        cmds.text(label = "Layout objects:", p=layoutObjectsCollection_layout)
        rbl = cmds.radioButton(label="Per object(overlapping)", p=layoutObjectsCollection_layout, onc=lambda *args: self.perObjectLayout(0))
        rbl = cmds.radioButton(label="Single or multiple objects(non-overlapping)", p=layoutObjectsCollection_layout, onc=lambda *args: self.perObjectLayout(1), sl=True )
                
        prescaleCollection = cmds.radioCollection()                        #radial button, creates new layout
        prescaleCollection_layout = cmds.columnLayout()
        cmds.text(label = "Prescale:", p=prescaleCollection_layout)
        rbl = cmds.radioButton(label="None", p=prescaleCollection_layout, onc=lambda *args: self.prescaleLayout(0))
        rbl = cmds.radioButton(label="Object", p=prescaleCollection_layout, onc=lambda *args: self.prescaleLayout(1))
        rbl = cmds.radioButton(label="World", p=prescaleCollection_layout, onc=lambda *args: self.prescaleLayout(2), sl=True)

        collection = cmds.radioCollection()                        #radial button, creates new layout
        collection_layout = cmds.columnLayout()
        cmds.text(label = "Shell Layout:", p=collection_layout)
        rbl = cmds.radioButton(label="Into region", p=collection_layout, onc=lambda *args: self.shellLayout(0), sl=True)
        rbl = cmds.radioButton(label="Along U", p=collection_layout, onc=lambda *args: self.shellLayout(1))
        rbl = cmds.radioButton(label="None", p=collection_layout, onc=lambda *args: self.shellLayout(2))
           
        collection = cmds.radioCollection()                        #radial button, creates new layout
        collection_layout = cmds.columnLayout()
        cmds.text(label = "Scale:", p=collection_layout)
        rbl = cmds.radioButton(label="None", p=collection_layout, onc=lambda *args: self.scaleLayout(0))
        rbl = cmds.radioButton(label="Uniform", p=collection_layout, onc=lambda *args: self.scaleLayout(1), sl=True)
        rbl = cmds.radioButton(label="Stretch", p=collection_layout, onc=lambda *args: self.scaleLayout(2))
        
        rotateCollection = cmds.radioCollection()                        #radial button, creates new layout
        rotateCollection_layout = cmds.columnLayout()
        cmds.text(label = "Rotate:", p=rotateCollection_layout)
        rbl = cmds.radioButton(label="None", p=rotateCollection_layout, onc=lambda *args: self.rotationLayout(0))
        rbl = cmds.radioButton(label="90 degrees", p=rotateCollection_layout, onc=lambda *args: self.rotationLayout(1), sl=True)
        rbl = cmds.radioButton(label="Free", p=rotateCollection_layout, onc=lambda *args: self.rotationLayout(2))
        
        cmds.tabLayout( tabs, edit=True, tabLabel=((standardLayout, 'General'), (advancedLayout, 'Advanced')) ) 
        
        cmds.showWindow(self.optionWindow)
开发者ID:RinglingGameArt,项目名称:GADTools,代码行数:58,代码来源:dcollins_uvLightmap.py


示例14: __init__

	def __init__(self):
		self.moduleInstance = None
	
		self.deleteSymmetryMoveExpressions()
	    #store UI elements in a dictionary
		self.UIElements = {}
		
		if cmds.window("blueprint_UI_window", exists=True):
			cmds.deleteUI("blueprint_UI_window")
			cmds.windowPref( "blueprint_UI_window", remove=True )
			
		
		windowWidth = 400
		windowHeight = 598
		
		self.UIElements ["window"] = cmds.window("blueprint_UI_window", width=windowWidth, height=windowHeight, title="Blueprint Module UI", sizeable = True)
        
		self.UIElements["topLevelColumn"] = cmds.columnLayout (adjustableColumn=True, columnAlign="center")
		
		#Setup taps
		tabHeight = 500
		self.UIElements["tabs"] = cmds.tabLayout(height=tabHeight,width=windowWidth, innerMarginWidth=5, innerMarginHeight=5)
		
		tabWidth = cmds.tabLayout(self.UIElements["tabs"], q=True, width=True)
		
		self.scrollWidth = tabWidth - 40
		
		self.initialiseModuleTab(tabHeight,tabWidth)
		
		cmds.setParent(self.UIElements["tabs"])
		self.initialiseTemplatesTab(tabHeight, tabWidth)
		
		
		scenePublished = cmds.objExists('Scene_Published')
		sceneUnlocked = not cmds.objExists('Scene_Locked') and not scenePublished
		
		cmds.tabLayout(self.UIElements["tabs"], edit=True, tabLabelIndex=([1,"Modules"],[2,'Templates']),enable=sceneUnlocked)
		
		cmds.setParent(self.UIElements['topLevelColumn'])
		self.UIElements['lockPublishColumn'] = cmds.columnLayout(adj=True,columnAlign='center',rs=3)
		
		cmds.separator()
		
		self.UIElements['lockBtn'] = cmds.button(label='Lock', c=self.lock, enable=sceneUnlocked)
		
		cmds.separator()
		
		self.UIElements['publishBtn'] = cmds.button(label='Publish',enable=not sceneUnlocked and not scenePublished, c=self.publish)
		
		cmds.separator()
		
		
		
		#Display window
		cmds.showWindow(self.UIElements["window"])
		
		self.createScriptJob()
开发者ID:pouyaz123,项目名称:Python-character-pipeline,代码行数:57,代码来源:blueprint_UI.py


示例15: __init__

	def __init__( self ):
		window_name = 'fissureToolWindow'
		window_width = 200
		window_height = 200

		if cmds.window( window_name, exists = True, q = True ):
			cmds.deleteUI( window_name )

		cmds.window( window_name, title = 'Fissure Tool {0}'.format( VERSION ), widthHeight = ( window_width, window_height ) )
		form = cmds.formLayout()
		tabs = cmds.tabLayout( innerMarginWidth = 5, innerMarginHeight = 5 )
		cmds.formLayout( form, edit = True, attachForm = ( ( tabs, 'top', 0 ), ( tabs, 'left', 0 ), ( tabs, 'bottom', 0 ), ( tabs, 'right', 0 ) ) )

		# Crack Row
		crack_row = cmds.rowColumnLayout( numberOfColumns = 1 )
		cmds.separator( style = 'none', height = 20 )
		cmds.text( label = 'Crack Pieces' )
		self.crack_float = cmds.floatField( value = 50, precision = 0 )
		cmds.button( l = 'Crack Mesh', w = window_width, c = self.run_crack_obj )
		cmds.separator( height = 40, style = 'in' )

		cmds.button( l = 'Create Plane Rig', w = window_width, c = self.run_create_plane_rig )
		cmds.button( l = 'Attach Plane Rig', w = window_width, c = self.run_attach_plane_rig )
		cmds.separator( height = 40, style = 'in' )

		cmds.button( l = 'Create Cluster', w = window_width, c = self.run_create_cluster )
		cmds.setParent( '..' )

		# Simulation Row
		sim_row = cmds.rowColumnLayout( numberOfColumns = 1 )
		cmds.separator( style = 'none', height = 20 )
		cmds.text( label = 'Gravity Magnitude' )
		self.magnitude_float = cmds.floatField( value = 50, precision = 2 )
		cmds.button( l = 'Add Rigid Body', w = window_width, c = self.run_add_rigid_body )
		cmds.separator( height = 40, style = 'in' )

		cmds.button( l = 'Add Crack Distance', w = window_width, c = self.run_create_crack_distance )
		cmds.button( l = 'Run Crack Distance', w = window_width, c = self.run_build_crack_distance )
		cmds.separator( height = 40, style = 'in' )

		cmds.button( l = 'Bake Simulation', w = window_width, c = self.run_bake_sim )
		cmds.setParent( '..' )

		# Export Row
		export_row = cmds.rowColumnLayout( numberOfColumns = 1 )
		cmds.separator( style = 'none', height = 20 )
		cmds.button( l = 'Convert to game skin', w = window_width, c = self.run_convert_to_game_skin )
		cmds.separator( height = 40, style = 'in' )

		cmds.button( l = 'Export FBX Mesh', w = window_width )
		cmds.button( l = 'Export FBX Skin', w = window_width )
		cmds.button( l = 'Export FBX Animation', w = window_width )
		cmds.setParent( '..' )

		cmds.tabLayout( tabs, edit = True, tabLabel = ( ( crack_row, 'Crack' ), ( sim_row, 'Simulation' ), ( export_row, 'Export' ) ) )

		cmds.showWindow()
开发者ID:StuTozer,项目名称:art_pipeline,代码行数:57,代码来源:crack_ui.py


示例16: drawTweakTabs

    def drawTweakTabs(self):
        mainTl = self.ui['tabLayout']
        tabs = cmds.tabLayout(mainTl, q=True, childArray=True)
        labels = cmds.tabLayout(mainTl, q=True, tabLabel=True)
        for twkLst in self.tweaks:
            # search tabs for this tweak list
            try:
                idx = labels.index(twkLst)
                # delete content if layout is available
                col = tabs[idx]
                content = cmds.columnLayout(col, q=True, childArray=True)
                if content:
                    cmds.deleteUI(content)
            # or create a new one
            except:
                col = cmds.columnLayout(adjustableColumn=True, parent=mainTl)
                cmds.tabLayout(mainTl, edit=True, tabLabel=((col, twkLst)))

            for typ in self.tweaks[twkLst]:
                if not self.tweaks[twkLst][typ]:
                    continue
                for item in self.tweaks[twkLst][typ]:
                    if typ == 'hotkeys':
                        keyLabel = hotkey.makeKeyLabel(self.tweaks[twkLst][typ][item])
                        checkValue = 'hotkeyBackups' in self.prefsDict and keyLabel in self.prefsDict['hotkeyBackups']
                        
                        # a collapsable frame with checkbox in front
                        cmds.rowLayout(numberOfColumns=2, parent=col, adjustableColumn=2)
                        cmds.checkBox(label='', w=20, value=checkValue,
                                      onCommand=partial(hotkey.setup, item, self.tweaks[twkLst]['hotkeys'][item]),
                                      offCommand=partial(hotkey.reset, item, self.tweaks[twkLst]['hotkeys'][item], keyLabel))
                        cmds.frameLayout(label=('%s (%s)') % (item, keyLabel), collapsable=True, collapse=True, borderStyle='in')
                        
                        cmds.columnLayout(adjustableColumn=True)
                        # first version: write everything in textFields:
                        for attr in self.tweaks[twkLst][typ][item]:
                            cmds.textFieldGrp(label='%s:' % attr, text=self.tweaks[twkLst][typ][item][attr],
                                              cw=(1, LABEL_W), adjustableColumn=2)

                        key = self.tweaks[twkLst][typ][item]['key']
                        ctl = 'ctl' in self.tweaks[twkLst][typ][item]
                        alt = 'alt' in self.tweaks[twkLst][typ][item]
                        data = hotkey.gather(key, ctl, alt)
                        # show the override item when any hotkey is already found
                        if data:
                            # and if set by us and actually overrides something
                            if checkValue:
                                if self.prefsDict['hotkeyBackups'][keyLabel]:
                                    overrideLabel = self.prefsDict['hotkeyBackups'][keyLabel]['name']
                                else:
                                    overrideLabel = None
                            else:
                                overrideLabel = data['name']
                            if overrideLabel:
                                cmds.textFieldGrp(label='overrides:', text=overrideLabel, bgc=(0.4, 0, 0),
                                                  cw=(1, LABEL_W), adjustableColumn=2)
开发者ID:ewerybody,项目名称:melDrop,代码行数:56,代码来源:ui.py


示例17: createUploadWindow

def createUploadWindow():
    #---------------------------------------------以下窗体显示部分------------------------------------------
    uploadCacheWindow = cmds.window(title = "Upload Cache", iconName = "UC", widthHeight = (420, 160))
    
    uploadForm = cmds.formLayout()
    #------------------以下为标签的内容---------------------
    tabs = cmds.tabLayout(innerMarginWidth=5, innerMarginHeight=5)
    
    #标签1
    child1 = cmds.rowColumnLayout(numberOfColumns=2)    
    chlid1Form = cmds.formLayout()
    uCOptionMenu = cmds.optionMenu(label = "Project Name:     ")
    projectNameList = getProjectName()  #添加optionMenu的项
    for projectName in projectNameList:
        cmds.menuItem(label = projectName)
    tFolder = getUploadDir(uCOptionMenu)    #拿到tFolder
    uploadTextRowLayout = cmds.rowColumnLayout(numberOfColumns=2, columnAttach=(1, 'right', 0), columnWidth=[(1, 88), (2, 280)], rowSpacing = (1, 4))
    uploadDirText = cmds.text(label="Upload Directory: ")
    uploadDirTextField = cmds.textField(text = tFolder, editable = False)
    cmds.setParent("..")
    cmds.formLayout(chlid1Form, edit=True, attachForm=[(uCOptionMenu, "top", 6), (uCOptionMenu, "left", 6), (uCOptionMenu, "right", 4),
                                        (uploadTextRowLayout, "left", 4), (uploadTextRowLayout, "bottom", 10), (uploadTextRowLayout, "right", 4)],
                                        attachControl=[(uploadTextRowLayout, "top", 12, uCOptionMenu)] )
    cmds.setParent( '..' )
    cmds.setParent( '..' )

    #标签2
    child2 = cmds.rowColumnLayout(numberOfColumns=2)
    chlid2Form = cmds.formLayout()
    tFolder = ""
    chlid2TextFBG = cmds.textFieldButtonGrp(label = "Upload Directory: ", columnWidth = [(1, 90),(2, 260),(3,80)], text = tFolder, editable = False, buttonLabel = "brower")
    browerNoticeText = cmds.text("Please Select Project Name!")
    cmds.formLayout(chlid2Form, edit=True, attachForm=[(chlid2TextFBG, "top", 6), (chlid2TextFBG, "left", 0), (chlid2TextFBG, "right", 0),
                                                       (browerNoticeText, "left", 4), (browerNoticeText, "bottom", 10), (browerNoticeText, "right", 4)])
    cmds.setParent( '..' )
    cmds.setParent( '..' )
    
    cmds.tabLayout(tabs, edit=True, tabLabel=((child1, "Basic"), (child2, "Advanced")) )
    cmds.setParent( '..' )
    #----------------以下为button的内容-----------------
    uCButtonRowLayout = cmds.rowLayout(numberOfColumns = 2, columnAttach = [(1, "right", 0),(2, "right", 0)], columnWidth=[(1, 280), (2, 78)])
    #cmds.button(label = "Upload", width = 75, command = 'clothAndHair.chMain.otherWinCmd.doUploadCache(\"' + uCOptionMenu + '\", \"' + uploadCacheWindow+'\")')
    uploadButton = cmds.button(label = "Upload", width = 75)
    closeButton = cmds.button(label = "Close", width = 75)
    cmds.setParent("..")
    
    cmds.formLayout(uploadForm, edit=True, attachForm=[(tabs, "top", 4), (tabs, "left", 4), (tabs, "bottom", 50), (tabs, "right", 4),
                                                    (uCButtonRowLayout, "bottom", 12),(uCButtonRowLayout, "left", 52), (uCButtonRowLayout, "right", 4)],
                                                    attachControl=[(uCButtonRowLayout, "top", 12, tabs)] )
    cmds.showWindow(uploadCacheWindow)
    
    #---------------------------------------------以下窗体指令部分------------------------------------------
    cmds.optionMenu(uCOptionMenu, edit = True, changeCommand = (lambda x:changeProject(uploadDirTextField, uCOptionMenu)))
    cmds.textFieldButtonGrp(chlid2TextFBG, edit = True, buttonCommand = (lambda:getUploadDirAdv(chlid2TextFBG)))
    cmds.button(uploadButton, edit = True, command = lambda x:doUploadCache(tabs , child1 , child2 , uploadDirTextField , chlid2TextFBG , uploadCacheWindow ))
    cmds.button(closeButton, edit = True, command=('cmds.deleteUI(\"' + uploadCacheWindow + '\", window=True)'))
开发者ID:chloechan,项目名称:clothAndHair,代码行数:56,代码来源:cacheAllMag.py


示例18: createUI

def createUI():

	preUI()

	mc.window( 'gitMayaWin', title="Git Tools", iconName='', widthHeight=(200, 55) )
	mc.menuBarLayout()
	mc.menu( label='File' )
	mc.menuItem( label='Create Repo', c=lambda *args: createRepo() )
	mc.setParent( '..' )
	mc.columnLayout( adjustableColumn=True )
	mc.rowLayout( numberOfColumns=3, columnWidth3=(80, 80, 80))
	mc.button( label='Create Repo', w=80, h=80)
	mc.button( label='Clone Repo', w=80, h=80)
	mc.setParent( '..' )
	mc.separator(h=10, style='none')
	mc.textFieldButtonGrp( 'repoPath', label='Repo Path', text='', buttonLabel='Browse', bc=lambda *args: getFolder() )
	mc.button( label='Refresh', c=lambda *args: initRepo() )
	mc.separator(h=10, style='none')
	mc.tabLayout(innerMarginWidth=5, innerMarginHeight=5)
	mc.columnLayout( 'Files', adjustableColumn=True )
	mc.rowColumnLayout(nc=5)
	mc.separator(h=20, style='none')
	mc.text(l='Working Copy Changes')
	mc.separator(h=20, style='none')
	mc.separator(h=20, style='none')
	mc.text(l='Staged Changes')
	mc.columnLayout( 'workingChangesColor', adjustableColumn=True)
	mc.setParent( '..' )
	mc.textScrollList( 'workingChanges', numberOfRows=16, allowMultiSelection=True)
	mc.columnLayout( adjustableColumn=True )
	mc.button( label='>>', c=lambda *args: addChanged())
	mc.button( label='>' )
	mc.separator(h=30, style='none')
	mc.button( label='<', c=lambda *args: remSelected())
	mc.button( label='<<' )
	mc.setParent( '..' )
	mc.columnLayout( 'stagedChangesColor', adjustableColumn=True )
	mc.setParent( '..' )
	mc.textScrollList( 'stagedChanges', numberOfRows=16, allowMultiSelection=True)
	mc.setParent( '..' )
	mc.textFieldButtonGrp( 'commitMessage', label='Message', text='', buttonLabel='Commit', bc=lambda *args: doCommit() )
	mc.separator(h=20)
	mc.setParent( '..' )

	mc.columnLayout( 'History', adjustableColumn=True )
	mc.intFieldGrp( 'commitCount', numberOfFields=1, label='Number of Commits', value1=10, cc=lambda *args: getCommits())
	mc.scrollLayout(h=250, horizontalScrollBarThickness=16, verticalScrollBarThickness=16)
	mc.rowColumnLayout( 'commitsGrid', numberOfColumns=2, cw=([1,450],[2,150]) )
	mc.setParent( '..' )
	mc.setParent( '..' )
	mc.text(l='Commited Changes')
	mc.textScrollList( 'commitChanges', numberOfRows=16, allowMultiSelection=True)
	mc.showWindow( 'gitMayaWin' )

	postUI()
开发者ID:artbycrunk,项目名称:maya-git,代码行数:55,代码来源:ui.py


示例19: zbw_mmUI

def zbw_mmUI():
    """the UI for the script"""

    if (cmds.window('`UI', exists=True)):
        cmds.deleteUI('zbw_messageMapperUI', window=True)
        cmds.windowPref('zbw_messageMapperUI', remove=True)
    window=cmds.window('zbw_messageMapperUI', widthHeight=(600,400), title='zbw_messageMapper')

    cmds.tabLayout(h=400)
    cmds.columnLayout("mmAddNewConnections", h=400)
    #2nd small column for the persistant UI
    cmds.columnLayout(w=400, h=100)
    cmds.textFieldButtonGrp('zbw_tfbg_baseObj', cal=(1, "left"), cw3=(75, 200, 75), label="base object", w=400, bl="choose object", bc=partial(zbw_mmAddBase, "zbw_tfbg_baseObj", "clear"))

    #button to create new message/obj field groups
    cmds.separator(h=20, st="single")
    cmds.button(w=150, l="add new message attr/obj", c=zbw_mmAddMObjs)
    cmds.separator(h=20, st="single")

    cmds.setParent(u=True)
    cmds.rowColumnLayout("mmRCLayout", nc=2, co=(2, "left", 30))

    #back up to the 2nd columnLayout
    cmds.setParent(u=True)

    cmds.separator(h=20, st="single")
    #create button to delete last pair of text fields
    cmds.button("deleteLastButton", w=150, bgc=(.5,0,0), l="delete last attr/obj pair", c=zbw_mmDeleteLast)
    cmds.separator(h=20, st="double")

    #button to do connect all the attr/messages
    cmds.button("createMessageButton", w=150, bgc=(0,.5,0), l="create messages", c=zbw_mmConnectM)

    #back up to the main column
    cmds.setParent(u=True)
    #back up to the tab
    cmds.setParent(u=True)
    #new tab
    cmds.columnLayout("existingMessages", w=600, h=400)

    #Here we add stuff to the second tab
    cmds.textFieldButtonGrp("mmListMessages", cal=(1, "left"), cw3=(75,200,75), label="baseObject", w=400, bl="choose object", bc=partial(zbw_mmAddBase,"mmListMessages", "noClear"))
    cmds.separator(h=20, st="double")
    #button to create list of message attrs
    cmds.button(w=200, l="list all message attr for base", bgc = (0,.5,0), c=partial(zbw_mmListCurrentMessages, "mmListMessages"))
    cmds.separator(h=20, st="double")
    cmds.text("rt-click on the attr or object to change the connection")
    cmds.separator(h=20, st="do 

鲜花

握手

雷人

路过

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

请发表评论

全部评论

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