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


Python core.rowLayout函数代码示例

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


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

示例1: createUISet

 def createUISet(self):
     self._childLayout = pm.columnLayout( adj=True )
     with self._childLayout:
         pm.text(l="Click cage mesh first, then shift+click target mesh, and click the menu item.")
         self.deformers = pm.ls(type="cage")
         for i in range(len(self.deformers)):
             frameLayout = pm.frameLayout( label=self.deformers[i].name(), collapsable = True)
             with frameLayout:
                 with pm.rowLayout(numberOfColumns=3) :
                     pm.button( l="Del", c=pm.Callback( self.deleteNode, self.deformers[i].name()))
                     pm.attrControlGrp( label="cage mode", attribute= self.deformers[i].cgm)
                     pm.attrControlGrp( label="blend mode", attribute= self.deformers[i].bm)
                 with pm.rowLayout(numberOfColumns=3) :
                     pm.attrControlGrp( label="rotation consistency", attribute= self.deformers[i].rc)
                     pm.attrControlGrp( label="Frechet sum", attribute= self.deformers[i].fs)                        
         self.deformers = pm.ls(type="cageARAP")
         for i in range(len(self.deformers)):
             frameLayout = pm.frameLayout( label=self.deformers[i].name(), collapsable = True)
             with frameLayout:
                 with pm.rowLayout(numberOfColumns=4) :
                     pm.button( l="Del", c=pm.Callback( self.deleteNode, self.deformers[i].name()))
                     pm.attrControlGrp( label="cage mode", attribute= self.deformers[i].cgm)
                     pm.attrControlGrp( label="blend mode", attribute= self.deformers[i].bm)
                     pm.attrControlGrp( label="constraint mode", attribute= self.deformers[i].constraintMode)
                 with pm.rowLayout(numberOfColumns=3) :
                     pm.attrControlGrp( label="rotation consistency", attribute= self.deformers[i].rc)
                     pm.attrControlGrp( label="Frechet sum", attribute= self.deformers[i].fs)                        
                     pm.attrControlGrp( label="constraint weight", attribute= self.deformers[i].constraintWeight)
开发者ID:Leopardob,项目名称:CageDeformerMaya,代码行数:28,代码来源:ui_cageDeformer.py

示例2: uiContents

def uiContents():
    with pm.frameLayout(l='Export To AE Tools', cll=True, mw=3, mh=3, bs='etchedIn'):
        with pm.columnLayout(adj=True):
            with pm.rowLayout(nc=10):
                pm.text(l='Create Static Null : ', w=labelWidth, align='right')
                pm.button(l='Select Transform and Excute', c=pm.Callback( btn_createStaticNull ), w=160)
                #pm.button(l='d', w=20, c=pm.Callback( pm.launch, web="http://www.braverabbit.de/playground/dp=443") ) 
                #pm.button(l='t', w=20, c=pm.Callback( pm.launch, web="https://www.youtube.com/watch?v=YvNdYseSNFs") )
                #pm.button(l='t', w=20, c=pm.Callback( excuteWindowFile, 'alembicExporter.flv') )
            with pm.rowLayout(nc=10):
                pm.text(l='Create Active Null : ', w=labelWidth, align='right')
                pm.button(l='Select Transform and Excute', c=pm.Callback( btn_createActiveNull ), w=160)
                #pm.button(l='d', w=20, c=pm.Callback( pm.launch, web="http://www.braverabbit.de/playground/dp=443") ) 
                #pm.button(l='t', w=20, c=pm.Callback( pm.launch, web="https://www.youtube.com/watch?v=YvNdYseSNFs") )
                #pm.button(l='t', w=20, c=pm.Callback( excuteWindowFile, 'alembicExporter.flv') )
            with pm.rowLayout(nc=10):
                pm.text(l='Create aeCamera : ', w=labelWidth, align='right')
                pm.button(l='Select Camera and Excute', c=pm.Callback( btn_createAECam ), w=160)
                #pm.button(l='d', w=20, c=pm.Callback( pm.launch, web="http://www.braverabbit.de/playground/dp=443") ) 
                #pm.button(l='t', w=20, c=pm.Callback( pm.launch, web="https://www.youtube.com/watch?v=YvNdYseSNFs") )
                #pm.button(l='t', w=20, c=pm.Callback( excuteWindowFile, 'alembicExporter.flv') )

    with pm.frameLayout(l='Support Tools', cll=True, mw=3, mh=3, bs='etchedIn'):
        with pm.columnLayout(adj=True):
            with pm.rowLayout(nc=10):
                pm.text(l='PrimaryVis : ', w=labelWidth, align='right')
                pm.button(l='OFF', c=pm.Callback( btn_primaryVisibilityOff ), w=160)
