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

Python cmds.rowLayout函数代码示例

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

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



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

示例1: createUI

    def createUI (self, *pArgs):
        if cmds.window(self.windowID, exists = True):
            cmds.deleteUI(self.windowID)
        # initialize window properties
        cmds.window(self.windowID, title = 'cleanupUI', sizeable = True, resizeToFitChildren = True)
        cmds.columnLayout(columnAttach = ('both', 5), columnWidth = 265)

        cmds.rowLayout(numberOfColumns = 3, columnWidth3 = (80, 100, 80))
        cmds.text(label = 'Threshold:', align = 'right', width = 80)
        threshold = cmds.floatField(visible = True, minValue = 0.001, value = 0.1, width = 50, pre = 3, step = 0.01)
        findFacesButton = cmds.button(label = 'findFaces', width = 70 , align = 'center')
        cmds.setParent('..')

        cmds.rowLayout(numberOfColumns = 1, columnWidth1 = (250))
        cmds.text(label = 'List of shells with number of triangles:', align = "center", width = 230)
        cmds.setParent('..')
        cmds.rowLayout(numberOfColumns = 1, columnWidth1 = (250))
        scrollList = cmds.textScrollList(width = 250)
        cmds.setParent('..')

        cmds.rowLayout(numberOfColumns = 1, columnWidth1 = (250))
        progress = cmds.text(label = "Press 'Find' to calculate shells", align = 'left', width = 200, height = 10)
        cmds.setParent('..')

        cmds.button(findFacesButton, e = 1, command = partial(self.__findFacesCallback, threshold, progress))

        cmds.rowLayout(numberOfColumns = 3, columnWidth3 = (80, 80, 80))
        cmds.button(label = 'Find', command = partial(self.__applyCallback, threshold, scrollList, progress), width = 70 , align = 'center')
        cmds.button(label = 'Select', command = partial(self.__applySelectCallback, scrollList, progress), width = 70, align = 'center')
        cmds.button(label = 'Cancel', command = self.__cancelCallback, width = 70, align = 'center')
        cmds.setParent('..')

        cmds.showWindow()
开发者ID:EnReich,项目名称:ProKlaue,代码行数:33,代码来源:cleanup.py


示例2: __enter__

    def __enter__(self):
        '''
        Initialize the UI
        '''
        if mc.window(self.name, exists=True):
            mc.deleteUI(self.name)

        mc.window(self.name, title='ml :: '+self.title, iconName=self.title, width=self.width, height=self.height, menuBar=self.menu)
        
        
        if self.menu:
            self.createMenu()
        
        self.form = mc.formLayout()
        self.column = mc.columnLayout(adj=True)

        
        mc.rowLayout( numberOfColumns=2, columnWidth2=(34, self.width-34), adjustableColumn=2, 
                    columnAlign2=('right','left'),
                    columnAttach=[(1, 'both', 0), (2, 'both', 8)] )

        #if we can find an icon, use that, otherwise do the text version
        if self.icon:
            mc.iconTextStaticLabel(style='iconOnly', image1=self.icon)
        else:
            mc.text(label=' _ _ |\n| | | |')
            
        if not self.menu:
            mc.popupMenu(button=1)
            mc.menuItem(label='Help', command=(_showHelpCommand(wikiURL+'#'+self.name)))
        
        mc.text(label=self.info)
        mc.setParent('..')
        mc.separator(height=8, style='single')
        return self
开发者ID:Bumpybox,项目名称:Tapp,代码行数:35,代码来源:ml_utilities.py


