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

Python core.rowLayout函数代码示例

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

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



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


示例16: placeHighLight

def placeHighLight(*args):
    ### UI setup 
    global UI_name
    UI_name = [ 'txtBtn_light', 'txtBtn_camera', 'txtBtn_object', 'txtBtn_HLitPoint', 'btn_placeHLit', 'chk_interaction' ]
    
    if pm.window( 'winPlaceHLit', exists=True ):
        pm.deleteUI( 'winPlaceHLit', window=True )
        
    ui_layout['window'] = pm.window( 'winPlaceHLit', title='Place Highlight', sizeable=False, h=100, w=250 )
    ui_layout['mainLayout'] = pm.columnLayout( columnAlign='left', columnAttach=['left', 0] )
    
    #// get active camera
    activeViewCamera = getActiveCam()
    
    '''loc_light_probe = pm.createNode('locator', name='light_probe')
    pm.lockNode(loc_light_probe, lock=False)'''

    #// sub layout
    #// sub1
    ui_layout['ui_sub1'] = pm.rowLayout(nc=2, cw=[(1, 210), (2, 40)], p=ui_layout['mainLayout'] )
    pm.textFieldButtonGrp( UI_name[0], label='Light: ', text='', buttonLabel='Pick',editable=False, buttonCommand='pickLit()', cw=[(1,50), (2,120), (3,40)], p=ui_layout['ui_sub1'] )
    pm.button( 'btn_sel_light' ,label='Sel', command=pm.Callback( doSelItem, UI_name[0] ), p=ui_layout['ui_sub1'] )
    
    #// sub2
    ui_layout['ui_sub2'] = pm.rowLayout(nc=2, cw=[(1, 210), (2, 40)], p=ui_layout['mainLayout'] )
    pm.textFieldButtonGrp( UI_name[1], label='Camera: ', text=activeViewCamera, buttonLabel='Pick', editable=False, buttonCommand='pickCam()', cw=[(1,50), (2,120), (3,40)], p=ui_layout['ui_sub2'] )
    pm.button( 'btn_sel_camera' ,label='Sel', command=pm.Callback( doSelItem, UI_name[1] ), p=ui_layout['ui_sub2'] )
    
    #// sub3
    ui_layout['ui_sub3'] = pm.rowLayout(nc=2, cw=[(1, 210), (2, 40)], p=ui_layout['mainLayout'] )
    pm.textFieldButtonGrp( UI_name[2], label='Object: ', text='', buttonLabel='Pick', editable=False, buttonCommand='pickTgtObj()', cw=[(1,50), (2,120), (3,40)], p=ui_layout['ui_sub3'] )
    pm.button( 'btn_sel_obj' ,label='Sel', command=pm.Callback( doSelItem, UI_name[2] ), p=ui_layout['ui_sub3'] )
    
    #// sub4
    ui_layout['ui_sub4'] = pm.rowLayout(nc=2, cw=[(1, 210), (2, 40)], p=ui_layout['mainLayout'] )    
    pm.textFieldButtonGrp( UI_name[3], label='Point: ', text='', buttonLabel='Pick', editable=False, buttonCommand='pickHLitPt()', cw=[(1,50), (2,120), (3,40)], p=ui_layout['ui_sub4'] )
    pm.button( 'btn_sel_point' ,label='Sel', command=pm.Callback( doSelItem, UI_name[3] ), p=ui_layout['ui_sub4'] )
    
    #// sub5
    ui_layout['ui_sub5'] = pm.rowLayout(nc=2, cw=[(1, 70), (2, 50)], p=ui_layout['mainLayout'] )
    pm.button( UI_name[4] ,label='Place Light!', command='doPlaceHLight()', p=ui_layout['ui_sub5'] )    
    pm.checkBox( UI_name[5], label='interactive mode', onCommand=pm.Callback( doInteractionON ), offCommand=pm.Callback( doInteractionOFF ), p=ui_layout['ui_sub5'] )
    
    
    pm.showWindow( ui_layout['window'] )
    
    pm.spaceLocator( name='light_probe' )
    pm.lockNode( 'light_probe', lock=True )
    pm.textFieldButtonGrp( 'txtBtn_HLitPoint', edit=True, text='light_probe' )
    
    #// clean make live and scriptJob after exit script
    pm.scriptJob( uiDeleted=[ ui_layout['window'], pm.Callback( flushScript ) ] )