开发者ID:kyuhoChoi,项目名称:mayaTools,代码行数:27,代码来源:ui.py

示例3: role_mqsb_switch

	def role_mqsb_switch(status, *args):
		pm.rowLayout(srcAddr, e= 1, vis= 1 if status else 0)
		pm.rowLayout(disAddr, e= 1, vis= 0 if status else 1)
		pm.textField(tcHost_txt, e= 1, tx= '', ed= 1 if status else 0)
		pm.textField(tcPort_txt, e= 1, tx= '', ed= 1 if status else 0)
		pm.columnLayout(remap_Area, e= 1, en= 1 if status else 0)
		pm.columnLayout(exect_Area, e= 1, en= 1 if status else 0)
开发者ID:davidpower,项目名称:MS_AniRemap,代码行数:7,代码来源:mAnimRemapUI.py

示例4: createUISet

 def createUISet(self):
     self._childLayout = pm.columnLayout( adj=True )
     with self._childLayout:
         pm.text(l="Click cage mesh first, then shift+click target mesh, and click the menu item.")
         for type in deformerTypes:
             deformers = pm.ls(type=type)
             for node in deformers:
                 frameLayout = pm.frameLayout( label=node.name(), collapsable = True)
                 with frameLayout:
                     with pm.rowLayout(numberOfColumns=2) :
                         pm.button( l="Del", c=pm.Callback( self.deleteNode, node))
                         pm.attrFieldSliderGrp( label="iteration", min=1, max=100, attribute=node.it)
                     with pm.rowLayout(numberOfColumns=2) :
                         pm.attrControlGrp( label="rotation consistency", attribute= node.rc)
                         pm.attrFieldSliderGrp( label="global rotation", min=-720, max=720, attribute=node.ir)
                     with pm.rowLayout(numberOfColumns=3) :
                         pm.attrControlGrp( label="blend mode", attribute= node.bm)
                         pm.attrControlGrp( label="tet mode", attribute= node.tm)
                         pm.attrControlGrp( label="area weight", attribute= node.aw)
                     with pm.rowLayout(numberOfColumns=2) :
                         pm.attrControlGrp( label="visualise energy", attribute= node.ve)
                         pm.attrFieldSliderGrp( label="visualisation multiplier", min=0.001, max=1000, attribute=node.vmp)
                     for j in range(node.blendMesh.numElements()):
                         with pm.rowLayout(numberOfColumns=1) :
                             pm.attrFieldSliderGrp(label=node.blendWeight[j].getAlias(), min=-1.0, max=2.0, attribute= node.blendWeight[j])
开发者ID:shizuo-kaji,项目名称:NWayBlenderMaya,代码行数:25,代码来源:ui_nwayBlender.py

示例5: createUISet

    def createUISet(self):
        self._childLayout = pm.columnLayout( adj=True )
        with self._childLayout:
            pm.text(l="Click cage mesh first, then shift+click target mesh, and click the menu item.")
            # cageDeformer specific
            deformers = pm.ls(type=deformerTypes[0])
            for node in deformers:
                frameLayout = pm.frameLayout( label=node.name(), collapsable = True)
                with frameLayout:
                    self.createCommonAttr(node)

            # cageDeformerARAP specific
            deformers = pm.ls(type=deformerTypes[1])
            for node in deformers:
                frameLayout = pm.frameLayout( label=node.name(), collapsable = True)
                with frameLayout:
                    self.createCommonAttr(node)
                    with pm.rowLayout(numberOfColumns=3) :
                        pm.attrControlGrp( label="constraint mode", attribute= node.ctm)
                        pm.attrFieldSliderGrp( label="constraint weight", min=1e-10, max=1000, attribute=node.cw)
                        pm.attrFieldSliderGrp(label="constraint radius", min=0.001, max=10.0, attribute=node.cr)
                    with pm.rowLayout(numberOfColumns=3) :
                        pm.attrFieldSliderGrp( label="iteration", min=1, max=20, attribute=node.it)
                        pm.attrControlGrp( label="tet mode", attribute= node.tm)
                        pm.attrFieldSliderGrp( label="translation weight", min=0.0, max=1.0, attribute=node.tw)