示例3: build

 def build(self):
     if mc.window( self.win, ex=1 ): mc.deleteUI( self.win )
     if mc.windowPref( self.win, ex=1 ): mc.windowPref( self.win, remove=1 )
     mc.window(self.win, title=self.title, wh=(410,378))
     mc.columnLayout( 'mainColumn', adj=True )
     mc.separator( h=10 )
     mc.rowLayout( numberOfColumns=2, columnWidth2=(200, 200), columnAttach=[(1, "both", 5),(2 ,"both", 5)] )
     mc.columnLayout( adj=True, columnAlign="center" )
     mc.text( l=self.textsk )
     self.skcharacterList = mc.textScrollList( numberOfRows=20, allowMultiSelection=True  )
     mc.setParent('..')
     mc.columnLayout( adj=True, columnAlign="center" )
     mc.text( l=self.textqp )
     self.qpcharacterList = mc.textScrollList( numberOfRows=20, allowMultiSelection=True  )
     mc.setParent( '..' )
     mc.setParent('..')
     mc.separator ( h=10 )
     mc.rowLayout( numberOfColumns=4, columnWidth4=(100, 100, 100, 100), columnAttach=[(1, "both", 1),(2 ,"both", 1), (3 ,"both", 1), (4 ,"both", 1)] )
     mc.button( l=self.buttonsk, c=self.selSKItem )
     mc.button( l=self.buttonAllSk, c=self.mainSK )
     mc.button( l=self.buttonqp, c=self.selQPItem )
     mc.button( l=self.buttonAllQp, c=self.mainQP )
     mc.setParent('..')
     mc.columnLayout( adj=True, columnAlign="center" )
     mc.separator ( h=10 )
     mc.setParent('..')
     self.addSKList()
开发者ID:chuckbruno,项目名称:Python_scripts,代码行数:27,代码来源:SKQP_new.py


示例4: installFalloffGradient

 def installFalloffGradient(self):
     """"""
     layout = cmds.frameLayout( "falloffLayout",
                                l='Falloff:',
                                cl=True,
                                cll=True,
                                mw=5,
                                mh=5,
                                ec=lambda *args: self.resizeMainWindow(),
                                cc=lambda *args: self.resizeMainWindow())
     
     # Install falloff mode scroll List
     cmds.rowLayout(nc=2, adj=1)
     falloffMode = self.installFalloffOption()
     resetBtn = cmds.button(l='Reset', c=lambda *args: self.resetFalloff(), w=40)
     cmds.setParent( '..' )
     
     # Install falloff gradient control
     self.gradient = cmds.gradientControlNoAttr( 'falloffCurve', h=90)
     self.copyFromMayaFalloffCurve()
     cmds.gradientControlNoAttr( 'falloffCurve',
                                 e=True,
                                 optionVar='falloffCurveOptionVar',
                                 changeCommand=lambda *args: self.changeSoftSelectValue(),
                                 currentKeyChanged=lambda *args: self.softSelectCurveKeyChanged() )
     
     # Install interpolation scroll List
     interpolation = self.installInterpolationOption()
     
     cmds.setParent( '..' )
     return layout
开发者ID:DavideAlidosi,项目名称:May9,代码行数:31,代码来源:tabCreate.py


示例5: transfertSelectionToTarget_window

def transfertSelectionToTarget_window():
	"""
	This definition creates the 'Transfert Selection To Target' main window.
	"""

	cmds.windowPref(enableAll=False)

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

	cmds.window("transfertSelectionToTarget_window",
		title="Transfert Selection To Target",
		width=320)

	spacing = 5

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

	cmds.rowLayout(numberOfColumns=3, columnWidth3=(125, 150, 130), adjustableColumn=2, columnAlign=(2, "left"), columnAttach=[(1, "both", spacing), (2, "both", spacing), (3, "both", spacing)])
	cmds.text(label="Target:")
	sources_textField = cmds.textField("target_textField")
	cmds.button("pickTarget_button", label="Pick Target!", command=pickTarget_button_OnClicked)
	cmds.setParent(topLevel=True)

	cmds.separator(style="single")

	cmds.button("transfertSelection_button", label="Transfert Selection!", command=transfertSelection_button_OnClicked)

	setUnsetContextHotkeys()
	scriptJob = cmds.scriptJob(uiDeleted=("transfertSelectionToTarget_window", setUnsetContextHotkeys), runOnce=True)

	cmds.showWindow("transfertSelectionToTarget_window")

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


示例6: snapOnClosestVertex_window

def snapOnClosestVertex_window():
	"""
	Creates the 'Snap On Closest Vertex' vertex window.
	"""

	cmds.windowPref(enableAll=False)

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

	cmds.window("snapOnClosestVertex_window",
		title="Snap On Closest Vertex",
		width=320)

	spacing = 5

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

	cmds.rowLayout(numberOfColumns=3, columnWidth3=(125, 150, 130), adjustableColumn=2, columnAlign=(2, "left"), columnAttach=[(1, "both", spacing), (2, "both", spacing), (3, "both", spacing)])
	cmds.text(label="Reference Object:")
	referenceObject_textField = cmds.textField("referenceObject_textField")
	cmds.button("getReferenceObject_button", label="Get Reference Object!", command=getReferenceObject_button_OnClicked)
	cmds.setParent(topLevel=True)

	cmds.separator(style="single")

	cmds.button("snapIt_button", label="Snap It!", al="center", command=snapIt_button_OnClicked)

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