开发者ID:kzchen,项目名称:Maya_TD_tools,代码行数:52,代码来源:placeHlighLight_v16.py


示例17: __init__

    def __init__(self):
        with pm.frameLayout(l='Transform:', cll=True, cl=False, bs='out'):
            with pm.columnLayout():
                with pm.gridLayout(nc=5):
                    pm.iconTextButton(image1='pbUV/tRot90CCW.png', c=lambda *args: self.rotate(angle=90, dir='ccw'),
                                      commandRepeatable=True)
                    pm.iconTextButton(image1='pbUV/tRotCCW.png', c=lambda *args: self.rotate(dir='ccw'),
                                      commandRepeatable=True)
                    pm.iconTextButton(image1='pbUV/tTranslateUp.png', c=lambda *args: self.move(v=1),
                                      commandRepeatable=True)
                    pm.iconTextButton(image1='pbUV/tRotCW.png', c=lambda *args: self.rotate(dir='cw'))
                    pm.iconTextButton(image1='pbUV/tRot90CW.png', c=lambda *args: self.rotate(angle=90, dir='cw'),
                                      commandRepeatable=True)

                    flipuv = pm.iconTextButton(image1='pbUV/tFlipUV.png', c=lambda *args: self.flip(axis='u'),
                                               commandRepeatable=True)
                    pm.popupMenu(button=3, p=flipuv, pmc=lambda *args: self.flip(axis='v'))
                    pm.iconTextButton(image1='pbUV/tTranslateLeft.png', c=lambda *args: self.move(u=-1),
                                      commandRepeatable=True)
                    pm.iconTextButton(image1='pbUV/tTranslateDown.png', c=lambda *args: self.move(v=-1),
                                      commandRepeatable=True)
                    pm.iconTextButton(image1='pbUV/tTranslateRight.png', c=lambda *args: self.move(u=1),
                                      commandRepeatable=True)
                    pm.iconTextButton(image1='pbUV/tRot180CCW.png', c=lambda *args: self.rotate(angle=180, dir='ccw'),
                                      commandRepeatable=True)

                with pm.rowColumnLayout(nc=4):
                    self.manipValue = pm.floatField(v=1.0)
                    pm.iconTextButton(image1='pbUV/tScaleU.png', c=lambda *args: self.scale(axis='u'),
                                      commandRepeatable=True)
                    pm.iconTextButton(image1='pbUV/tScaleV.png', c=lambda *args: self.scale(axis='v'),
                                      commandRepeatable=True)
                    pm.iconTextButton(image1='pbUV/tScaleUV.png', c=lambda *args: self.scale(),
                                      commandRepeatable=True)

                pm.separator(st='in', width=160, height=8)

                with pm.rowLayout(nc=2):
                    pm.button(l='Orient Edge', c=self.orient_edge)
                    pm.button(l='Orient Bounds', c=self.orient_bounds)

                pm.separator(st='in', width=160, height=8)

                with pm.columnLayout(cal='left'):
                    pm.text(l='Pivot:')
                    self.pivType = pm.radioButtonGrp(nrb=2, labelArray2=['Selection', 'Custom'], cw2=[64, 64],
                                                     cc=self._piv_change, sl=1)
                    with pm.rowLayout(nc=3, en=False) as self.pivPos:
                        pm.text('POS:')
                        self.pivU = pm.floatField()
                        self.pivV = pm.floatField()
                    self.sampleSel = pm.button(l='Sample Selection', height=18, en=False, c=self.sample_sel_cmd)
