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

Python cmds.paneLayout函数代码示例

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

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



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

示例1: view_outliner

def view_outliner(floating=False):
    """
    Toggle the outliner on as a dock window to the right side of the viewport,
    if floating is ture then toggle outliner to a floating window.

    makes sure to delete the dockControl UI when visibility is lost to
    ensure the name is available for maya.

    .. old::
        panel_window = 'outlinerPanel1Window'
        if cmds.window(panel_window, q=True, exists=True):
            cmds.deleteUI(panel_window, window=True)
        else:
            panel = cmds.getPanel(withLabel='Outliner')
            cmds.outlinerPanel(panel, e=True, tearOff=True)
    """
    # Constants
    TABLAYOUT = "MAM_TAB_LAYOUT"
    DOCK_CONTROL_OUTLINER = "MAM_DOCK_CONTROL_OUTLINER"

    if not cmds.paneLayout(TABLAYOUT, q=True, ex=True):
        cmds.paneLayout(TABLAYOUT, p="viewPanes")  # mel.eval('$tmp = $gMainWindow'))

    # Creat or show outliner.
    if not cmds.dockControl(DOCK_CONTROL_OUTLINER, q=True, ex=True):
        cmds.dockControl(
            DOCK_CONTROL_OUTLINER,
            label="Outliner",
            width=280,
            content=TABLAYOUT,
            allowedArea=["left", "right"],
            area="right",
        )

    # Tear it off or dock it depending on floating arg.
    vis_state = cmds.dockControl(DOCK_CONTROL_OUTLINER, q=True, vis=True)
    fl_state = cmds.dockControl(DOCK_CONTROL_OUTLINER, q=True, fl=True)
    cmds.dockControl(DOCK_CONTROL_OUTLINER, e=True, fl=floating)
    if vis_state and not fl_state == floating:
        pass
    else:
        cmds.dockControl(
            DOCK_CONTROL_OUTLINER, e=True, vis=not (cmds.dockControl(DOCK_CONTROL_OUTLINER, q=True, vis=True))
        )

    if not cmds.dockControl(DOCK_CONTROL_OUTLINER, q=True, vis=True):
        try:
            cmds.deleteUI(DOCK_CONTROL_OUTLINER)
        except RuntimeError:
            pass
    else:
        # Create outliner pane under tablayout if it's not there.
        outliner_window = "outlinerPanel1Window"
        if not cmds.control(outliner_window, q=True, ex=True):
            panel = cmds.getPanel(withLabel="Outliner")
            cmds.outlinerPanel(panel, e=True, p=TABLAYOUT)
            # cmds.control(outliner_window, e=True, p=TABLAYOUT)

    if floating:
        cmds.dockControl(DOCK_CONTROL_OUTLINER, e=True, height=600)
开发者ID:arubertoson,项目名称:maya-mamtools,代码行数:60,代码来源:display.py


示例2: userGuide

def userGuide(*argv):
    
    if cmds.window("UserGuideWindow", exists = True):
        cmds.deleteUI("UserGuideWindow")
        
    window = cmds.window("UserGuideWindow",title = "User Guide for Galaxy Modifier v0.2", w = 600,  
                         minimizeButton = True, maximizeButton = False, sizeable = True) 
    
    cmds.paneLayout()
    
    cmds.textScrollList( "guideInfo", allowMultiSelection = False, 
                         append=[ "//    作者:李宏杰",
                                  "//    星系编辑脚本,版本V0.1,20150415",
                                  "//    脚本主页:http://lhj.nkco.org/?p=1173", 
                                  "",
                                  "*使用步骤:",
                                  "    1、使用Maya打开随脚本一起下载的MyGalaxy.mb,同时把脚本放到Maya的脚本目录下,", 
                                  "        例如 C:\Users\Lee\Documents\maya\2015-x64\zh_CN\scripts;", 
                                  "    2、在Maya的Python命令框输入以下语句,并拖动到工具栏:",
                                  "        import MyGalaxy", 
                                  "        reload(MyGalaxy)", 
                                  "        MyGalaxy.createUI()", 
                                  "    3、自由调节各参数至获得满意效果即可。", 
                                  "", 
                                  "*参数说明:(模型中的星系由两层粒子组成,一层代表星星,一层代表星云)", 
                                  "    Scale Factor: 按比例放大/缩小;", 
                                  "    Galaxy Color:星系的主体颜色。星系的颜色会以该颜色为基色随机。", 
                                  "    Star Count:星星的数量;", 
                                  "    Star Radius:星星的密度(多点半径);", 
                                  "    Cloud Radius:星云的粒子半径;", 
                                  "    Star Opacity, Cloud Opacity:星星/星云的透明度;"]
                         )    
    
    cmds.showWindow(window)
