def __select_shelf( shelf_name ):
  """
  Makes a shelf the active shelf.
  """

  if __shelf_exists( shelf_name ):
    main_shelf = __get_main_shelf( )
    pmc.shelfTabLayout( main_shelf, e = True, st = shelf_name )
Exemple #2
0
    def addToShalf(self):
        '''
        update : 2015-04-28
        '''

        # 현재 쉐프탭 이름 알아옴.
        currentShelfTab = pm.shelfTabLayout( pm.melGlobals['gShelfTopLevel'], q=True, selectTab=True )

        # 생성
        if True:
            pm.shelfButton(
                commandRepeatable=True,
                image1=shelf_icon,                    # 아이콘
                width=32,
                height=32,
                label=title,                          # 타이틀
                imageOverlayLabel=shelf_label,        # 라벨 (5글자 이하)
                font="smallPlainLabelFont",
                # "boldLabelFont", "smallBoldLabelFont", "tinyBoldLabelFont", "plainLabelFont", "smallPlainLabelFont", "obliqueLabelFont", "smallObliqueLabelFont", "fixedWidthFont", "smallFixedWidthFont".
                #overlayLabelColor     = (1, 1, .25), 
                overlayLabelBackColor=(0, 0, 0, 0),  #(.15, .9, .1, .4),
                annotation=shelf_anno,                # 참조글 
                sourceType='python',
                command=shelf_cmd,                    # 명령어
                doubleClickCommand='',
                parent=currentShelfTab,
            )
Exemple #3
0
    def _fixOptionVars():
        # fix optionVars
        import pymel.core as pm
        import maya.mel as mel
        import maya.cmds as m

        ids = [x for x in m.optionVar(l=1) if 'shelfName' in x or 'shelfVers' in x or 'shelfFile' in x or 'shelfLoad' in x or 'shelfAlign' in x]
        ids.sort()
        for n in ids:
            print n, m.optionVar(q=n)
            m.optionVar(rm=n)

        topLevelShelf = mel.eval('string $m = $gShelfTopLevel')
        shelves = pm.shelfTabLayout(topLevelShelf, query=True, tabLabelIndex=True)
        for index, shelf in enumerate(shelves):
            pm.optionVar(stringValue=('shelfName%d' % (index+1), str(shelf)))
            pm.optionVar(stringValue=('shelfLoad%d' % (index+1), 1))
            pm.optionVar(stringValue=('shelfFile%d' % (index+1), 'shelf_'+str(shelf)))
            pm.optionVar(stringValue=('shelfAlign%d' % (index+1), 'left'))
            print index+1,shelf

        ids = [x for x in m.optionVar(l=1) if 'shelfName' in x or 'shelfVers' in x or 'shelfFile' in x or 'shelfLoad' in x or 'shelfAlign' in x]
        ids.sort()
        for n in ids:
            print n, m.optionVar(q=n)
Exemple #4
0
    def ui(self):
        winName = 'FloatingShelfWin'
        if pm.window(winName, exists=True):
            pm.deleteUI(winName)

        self.win = pm.window(winName,
                             title='Floating Shelf v%s' % self.version,
                             rtf=True)

        pm.columnLayout(adj=True)

        #--- Top Buttons
        pm.rowLayout(nc=3, adj=3, cw3=(100, 100, 100))
        pm.button(label='\tExit\t', c=self.exit, bgc=[1.0, 0.2, 0.2], w=100)
        pm.button(label='\tNew Tab\t', c=self._addTab, w=100)
        pm.text('')
        pm.setParent('..')

        #--- Tabs
        self.mainLayout = pm.shelfTabLayout('mainShelfTab',
                                            image='smallTrash.xpm',
                                            imageVisible=True,
                                            imh=SHELFTAB_HEIGHT,
                                            cc=self._refreshTabs)
        self.shelfTabs = []
        sTab = pm.shelfLayout('General', h=SHELFTAB_HEIGHT)
        self.shelfTabs.append(sTab)
        self._createDeleteTabButton(shelfTab=sTab)
        pm.setParent('..')
        pm.setParent('..')

        pm.showWindow()
Exemple #5
0
def __addToShalf(shelfCmd, label=''):
    '''
    update : 2015-04-28
    '''

    # 현재 쉐프탭 이름 알아옴.
    currentShelfTab = pm.shelfTabLayout(pm.melGlobals['gShelfTopLevel'],
                                        q=True,
                                        selectTab=True)

    # 생성
    pm.shelfButton(
        commandRepeatable=True,
        image1='commandButton.png',  # 아이콘
        width=32,
        height=32,
        label=label,  # 타이틀
        imageOverlayLabel=label,  # 라벨 (5글자 이하)
        font="smallPlainLabelFont",
        # "boldLabelFont", "smallBoldLabelFont", "tinyBoldLabelFont", "plainLabelFont", "smallPlainLabelFont", "obliqueLabelFont", "smallObliqueLabelFont", "fixedWidthFont", "smallFixedWidthFont".
        #overlayLabelColor     = (1, 1, .25),
        overlayLabelBackColor=(0, 0, 0, 0),  # (.15, .9, .1, .4),
        annotation=label,  # 참조글
        sourceType='python',
        command=shelfCmd,  # 명령어
        doubleClickCommand='',
        parent=currentShelfTab,
    )
 def _deleteShelfTab(self, shelfTab=None,*args):
     ''' Deleting shelfLayout crashes 2010, so hiding, disabling and changing name.
     When saving shelves, hidden ones will be ignored. '''
     
     if len(self.shelfTabs) == 1:
         print '\nFloatingShelf: Warning: Can not delete the last tab.',
         return
     
     if pm.shelfLayout(shelfTab, q=True, exists=True):
         # Display shelf not being deleted
         for tab in self.shelfTabs:
             if tab != shelfTab:
                 pm.tabLayout(self.mainLayout,edit=True,selectTab=tab)
             
         # Hide the shelf
         pm.shelfLayout( shelfTab, e=True, visible=False )
         pm.shelfLayout( shelfTab, e=True, enable=False )
         tabName = shelfTab.split('|')[-1]
         pm.shelfTabLayout( self.mainLayout, e=True, tabLabel=(tabName,'%s(Deleted)'%tabName) )
         index = self.shelfTabs.index(shelfTab)
         self.shelfTabs[index] = shelfTab.replace(tabName,tabName+'(Deleted)')
def __get_main_shelf( ):
  """
  Return paht to main shelfTabLayout
  """
  try:
    main_shelf = pmc.melGlobals[ 'gShelfTopLevel' ]
  except KeyError:
    return None
  if pmc.shelfTabLayout( main_shelf, ex = True ):
    return main_shelf
  
  else:
    return None
def __shelf_exists( shelf_name ):
  """
  Return True if a shelf Exists, False if it does not
  """
  
  exists = False
  
  main_shelf = __get_main_shelf( )
  if main_shelf is None:
    return False
  
  tabs = pmc.shelfTabLayout( main_shelf, q = True, ca = True )
  if not tabs is None:
    exists = ( shelf_name in tabs )    
  return exists
Exemple #9
0
    def _deleteShelfTab(self, shelfTab=None, *args):
        ''' Deleting shelfLayout crashes 2010, so hiding, disabling and changing name.
        When saving shelves, hidden ones will be ignored. '''

        if len(self.shelfTabs) == 1:
            print '\nFloatingShelf: Warning: Can not delete the last tab.',
            return

        if pm.shelfLayout(shelfTab, q=True, exists=True):
            # Display shelf not being deleted
            for tab in self.shelfTabs:
                if tab != shelfTab:
                    pm.tabLayout(self.mainLayout, edit=True, selectTab=tab)

            # Hide the shelf
            pm.shelfLayout(shelfTab, e=True, visible=False)
            pm.shelfLayout(shelfTab, e=True, enable=False)
            tabName = shelfTab.split('|')[-1]
            pm.shelfTabLayout(self.mainLayout,
                              e=True,
                              tabLabel=(tabName, '%s(Deleted)' % tabName))
            index = self.shelfTabs.index(shelfTab)
            self.shelfTabs[index] = shelfTab.replace(tabName,
                                                     tabName + '(Deleted)')
def __shelf_button_exists( shelf_name, button_name ):
    
    exists = False
    
    main_shelf = __get_main_shelf( )
    if main_shelf is None:
      return False
    
    tabs = pmc.shelfTabLayout( main_shelf, q = True, ca = True )
    if not tabs is None:
      __select_shelf( shelf_name )
      full_shelf = '{0}|{1}'.format( main_shelf, shelf_name )
      buttons = pmc.shelfLayout( full_shelf, q = True, ca = True )
      for button in buttons:
        full_button = '{0}|{1}'.format( full_shelf, button )
        if button_name == pmc.shelfButton( full_button, q = True, l = True ):
          return True
 def ui(self):
     winName = 'FloatingShelfWin'
     if pm.window(winName,exists=True):
         pm.deleteUI(winName)
         
     self.win = pm.window(winName,title='Floating Shelf v%s'%self.version,
               rtf=True)
     
     pm.columnLayout(adj=True)
     
     #--- Top Buttons
     pm.rowLayout(nc=3,adj=3,cw3=(100,100,100))
     pm.button(label='\tExit\t', 
               c = self.exit, 
               bgc=[1.0,0.2,0.2],
               w=100)    
     pm.button(label='\tNew Tab\t', 
               c = self._addTab, 
               w=100)         
     pm.text('')
     pm.setParent( '..' )
     
     #--- Tabs
     self.mainLayout = pm.shelfTabLayout( 'mainShelfTab' , 
                                          image='smallTrash.xpm', 
                                          imageVisible=True, 
                                          imh=SHELFTAB_HEIGHT,
                                          cc=self._refreshTabs)
     self.shelfTabs = []
     sTab = pm.shelfLayout( 'General',h=SHELFTAB_HEIGHT )
     self.shelfTabs.append( sTab )
     self._createDeleteTabButton(shelfTab=sTab)
     pm.setParent( '..' )
     pm.setParent( '..' )
     
     pm.showWindow()    