开发者ID:shizuo-kaji,项目名称:CageDeformerMaya,代码行数:25,代码来源:ui_cageDeformer.py

示例6: createUI

def createUI():
    global m2uwin
    if m2uwin is not None:
        pm.deleteUI(m2uwin, window=True)
    
    v = m2u.getVersion()
    m2uwin = pm.window( title="m2u "+v+" (maya)", iconName='m2u',
                        widthHeight=(150, 300) )
    pm.columnLayout()
    pm.rowLayout(numberOfColumns = 2)
    pm.button( label='Connect', c=cbConnect )
    pm.button( label='Setup Cameras', c=cbSetupCamera )
    pm.setParent('..')
    pm.checkBox( label='Sync Camera', onc = cbSyncCamera,
                 ofc = cbSyncCameraOff, v = False)
    pm.checkBox( label='Sync Objects', onc = cbSyncObjects,
                 ofc = cbSyncObjectsOff, v = False)
    pm.checkBox( label='Sync Visibility', onc = cbSyncVisibility,
                 ofc = cbSyncVisibilityOff, v = False)
    pm.separator()
    pm.button( label='Fetch Selected', c = cbFetchSelected)
    pm.button( label='Send Selected To Editor', c = cbSendSelectedToEd)
    #pm.button( label='Import Content Test', c = cbUDKImportContent)
    pm.setParent( '..' )
    pm.showWindow( m2uwin )
开发者ID:m2u,项目名称:m2u,代码行数:25,代码来源:mayaInternalUI.py

示例7: __init_window__

 def __init_window__(self):
     self.window = pm.window(menuBar=False, widthHeight=[200, 100], title="PYMHUD by Daniel S�nchez Quir�s")
     self.columna = pm.columnLayout(adjustableColumn=True)
     # Name row
     self.row1 = pm.rowLayout(numberOfColumns=3, adjustableColumn=True, parent=self.columna)
     pm.text("Name:", al="left", parent=self.row1)
     self.nameQ = pm.textField(parent=self.row1)
     pm.checkBox(
         label="", parent=self.row1, offCommand=Callback(self.nameHud, False), onCommand=Callback(self.nameHud, True)
     )
     # Scene row
     self.row2 = pm.rowLayout(numberOfColumns=3, adjustableColumn=True, parent=self.columna)
     pm.text("Scene Name:", al="left")
     self.sceneNameQ = pm.textField(parent=self.row2)
     pm.checkBox(
         label="",
         parent=self.row2,
         offCommand=Callback(self.sceneHud, False),
         onCommand=Callback(self.sceneHud, True),
     )
     # Date row
     self.row3 = pm.rowLayout(numberOfColumns=3, adjustableColumn=True, parent=self.columna)
     pm.text("Date:", al="left")
     pm.checkBox(
         label="", parent=self.row3, offCommand=Callback(self.dateHud, False), onCommand=Callback(self.dateHud, True)
     )
     # rame counter row
     self.row4 = pm.rowLayout(numberOfColumns=3, adjustableColumn=True, parent=self.columna)
     pm.text("Frame Counter:", al="left")
     pm.checkBox(label="", parent=self.row4, offCommand=Callback(self.frameHud), onCommand=Callback(self.frameHud))
     pm.showWindow(self.window)
开发者ID:danimanimal,项目名称:PYMHUD,代码行数:31,代码来源:pymhud.py

示例8: uiContents