示例7: startBlock

    def startBlock(self,m=1,n=1):
        #currently i will just make basic layou using the rawLayout
#        columnWidth=[]
#        for i in range(1,m):
#            columnWidth.append([i,80])#[(1, 60), (2, 80), (3, 100)]
#        cmds.rowColumnLayout(numberOfColumns=m,columnWidth=columnWidth)
#        cmds.flowLayout(wr=True)
        if not self.inNotebook and self.notebook is not None:    
            if self.afterNoteBook is None:
                c=self.afterNoteBook = cmds.flowLayout(wr=True,p=self.form)
                cmds.formLayout( self.form, edit=True, attachForm=((c, 'left', 0),(c, 'bottom', 0),
                                              (c, 'right', 0)),attachControl = ((c,'top',5,self.notebook["id"])) )
            if m==0:
                c=cmds.flowLayout(wr=True,w=self.w*self.scale,p=self.afterNoteBook)
            else :
                c=cmds.rowLayout(numberOfColumns=m,w=self.w*self.scale,p=self.afterNoteBook)            
        else : 
#            if self.mainlayout is None:
#                c=self.mainlayout = cmds.scrollLayout('scrollLayout',p=self.form)#cmds.flowLayout(wr=True,p=self.form)
#                cmds.formLayout( self.form, edit=True, attachForm=((c, 'left', 0),(c, 'bottom', 0),
#                                              (c, 'right', 0),(c, 'top', 0),) )
                
            if m==0:
                cmds.flowLayout(wr=True,w=self.w*self.scale)#,p=self.mainlayout)
            else :
                cmds.rowLayout(numberOfColumns=m,w=self.w*self.scale)#,p=self.mainlayout)
开发者ID:gj210,项目名称:upy,代码行数:26,代码来源:mayaUI.py


示例8: channelbox_command_freezeUI

def channelbox_command_freezeUI():
    with sysCmd.Undo(0):
        if cmds.window("freezeWindowBox", q=1, exists=1):
            cmds.deleteUI("freezeWindowBox")
        frz_window = cmds.window("freezeWindowBox", title="Freeze", rtf=1, s=0, tbm=1, tlb=1)
        layout = cmds.columnLayout(p=frz_window)
        layout_top = cmds.rowLayout(nc=4, p=layout)

        width = 25
        cmds.button(l="T", w=width, ann="Freeze Translate",
                    c=sysCmd.rpartial(channelbox_command_freezeTranslate, "", "", "Freeze Translate"), p=layout_top)
        cmds.button(l="R", w=width, ann="Freeze Rotate",
                    c=sysCmd.rpartial(channelbox_command_freezeRotate, "", "", "Freeze Rotate"), p=layout_top)
        cmds.button(l="S", w=width, ann="Freeze Scale",
                    c=sysCmd.rpartial(channelbox_command_freezeScale, "", "", "Freeze Scale"), p=layout_top)
        cmds.button(l="A", w=width, ann="Freeze All",
                    c=sysCmd.rpartial(channelbox_command_freezeAll, "", "", "Freeze All"), p=layout_top)

        layout_bot = cmds.rowLayout(nc=4, p=layout)
        cmds.button(l="TS", w=width, ann="Freeze Translate / Scale",
                    c=sysCmd.rpartial(channelbox_command_freezeTranslateScale, "", "", "Freeze Translate / Scale"),
                    p=layout_bot)
        cmds.button(l="TR", w=width, ann="Freeze Translate / Rotate",
                    c=sysCmd.rpartial(channelbox_command_freezeTranslateRotate, "", "", "Freeze Translate / Rotate"),
                    p=layout_bot)
        cmds.button(l="RS", w=width, ann="Freeze Rotate / Scale",
                    c=sysCmd.rpartial(channelbox_command_freezeRotateScale, "", "", "Freeze Rotate / Scale"),
                    p=layout_bot)
        cmds.button(l="JO", w=width, ann="Freeze Joint Orient",
                    c=sysCmd.rpartial(channelbox_command_freezeJointOrient, "", "", "Freeze Joint Orient"),
                    p=layout_bot)
        cmds.window(frz_window, e=1, wh=(1, 1), rtf=1)
        cmds.showWindow(frz_window)