Exemple #12
0
def UI():

    # kill window if it already exists
    if pm.window('varFkUI', exists=True):
        pm.deleteUI('varFkUI')

    # build window
    varFkWindow = pm.window('varFkUI',
                            title='Variable Fk Rigger',
                            widthHeight=(365.0, 340.0),
                            sizeable=False,
                            minimizeButton=True,
                            maximizeButton=False)

    # create tabLayout
    tabs = pm.tabLayout(imw=5, imh=5)

    # create tabs
    form = pm.formLayout(numberOfDivisions=100, w=365, h=340, parent=tabs)
    pm.tabLayout(tabs, edit=True, tabLabel=(form, 'VarFk Rigger'))
    info = pm.formLayout(numberOfDivisions=100, w=365, h=340, parent=tabs)
    pm.tabLayout(tabs, edit=True, tabLabel=(info, 'Help'))

    # fill info tab
    pm.setParent(info)

    # Creating Element scrollField_info
    infotext = 'Variable FK Autorigger \nVersion: 1.00 \nby Julian "fleity" Oberbeck. \n\nBasic variable FK concept by Jeff Brodsky (https://vimeo.com/72424469). \n\n\nVariable FK Rigs allow moving a FK-control along a joint chain, their influence being based on the distance to the joints. \n\n How to use: \n 1. Insert the name of the input curve. \n 2. Enter a name for the rig. \n 3. Choose number of controls. \n 4. Press "Build."'

    # Creating Element scrollField_infotext
    scrollField_infotext = pm.scrollField(text=infotext,
                                          w=340,
                                          h=295,
                                          editable=False,
                                          wordWrap=True)
    pm.formLayout(info,
                  edit=True,
                  attachForm=[(scrollField_infotext, 'top', 10),
                              (scrollField_infotext, 'left', 10)])

    # fill main utility tab
    pm.setParent(form)

    # Creating Element img_banner
    imagePath = pm.internalVar(upd=True) + '/icons/varFk.png'
    img_banner = pm.image(w=365, h=110, image=imagePath)
    pm.formLayout(form,
                  edit=True,
                  attachForm=[(img_banner, 'top', 0),
                              (img_banner, 'left', -5)])
    # =========================================
    # Creating Element layout_curve_tools
    shelfLayout_curveTools = pm.shelfTabLayout('shelfCurves',
                                               w=225,
                                               h=50,
                                               tabsVisible=False)
    pm.setParent(shelfLayout_curveTools)
    pm.formLayout(form,
                  edit=True,
                  attachForm=[(shelfLayout_curveTools, 'top', 97),
                              (shelfLayout_curveTools, 'left', 70)])
    rowLayout_curveTools = pm.rowLayout('rowLayout_curveTools',
                                        w=200,
                                        h=45,
                                        numberOfColumns=4,
                                        cw4=[40, 40, 40, 40],
                                        ct4=['left', 'left', 'left', 'left'],
                                        co4=[10, 10, 10, 10])
    pm.setParent(rowLayout_curveTools)
    # =========================================
    # Creating Elements curve tool buttons
    button_CVCurveTool = pm.iconTextButton(
        'button_CVCurveTool',
        w=40,
        h=40,
        mw=2,
        mh=2,
        image='curveCV.png',
        command=pm.Callback(pm.runtime.CVCurveTool, ),
        doubleClickCommand=pm.Callback(pm.runtime.CVCurveToolOptions, ))
    button_EPCurveTool = pm.iconTextButton(
        'button_EPCurveTool',
        w=40,
        h=40,
        mw=2,
        mh=2,
        image='curveEP.png',
        command=pm.Callback(pm.runtime.EPCurveTool, ),
        doubleClickCommand=pm.Callback(pm.runtime.EPCurveToolOptions, ))
    button_PencilCurveTool = pm.iconTextButton(
        'button_PencilCurveTool',
        w=40,
        h=40,
        mw=2,
        mh=2,
        image='pencil.png',
        command=pm.Callback(pm.runtime.PencilCurveTool, ),
        doubleClickCommand=pm.Callback(pm.runtime.PencilCurveToolOptions, ))
    button_BezierCurveTool = pm.iconTextButton(
        'button_BezierCurveTool',
        w=40,
        h=40,
        mw=2,
        mh=2,
        image='curveBezier.png',
        command=pm.Callback(pm.runtime.CreateBezierCurveTool, ),
        doubleClickCommand=pm.Callback(
            pm.runtime.CreateBezierCurveToolOptions, ))
    # =========================================
    pm.setParent(form)
    # =========================================
    # Creating Element button_insertSelectedCurve
    button_insertSelectedCurve = pm.button(label='>',
                                           w=35,
                                           h=25,
                                           command=pm.Callback(
                                               insertFirstSelected, ))
    pm.formLayout(form,
                  edit=True,
                  attachForm=[(button_insertSelectedCurve, 'top', 155),
                              (button_insertSelectedCurve, 'left', 55)])
    # =========================================
    # Creating Element input_inputCurve
    input_inputCurve = pm.textField('input_inputCurve',
                                    text='Draw a curve, 1 Joint per CV.',
                                    w=250,
                                    h=25)
    pm.formLayout(form,
                  edit=True,
                  attachForm=[(input_inputCurve, 'top', 155),
                              (input_inputCurve, 'left', 100)])
    # =========================================
    # Creating Element text_IdName
    text_IdName = pm.text(label='Prefix Name:',
                          align='right',
                          recomputeSize=True,
                          w=80,
                          h=25)
    pm.formLayout(form,
                  edit=True,
                  attachForm=[(text_IdName, 'top', 190),
                              (text_IdName, 'left', 10)])
    # =========================================
    # Creating Element input_IdName
    input_IdName = pm.textField('input_IdName', text='varFk', w=250, h=25)
    pm.formLayout(form,
                  edit=True,
                  attachForm=[(input_IdName, 'top', 190),
                              (input_IdName, 'left', 100)])
    # =========================================
    # Creating Element text_numOfCtrls
    text_numOfCtrls = pm.text(label='# of Controls:',
                              align='right',
                              recomputeSize=True,
                              w=80,
                              h=25)
    pm.formLayout(form,
                  edit=True,
                  attachForm=[(text_numOfCtrls, 'top', 225),
                              (text_numOfCtrls, 'left', 10)])
    # =========================================
    # Creating Element slider_numOfCtrls
    slider_numOfCtrls = pm.intSliderGrp('slider_numOfCtrls',
                                        f=True,
                                        min=1,
                                        max=10,
                                        fieldMinValue=1,
                                        fieldMaxValue=999,
                                        value=3,
                                        ann='Number of Controls',
                                        w=255,
                                        h=25)
    pm.formLayout(form,
                  edit=True,
                  attachForm=[(slider_numOfCtrls, 'top', 225),
                              (slider_numOfCtrls, 'left', 100)])
    # =========================================
    # Creating Element button_build
    button_build = pm.button(label='Build',
                             w=340,
                             h=40,
                             command=pm.Callback(buildVarFkFromUI, ))
    pm.formLayout(form,
                  edit=True,
                  attachForm=[(button_build, 'top', 265),
                              (button_build, 'left', 10)])
    # =========================================

    pm.setParent('..')

    # show window
    varFkWindow.show()