开发者ID:Wilhelmshaven,项目名称:Maya-Galaxy,代码行数:34,代码来源:Maya_Galaxy.py


示例3: gui

def gui():
	global txt_list
	
	if (cmds.window(win, q=True, ex=True)):
		cmds.deleteUI(win)
		
	cmds.window(win, w=170)
	main_layout= cmds.columnLayout(adj=True)
	
	cmds.paneLayout(cn='vertical2', w=width)
	txt_list = cmds.textScrollList(w=width, a=test_list)
	
	cmds.columnLayout(adj=True, w=width/2)
	cmds.button(l='Move Up', w=width/1.5, c=scriptname + '.move_up()')
	cmds.button(l='Move Down', w=width/1.5, c=scriptname + '.move_down()')
	cmds.button(l='Delete', w=width/1.5, c=scriptname + '.remove_item()')
	
	cmds.text(l='Sort')
	cmds.button(l='ABC', w=width/1.5, c=scriptname + '.sort_abc()')
	cmds.button(l='Type', w=width/1.5)
	cmds.button(l='Default', w=width/1.5, c=scriptname + '.sort_default()')
	cmds.setParent(main_layout)
	
	cmds.separator(w=width, h=5)
	cmds.text(l='Create')
	
	cmds.rowColumnLayout(nc=2)
	cmds.button(l='pmAvg', w=width/4)
	cmds.button(l='multDiv', w=width/4)
	
	cmds.showWindow(win)
开发者ID:creuter23,项目名称:fs-tech-artist,代码行数:31,代码来源:text_scroll_tool.py


示例4: displayUI

	def displayUI(self):
		
		windowName = 'LCMTUIWindow'
		if cmds.window(windowName, exists=True):
			cmds.deleteUI(windowName)
		window = cmds.window(windowName, menuBar = True,t="LCMT v3.1.1")
		fileMenu = cmds.menu( label='Manage Light Types')
		cmds.menuItem( label='Add More Light Types',command=lambda *args:self.addLightTypes()) 
		cmds.menuItem( label='See Current Light Types', command=lambda *args:self.displayLightTypes()) 
		cmds.menuItem( label='Reset Light Types to Default Values', command=lambda *args:self.resetLightTypesToDefault()) 
		
		cmds.paneLayout( configuration='vertical2' )
		lightStageColumn = cmds.columnLayout(adjustableColumn=True)
		cmds.text('Lights in the SCENE')
		lights = cmds.ls(dag =True,visible=True,lights=True, type='mentalrayIblShape')  
		lightList = cmds.iconTextScrollList(allowMultiSelection=True,  append=lights)
		cmds.rowLayout(numberOfColumns = 2)
		useGroupLights = cmds.checkBox( label='Group Lights', onCommand = lambda *args: self.updateScollList(True, lightList), offCommand = lambda *args: self.updateScollList(False, lightList))    
		cmds.checkBox( label='Save Images?', cc = lambda *args: self.toggleSaveImages())  
		cmds.setParent('..')
		cmds.iconTextScrollList(lightList,edit=True,selectCommand=lambda *args: cmds.select(self.getElementsFromLightScrollList(lightList,useGroupLights),vis=True))    
		cmds.button(label='Render Lights!', command = lambda *args: self.renderAllLights(self.getElementsFromLightScrollList(lightList,useGroupLights),cmds.checkBox(useGroupLights, query=True, value=True)))  
		cmds.setParent('..')
		renderLayersColumn = cmds.columnLayout(adjustableColumn=True)
		#new column    
		cmds.text('Geometry in the SCENE')
		geometry =  cmds.ls(geometry=True)
		#take out the ibl shapes from the geo selection
		geometry = list(set(geometry) - set(lights))   
		geoList = cmds.iconTextScrollList(allowMultiSelection=True, append=geometry,selectCommand=lambda *args: cmds.select(cmds.iconTextScrollList(geoList, query=True, si=True )) )
		cmds.text('Create Render Layers from selected geometry and lights')      
		cmds.button(label='Create Render Layers!', command = lambda *args: self.createLayersFromLights(cmds.iconTextScrollList(geoList, query=True, si=True ),self.getElementsFromLightScrollList(lightList,useGroupLights)))  
		cmds.setParent('..')
		cmds.showWindow()
