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


Python cmds.tabLayout函数代码示例

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


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


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