def uiContents():
    with pm.frameLayout(l='Color', cll=True, mw=3, mh=3 ):
        with pm.columnLayout(adj=True):

            with pm.rowLayout(nc=2):
                pm.text(label='Set Override Color : ', align='right', w=130)
                with pm.rowColumnLayout( nc=10 ):
                    wh=18
                    for i in range(0,32):
                        rgb = (0,0,0)
                        if i == 0:
                            rgb  = (0.5,0.5,0.5)
                            anno = 'Reset'
                            pm.symbolButton( i=iconPath+'ui_colorNone.png', annotation=anno, w=wh, h=wh, c=pm.Callback( setColor.setColor, color=i ) )

                        else:
                            rgb  = pm.colorIndex( i, q=True )
                            anno = '- index : %d\n- RGB : %03.3f %03.3f %03.3f\n- name : %s'%(i, rgb[0], rgb[1], rgb[2], setColor.color_intToStr(i) )

                            pm.canvas(
                                rgbValue   = rgb,
                                annotation = anno,
                                w=wh, h=wh,
                                pressCommand = pm.Callback( setColor.setColor, color=i )
                                ) #partial( self.setColor, i, True , self._toShape)) #partial( self.setColor, i, False, False))

            pm.separator(h=8,style='in')
            with pm.rowLayout( nc=10 ):
                pm.text(label='Set Wire Frame Color : ', align='right', w=130)
                pm.button(label='Object Color Palette', c=pm.Callback( pm.mel.objectColorPalette ), w=180 )

# ======================================
# Buttons
# ======================================
开发者ID:kyuhoChoi,项目名称:mayaTools,代码行数:34,代码来源:ui.py

示例9: __init__

    def __init__(self, template):
        self.template = template
        self.win = "arnold_filter_list_win"
        if pm.window(self.win, exists=True):
            pm.deleteUI(self.win)
    
        pm.window(self.win, title="Add Light Filter",
                    sizeable=False,
                    resizeToFitChildren=True)
        #pm.windowPref(removeAll=True)
        pm.columnLayout(adjustableColumn=True,
                          columnOffset=("both", 10),
                          #columnAttach=('both',1),
                          rowSpacing=10)
    
        self.scrollList = pm.textScrollList('alf_filter_list', nr=4, ams=False)
        pm.textScrollList(self.scrollList,
                            e=True,
                            doubleClickCommand=Callback(self.addFilterAndHide))

        for label, nodeType in self.filters():
            pm.textScrollList(self.scrollList, edit=True, append=label)

        pm.rowLayout(numberOfColumns=2, columnAlign2=("center", "center"))
        pm.button(width=100, label="Add", command=Callback(self.addFilterAndHide))
        pm.button(width=100, label="Cancel", command=Callback(pm.deleteUI, self.win, window=True))
    
        pm.setParent('..')
        pm.setParent('..')

        pm.showWindow(self.win)
开发者ID:Quazo,项目名称:breakingpoint,代码行数:31,代码来源:lightTemplate.py

示例10: __init__

    def __init__(self):
        title = 'pbRenderableCurve'
        version = 1.02

        if pm.window('pbRCurve', exists=True):
            pm.deleteUI('pbRCurve')

        with pm.window('pbRCurve', title='{0} | {1}'.format(title, version), s=False) as window:
            with pm.columnLayout():
                with pm.frameLayout(l='Selection:', cll=True, bs='out'):
                    with pm.columnLayout():
                        self.selField = pm.textFieldGrp(text='No Curves Selected', ed=False, l='Curve:', cw2=[72, 192])
                        with pm.rowLayout(nc=2):
                            self.bRenderable = pm.checkBox(l='Renderable', cc=self.bcRenderable)

                with pm.frameLayout(l='Mesh Settings:', cll=True, bs='out') as self.meshUI:
                    with pm.columnLayout():
                        with pm.rowLayout(nc=4):
                            self.useNormal = pm.checkBox(l='Use Normal', cc=self.bcUseNormal)
                            self.normalVector = [pm.intField(width=62, en=False, value=0, cc=self.setNormal),
                                                 pm.intField(width=62, en=False, value=1, cc=self.setNormal),
                                                 pm.intField(width=62, en=False, value=0, cc=self.setNormal)]
                        self.meshAttrs = [AttrSlider(maxValue=128, name='Thickness', obj=getCurves, type_='float', fmn=0.0001),
                                          AttrSlider(value=3, minValue=3, maxValue=64, name='Sides', obj=getCurves, fmn=3, fmx=100),
                                          AttrSlider(minValue=1, maxValue=32, name='Samples', obj=getCurves, fmn=1, fmx=128)]

                with pm.frameLayout('Shell Settings:', cll=True, bs='out') as self.shellUI:
                    with pm.columnLayout():
                        self.bShell = pm.checkBox(l='Enable Shell', cc=self.bcShell)
                        self.shellAttrs = [AttrSlider(value=1, minValue=-64, maxValue=64, name='ShellThickness', obj=getCurves, type_='float'),
                                           AttrSlider(value=1, minValue=1, maxValue=64, name='ShellDivisions', obj=getCurves, fmn=1, fmx=32)]

        window.show()
        pm.scriptJob(event=['SelectionChanged', self.refresh], protected=True, p=window)
        self.refresh()