开发者ID:Vaei,项目名称:ModularChannelBox,代码行数:33,代码来源:jtChannelBox_Commands_Default.py


示例9: populate_render_layer_layout

        def populate_render_layer_layout(self, attr):
            if self.render_layer_layout is not None:
                node = attr.split('.')[0]  
                # delete old ui
                children = cmds.columnLayout(self.render_layer_layout, q=True, childArray=True)
                if children is not None:
                    for name in children:
                        cmds.deleteUI(name)

                for i in range(50):
                    i += 1

                    layer_name = 'render_layer_{0}_name'.format(i)

                    if cmds.attributeQuery(layer_name, exists=True, node=node):
                        cmds.setParent(self.render_layer_layout)
                        current_render_layer_layout = cmds.rowLayout(nc=5)
                        for n, width in enumerate(self.render_layer_layout_widths):
                            cmds.rowLayout(current_render_layer_layout, e=True, cw=[n + 1, width])
                        cmds.textField(cc=partial(self.set_render_layer_name, node, i), text=cmds.getAttr('{0}.render_layer_{1}_name'.format(node, i)))
                        entity_type_menu = cmds.optionMenu(cc=partial(self.set_render_layer_type, node, i))
                        for entity_type in ms_commands.RENDER_LAYER_ENTITY_TYPES:
                            cmds.menuItem(label=entity_type)
                        cmds.optionMenu(entity_type_menu, e=True, v=cmds.getAttr('{0}.render_layer_{1}_type'.format(node, i)))
                        pattern_text_field = cmds.textField(cc=partial(self.set_render_layer_pattern, node, i), text=cmds.getAttr('{0}.render_layer_{1}_pattern'.format(node, i)))
                        cmds.textField(cc=partial(self.set_render_layer_order, node, i), text=cmds.getAttr('{0}.render_layer_{1}_order'.format(node, i)))
                        cmds.button(' - ', height=20, command=partial(self.remove_render_layer, node, i))
                
                cmds.setParent(self.render_layer_layout)
                current_render_layer_layout = cmds.rowLayout(nc=2)
                cmds.button(' + ', command=partial(self.add_render_layer, node))
开发者ID:jonathantopf,项目名称:mayaseed,代码行数:31,代码来源:AEms_renderSettingsTemplate.py


示例10: setUIObjectVisibility

def setUIObjectVisibility(item, visState):
    """
    >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
    DESCRIPTION:
    Toggle for turning off and on the visibility of a menu section

    ARGUMENTS:
    stateToggle(string) - this should point to the variable holding a (bool) value
    listOfItems(list) - list of menu item names to change

    RETURNS:
    locatorName(string)
    >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
    """
    uiType = mc.objectTypeUI(item)

    if uiType == 'staticText':
        mc.text(item, edit = True, visible = visState)
    elif uiType == 'separator':
        mc.separator(item, edit = True, visible = visState)
    elif uiType == 'rowLayout':
        mc.rowLayout(item, edit = True, visible = visState)
    elif uiType == 'rowColumnLayout':
        mc.rowColumnLayout(item, edit = True, visible = visState)
    elif uiType == 'columnLayout':
        mc.columnLayout(item, edit = True, visible = visState)
    elif uiType == 'formLayout':
        mc.formLayout(item, edit = True, visible = visState)
        #print ('%s%s%s%s%s%s%s' % ('"python(mc.',uiType,"('",item,"', edit = True, visible = ",visState,'))"'))
        #mel.eval(('%s%s%s%s%s%s%s' % ('"python(mc.',uiType,"('",item,"', edit = True, visible = ",visState,'))"')))
        #mc.separator(item, edit = True, visible = visState)
    else:
        warning('%s%s%s' %('No idea what ', item, ' is'))
开发者ID:Italic-,项目名称:maya-prefs,代码行数:33,代码来源:guiFactory.py


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


示例12: UI