开发者ID:nestorprado,项目名称:light-contribution-management-tool,代码行数:34,代码来源:lcmtv311_stable.py


示例5: SelectionError

def SelectionError(*args):
	WindowCheck = cmds.window(title = 'ERROR', widthHeight = (400, 100))
	CHECK = cmds.ls( selection=True )
	if len(CHECK) == 0:
		#cmds.error( "###     Please Select CHAR_HULL_BASE     ###" )
		cmds.paneLayout()
		cmds.scrollField(wordWrap=True, text='       ###     Please Select CHAR_HULL_GEO     ###')
		cmds.showWindow(WindowCheck)
		cmds.showSelectionInTitle(WindowCheck)
开发者ID:ChengJiunHao,项目名称:BBB_stuff,代码行数:9,代码来源:BBB_FX.py


示例6: takePicture

 def takePicture(self,*args):
     global screenShotPanelVar
     cmds.formLayout()
     cmas=cmds.columnLayout(adj=True)
     cmds.paneLayout(w=150,h=150)
     screenShotPanelVar=cmds.modelPanel(cam='persp',mbv=False)
     cmds.modelEditor(screenShotPanelVar,e=True,da='smoothShaded',hud=False,jx=False,dtx=True,grid=False)
     cmds.separator(p=cmas)
     cmds.button(l='SET AS PREVIEW',p=cmas, c=self.takePictureProcess)
     return
开发者ID:andrewwillish,项目名称:veRegistrarFileManager,代码行数:10,代码来源:veRegAssetManager.py


示例7: FBXExporter_AnimationHelpWindow

def FBXExporter_AnimationHelpWindow():
    ui_animHelpWindow = "ui_FBXExporter_AnimationHelpWindow"
    if cmds.window(ui_animHelpWindow, exists=True):
        cmds.deleteUI(ui_animHelpWindow)
        
    cmds.window(ui_animHelpWindow, s=True, width=500, height=500, menuBar=True, title="Help on Animation Export")
    cmds.paneLayout(configuration='horizontal4')
    cmds.scrollField(editable=False, wordWrap=True, text="Animation Export: \nAnimation export assumes single-level referencing with proper namesapce.\n\nActors: \nAll referenced characters with a origin joint tagged with the origin attribute will be listed in the Actor's field by their namespace. Please see the modeling help window for how to tage a character's origin with the origin attribute.\n\nExport Nodes:\nThe Export Nodes panel will fill in with export nodes connected to the origin of the selected actor from the Actor's field. Clicking on the New Export Node will create a new node. Each export node represents a seperate animation.\n\nExport:\nThe Export flag means the current export ndoe will be available for export. All nodes wihtout this checked will not be exported.\n\nMove to origin:\nNot yet supported\n\nSub Range:\nTurn this on to enable the sub-range option for the selected node. This will enable the Start Frame and End Frame fields where you can set the range for the specified animation. Otherwise, the animation will use the frame range of the file.\n\nExport File Name:\nClick on the Browse button to browse to where you want the file to go. The path will be project relative.\n\nExport Selected Animation:\nClick this button to export the animation selected in Export Nodes\n\nExport All Animations For Selected Character:\nClick this button to export all animations for the selected actor in the Actors filed. This flag will ignore what is selected in Export Nodes and export from all found nodes for the character\n\nExport All Animations:\nClick this button to export all animations for all characters. All selections will be ignored" )		
    
    cmds.showWindow(ui_animHelpWindow)
开发者ID:orekamenpe,项目名称:maya-scripts,代码行数:10,代码来源:FBXAnimationExporter.py


示例8: FBXExporter_ModelHelpWindow