开发者ID:cmcpasserby,项目名称:pbRenderableCurve,代码行数:35,代码来源:pbRenderableCurve.py

示例11: uiOptions

    def uiOptions(self):
        with pm.tabLayout(tv=False, imw=5, imh=5 ) as layout:  
            with pm.columnLayout(adj=1):
                self.navFieldGrp( 'navFieldGrp', label='Work Path : ', text=self.startPath.get(), optVar=self.startPath, fileMode='dir' )
             
                pm.separator(style='in', h=8)       
                with pm.rowLayout(nc=7):
                    pm.text(l=' Work : ', al='right', w=140 )   
                    pm.button(l='Create',      c=partial( self.btnCmd, 'create'), w=50 )
                    pm.button(l='Reload',      c=partial( self.btnCmd, 'reload'), w=50 )    
                    pm.button(l='Replace',     c=partial( self.btnCmd, 'replace'), w=50 )
                    pm.button(l='Import',      c=partial( self.btnCmd, 'import'), w=50 )
                    pm.button(l='Remove',      c=partial( self.btnCmd, 'remove'), w=50 )    
            
                with pm.rowLayout(nc=7):
                    pm.text(l='',al='right', w=140 )    
                    pm.button(l='Print Reference State', c=partial( self.btnCmd, 'state'), w=128 )

                pm.separator(style='in', h=8)                
                with pm.rowLayout(nc=7):
                    pm.text(l='Maya Editor : ',al='right', w=140 )    
                    pm.button(l='Reference Editor',  c=pm.Callback( pm.mel.ReferenceEditor ), w=128 )
                    pm.button(l='Namespace Editor',  c=pm.Callback( pm.mel.NamespaceEditor ), w=128 )

        return layout
开发者ID:kyuhoChoi,项目名称:mayaTools,代码行数:25,代码来源:ui.py

示例12: createRamp

 def createRamp( self, attr ):
     #Create the control fields
     pm.columnLayout( )
     
     cmds.rowLayout(nc=2, cw2=(142,220))
     pm.text("Shutter Curve");
     pm.text(" ");
     pm.cmds.setParent('..')
     
     cmds.rowLayout("ShutterCurveRowLayout",nc=2, cw2=(142,220))
     
     pm.columnLayout("ShutterCurveColumLayout")
     cmds.rowLayout("ShutterCurveValueLayout", nc=2, cw2=(60,45))
     pm.text("Value");
     valueField = pm.floatField("ShutterCurveValueField");
     pm.cmds.setParent('..')
     
     pm.rowLayout("ShutterCurvePositionLayout", nc=2, cw2=(60,45))
     pm.text("Position");
     
     positionField = cmds.floatField("ShutterCurvePositionField");
     pm.cmds.setParent('..')
     
     '''pm.rowLayout(nc=2, cw2=(60,65))
     pm.text("Interpol.");
     pm.optionMenu(changeCommand=self.updateRamp )
     pm.menuItem( label='None' )
     pm.menuItem( label='Linear' )
     pm.menuItem( label='Smooth' )
     pm.menuItem( label='Spline' )
     pm.cmds.setParent('..')'''
     pm.cmds.setParent('..')
     
     gradient = pm.gradientControlNoAttr("ShutterCurveGradientControl", w=200, h=100 )
     pm.gradientControlNoAttr( gradient, edit=True, changeCommand=pm.Callback(self.syncAttribute,attr,gradient, valueField, positionField) )
     
     #Initialize the curve with the values in the attribute
     curveString = ""
     attr = self.nodeAttr('aiShutterCurve')
     size = cmds.getAttr(attr, size=True)
     startX = 0
     startY = 1
     if size > 0:
         x = cmds.getAttr(attr+'[0].aiShutterCurveX')
         y = cmds.getAttr(attr+'[0].aiShutterCurveY')
         startX = x
         startY = y
         curveString += str(y) +"," + str(x) +",1"
     else:
         curveString += "1,0,1"
     for i in range(1,size):
         x = cmds.getAttr(attr+'['+str(i)+'].aiShutterCurveX')
         y = cmds.getAttr(attr+'['+str(i)+'].aiShutterCurveY')
         curveString += ","+str(y) +"," + str(x) +",1"
         
     cmds.gradientControlNoAttr( gradient, edit=True, asString=curveString) 
     
     pm.floatField(valueField, edit=True, value=startY, changeCommand=pm.Callback(self.updateValue, attr, gradient, valueField, positionField))
     pm.floatField(positionField, edit=True, value=startX, changeCommand=pm.Callback(self.updatePosition, attr, gradient, valueField, positionField))