def UI():
    mc.frameLayout('Furioso',w=ui.rowWidth,cll=1,bgc=[.2,.2,.2],fn='smallBoldLabelFont',bs='in',l='Furioso')
    
    mc.columnLayout('furiosoObjectConform',cal='center',w=ui.rowWidth-10)
    mc.rowColumnLayout(numberOfColumns=8)
    mc.iconTextButton(w=ui.iconSize,h=ui.iconSize,ann="Create 10x10 Tile",l= "Tile" ,i= "polyPlane.png",c=partial(delay,'mel.eval','("polyPlane -w 10 -h 10 -sx 10 -sy 10 -ax 0 1 0 -cuv 2 -ch 1")'))	
    mc.iconTextButton(w=ui.iconSize,h=ui.iconSize,ann="Create 1x1 Tile",l= "Tile" ,i= "plane.png",c=partial(delay,'mel.eval','("polyPlane -w 10 -h 10 -sx 1 -sy 1 -ax 0 1 0 -cuv 2 -ch 1;")'))
    mc.iconTextButton(w=ui.iconSize,h=ui.iconSize,i= "cube.png",c=partial(delay,'mel.eval','("polyCube -w 10 -h 10 -d 10 -sx 1 -sy 1 -sz 1 -ax 0 1 0 -cuv 4 -ch 1;")'))
    mc.iconTextButton(w=ui.iconSize,h=ui.iconSize,i= "historyPulldownIcon.png",bgc=[.5,0,0],c=partial(delay,'mel.eval','("DeleteHistory")'))
    mc.iconTextButton(w=ui.iconSize,h=ui.iconSize,i= "",en=0,c=partial(delay,'mel.eval','("polyPlane -w 10 -h 10 -sx 1 -sy 1 -ax 0 1 0 -cuv 2 -ch 1;")'))  
    mc.iconTextButton(w=ui.iconSize,h=ui.iconSize,ann="Set Camera to Meters",en=1,l= "Set Camera" ,i= "CameraAE.png",c=partial(delay,'mel.eval','("rcSetCameraClip .5 100000")'))
    mc.iconTextButton(w=ui.iconSize,h=ui.iconSize,i= "polyQuad",c=partial(delay,'mel.eval','("TogglePolyCount")'))
    mc.iconTextCheckBox(w=ui.iconSize,h=ui.iconSize,ann="Snap",l= "Tile" ,i= "snapGrid.png",onc=partial(delay,'rc.stepSnap','(5,1)'),ofc=partial(delay,'rc.stepSnap','(5,0)'),v=mc.manipMoveContext('Move',q=1,s=1))    
    mc.setParent('..')

    mc.rowLayout(w=ui.rowWidth,numberOfColumns=3)
    mc.button(w=ui.rowWidth/3,h=ui.btn_large,al='left',l=' + ',c=partial(delay,'btnPlus','(mc.ls(sl=1))'))  #
    mc.button(h=ui.btn_large,w=ui.rowWidth/3,al='center',l=' - ',c=partial(delay,'btnDel','("sel")')) 
    mc.button(h=ui.btn_large,w=ui.rowWidth/3,al='right',l='NUKE',c=partial(delay,'btnDel','("all")'))
    mc.setParent('..')
    
    mc.checkBox('Object',vis=0,l='Object',v=int(furiosoPrefs.get('Object')),cc=partial(delay,'furiosoPrefs.checkBox',"('Object')"))
    mc.checkBox('Material',l='Material',vis=1,v=int(furiosoPrefs.get('Material')),cc=partial(delay,'furiosoPrefs.checkBox',"('Material')"))
    mc.checkBox('Flag',l='Flag',vis=0,v=int(furiosoPrefs.get('Flag')),cc=partial(delay,'furiosoPrefs.checkBox',"('Flag')"))
    mc.iconTextScrollList('FuriosoObjScroll',w=ui.rowWidth,h=500)
    mc.setParent('furiosoObjectConform')
    mc.setParent('..')
    
    buildUILists()
开发者ID:RobRuckus,项目名称:rcTools,代码行数:29,代码来源:rcFurioso.py