Exemple #13
0
def UI():
    
    # kill window if it already exists
    if pm.window('varFkUI', exists = True):
        pm.deleteUI('varFkUI')
    
    # build window
    varFkWindow = pm.window('varFkUI', title = 'Variable Fk Rigger', widthHeight=(365.0, 340.0), sizeable=False, minimizeButton=True, maximizeButton=False)
    
    # create tabLayout
    tabs = pm.tabLayout(imw = 5, imh = 5)
    
    # create tabs
    form = pm.formLayout(numberOfDivisions=100, w = 365, h = 340, parent = tabs)
    pm.tabLayout(tabs, edit = True, tabLabel = (form, 'VarFk Rigger'))
    info = pm.formLayout(numberOfDivisions=100, w = 365, h = 340, parent = tabs)
    pm.tabLayout(tabs, edit = True, tabLabel = (info, 'Help'))
    
    # fill info tab
    pm.setParent ( info )
    
    # Creating Element scrollField_info
    infotext = 'Variable FK Autorigger \nVersion: 1.00 \nby Julian "fleity" Oberbeck. \n\nBasic variable FK concept by Jeff Brodsky (https://vimeo.com/72424469). \n\n\nVariable FK Rigs allow moving a FK-control along a joint chain, their influence being based on the distance to the joints. \n\n How to use: \n 1. Insert the name of the input curve. \n 2. Enter a name for the rig. \n 3. Choose number of controls. \n 4. Press "Build."'

    # Creating Element scrollField_infotext
    scrollField_infotext = pm.scrollField ( text = infotext, w = 340, h = 295, editable = False, wordWrap = True )
    pm.formLayout( info, edit=True, attachForm=[( scrollField_infotext, 'top', 10), ( scrollField_infotext, 'left', 10)] )

    # fill main utility tab
    pm.setParent( form )
    
    # Creating Element img_banner
    imagePath = pm.internalVar(upd = True) + '/icons/varFk.png' # old
    imagePath = '/'.join( __file__.split('\\')[:-1] ) + '/varFk.png'
    img_banner = pm.image( w = 365, h = 110, image = imagePath )
    pm.formLayout( form, edit=True, attachForm=[( img_banner, 'top', 0), ( img_banner, 'left', -5)] )
    # =========================================
    # Creating Element layout_curve_tools
    shelfLayout_curveTools = pm.shelfTabLayout( 'shelfCurves', w = 225, h = 50, tabsVisible = False )
    pm.setParent( shelfLayout_curveTools )
    pm.formLayout( form, edit=True, attachForm=[( shelfLayout_curveTools, 'top', 97), ( shelfLayout_curveTools, 'left', 70)] )
    rowLayout_curveTools = pm.rowLayout( 'rowLayout_curveTools', w = 200, h = 45, numberOfColumns = 4, cw4 = [40,40,40,40], ct4 = ['left', 'left', 'left', 'left'], co4 = [10,10,10,10] )
    pm.setParent( rowLayout_curveTools )
    # =========================================
    # Creating Elements curve tool buttons
    button_CVCurveTool = pm.iconTextButton( 'button_CVCurveTool', w = 40, h = 40, mw = 2, mh = 2, image = 'curveCV.png', command = pm.Callback(pm.runtime.CVCurveTool, ), doubleClickCommand = pm.Callback(pm.runtime.CVCurveToolOptions, ) )
    button_EPCurveTool = pm.iconTextButton( 'button_EPCurveTool', w = 40, h = 40, mw = 2, mh = 2, image = 'curveEP.png', command = pm.Callback(pm.runtime.EPCurveTool, ), doubleClickCommand = pm.Callback(pm.runtime.EPCurveToolOptions, ) )
    button_PencilCurveTool = pm.iconTextButton( 'button_PencilCurveTool', w = 40, h = 40, mw = 2, mh = 2, image = 'pencil.png', command = pm.Callback(pm.runtime.PencilCurveTool, ), doubleClickCommand = pm.Callback(pm.runtime.PencilCurveToolOptions, ) )
    button_BezierCurveTool = pm.iconTextButton( 'button_BezierCurveTool', w = 40, h = 40, mw = 2, mh = 2, image = 'curveBezier.png', command = pm.Callback(pm.runtime.CreateBezierCurveTool, ), doubleClickCommand = pm.Callback(pm.runtime.CreateBezierCurveToolOptions, ) )
    # =========================================
    pm.setParent( form )
    # =========================================
    # Creating Element button_insertSelectedCurve
    button_insertSelectedCurve = pm.button( label='>', w=35, h=25, command=pm.Callback(insertFirstSelected, ) )
    pm.formLayout( form, edit=True, attachForm=[( button_insertSelectedCurve, 'top', 155), ( button_insertSelectedCurve, 'left', 55)] )
    # =========================================    
    # Creating Element input_inputCurve
    input_inputCurve = pm.textField('input_inputCurve', text='Draw a curve, 1 Joint per CV.', w=250, h=25)
    pm.formLayout( form, edit=True, attachForm=[( input_inputCurve, 'top', 155), ( input_inputCurve, 'left', 100)] )
    # =========================================
    # Creating Element text_IdName
    text_IdName = pm.text( label='Prefix Name:', align='right', recomputeSize=True, w=80, h=25)
    pm.formLayout( form, edit=True, attachForm=[( text_IdName, 'top', 190), ( text_IdName, 'left', 10)] )
    # =========================================
    # Creating Element input_IdName
    input_IdName = pm.textField('input_IdName', text='varFk', w=250, h=25)
    pm.formLayout( form, edit=True, attachForm=[( input_IdName, 'top', 190), ( input_IdName, 'left', 100)] )    
    # =========================================    
    # Creating Element text_numOfCtrls
    text_numOfCtrls = pm.text( label='# of Controls:', align='right', recomputeSize=True, w=80, h=25)
    pm.formLayout( form, edit=True, attachForm=[( text_numOfCtrls, 'top', 225), ( text_numOfCtrls, 'left', 10)] )
    # =========================================
    # Creating Element slider_numOfCtrls
    slider_numOfCtrls = pm.intSliderGrp('slider_numOfCtrls', f=True, min=1, max=10, fieldMinValue=1,fieldMaxValue=999, value=3, ann='Number of Controls', w=255, h=25)
    pm.formLayout( form, edit=True, attachForm=[( slider_numOfCtrls, 'top', 225), ( slider_numOfCtrls, 'left', 100)] )
    # =========================================
    # Creating Element button_build
    button_build = pm.button( label='Build', w=340, h=40, command = pm.Callback(buildVarFkFromUI, ))
    pm.formLayout( form, edit=True, attachForm=[( button_build, 'top', 265), ( button_build, 'left', 10)] )
    # =========================================
    
    pm.setParent( '..' )    

    # show window
    varFkWindow.show()
Exemple #14
0
 def set_height(cls, height):
     print('new height : {}'.format(height))
     pm.shelfTabLayout(cls.SHELF_LAYOUT, edit=True, height=height)
     pm.optionVar(intValue=(cls.OPTION_VAR, height))
Exemple #15
0
 def decrease(cls, step):
     height = pm.shelfTabLayout(cls.SHELF_LAYOUT, query=True,
                                height=True) - step
     if height < 64:
         height = 64
     cls.set_height(height)
Exemple #16
0
 def increase(cls, step):
     height = pm.shelfTabLayout(cls.SHELF_LAYOUT, query=True,
                                height=True) + step
     cls.set_height(height)