def FBXExporter_ModelHelpWindow():
    ui_modelHelpWindow = "ui_FBXExporter_ModelHelpWindow"
    if cmds.window(ui_modelHelpWindow, exists=True):
        cmds.deleteUI(ui_modelHelpWindow)
        
    cmds.window(ui_modelHelpWindow, s=True, width=500, height=500, menuBar=True, title="Help on Model Export")
    cmds.paneLayout(configuration='horizontal4')
    cmds.scrollField(editable=False, wordWrap=True, text="Model Export: \nModel exporter assumes one skeleton for export. Referencing for model export is not supported\n\nRoot Joints: \nPanel will list all the joints tagged with the \"origin\" attribute. If no joint is tagged with the attribute, it will list all joints in the scene and turn red. Select the root joint and click the Tag as Origin button.\n\nExport Nodes:\nThe Export Nodes panel will fill in with export nodes connected to the origin of the selected actor from the Actor's field. Clicking on the New Export Node will create a new node. Each export node represents a seperate character export (for example, seperate LOD's).\n\nMeshes:\nThe Meshes panel shows all the geometry associated with the selected export node. This can be used if you have mesh variations skinned to the same rig or LOD's.\n\nExport File Name:\nClick on the Browse button to browse to where you want the file to go. The path will be project relative.\n\nExport Selected Character:\nClick this button to export the character selected in Export Nodes\n\nExport All Characters:\nClick this button to export all character definitions for the skeleton. All selections will be ignored" )

    cmds.showWindow(ui_modelHelpWindow)
开发者ID:orekamenpe,项目名称:maya-scripts,代码行数:10,代码来源:FBXAnimationExporter.py


示例9: getParentPanel

def getParentPanel():
    """return the parent panel """
    upPanel = cmds.getPanel(up=True)
    if cmds.panel(upPanel, q=True, ex=True):
        upPanelLayout = cmds.layout(upPanel, q=True, p=True)
        while not cmds.paneLayout(upPanelLayout, q=True, ex=True):
            upPanelLayout = cmds.control(upPanelLayout, q=True, p=True)
        if cmds.paneLayout(upPanelLayout, q=True, ex=True):
            return upPanelLayout
    else:
        return "viewPanes"
开发者ID:shrimo,项目名称:dmptools,代码行数:11,代码来源:markingMenu.py


示例10: sjKillGUI

def sjKillGUI():
	'''
	GUI guts
	'''
	global mainCol
	global tsl
	
	# mainCol = cmds.columnLayout( adjustableColumn=True )
	cmds.paneLayout()
	tsl = cmds.textScrollList( w=1200, h=180, ams=True,
		append=cmds.scriptJob(listJobs=True))
	'''
开发者ID:creuter23,项目名称:fs-tech-artist,代码行数:12,代码来源:mecScriptJob.py


示例11: win

    def win(self):
        if cmds.window(self.intWinName, exists=True):
            cmds.deleteUI(self.intWinName, window=True)

        cmds.window(self.intWinName, menuBar=True, title=self.visWinName, width=400, height=650)
        self.buildMenuBar()
        cmds.paneLayout(configuration="horizontal2", h=100, ps=[1, 100, 25])
        self.buildNameContents()
        self.addControls()
        self.parseSceneNameAndPopulate()
        self.buildName()
        cmds.showWindow(self.intWinName)
开发者ID:boochos,项目名称:work,代码行数:12,代码来源:key_ui.py


示例12: imageViewer

 def imageViewer(self):
         """
         Click thumbnail to see enlarged image
         """
         selectedImage=os.path.join(cmds.textField('location',q=True,tx=True),cmds.textScrollList('fileLister',q=True,
                                                                                                  si=True)[0]).split(" > ")[0]
         for each in ["jpg","png",'tif',"iff"]:
                 if selectedImage.endswith(each):
                         window = cmds.window(t="Image Viewer")
                         cmds.paneLayout()
                         cmds.image( image=selectedImage)
                         cmds.showWindow( window )
开发者ID:sanfx,项目名称:pythonScripts,代码行数:12,代码来源:minime.py


示例13: UI

 def UI(self, meshes=[]):
     if cmds.window('CheckColorVertex', exists=True):
         cmds.deleteUI('CheckColorVertex', window=True)
     
     win = cmds.window('CheckColorVertex', t='Check Color Vertex')
     cmds.paneLayout()
     cmds.textScrollList('textScroll',
                         numberOfRows=8,
                         allowMultiSelection=True,
                         selectCommand=self.selectNode,
                         append=[str(mesh) for mesh in meshes])
     cmds.showWindow()
开发者ID:jonntd,项目名称:dmptools,代码行数:12,代码来源:checkColors.py


示例14: ui

    def ui(self):
        '''
        Launch a UI to display the marks that were recorded.
        '''
        
        with utl.MlUi('ml_stopwatchReport', 'Stopwatch Report', width=400, height=400, info='''This is the report from the stopwatch you just ran.