示例13: __init__

	def __init__(self): 
		### Initialize, definitions		
	    	if(mc.window("ms_orientJoint",exists=True)):
            	    mc.deleteUI("ms_orientJoint",window=True)
	    	mc.window("ms_orientJoint",title="Orient Joint v1.0",rtf=True)
	    	mc.columnLayout()
	    	
	    	mc.rowLayout(nc=2)
	    	mc.text(" ")
	    	mc.text("Orient joint A to joint B")
	    	mc.setParent("..")
	    	
	    	mc.separator(w=500)

		self.aimAxisField = mc.radioButtonGrp(label="Aim Axis",labelArray3=['x','y','z'],nrb=3,sl = 1)
		self.aimAxisPolField = mc.radioButtonGrp(label="Aim Axis Polarity",labelArray2=['+','-'],nrb=2,sl = 1)
		self.upAxisField = mc.radioButtonGrp(label="Up Axis",labelArray3=['x','y','z'],nrb=3,sl  = 2)
		self.upPolarityField = mc.radioButtonGrp(label="Up Axis Polarity",labelArray2=['+','-'],nrb=2,sl=1)
		
		mc.separator(w=500)
		
		mc.rowLayout(nc=3)
		mc.text(" ")
		mc.button(label="-=Orient=-",c=self.orient)
		mc.button(label="-=None Orient=-",c=self.noneOrient)
		
		mc.setParent("..")

	    	mc.showWindow("ms_orientJoint")
开发者ID:Mauricio3000,项目名称:MSH_Maya,代码行数:29,代码来源:ms_orientJoint.py


示例14: SundayGeometryCacheImportUI

def SundayGeometryCacheImportUI():
    global sundayGeometryCacheImportUI
    print 'SundayGeometryCacheImport'
    exportDir = cmds.workspace(q = True, rootDirectory = True) + 'data'
    cacheDir = os.listdir(exportDir)
    SundayMayaGuiPath = mel.eval('getenv SundayGui;')
    
    try:
        if cmds.window(sundayGeometryCacheImportUI, exists = True):
            cmds.deleteUI(sundayGeometryCacheImportUI)
        
        sundayGeometryCacheImportUI = cmds.loadUI(uiFile = SundayMayaGuiPath + 'SundayGeometryCacheImport.ui')
    except:
        sundayGeometryCacheImportUI = cmds.loadUI(uiFile = SundayMayaGuiPath + 'SundayGeometryCacheImport.ui')

    cmds.text('SundayGeometryCachePath', edit = True, label = exportDir)
    cmds.setParent(sundayGeometryCacheImportUI)
    cmds.setParent(cmds.button('SundayGeometryImportDummyButtonToGrabParent', query = True, fullPathName = True, parent = True))
    scrollLayout = cmds.scrollLayout(childResizable = True)
    for curCacheDir in cacheDir:
        if curCacheDir.split('.')[0] != '':
            cmds.rowLayout(numberOfColumns = 2, adjustableColumn = 1)
            cmds.button(height = 26, label = curCacheDir, command = 'import SundayGeometryCachePy\nreload(SundayGeometryCachePy)\nSundayGeometryCachePy.SundayGeometryCacheImportFile("' + exportDir + os.sep + curCacheDir + '")')
            cmds.button(height = 26, label = 'Delete', command = 'import SundayGeometryCachePy\nreload(SundayGeometryCachePy)\nSundayGeometryCachePy.SundayGeometryCacheDelete("' + exportDir + os.sep + curCacheDir + '")')
            cmds.setParent('..')
            continue
    
    cmds.setParent(sundayGeometryCacheImportUI)
    cmds.setParent(cmds.button('SundayGeometryImportDummyButtonToGrabParent', query = True, fullPathName = True, parent = True))
    cmds.text('sundayGeoCacheNodeLabel', edit = True, label = len(cmds.ls(type = 'cacheFile', long = True)))
    cmds.showWindow(sundayGeometryCacheImportUI)
    if platform.system() == 'Windows':
        cmds.window(sundayGeometryCacheImportUI, edit = True, topLeftCorner = [
            100,
            100])
开发者ID:elliottjames,项目名称:jeeves,代码行数:35,代码来源:SundayGeometryCachePy.py


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