Exemple #17
0
    def uiCreate(self):

        self.onCloseClicked()

        self.window = pm.window(
            WIN_NAME,
            title='PyMel Window',
            maximizeButton=False
        )

        with self.window:
            with pm.formLayout() as uiLAY_mainForm:
                with pm.scrollLayout('uiLAY_mainScroll', childResizable=True) as self.uiLAY_mainScroll:
                    with pm.columnLayout(adjustableColumn=True):

                        with self.uiCreateFrame('uiLAY_frameCheckBoxes', 'Check Boxes (PMCheckBox)') as self.uiLAY_frameCheckBoxes:
                            with pm.columnLayout():
                                pm.separator(style='none', height=2)
                                with pm.rowLayout(numberOfColumns=3):
                                    pm.separator(width=140, style='none')
                                    self.uiCHK_test1 = pm.checkBox('uiCHK_test1', label='test1')
                                    self.uiCHK_test2 = pm.checkBox('uiCHK_test2', label='test2')

                        with self.uiCreateFrame('uiLAY_frameCheckBoxGroups', 'Check Box Groups (PMCheckBoxGrp#)') as self.uiLAY_frameCheckBoxGroups:
                            with pm.columnLayout():
                                pm.separator(style='none', height=2)
                                self.uiCHKGRP_test1 = pm.checkBoxGrp(
                                    'uiCHKGRP_test1',
                                    numberOfCheckBoxes=1,
                                    label='PMCheckBoxGrp1',
                                    label1='test1'
                                )
                                self.uiCHKGRP_test2 = pm.checkBoxGrp(
                                    'uiCHKGRP_test2',
                                    numberOfCheckBoxes=2,
                                    label='PMCheckBoxGrp2',
                                    labelArray2=('test1', 'test2')
                                )
                                self.uiCHKGRP_test3 = pm.checkBoxGrp(
                                    'uiCHKGRP_test3',
                                    numberOfCheckBoxes=3,
                                    label='PMCheckBoxGrp3',
                                    labelArray3=('test1', 'test2', 'test3')
                                )
                                self.uiCHKGRP_test4 = pm.checkBoxGrp(
                                    'uiCHKGRP_test4',
                                    numberOfCheckBoxes=4,
                                    label='PMCheckBoxGrp4',
                                    labelArray4=('test1', 'test2', 'test3', 'test4')
                                )

                        with self.uiCreateFrame('uiLAY_frameColorSliders', 'Color Slider Groups (PMColorSliderGrp)') as self.uiLAY_frameColorSliders:
                            with pm.columnLayout():
                                pm.separator(style='none', height=2)
                                self.uiCLRGRP_test1 = pm.colorSliderGrp(
                                    'uiCLRGRP_test1',
                                    label='test1'
                                )
                                self.uiCLRGRP_test2 = pm.colorSliderGrp(
                                    'uiCLRGRP_test2',
                                    label='test2'
                                )

                        with self.uiCreateFrame('uiLAY_frameFloatFields', 'Float Fields (PMFloatField)') as self.uiLAY_frameFloatFields:
                            with pm.columnLayout():
                                pm.separator(style='none', height=2)
                                with pm.rowLayout(numberOfColumns=3):
                                    pm.separator(width=140, style='none')
                                    self.uiFLF_test1 = pm.floatField('uiFLF_test1')
                                    self.uiFLF_test2 = pm.floatField('uiFLF_test2')

                        with self.uiCreateFrame('uiLAY_frameFloatFieldGroups', 'Float Field Groups (PMFloatFieldGrp#)') as self.uiLAY_frameFloatFieldGroups:
                            with pm.columnLayout():
                                pm.separator(style='none', height=2)
                                self.uiFLFGRP_test1 = pm.floatFieldGrp(
                                    'uiFLFGRP_test1',
                                    numberOfFields=1,
                                    label='PMFloatFieldGrp1'
                                )
                                self.uiFLFGRP_test2 = pm.floatFieldGrp(
                                    'uiFLFGRP_test2',
                                    numberOfFields=2,
                                    label='PMFloatFieldGrp2'
                                )
                                self.uiFLFGRP_test3 = pm.floatFieldGrp(
                                    'uiFLFGRP_test3',
                                    numberOfFields=3,
                                    label='PMFloatFieldGrp3'
                                )
                                self.uiFLFGRP_test4 = pm.floatFieldGrp(
                                    'uiFLFGRP_test4',
                                    numberOfFields=4,
                                    label='PMFloatFieldGrp4'
                                )

                        with self.uiCreateFrame('uiLAY_frameFloatScrollBars', 'Float Scroll Bars (PMFloatScrollBar)') as self.uiLAY_frameFloatScrollBars:
                            with pm.columnLayout(adjustableColumn=True):
                                pm.separator(style='none', height=2)
                                self.uiFLSCRL_test1 = pm.floatScrollBar('uiFLSCRL_test1')
                                self.uiFLSCRL_test2 = pm.floatScrollBar('uiFLSCRL_test2')

                        with self.uiCreateFrame('uiLAY_frameFloatSliders', 'Float Sliders (PMFloatSlider)') as self.uiLAY_frameFloatSliders:
                            with pm.columnLayout(adjustableColumn=True):
                                pm.separator(style='none', height=2)
                                self.uiFLTSLD_test1 = pm.floatSlider('uiFLTSLD_test1')
                                self.uiFLTSLD_test2 = pm.floatSlider('uiFLTSLD_test2')

                        with self.uiCreateFrame('uiLAY_frameFloatSliderGroups', 'Float Slider Groups (PMFloatSliderGrp)') as self.uiLAY_frameFloatSliderGroups:
                            with pm.columnLayout():
                                pm.separator(style='none', height=2)
                                self.uiFLSGRP_test1 = pm.floatSliderGrp(
                                    'uiFLSGRP_test1',
                                    label='test1',
                                    field=True
                                )
                                self.uiFLSGRP_test2 = pm.floatSliderGrp(
                                    'uiFLSGRP_test2',
                                    label='test2',
                                    field=True
                                )

                        with self.uiCreateFrame('uiLAY_frameIconTextCheckBoxes', 'Icon Text Check Boxes (PMIconTextCheckBox)') as self.uiLAY_frameIconTextCheckBoxes:
                            with pm.columnLayout():
                                with pm.rowLayout(numberOfColumns=3):
                                    pm.separator(style='none', width=140)
                                    self.uiITCHK_test1 = pm.iconTextCheckBox(
                                        'uiITCHK_test1',
                                        style='iconAndTextHorizontal',
                                        label='cube',
                                        image1='cube'
                                    )
                                    self.uiITCHK_test2 = pm.iconTextCheckBox(
                                        'uiITCHK_test2',
                                        style='iconAndTextHorizontal',
                                        label='cone',
                                        image1='cone'
                                    )

                        with self.uiCreateFrame('uiLAY_frameIconTextRadioButtons', 'Icon Text Radio Buttons (PMIconTextRadioButton)') as self.uiLAY_frameIconTextRadioButtons:
                            with pm.columnLayout():
                                with pm.rowLayout(numberOfColumns=4):
                                    pm.separator(style='none', width=140)
                                    pm.iconTextRadioCollection()
                                    self.uiITRAD_test1 = pm.iconTextRadioButton(
                                        'uiITRAD_test1',
                                        style='iconAndTextHorizontal',
                                        label='cube',
                                        image1='cube'
                                    )
                                    self.uiITRAD_test2 = pm.iconTextRadioButton(
                                        'uiITRAD_test2',
                                        style='iconAndTextHorizontal',
                                        label='cone',
                                        image1='cone'
                                    )
                                    self.uiITRAD_test3 = pm.iconTextRadioButton(
                                        'uiITRAD_test3',
                                        style='iconAndTextHorizontal',
                                        label='torus',
                                        image1='torus'
                                    )

                        with self.uiCreateFrame('uiLAY_frameIconTextScrollLists', 'Icon Text Scroll Lists (PMIconTextScrollList)') as self.uiLAY_frameIconTextScrollLists:
                            with pm.columnLayout():
                                with pm.rowLayout(numberOfColumns=3):
                                    pm.separator(style='none', width=140)
                                    self.uiITSLST_test1 = pm.iconTextScrollList(
                                        'uiITSLST_test1',
                                        allowMultiSelection=True,
                                        append=('one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine', 'ten')
                                    )
                                    self.uiITSLST_test2 = pm.iconTextScrollList(
                                        'uiITSLST_test2',
                                        allowMultiSelection=True,
                                        append=('one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine', 'ten')
                                    )

                        with self.uiCreateFrame('uiLAY_frameIntFields', 'Int Fields (PMIntField)') as self.uiLAY_frameIntFields:
                            with pm.columnLayout():
                                pm.separator(style='none', height=2)
                                with pm.rowLayout(numberOfColumns=3):
                                    pm.separator(width=140, style='none')
                                    self.uiINF_test1 = pm.intField('uiINF_test1')
                                    self.uiINF_test2 = pm.intField('uiINF_test2')

                        with self.uiCreateFrame('uiLAY_frameIntFieldGroups', 'Int Field Groups (PMIntFieldGrp#)') as self.uiLAY_frameIntFieldGroups:
                            with pm.columnLayout():
                                pm.separator(style='none', height=2)
                                self.uiINFGRP_test1 = pm.intFieldGrp(
                                    'uiINFGRP_test1',
                                    numberOfFields=1,
                                    label='PMIntFieldGrp1'
                                )
                                self.uiINFGRP_test2 = pm.intFieldGrp(
                                    'uiINFGRP_test2',
                                    numberOfFields=2,
                                    label='PMIntFieldGrp2'
                                )
                                self.uiINFGRP_test3 = pm.intFieldGrp(
                                    'uiINFGRP_test3',
                                    numberOfFields=3,
                                    label='PMIntFieldGrp3'
                                )
                                self.uiINFGRP_test4 = pm.intFieldGrp(
                                    'uiINFGRP_test4',
                                    numberOfFields=4,
                                    label='PMIntFieldGrp4'
                                )

                        with self.uiCreateFrame('uiLAY_frameIntScrollBars', 'Int Scroll Bars (PMIntScrollBar)') as self.uiLAY_frameIntScrollBars:
                            with pm.columnLayout(adjustableColumn=True):
                                pm.separator(style='none', height=2)
                                self.uiINSCRL_test1 = pm.intScrollBar('uiINSCRL_test1')
                                self.uiINSCRL_test2 = pm.intScrollBar('uiINSCRL_test2')

                        with self.uiCreateFrame('uiLAY_frameIntSliders', 'Int Sliders (PMIntSlider)') as self.uiLAY_frameIntSliders:
                            with pm.columnLayout(adjustableColumn=True):
                                pm.separator(style='none', height=2)
                                self.uiINTSLD_test1 = pm.intSlider('uiINTSLD_test1')
                                self.uiINTSLD_test2 = pm.intSlider('uiINTSLD_test2')

                        with self.uiCreateFrame('uiLAY_frameIntSliderGroups', 'Int Slider Groups (PMIntSliderGrp)') as self.uiLAY_frameIntSliderGroups:
                            with pm.columnLayout():
                                pm.separator(style='none', height=2)
                                self.uiINSGRP_test1 = pm.intSliderGrp(
                                    'uiINSGRP_test1',
                                    label='test1',
                                    field=True
                                )
                                self.uiINSGRP_test2 = pm.intSliderGrp(
                                    'uiINSGRP_test2',
                                    label='test2',
                                    field=True
                                )

                        with self.uiCreateFrame('uiLAY_frameOptionMenus', 'Option Menus (PMOptionMenu)') as self.uiLAY_frameOptionMenus:
                            with pm.columnLayout():
                                pm.separator(style='none', height=2)
                                with pm.rowLayout(numberOfColumns=3):
                                    pm.separator(width=110, style='none')
                                    self.uiOPTMNU_test1 = pm.optionMenu('uiOPTMNU_test1', label='test1')
                                    pm.menuItem(label='one')
                                    pm.menuItem(label='two')
                                    pm.menuItem(label='three')
                                    self.uiOPTMNU_test2 = pm.optionMenu('uiOPTMNU_test2', label='test2')
                                    pm.menuItem(label='four')
                                    pm.menuItem(label='five')
                                    pm.menuItem(label='six')

                        with self.uiCreateFrame('uiLAY_frameOptionMenuGroups', 'Option Menus Groups (PMOptionMenuGrp)') as self.uiLAY_frameOptionMenuGroups:
                            with pm.columnLayout():
                                pm.separator(style='none', height=2)
                                self.uiOPMGRP_test1 = pm.optionMenuGrp('uiOPMGRP_test1', label='test1', extraLabel='extraLabel')
                                pm.menuItem(label='one')
                                pm.menuItem(label='two')
                                pm.menuItem(label='three')
                                self.uiOPMGRP_test2 = pm.optionMenuGrp('uiOPMGRP_test2', label='test2', extraLabel='extraLabel')
                                pm.menuItem(label='four')
                                pm.menuItem(label='five')
                                pm.menuItem(label='six')

                        with self.uiCreateFrame('uiLAY_frameRadioButtons', 'Radio Buttons (PMRadioButton)') as self.uiLAY_frameRadioButtons:
                            with pm.columnLayout():
                                with pm.rowLayout(numberOfColumns=4):
                                    pm.separator(style='none', width=140)
                                    pm.radioCollection()
                                    self.uiRAD_test1 = pm.radioButton('uiRAD_test1', label='test1')
                                    self.uiRAD_test2 = pm.radioButton('uiRAD_test2', label='test2')
                                    self.uiRAD_test3 = pm.radioButton('uiRAD_test3', label='test3')

                        with self.uiCreateFrame('uiLAY_frameRadioButtonGroups', 'Radio Button Groups (PMRadioButtonGrp#)') as self.uiLAY_frameRadioButtonGroups:
                            with pm.columnLayout():
                                pm.separator(style='none', height=2)
                                self.uiRADGRP_test1 = pm.radioButtonGrp(
                                    'uiRADGRP_test1',
                                    numberOfRadioButtons=1,
                                    label='PMRadioButtonGrp1',
                                    label1='test1'
                                )
                                self.uiRADGRP_test2 = pm.radioButtonGrp(
                                    'uiRADGRP_test2',
                                    numberOfRadioButtons=2,
                                    label='PMRadioButtonGrp2',
                                    labelArray2=('test1', 'test2')
                                )
                                self.uiRADGRP_test3 = pm.radioButtonGrp(
                                    'uiRADGRP_test3',
                                    numberOfRadioButtons=3,
                                    label='PMRadioButtonGrp3',
                                    labelArray3=('test1', 'test2', 'test3')
                                )
                                self.uiRADGRP_test4 = pm.radioButtonGrp(
                                    'uiRADGRP_test4',
                                    numberOfRadioButtons=4,
                                    label='PMRadioButtonGrp4',
                                    labelArray4=('test1', 'test2', 'test3', 'test4')
                                )

                        with self.uiCreateFrame('uiLAY_frameSymbolCheckBoxes', 'Symbol Check Boxes (PMSymbolCheckBox)') as self.uiLAY_frameSymbolCheckBoxes:
                            with pm.columnLayout():
                                with pm.rowLayout(numberOfColumns=3):
                                    pm.separator(style='none', width=140)
                                    self.uiSYMCHK_test1 = pm.symbolCheckBox(
                                        'uiSYMCHK_test1',
                                        image='polyCube'
                                    )
                                    self.uiSYMCHK_test2 = pm.symbolCheckBox(
                                        'uiSYMCHK_test2',
                                        image='polyCone'
                                    )

                        with self.uiCreateFrame('uiLAY_frameScriptTables', 'Script Tables (PMScriptTable)') as self.uiLAY_frameScriptTables:
                            with pm.columnLayout():
                                with pm.rowLayout(numberOfColumns=3):
                                    pm.separator(style='none', width=140)
                                    self.uiSCRTBL_test1 = pm.scriptTable(
                                        'uiSCRTBL_test1',
                                        selectionMode=3,
                                        rows=4,
                                        columns=2
                                    )
                                    self.uiSCRTBL_test2 = pm.scriptTable(
                                        'uiSCRTBL_test2',
                                        selectionMode=3,
                                        rows=4,
                                        columns=2
                                    )

                        with self.uiCreateFrame('uiLAY_frameScrollField', 'Scroll Field (PMScrollField)') as self.uiLAY_frameScrollField:
                            with pm.columnLayout():
                                with pm.rowLayout(numberOfColumns=3):
                                    pm.separator(style='none', width=140)
                                    self.uiSCRFLD_test1 = pm.scrollField(
                                        'uiSCRFLD_test1',
                                        wordWrap=True
                                    )
                                    self.uiSCRFLD_test2 = pm.scrollField(
                                        'uiSCRFLD_test2',
                                        wordWrap=True
                                    )

                        with self.uiCreateFrame('uiLAY_frameShelfTabLayout', 'Shelf Tab Layout (PMShelfTabLayout)') as self.uiLAY_frameShelfTabLayout:
                            with pm.columnLayout(adjustableColumn=True):
                                with pm.shelfTabLayout('uiSHLTAB_test1') as self.uiSHLTAB_test1:
                                    with pm.shelfLayout('test1'):
                                        pass
                                    with pm.shelfLayout('test2'):
                                        pass
                                    with pm.shelfLayout('test3'):
                                        pass
                                with pm.shelfTabLayout('uiSHLTAB_test2') as self.uiSHLTAB_test2:
                                    with pm.shelfLayout('test4'):
                                        pass
                                    with pm.shelfLayout('test5'):
                                        pass
                                    with pm.shelfLayout('test6'):
                                        pass

                        with self.uiCreateFrame('uiLAY_frameTabLayout', 'Tab Layout (PMTabLayout)') as self.uiLAY_frameTabLayout:
                            with pm.columnLayout(adjustableColumn=True):
                                with pm.tabLayout('uiTAB_test1') as self.uiTAB_test1:

                                    with pm.rowLayout(numberOfColumns=1) as uiLAY_tabRow1:
                                        pass
                                    with pm.rowLayout(numberOfColumns=1) as uiLAY_tabRow2:
                                        pass
                                    with pm.rowLayout(numberOfColumns=1) as uiLAY_tabRow3:
                                        pass

                                pm.tabLayout(
                                    self.uiTAB_test1,
                                    edit=True,
                                    tabLabel=((uiLAY_tabRow1, 'test1'), (uiLAY_tabRow2, 'test2'), (uiLAY_tabRow3, 'test3'),)
                                )

                                with pm.tabLayout('uiTAB_test2') as self.uiTAB_test2:

                                    with pm.rowLayout(numberOfColumns=1) as uiLAY_tabRow4:
                                        pass
                                    with pm.rowLayout(numberOfColumns=1) as uiLAY_tabRow5:
                                        pass
                                    with pm.rowLayout(numberOfColumns=1) as uiLAY_tabRow6:
                                        pass

                                pm.tabLayout(
                                    self.uiTAB_test2,
                                    edit=True,
                                    tabLabel=((uiLAY_tabRow4, 'test4'), (uiLAY_tabRow5, 'test5'), (uiLAY_tabRow6, 'test6'),)
                                )

                        with self.uiCreateFrame('uiLAY_frameTextFields', 'Text Fields (PMTextField)') as self.uiLAY_frameTextFields:
                            with pm.columnLayout():
                                pm.separator(style='none', height=2)
                                with pm.rowLayout(numberOfColumns=3):
                                    pm.separator(width=140, style='none')
                                    self.uiTXT_test1 = pm.textField('uiTXT_test1')
                                    self.uiTXT_test2 = pm.textField('uiTXT_test2')

                        with self.uiCreateFrame('uiLAY_frameTextFieldButtonGroups', 'Text Field Button Groups (PMTextFieldButtonGrp)') as self.uiLAY_frameTextFieldButtonGroups:
                            with pm.columnLayout():
                                pm.separator(style='none', height=2)
                                self.uiTXBTGR_test1 = pm.textFieldButtonGrp(
                                    'uiTXBTGR_test1',
                                    label='test1',
                                    buttonLabel='button1'
                                )
                                self.uiTXBTGR_test2 = pm.textFieldButtonGrp(
                                    'uiTXBTGR_test2',
                                    label='test2',
                                    buttonLabel='button2'
                                )

                        with self.uiCreateFrame('uiLAY_frameTextFieldGroups', 'Text Field Groups (PMTextFieldGrp)') as self.uiLAY_frameTextFieldGroups:
                            with pm.columnLayout():
                                pm.separator(style='none', height=2)
                                self.uiTXTGRP_test1 = pm.textFieldGrp(
                                    'uiTXTGRP_test1',
                                    label='test1'
                                )
                                self.uiTXTGRP_test2 = pm.textFieldGrp(
                                    'uiTXTGRP_test2',
                                    label='test2'
                                )

                        with self.uiCreateFrame('uiLAY_frameTextScrollLists', 'Text Scroll Lists (PMTextScrollList)') as self.uiLAY_frameTextScrollLists:
                            with pm.columnLayout():
                                with pm.rowLayout(numberOfColumns=3):
                                    pm.separator(style='none', width=140)
                                    self.uiTXTLST_test1 = pm.textScrollList(
                                        'uiTXTLST_test1',
                                        allowMultiSelection=True,
                                        append=('one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine', 'ten')
                                    )
                                    self.uiTXTLST_test2 = pm.textScrollList(
                                        'uiTXTLST_test2',
                                        allowMultiSelection=True,
                                        append=('one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine', 'ten')
                                    )

                self.uiBTN_savePrefs = pm.button(
                    label='Save Prefs',
                    height=MAIN_BUTTONS_HEIGHT,
                    command=self.onSavePrefsClicked
                )

                self.uiBTN_loadPrefs = pm.button(
                    label='Load Prefs',
                    height=MAIN_BUTTONS_HEIGHT,
                    command=self.onLoadPrefsClicked
                )

                self.uiBTN_resetPrefs = pm.button(
                    label='Reset Prefs',
                    height=MAIN_BUTTONS_HEIGHT,
                    command=self.onResetPrefsClicked
                )

                uiLAY_mainForm.attachForm(self.uiLAY_mainScroll, 'top', 2)
                uiLAY_mainForm.attachForm(self.uiLAY_mainScroll, 'left', 2)
                uiLAY_mainForm.attachForm(self.uiLAY_mainScroll, 'right', 2)
                uiLAY_mainForm.attachControl(self.uiLAY_mainScroll, 'bottom', 2, self.uiBTN_savePrefs)

                uiLAY_mainForm.attachNone(self.uiBTN_savePrefs, 'top')
                uiLAY_mainForm.attachForm(self.uiBTN_savePrefs, 'left', 2)
                uiLAY_mainForm.attachPosition(self.uiBTN_savePrefs, 'right', 2, 33)
                uiLAY_mainForm.attachForm(self.uiBTN_savePrefs, 'bottom', 2)

                uiLAY_mainForm.attachNone(self.uiBTN_loadPrefs, 'top')
                uiLAY_mainForm.attachPosition(self.uiBTN_loadPrefs, 'left', 2, 33)
                uiLAY_mainForm.attachPosition(self.uiBTN_loadPrefs, 'right', 2, 66)
                uiLAY_mainForm.attachForm(self.uiBTN_loadPrefs, 'bottom', 2)

                uiLAY_mainForm.attachNone(self.uiBTN_resetPrefs, 'top')
                uiLAY_mainForm.attachPosition(self.uiBTN_resetPrefs, 'left', 2, 66)
                uiLAY_mainForm.attachForm(self.uiBTN_resetPrefs, 'right', 2)
                uiLAY_mainForm.attachForm(self.uiBTN_resetPrefs, 'bottom', 2)

        self.window.setTitle(self.window.__class__)