开发者ID:Quazo,项目名称:breakingpoint,代码行数:59,代码来源:customShapeAttributes.py

示例13: __init__

	def __init__(self):
		self.windows_name = 'cgru_afanasy_wnd'

		if pm.window(self.windows_name, exists=True):
			pm.deleteUI(self.windows_name)

		self.window = pm.window(self.windows_name, t='Afanasy')

		with pm.columnLayout(adj=True):
			labels_width = 90
			with pm.rowLayout(nc=2, adj=2, cw2=(labels_width, 50)):
				pm.text(l='Start Frame')
				pm.intField(
					'cgru_afanasy__start_frame',
					v=pm.optionVar.get('cgru_afanasy__start_frame_ov', 1)
				)

			with pm.rowLayout(nc=2, adj=2, cw2=(labels_width, 50)):
				pm.text(l='End Frame')
				pm.intField(
					'cgru_afanasy__end_frame',
					v=pm.optionVar.get('cgru_afanasy__end_frame_ov', 1)
				)

			with pm.rowLayout(nc=2, adj=2, cw2=(labels_width, 50)):
				pm.text(l='Frame Per Task')
				pm.intField(
					'cgru_afanasy__frames_per_task',
					v=pm.optionVar.get('cgru_afanasy__frames_per_task_ov', 1)
				)

			with pm.rowLayout(nc=2, adj=2, cw2=(labels_width, 50)):
				pm.text(l='By Frame')
				pm.intField(
					'cgru_afanasy__by_frame',
					v=pm.optionVar.get('cgru_afanasy__by_frame_ov', 1)
				)

			pm.checkBox('cgru_afanasy__paused', l='Start Paused', v=0)
			pm.checkBox(
				'cgru_afanasy__separate_layers',
				l='Submit Render Layers as Separate Tasks',
				v=1
			)

			pm.button(
				l='LAUNCH',
				c=self.launch
			)

			pm.checkBox(
				'cgru_afanasy__close',
				l='Close After',
				v=1
			)

		pm.showWindow(self.window)
开发者ID:AlbertR,项目名称:cgru,代码行数:57,代码来源:__init__.py