示例16: AboutBox

 def AboutBox(self, *args):
     import os
     
     def GoToWebsite(site):
         cmds.launch( webPage = site)
     
     if cmds.window("AboutWindow", exists = True):
         cmds.deleteUI("AboutWindow")
     cmds.window("AboutWindow")
     cmds.rowLayout("MainLayout", nc = 3, cw3 = [10, 80, 200], rat = [[1, "top", 0],[2, "top", 0],[3, "top", 0]])
     cmds.columnLayout("EmptyColumn", p = "MainLayout")
     cmds.columnLayout("ImageColumn", p = "MainLayout")
     cmds.columnLayout("TextColumn", p = "MainLayout")
     
     cmds.separator(h = 30, p = "TextColumn")
     cmds.text(label = "TurboSquid CheckMate and Publishing Tools for Maya, v1.22", p = "TextColumn")
     cmds.separator(h = 55, p = "TextColumn")
     cmds.text(label = "Created by Titan Software Solutions", p = "TextColumn")
     cmds.separator(h = 55, p = "TextColumn")
     cmds.text(label = "Special thanks to Ashraf Aiad for the use of his UV texture templates", p = "TextColumn")
     
     cmds.separator(h = 10, p = "ImageColumn")
     cmds.iconTextButton(image = os.path.expanduser('~/maya/Turbosquid/CheckMate Tools For Maya/CM_Tools/') + "Logos/CheckMate.png", p = "ImageColumn", c = partial(GoToWebsite, "http://www.turbosquid.com"))
     cmds.separator(h = 20, p = "ImageColumn")
     cmds.iconTextButton(image = os.path.expanduser('~/maya/Turbosquid/CheckMate Tools For Maya/CM_Tools/') + "Logos/TSS.png", p = "ImageColumn", c = partial(GoToWebsite, "http://www.titansoftwaresolutions.net"))
     cmds.separator(h = 20, p = "ImageColumn")
     cmds.iconTextButton(image = os.path.expanduser('~/maya/Turbosquid/CheckMate Tools For Maya/CM_Tools/') + "Logos/PixelCG.png", p = "ImageColumn", c = partial(GoToWebsite, "http://www.pixelcg.com/blog"))
     cmds.separator(h = 10, p = "ImageColumn")
     cmds.showWindow("AboutWindow")
开发者ID:Kif11,项目名称:turbosquid_maya_publisher,代码行数:29,代码来源:SystemFile.py


示例17: AverageUI

    def AverageUI(self):
        import maya.cmds as cmds
	import maya.mel as mel
	import sys

        if cmds.window('AverageTool',exists=True):
            cmds.deleteUI('AverageTool')

        cmds.window('AverageTool') 
        grid=cmds.gridLayout( numberOfColumns=2, cellWidthHeight=(120, 150) )
        column=cmds.columnLayout()
        cmds.button('Creat',c='creat()',h=100)
        cmds.button('Key',c='key()',h=50)
        cmds.columnLayout(column,edit=1,columnAttach=('both',0),adj=1,co=('both',50),columnWidth=120)
        cmds.setParent(column)
        cmds.setParent( '..' )



        cmds.frameLayout( label='Average', borderStyle='in' )
        cmds.columnLayout()
        cmds.rowLayout( numberOfColumns=3, columnWidth3=(35, 30, 35), adjustableColumn=2, columnAlign=(1, 'right'), columnAttach=[(1, 'both', 0), (2, 'both', 0), (3, 'both', 0)] )
        cmds.intField('min',minValue=0,value=0)
        cmds.text('To')
        cmds.intField('max',minValue=0, value=0)
        cmds.setParent( '..' )
        cmds.setParent( '..' )

        cmds.frameLayout( label='Iterations', borderStyle='out' )
        cmds.intField('iterations',minValue=0,maxValue=10,value=0)


        cmds.frameLayout( label='Key', borderStyle='out' )
        cmds.button('Delect',c='Delect()')
        cmds.showWindow()
开发者ID:wangqinghuaTudou,项目名称:test,代码行数:35,代码来源:Average.py


示例18: createWin

    def createWin(self):

        # Creates window
        self.mainWin = cmds.window(self.winName, sizeable=True)

        # Main frame
        cmds.frameLayout(
            "mainFrameLayout",
            labelVisible=False,
            borderVisible=False,
            w=10,
            marginHeight=0,
            marginWidth=0,
            labelIndent=0,
            collapsable=False,
        )
        cmds.rowLayout(numberOfColumns=2, adjustableColumn=1, columnAttach=([2, "right", self.barOffset]), h=37)
        cmds.text(label="")
        self.subUIsLayout = cmds.rowLayout("mainLayout", numberOfColumns=len(SUB_UI_MODS) + 2)

        # subUIs
        self.uiList = [eval("%s.%s%s_Gui" % (loopUi, loopUi[0].upper(), loopUi[1:])) for loopUi in SUB_UI_MODS]
        # append general tools ui
        self.uiList.append(generalToolsUI.GeneralTools_Gui)
        # define subUis
        self.subUIs = [loopUi(self.subUIsLayout, self.buttonSize) for loopUi in self.uiList]

        self.addSubUIs()

        # shows toolbar
        cmds.toolBar(self.toolbarName, area="bottom", content=self.mainWin, allowedArea=["bottom"])