Exemple #18
0
    def uiCreate(self):

        self.onCloseClicked()

        self.window = pm.window(WIN_NAME,
                                title='PyMel Window',
                                maximizeButton=False)

        with self.window:
            with pm.formLayout() as uiLAY_mainForm:
                with pm.scrollLayout(
                        'uiLAY_mainScroll',
                        childResizable=True) as self.uiLAY_mainScroll:
                    with pm.columnLayout(adjustableColumn=True):

                        with self.uiCreateFrame(
                                'uiLAY_frameCheckBoxes',
                                'Check Boxes (PMCheckBox)'
                        ) as self.uiLAY_frameCheckBoxes:
                            with pm.columnLayout():
                                pm.separator(style='none', height=2)
                                with pm.rowLayout(numberOfColumns=3):
                                    pm.separator(width=140, style='none')
                                    self.uiCHK_test1 = pm.checkBox(
                                        'uiCHK_test1', label='test1')
                                    self.uiCHK_test2 = pm.checkBox(
                                        'uiCHK_test2', label='test2')

                        with self.uiCreateFrame(
                                'uiLAY_frameCheckBoxGroups',
                                'Check Box Groups (PMCheckBoxGrp#)'
                        ) as self.uiLAY_frameCheckBoxGroups:
                            with pm.columnLayout():
                                pm.separator(style='none', height=2)
                                self.uiCHKGRP_test1 = pm.checkBoxGrp(
                                    'uiCHKGRP_test1',
                                    numberOfCheckBoxes=1,
                                    label='PMCheckBoxGrp1',
                                    label1='test1')
                                self.uiCHKGRP_test2 = pm.checkBoxGrp(
                                    'uiCHKGRP_test2',
                                    numberOfCheckBoxes=2,
                                    label='PMCheckBoxGrp2',
                                    labelArray2=('test1', 'test2'))
                                self.uiCHKGRP_test3 = pm.checkBoxGrp(
                                    'uiCHKGRP_test3',
                                    numberOfCheckBoxes=3,
                                    label='PMCheckBoxGrp3',
                                    labelArray3=('test1', 'test2', 'test3'))
                                self.uiCHKGRP_test4 = pm.checkBoxGrp(
                                    'uiCHKGRP_test4',
                                    numberOfCheckBoxes=4,
                                    label='PMCheckBoxGrp4',
                                    labelArray4=('test1', 'test2', 'test3',
                                                 'test4'))

                        with self.uiCreateFrame(
                                'uiLAY_frameColorSliders',
                                'Color Slider Groups (PMColorSliderGrp)'
                        ) as self.uiLAY_frameColorSliders:
                            with pm.columnLayout():
                                pm.separator(style='none', height=2)
                                self.uiCLRGRP_test1 = pm.colorSliderGrp(
                                    'uiCLRGRP_test1', label='test1')
                                self.uiCLRGRP_test2 = pm.colorSliderGrp(
                                    'uiCLRGRP_test2', label='test2')

                        with self.uiCreateFrame(
                                'uiLAY_frameFloatFields',
                                'Float Fields (PMFloatField)'
                        ) as self.uiLAY_frameFloatFields:
                            with pm.columnLayout():
                                pm.separator(style='none', height=2)
                                with pm.rowLayout(numberOfColumns=3):
                                    pm.separator(width=140, style='none')
                                    self.uiFLF_test1 = pm.floatField(
                                        'uiFLF_test1')
                                    self.uiFLF_test2 = pm.floatField(
                                        'uiFLF_test2')

                        with self.uiCreateFrame(
                                'uiLAY_frameFloatFieldGroups',
                                'Float Field Groups (PMFloatFieldGrp#)'
                        ) as self.uiLAY_frameFloatFieldGroups:
                            with pm.columnLayout():
                                pm.separator(style='none', height=2)
                                self.uiFLFGRP_test1 = pm.floatFieldGrp(
                                    'uiFLFGRP_test1',
                                    numberOfFields=1,
                                    label='PMFloatFieldGrp1')
                                self.uiFLFGRP_test2 = pm.floatFieldGrp(
                                    'uiFLFGRP_test2',
                                    numberOfFields=2,
                                    label='PMFloatFieldGrp2')
                                self.uiFLFGRP_test3 = pm.floatFieldGrp(
                                    'uiFLFGRP_test3',
                                    numberOfFields=3,
                                    label='PMFloatFieldGrp3')
                                self.uiFLFGRP_test4 = pm.floatFieldGrp(
                                    'uiFLFGRP_test4',
                                    numberOfFields=4,
                                    label='PMFloatFieldGrp4')

                        with self.uiCreateFrame(
                                'uiLAY_frameFloatScrollBars',
                                'Float Scroll Bars (PMFloatScrollBar)'
                        ) as self.uiLAY_frameFloatScrollBars:
                            with pm.columnLayout(adjustableColumn=True):
                                pm.separator(style='none', height=2)
                                self.uiFLSCRL_test1 = pm.floatScrollBar(
                                    'uiFLSCRL_test1')
                                self.uiFLSCRL_test2 = pm.floatScrollBar(
                                    'uiFLSCRL_test2')

                        with self.uiCreateFrame(
                                'uiLAY_frameFloatSliders',
                                'Float Sliders (PMFloatSlider)'
                        ) as self.uiLAY_frameFloatSliders:
                            with pm.columnLayout(adjustableColumn=True):
                                pm.separator(style='none', height=2)
                                self.uiFLTSLD_test1 = pm.floatSlider(
                                    'uiFLTSLD_test1')
                                self.uiFLTSLD_test2 = pm.floatSlider(
                                    'uiFLTSLD_test2')

                        with self.uiCreateFrame(
                                'uiLAY_frameFloatSliderGroups',
                                'Float Slider Groups (PMFloatSliderGrp)'
                        ) as self.uiLAY_frameFloatSliderGroups:
                            with pm.columnLayout():
                                pm.separator(style='none', height=2)
                                self.uiFLSGRP_test1 = pm.floatSliderGrp(
                                    'uiFLSGRP_test1',
                                    label='test1',
                                    field=True)
                                self.uiFLSGRP_test2 = pm.floatSliderGrp(
                                    'uiFLSGRP_test2',
                                    label='test2',
                                    field=True)

                        with self.uiCreateFrame(
                                'uiLAY_frameIconTextCheckBoxes',
                                'Icon Text Check Boxes (PMIconTextCheckBox)'
                        ) as self.uiLAY_frameIconTextCheckBoxes:
                            with pm.columnLayout():
                                with pm.rowLayout(numberOfColumns=3):
                                    pm.separator(style='none', width=140)
                                    self.uiITCHK_test1 = pm.iconTextCheckBox(
                                        'uiITCHK_test1',
                                        style='iconAndTextHorizontal',
                                        label='cube',
                                        image1='cube')
                                    self.uiITCHK_test2 = pm.iconTextCheckBox(
                                        'uiITCHK_test2',
                                        style='iconAndTextHorizontal',
                                        label='cone',
                                        image1='cone')

                        with self.uiCreateFrame(
                                'uiLAY_frameIconTextRadioButtons',
                                'Icon Text Radio Buttons (PMIconTextRadioButton)'
                        ) as self.uiLAY_frameIconTextRadioButtons:
                            with pm.columnLayout():
                                with pm.rowLayout(numberOfColumns=4):
                                    pm.separator(style='none', width=140)
                                    pm.iconTextRadioCollection()
                                    self.uiITRAD_test1 = pm.iconTextRadioButton(
                                        'uiITRAD_test1',
                                        style='iconAndTextHorizontal',
                                        label='cube',
                                        image1='cube')
                                    self.uiITRAD_test2 = pm.iconTextRadioButton(
                                        'uiITRAD_test2',
                                        style='iconAndTextHorizontal',
                                        label='cone',
                                        image1='cone')
                                    self.uiITRAD_test3 = pm.iconTextRadioButton(
                                        'uiITRAD_test3',
                                        style='iconAndTextHorizontal',
                                        label='torus',
                                        image1='torus')

                        with self.uiCreateFrame(
                                'uiLAY_frameIconTextScrollLists',
                                'Icon Text Scroll Lists (PMIconTextScrollList)'
                        ) as self.uiLAY_frameIconTextScrollLists:
                            with pm.columnLayout():
                                with pm.rowLayout(numberOfColumns=3):
                                    pm.separator(style='none', width=140)
                                    self.uiITSLST_test1 = pm.iconTextScrollList(
                                        'uiITSLST_test1',
                                        allowMultiSelection=True,
                                        append=('one', 'two', 'three', 'four',
                                                'five', 'six', 'seven',
                                                'eight', 'nine', 'ten'))
                                    self.uiITSLST_test2 = pm.iconTextScrollList(
                                        'uiITSLST_test2',
                                        allowMultiSelection=True,
                                        append=('one', 'two', 'three', 'four',
                                                'five', 'six', 'seven',
                                                'eight', 'nine', 'ten'))

                        with self.uiCreateFrame('uiLAY_frameIntFields',
                                                'Int Fields (PMIntField)'
                                                ) as self.uiLAY_frameIntFields:
                            with pm.columnLayout():
                                pm.separator(style='none', height=2)
                                with pm.rowLayout(numberOfColumns=3):
                                    pm.separator(width=140, style='none')
                                    self.uiINF_test1 = pm.intField(
                                        'uiINF_test1')
                                    self.uiINF_test2 = pm.intField(
                                        'uiINF_test2')

                        with self.uiCreateFrame(
                                'uiLAY_frameIntFieldGroups',
                                'Int Field Groups (PMIntFieldGrp#)'
                        ) as self.uiLAY_frameIntFieldGroups:
                            with pm.columnLayout():
                                pm.separator(style='none', height=2)
                                self.uiINFGRP_test1 = pm.intFieldGrp(
                                    'uiINFGRP_test1',
                                    numberOfFields=1,
                                    label='PMIntFieldGrp1')
                                self.uiINFGRP_test2 = pm.intFieldGrp(
                                    'uiINFGRP_test2',
                                    numberOfFields=2,
                                    label='PMIntFieldGrp2')
                                self.uiINFGRP_test3 = pm.intFieldGrp(
                                    'uiINFGRP_test3',
                                    numberOfFields=3,
                                    label='PMIntFieldGrp3')
                                self.uiINFGRP_test4 = pm.intFieldGrp(
                                    'uiINFGRP_test4',
                                    numberOfFields=4,
                                    label='PMIntFieldGrp4')

                        with self.uiCreateFrame(
                                'uiLAY_frameIntScrollBars',
                                'Int Scroll Bars (PMIntScrollBar)'
                        ) as self.uiLAY_frameIntScrollBars:
                            with pm.columnLayout(adjustableColumn=True):
                                pm.separator(style='none', height=2)
                                self.uiINSCRL_test1 = pm.intScrollBar(
                                    'uiINSCRL_test1')
                                self.uiINSCRL_test2 = pm.intScrollBar(
                                    'uiINSCRL_test2')

                        with self.uiCreateFrame(
                                'uiLAY_frameIntSliders',
                                'Int Sliders (PMIntSlider)'
                        ) as self.uiLAY_frameIntSliders:
                            with pm.columnLayout(adjustableColumn=True):
                                pm.separator(style='none', height=2)
                                self.uiINTSLD_test1 = pm.intSlider(
                                    'uiINTSLD_test1')
                                self.uiINTSLD_test2 = pm.intSlider(
                                    'uiINTSLD_test2')

                        with self.uiCreateFrame(
                                'uiLAY_frameIntSliderGroups',
                                'Int Slider Groups (PMIntSliderGrp)'
                        ) as self.uiLAY_frameIntSliderGroups:
                            with pm.columnLayout():
                                pm.separator(style='none', height=2)
                                self.uiINSGRP_test1 = pm.intSliderGrp(
                                    'uiINSGRP_test1',
                                    label='test1',
                                    field=True)
                                self.uiINSGRP_test2 = pm.intSliderGrp(
                                    'uiINSGRP_test2',
                                    label='test2',
                                    field=True)

                        with self.uiCreateFrame(
                                'uiLAY_frameOptionMenus',
                                'Option Menus (PMOptionMenu)'
                        ) as self.uiLAY_frameOptionMenus:
                            with pm.columnLayout():
                                pm.separator(style='none', height=2)
                                with pm.rowLayout(numberOfColumns=3):
                                    pm.separator(width=110, style='none')
                                    self.uiOPTMNU_test1 = pm.optionMenu(
                                        'uiOPTMNU_test1', label='test1')
                                    pm.menuItem(label='one')
                                    pm.menuItem(label='two')
                                    pm.menuItem(label='three')
                                    self.uiOPTMNU_test2 = pm.optionMenu(
                                        'uiOPTMNU_test2', label='test2')
                                    pm.menuItem(label='four')
                                    pm.menuItem(label='five')
                                    pm.menuItem(label='six')

                        with self.uiCreateFrame(
                                'uiLAY_frameOptionMenuGroups',
                                'Option Menus Groups (PMOptionMenuGrp)'
                        ) as self.uiLAY_frameOptionMenuGroups:
                            with pm.columnLayout():
                                pm.separator(style='none', height=2)
                                self.uiOPMGRP_test1 = pm.optionMenuGrp(
                                    'uiOPMGRP_test1',
                                    label='test1',
                                    extraLabel='extraLabel')
                                pm.menuItem(label='one')
                                pm.menuItem(label='two')
                                pm.menuItem(label='three')
                                self.uiOPMGRP_test2 = pm.optionMenuGrp(
                                    'uiOPMGRP_test2',
                                    label='test2',
                                    extraLabel='extraLabel')
                                pm.menuItem(label='four')
                                pm.menuItem(label='five')
                                pm.menuItem(label='six')

                        with self.uiCreateFrame(
                                'uiLAY_frameRadioButtons',
                                'Radio Buttons (PMRadioButton)'
                        ) as self.uiLAY_frameRadioButtons:
                            with pm.columnLayout():
                                with pm.rowLayout(numberOfColumns=4):
                                    pm.separator(style='none', width=140)
                                    pm.radioCollection()
                                    self.uiRAD_test1 = pm.radioButton(
                                        'uiRAD_test1', label='test1')
                                    self.uiRAD_test2 = pm.radioButton(
                                        'uiRAD_test2', label='test2')
                                    self.uiRAD_test3 = pm.radioButton(
                                        'uiRAD_test3', label='test3')

                        with self.uiCreateFrame(
                                'uiLAY_frameRadioButtonGroups',
                                'Radio Button Groups (PMRadioButtonGrp#)'
                        ) as self.uiLAY_frameRadioButtonGroups:
                            with pm.columnLayout():
                                pm.separator(style='none', height=2)
                                self.uiRADGRP_test1 = pm.radioButtonGrp(
                                    'uiRADGRP_test1',
                                    numberOfRadioButtons=1,
                                    label='PMRadioButtonGrp1',
                                    label1='test1')
                                self.uiRADGRP_test2 = pm.radioButtonGrp(
                                    'uiRADGRP_test2',
                                    numberOfRadioButtons=2,
                                    label='PMRadioButtonGrp2',
                                    labelArray2=('test1', 'test2'))
                                self.uiRADGRP_test3 = pm.radioButtonGrp(
                                    'uiRADGRP_test3',
                                    numberOfRadioButtons=3,
                                    label='PMRadioButtonGrp3',
                                    labelArray3=('test1', 'test2', 'test3'))
                                self.uiRADGRP_test4 = pm.radioButtonGrp(
                                    'uiRADGRP_test4',
                                    numberOfRadioButtons=4,
                                    label='PMRadioButtonGrp4',
                                    labelArray4=('test1', 'test2', 'test3',
                                                 'test4'))

                        with self.uiCreateFrame(
                                'uiLAY_frameSymbolCheckBoxes',
                                'Symbol Check Boxes (PMSymbolCheckBox)'
                        ) as self.uiLAY_frameSymbolCheckBoxes:
                            with pm.columnLayout():
                                with pm.rowLayout(numberOfColumns=3):
                                    pm.separator(style='none', width=140)
                                    self.uiSYMCHK_test1 = pm.symbolCheckBox(
                                        'uiSYMCHK_test1', image='polyCube')
                                    self.uiSYMCHK_test2 = pm.symbolCheckBox(
                                        'uiSYMCHK_test2', image='polyCone')

                        with self.uiCreateFrame(
                                'uiLAY_frameScriptTables',
                                'Script Tables (PMScriptTable)'
                        ) as self.uiLAY_frameScriptTables:
                            with pm.columnLayout():
                                with pm.rowLayout(numberOfColumns=3):
                                    pm.separator(style='none', width=140)
                                    self.uiSCRTBL_test1 = pm.scriptTable(
                                        'uiSCRTBL_test1',
                                        selectionMode=3,
                                        rows=4,
                                        columns=2)
                                    self.uiSCRTBL_test2 = pm.scriptTable(
                                        'uiSCRTBL_test2',
                                        selectionMode=3,
                                        rows=4,
                                        columns=2)

                        with self.uiCreateFrame(
                                'uiLAY_frameScrollField',
                                'Scroll Field (PMScrollField)'
                        ) as self.uiLAY_frameScrollField:
                            with pm.columnLayout():
                                with pm.rowLayout(numberOfColumns=3):
                                    pm.separator(style='none', width=140)
                                    self.uiSCRFLD_test1 = pm.scrollField(
                                        'uiSCRFLD_test1', wordWrap=True)
                                    self.uiSCRFLD_test2 = pm.scrollField(
                                        'uiSCRFLD_test2', wordWrap=True)

                        with self.uiCreateFrame(
                                'uiLAY_frameShelfTabLayout',
                                'Shelf Tab Layout (PMShelfTabLayout)'
                        ) as self.uiLAY_frameShelfTabLayout:
                            with pm.columnLayout(adjustableColumn=True):
                                with pm.shelfTabLayout(
                                        'uiSHLTAB_test1'
                                ) as self.uiSHLTAB_test1:
                                    with pm.shelfLayout('test1'):
                                        pass
                                    with pm.shelfLayout('test2'):
                                        pass
                                    with pm.shelfLayout('test3'):
                                        pass
                                with pm.shelfTabLayout(
                                        'uiSHLTAB_test2'
                                ) as self.uiSHLTAB_test2:
                                    with pm.shelfLayout('test4'):
                                        pass
                                    with pm.shelfLayout('test5'):
                                        pass
                                    with pm.shelfLayout('test6'):
                                        pass

                        with self.uiCreateFrame('uiLAY_frameTabLayout',
                                                'Tab Layout (PMTabLayout)'
                                                ) as self.uiLAY_frameTabLayout:
                            with pm.columnLayout(adjustableColumn=True):
                                with pm.tabLayout(
                                        'uiTAB_test1') as self.uiTAB_test1:

                                    with pm.rowLayout(numberOfColumns=1
                                                      ) as uiLAY_tabRow1:
                                        pass
                                    with pm.rowLayout(numberOfColumns=1
                                                      ) as uiLAY_tabRow2:
                                        pass
                                    with pm.rowLayout(numberOfColumns=1
                                                      ) as uiLAY_tabRow3:
                                        pass

                                pm.tabLayout(self.uiTAB_test1,
                                             edit=True,
                                             tabLabel=(
                                                 (uiLAY_tabRow1, 'test1'),
                                                 (uiLAY_tabRow2, 'test2'),
                                                 (uiLAY_tabRow3, 'test3'),
                                             ))

                                with pm.tabLayout(
                                        'uiTAB_test2') as self.uiTAB_test2:

                                    with pm.rowLayout(numberOfColumns=1
                                                      ) as uiLAY_tabRow4:
                                        pass
                                    with pm.rowLayout(numberOfColumns=1
                                                      ) as uiLAY_tabRow5:
                                        pass
                                    with pm.rowLayout(numberOfColumns=1
                                                      ) as uiLAY_tabRow6:
                                        pass

                                pm.tabLayout(self.uiTAB_test2,
                                             edit=True,
                                             tabLabel=(
                                                 (uiLAY_tabRow4, 'test4'),
                                                 (uiLAY_tabRow5, 'test5'),
                                                 (uiLAY_tabRow6, 'test6'),
                                             ))

                        with self.uiCreateFrame(
                                'uiLAY_frameTextFields',
                                'Text Fields (PMTextField)'
                        ) as self.uiLAY_frameTextFields:
                            with pm.columnLayout():
                                pm.separator(style='none', height=2)
                                with pm.rowLayout(numberOfColumns=3):
                                    pm.separator(width=140, style='none')
                                    self.uiTXT_test1 = pm.textField(
                                        'uiTXT_test1')
                                    self.uiTXT_test2 = pm.textField(
                                        'uiTXT_test2')

                        with self.uiCreateFrame(
                                'uiLAY_frameTextFieldButtonGroups',
                                'Text Field Button Groups (PMTextFieldButtonGrp)'
                        ) as self.uiLAY_frameTextFieldButtonGroups:
                            with pm.columnLayout():
                                pm.separator(style='none', height=2)
                                self.uiTXBTGR_test1 = pm.textFieldButtonGrp(
                                    'uiTXBTGR_test1',
                                    label='test1',
                                    buttonLabel='button1')
                                self.uiTXBTGR_test2 = pm.textFieldButtonGrp(
                                    'uiTXBTGR_test2',
                                    label='test2',
                                    buttonLabel='button2')

                        with self.uiCreateFrame(
                                'uiLAY_frameTextFieldGroups',
                                'Text Field Groups (PMTextFieldGrp)'
                        ) as self.uiLAY_frameTextFieldGroups:
                            with pm.columnLayout():
                                pm.separator(style='none', height=2)
                                self.uiTXTGRP_test1 = pm.textFieldGrp(
                                    'uiTXTGRP_test1', label='test1')
                                self.uiTXTGRP_test2 = pm.textFieldGrp(
                                    'uiTXTGRP_test2', label='test2')

                        with self.uiCreateFrame(
                                'uiLAY_frameTextScrollLists',
                                'Text Scroll Lists (PMTextScrollList)'
                        ) as self.uiLAY_frameTextScrollLists:
                            with pm.columnLayout():
                                with pm.rowLayout(numberOfColumns=3):
                                    pm.separator(style='none', width=140)
                                    self.uiTXTLST_test1 = pm.textScrollList(
                                        'uiTXTLST_test1',
                                        allowMultiSelection=True,
                                        append=('one', 'two', 'three', 'four',
                                                'five', 'six', 'seven',
                                                'eight', 'nine', 'ten'))
                                    self.uiTXTLST_test2 = pm.textScrollList(
                                        'uiTXTLST_test2',
                                        allowMultiSelection=True,
                                        append=('one', 'two', 'three', 'four',
                                                'five', 'six', 'seven',
                                                'eight', 'nine', 'ten'))

                self.uiBTN_savePrefs = pm.button(
                    label='Save Prefs',
                    height=MAIN_BUTTONS_HEIGHT,
                    command=self.onSavePrefsClicked)

                self.uiBTN_loadPrefs = pm.button(
                    label='Load Prefs',
                    height=MAIN_BUTTONS_HEIGHT,
                    command=self.onLoadPrefsClicked)

                self.uiBTN_resetPrefs = pm.button(
                    label='Reset Prefs',
                    height=MAIN_BUTTONS_HEIGHT,
                    command=self.onResetPrefsClicked)

                uiLAY_mainForm.attachForm(self.uiLAY_mainScroll, 'top', 2)
                uiLAY_mainForm.attachForm(self.uiLAY_mainScroll, 'left', 2)
                uiLAY_mainForm.attachForm(self.uiLAY_mainScroll, 'right', 2)
                uiLAY_mainForm.attachControl(self.uiLAY_mainScroll, 'bottom',
                                             2, self.uiBTN_savePrefs)

                uiLAY_mainForm.attachNone(self.uiBTN_savePrefs, 'top')
                uiLAY_mainForm.attachForm(self.uiBTN_savePrefs, 'left', 2)
                uiLAY_mainForm.attachPosition(self.uiBTN_savePrefs, 'right', 2,
                                              33)
                uiLAY_mainForm.attachForm(self.uiBTN_savePrefs, 'bottom', 2)

                uiLAY_mainForm.attachNone(self.uiBTN_loadPrefs, 'top')
                uiLAY_mainForm.attachPosition(self.uiBTN_loadPrefs, 'left', 2,
                                              33)
                uiLAY_mainForm.attachPosition(self.uiBTN_loadPrefs, 'right', 2,
                                              66)
                uiLAY_mainForm.attachForm(self.uiBTN_loadPrefs, 'bottom', 2)

                uiLAY_mainForm.attachNone(self.uiBTN_resetPrefs, 'top')
                uiLAY_mainForm.attachPosition(self.uiBTN_resetPrefs, 'left', 2,
                                              66)
                uiLAY_mainForm.attachForm(self.uiBTN_resetPrefs, 'right', 2)
                uiLAY_mainForm.attachForm(self.uiBTN_resetPrefs, 'bottom', 2)

        self.window.setTitle(self.window.__class__)