示例14: create

 def create(self, stationary_count, offset_count):
     '''
     Create the fgshooter window.
     '''
     if pm.window(self.window_name, exists=True):
         pm.deleteUI(self.window_name)
     pm.window(self.window_name, title=self.window_title)
     
     main_form = pm.formLayout(numberOfDivisions=2)
     self.column = pm.columnLayout(adjustableColumn=True)
     
     # Render Camera
     self.render_camera_field = pm.checkBoxGrp(label="Include Render Camera", value1=self.render_camera, changeCommand=self.updateRenderCamera)
     
     # Stationary Cameras
     pm.separator(height=20, style="in")
     
     pm.rowLayout(numberOfColumns=3, columnWidth3=(140, 80, 80), columnAlign=(1, 'right'), columnAttach3=("right", "both", "both"))
     pm.text("Stationary Cameras")
     self.stationary_field = pm.intField(value=stationary_count)
     pm.button(label="Update", height=22, command=self.update)
     pm.setParent('..')
     
     self.stationary = []
     i = 0
     while i < stationary_count:
         self.stationary.append(pm.floatFieldGrp(value1=self.stationary_frames[i], label="frame"))
         i += 1
     
     # Offset Cameras
     pm.separator(height=20, style="in")
     
     pm.rowLayout(numberOfColumns=3, columnWidth3=(140, 80, 80), columnAlign=(1, 'right'), columnAttach3=("right", "both", "both"))
     pm.text("Offset Cameras")
     self.offset_field = pm.intField(value=offset_count)
     pm.button(label="Update", height=22, command=self.update)
     pm.setParent('..')
     
     self.offset = []
     i = 0
     while i < offset_count:
         self.offset.append(pm.intFieldGrp(value1=self.offset_frames[i], label="frame offset"))
         i += 1
     
     pm.setParent('..')
     
     # remove/apply buttons        
     self.remove_button = pm.button(label="Remove All", height=30, command=self.remove)
     self.apply_button = pm.button(label="Apply / Refresh", height=30, command=self.apply)
     
     pm.formLayout(main_form, edit=True, attachForm=[(self.column, "top", 2),(self.column, "left", 2),(self.column, "right", 2), (self.remove_button, "bottom", 2), (self.remove_button, "left", 2), (self.apply_button, "bottom", 2), (self.apply_button, "right", 2)], attachControl=(self.remove_button, "right", 1, self.apply_button), attachPosition=[ (self.remove_button, "right", 0, 1), (self.apply_button, "left", 1, 1)] )
     
     pm.setParent('..')
     pm.showWindow()
开发者ID:Bumpybox,项目名称:Tapp,代码行数:54,代码来源:fgshooter.py

示例15: MakeRowLayout

def MakeRowLayout(numColumns, 
                  leftColumnWidth=__LEFT_COLUMN_WIDTH__, 
                  middleColumnWidth=__MIDDLE_COLUMN_WIDTH__, 
                  rightColumnWidth=__RIGHT_COLUMN_WIDTH__,
                  makeAdjustable=True):
    """
    Creates & returns a PyMel row layout. 
    
    :param numColumns: number of columns in the layout, min=1 max=4 (<1 or >4 will raise a ValueError).
    :param leftColumnWidth: float, width of left column.
    :param middleColumnWidth: float, width of middle column, ignored if numColumns = 1.
    :param rightColumnWidth: float, width of right column, ignored if numColumsn < 3.
    :param makeAdjustable: True = right-most column (up to 3rd) will have flexible width, False = all columns fixed.
    """
    
    if(numColumns == 4):
        layout = pm.rowLayout(numberOfColumns=4, 
                              columnWidth4=(leftColumnWidth, middleColumnWidth, 
                                            rightColumnWidth - __FOURTH_COLUMN_WIDTH__, __FOURTH_COLUMN_WIDTH__), 
                              columnAlign=(1, 'right'), 
                              columnAttach=[(1, 'both', 0), (2, 'both', 0), (3, 'both', 0), (4, 'right', 10)])
        if(makeAdjustable):
            layout.adjustableColumn(3)
        
        return layout
    if(numColumns == 3):
        layout = pm.rowLayout(numberOfColumns=3, 
                              columnWidth3=(leftColumnWidth, middleColumnWidth, rightColumnWidth), 
                              columnAlign=(1, 'right'), 
                              columnAttach=[(1, 'both', 0), (2, 'both', 0), (3, 'both', 0)])
        if(makeAdjustable):
            layout.adjustableColumn(3)
        
        return layout
    elif(numColumns == 2):
        layout = pm.rowLayout(numberOfColumns=2, 
                              columnWidth2=(leftColumnWidth, rightColumnWidth), 
                              columnAlign=(1, 'right'), 
                              columnAttach=[(1, 'both', 0), (2, 'both', 0)])
        if(makeAdjustable):
            layout.adjustableColumn(2)
            
        return layout
    elif(numColumns == 1):
        layout = pm.rowLayout(numberOfColumns=1, 
                              columnAlign=(1, 'left'), 
                              columnAttach=(1, 'left', leftColumnWidth + 3))
        
        if(makeAdjustable):
            layout.adjustableColumn(1)
            
        return layout
    else:
        raise ValueError  
开发者ID:joemuers,项目名称:pyswarm,代码行数:54,代码来源:uiBuilder.py


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