开发者ID:aaronfang,项目名称:pbUV,代码行数:52,代码来源:pbUV.py


示例18: uiContents

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

            with pm.rowLayout(nc=10):
                pm.text(l='Assign Initial Shading Group : ', w= labelWidth, align='right')
                pm.button( l='Assign', w= 160, c=pm.Callback( btn_assignInitialShader ))
            
            with pm.rowLayout(nc=10):
                pm.text(l='File Texture Manager : ', w= labelWidth, align='right')
                pm.button( l='Open UI..', w= 160, c=pm.Callback( btn_fileTextureManager ))
                pm.button(l='d', w=20, c=pm.Callback( pm.launch, web="http://www.creativecrash.com/maya/script/filetexturemanager") )
                pm.button(l='t', w=20, c=pm.Callback( pm.launch, web="https://www.youtube.com/watch?v=3bSkVoo6glU") )
开发者ID:kyuhoChoi,项目名称:mayaTools,代码行数:13,代码来源:arnold_addAttr_ui.py


示例19: _buildupWindow

 def _buildupWindow(self):
     if isinstance(self._window, _pmCore.uitypes.Window) and self._window.exists(self._window.name()):
         _pmCore.deleteUI(self._window, window=True)
     self._window = _pmCore.window(title=self._winTitle)
     
     _pmCore.rowLayout(numberOfColumns=2, columnWidth2=[200, 100])
     self._textScrollList = _pmCore.textScrollList(height=100)
     for category in _Database.getCategoryList():
         _pmCore.textScrollList(self._textScrollList, edit=True, append=category)
     _pmCore.columnLayout()
     _pmCore.button(label='Add', width=100, height=30, command=self._addClicked)
     _pmCore.button(label='Rename', width=100, height=30, command=self._renameClicked)
     _pmCore.button(label='Delete', width=100, height=30, command=self._deleteClicked)
开发者ID:juewang,项目名称:AssetManager2,代码行数:13,代码来源:MayaUI.py


示例20: _buildPrefUi

    def _buildPrefUi(self):
       
        # delete previous UI
        if pmc.window(self.uiPrefName, exists=True):
            pmc.deleteUI(self.uiPrefName, window=True)
     
     
        # create UI
        self.uiPref['win']          = pmc.window(self.uiPrefName, title=self.uiPrefTitle, menuBar=True, width=300, height=200, sizeable=False)

        self.uiPref['mainLay']      = pmc.columnLayout()
        self.uiPref['titleTxt']     = pmc.text(label='Preferences', backgroundColor=[0,0,0], enableBackground=True, height=20, width=200)
       
        self.uiPref['optLay']       = pmc.rowLayout(numberOfColumns=2, columnWidth2=(125, 75))
        self.uiPref['optTxt']       = pmc.text(label='Format filter')
       
        self.uiPref['chkLay']       = pmc.columnLayout()
        
        v=False
        if '.obj' in self.filtersList:
            v=True
        self.uiPref['objChb']       = pmc.checkBox(label='Obj', value=v)
        v=False
        if '.ma' in self.filtersList:
            v=True
        self.uiPref['maChb']        = pmc.checkBox(label='Ma', value=v)
        v=False
        if '.mb' in self.filtersList:
            v=True
        self.uiPref['mbChb']        = pmc.checkBox(label='Mb', value=v)
        v=False
        if '.fbx' in self.filtersList:
            v=True
        self.uiPref['fbxChb']       = pmc.checkBox(label='Fbx', value=v)
        
        pmc.setParent('..')
        pmc.setParent('..')
        
        pmc.rowLayout(numberOfColumns=2, columnWidth2=(100, 100))
        self.uiPref['cancelBtn'] = pmc.bu 

鲜花

握手

雷人

路过

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

请发表评论

全部评论

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