Adjust the start frame, and then press the frame buttons to jump to that frame.
The fields on the right can be used for notes.''', menu=False) as win:

            self.uiSlider = mc.intSliderGrp(field=True, label='Start Frame', value=self.startFrame, 
                minValue=((-0.5*self.frameMarks[-1])+self.startFrame), maxValue=(self.frameMarks[-1]/2)+self.startFrame, 
                fieldMinValue=-1000, fieldMaxValue=1000,
                changeCommand=self.uiUpdateStartFrame)
                
            self.frameRateField = mc.intFieldGrp(label='Frame Rate', value1=self.frameRate, enable1=False, extraLabel='fps', annotation='')

            mc.scrollLayout()
            mc.rowColumnLayout(numberOfColumns=3, columnWidth=[(1, 50), (2, 80), (3, 340)])
            mc.text('Frame')
            mc.text('Duration')
            mc.text('Notes')

            for i in range(3):
                mc.separator(style='single', height=15)
            
            self.uiButton = list()
            
            for i in range(len(self.frameMarks)):
                
                #frame button
                frame = self.frameMarks[i]+self.startFrame
                self.uiButton.append(mc.button(label=str(frame), annotation='Go to frame %i' % frame,command='import maya.cmds;maya.cmds.currentTime(%i,edit=True)' % frame))
              
                #duration text
                if i:
                    mc.text(label=str(self.frameMarks[i]-self.frameMarks[i-1]))
                else:
                    mc.text(label='Start')
                    
                #notes field
                mc.textField()
            
            #add the stop
            mc.text(label='')
            mc.text(label='Stop')
            mc.setParent('..')
            mc.setParent('..')
            
            #next and prev buttons!
            mc.paneLayout(configuration='vertical2',separatorThickness=1)
            mc.button(label='<< Previous', command=self.previousFrame, annotation='Go to the previous frame in the list.')
            mc.button(label='Next >>', command=self.nextFrame, annotation='Go to the next frame in the list.')
开发者ID:Italic-,项目名称:maya-prefs,代码行数:52,代码来源:ml_stopwatch.py


示例15: get_parent_panel

def get_parent_panel():
    """
    Return current panels parent.
    """
    panel = cmds.getPanel(up=True)
    if cmds.panel(panel, q=True, ex=True):
        panel_layout = cmds.layout(panel, q=True, p=True)
        while not cmds.paneLayout(panel_layout, q=True, ex=True):
            panel_layout = cmds.control(panel_layout, q=True, p=True)
        if cmds.paneLayout(panel_layout, q=True, ex=True):
            return panel_layout
        else:
            return 'viewPanes'
开发者ID:arubertoson,项目名称:maya-mamprefs,代码行数:13,代码来源:markingmenus.py


示例16: showHotkeysList

def showHotkeysList():
    """shows the current user hotkeys mapping and its name"""
    reload(hotkeys)
    lines = []
    for key in hotkeys.HOTKEYS:
        lines.append('key:  '+str(key['key'])+'  ctrl:  '+str(key['ctrl'])+'  alt:  '+str(key['alt'])+'  '+str(key['name']))

    window = cmds.window('hotkeysWindow')
    cmds.paneLayout()
    cmds.textScrollList(numberOfRows=8,
                        allowMultiSelection=True,
                        append=lines,)
    cmds.showWindow()
开发者ID:manymax21,项目名称:dmptools,代码行数:13,代码来源:createHotkeys.py


示例17: _independent_panel

def _independent_panel(width, height, off_screen=False):
    """Create capture-window context without decorations

    Arguments:
        width (int): Width of panel
        height (int): Height of panel

    Example:
        >>> with _independent_panel(800, 600):
        ...   cmds.capture()

    """

    # center panel on screen
    screen_width, screen_height = _get_screen_size()
    topLeft = [int((screen_height-height)/2.0),
               int((screen_width-width)/2.0)]

    window = cmds.window(width=width,
                         height=height,
                         topLeftCorner=topLeft,
                         menuBarVisible=False,
                         titleBar=False,
                         visible=not off_screen)
    cmds.paneLayout()
    panel = cmds.modelPanel(menuBarVisible=False,
                            label='CapturePanel')

    # Hide icons under panel menus
    bar_layout = cmds.modelPanel(panel, q=True, barLayout=True)
    cmds.frameLayout(bar_layout, edit=True, collapse=True)

    if not off_screen:
        cmds.showWindow(window)

    # Set the modelEditor of the modelPanel as the active view so it takes
    # the playback focus. Does seem redundant with the `refresh` added in.
    editor = cmds.modelPanel(panel, query=True, modelEditor=True)
    cmds.modelEditor(editor, edit=True, activeView=True)

    # Force a draw refresh of Maya so it keeps focus on the new panel
    # This focus is required to force preview playback in the independent panel
    cmds.refresh(force=True)

    try:
        yield panel
    finally:
        # Delete the panel to fix memory leak (about 5 mb per capture)
        cmds.deleteUI(panel, panel=True)
        cmds.deleteUI(window)
开发者ID:BigRoy,项目名称:pyblish-magenta,代码行数:50,代码来源:capture.py


示例18: helpWin

def helpWin(*args):
    '''help file on how to use the transfer weights tool
    '''
    win_name = "atom_tw_help win"
    if cmds.window(win_name, exists=True):
        cmds.deleteUI(win_name)
    win = cmds.window(win_name, t='Atom Trasfer Weights Help', rtf=True)
    cmds.paneLayout()
    cmds.textScrollList('aton_helpTsl',
                        append=['This tool was designed to trasfer influence weights. When Mayas mirror weights',
                                'puts weighting on both sides of the mesh using with one influence.', 'Usage:',
                                'Select the vertex you want to transfer weighting to', 'Middle mouse drag the influences in the Copy and Paste',
                                'Click the Transfer Weighting button'])
    cmds.showWindow(win)
开发者ID:boochos,项目名称:work,代码行数:14,代码来源:atom_utilities_lib.py


示例19: ui

def ui():
    '''
    user interface for ml_hold
    '''

    with utl.MlUi('ml_hold', 'Hold Keys', width=400, height=150, info='''Press Next and Previous to match keys to the next or previous keyframes.