开发者ID:Italic-,项目名称:maya-prefs,代码行数:31,代码来源:animBarUI.py


示例19: drawFrame

    def drawFrame(self,bloc,x,y):
        """
        Function to draw a block as a collapsable frame layout of the gui. 
        
        @type  block: array or dictionary
        @param block: list or dictionary of item dictionary
        @type  x: int
        @param x: position on x in the gui windows, used for blender
        @type  y: int
        @param y: position on y in the gui windows, used for blender
        
        @rtype:   int
        @return:  the new horizontal position, used for blender
        """    
        
#        cmds.scrollLayout(bloc["name"]+"_scrol",w=self.w*self.scale)
        cmds.frameLayout( label=bloc["name"], collapsable=True,
                             cl=bloc["collapse"],borderVisible=False,
                             w=self.w*self.scale*2.5)#borderStyle='in' ,
        for k,blck in enumerate(bloc["elems"]):
#            print bloc["name"],len(blck),blck
            if len(blck) == 0 :
                continue
            kw = {}
            N = len(blck)
            if N < 6 :
                kw ["columnAlign"+str(N)] = "left" if N == 1 else ["left",]*N
            cmds.rowLayout(numberOfColumns=N,w=self.w*self.scale*2.5,**kw)
            for index, item in enumerate(blck):
                self._drawElem(item,x,y)
            self.endBlock()
        self.endBlock()
#        self.endBlock()
        return y
开发者ID:gj210,项目名称:upy,代码行数:34,代码来源:mayaUI.py


示例20: __init__

 def __init__(self,*args):
     if(cmds.window("rbbnChainBuilder",exists=True)):
         cmds.deleteUI("rbbnChainBuilder",window=True)
 	
     cmds.window("rbbnChainBuilder",title="Build Ribbon Rig v1.0", rtf=True)
     cmds.columnLayout()
     
 	self.prefixFld = cmds.textFieldGrp(label='Prefix',text='L_upLegRbbn_')	        
     self.ribbonFld = cmds.textFieldButtonGrp( label="Ribbon:", buttonLabel="Load", bc = self.loadRibbon)#,text='main_plane'  )
     self.startFld = cmds.textFieldButtonGrp( label="Start Control:", buttonLabel="Load", bc = self.loadStart,text='cnt_1'  )
     self.endFld = cmds.textFieldButtonGrp( label="End Control:", buttonLabel="Load", bc = self.loadEnd,text='cnt_2' )
     self.numFld = cmds.intFieldGrp(label='Controls:',nf=1,v1=5)
     self.skinFld = cmds.intFieldGrp(label='Skin Joints:',nf=1,v1=5)
     self.buildFld = cmds.radioButtonGrp(nrb=2,labelArray2=('U','V'),label='Build along:',sl=1)
     
     
     cmds.frameLayout(label='Control Options: ',fn='boldLabelFont',cll=False)
     cmds.columnLayout()
     self.crvCreateFld = cmds.radioButtonGrp(nrb=2,labelArray2=('Yes','No'),label='Create bend-bo controls?',sl=1)
     self.radFld = cmds.floatFieldGrp(label='Radius:',nf=1,v1=0.2)
     self.crvNrFld = cmds.radioButtonGrp(nrb=3,labelArray3=('X','Y','Z'),label='Controller normal Axis:',sl=2)
     cmds.setParent("..")
     cmds.setParent("..")
     
     cmds.rowLayout(nc=2,cw2=(200,100))
     cmds.text(' ')
     cmds.button(label = "          Create", c = self.buildRig,w=100 )
 	cmds.setParent('..')
 		
     cmds.showWindow("rbbnChainBuilder")
开发者ID:Mauricio3000,项目名称:MSH_Maya,代码行数:30,代码来源:ms_rbbnChainBuilder.py



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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