Press Current or Average to turn a frame range into a hold.''') as win:

        win.buttonWithPopup(label='Hold Current', command=current, annotation='Creates a hold for the selected range, or the surrounding keys, based on current frame.', shelfLabel='cur', shelfIcon='defaultTwoStackedLayout')
        win.buttonWithPopup(label='Hold Average', command=average, annotation='Creates a hold for the selected range, or the surrounding keys, based on average of keys.', shelfLabel='avg', shelfIcon='defaultTwoStackedLayout')
        
        mc.paneLayout(configuration='vertical2',separatorThickness=1)
        win.buttonWithPopup(label='<< Previous', command=previous, annotation='Matches selected key or current frame to the previous keyframe value.', shelfLabel='<_', shelfIcon='defaultTwoStackedLayout')
        win.buttonWithPopup(label='Next >>', command=next, annotation='Matches selected key or current frame to the next keyframe value.', shelfLabel='_>', shelfIcon='defaultTwoStackedLayout')
开发者ID:Italic-,项目名称:maya-prefs,代码行数:14,代码来源:ml_hold.py


示例20: newScriptEditor

def newScriptEditor():
    """
    simpler script editor test
    """
    win = cmds.window(t='New Script Editor', menuBar= True, w = 650, h = 300)
    form = cmds.formLayout()
    pane = cmds.paneLayout(configuration='horizontal2', paneSize=[[1,100,40],[2,100,60]])
    # top layout
    formTop = cmds.formLayout()
    reporter = cmds.cmdScrollFieldReporter('reporter')
    cmds.setParent('..')
    cmds.formLayout(formTop, e=True,
            attachForm=\
                [
                    (reporter, "top", 5),
                    (reporter, "bottom", 5),
                    (reporter, "left", 5),
                    (reporter, "right", 5),
                ]
        )
    cmds.paneLayout(pane, edit=True, setPane = [formTop, 2])
    # bottom layout
    formBottom = cmds.formLayout()
    shelf = cmds.shelfTabLayout()
    tab1 = cmds.cmdScrollFieldExecuter('python1', sourceType="python")
    cmds.setParent('..')
    cmds.formLayout(formBottom, e=True,
            attachForm=\
                [
                    (shelf, "top", 5),
                    (shelf, "bottom", 5),
                    (shelf, "left", 5),
                    (shelf, "right", 5),
                ]
        )
    
    cmds.paneLayout(pane, edit=True, setPane = [formTop, 1])
    
    cmds.formLayout(form, e=True,
            attachForm=\
                [
                    (pane, "top", 5),
                    (pane, "bottom", 5),
                    (pane, "left", 5),
                    (pane, "right", 5),
                ]
        )
    
    cmds.showWindow()
开发者ID:jonntd,项目名称:dmptools,代码行数:49,代码来源:mayaCommands.py



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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