Exemplo n.º 1
0
 def build(self):
     """ Build the main header and body for this view. """
     with pm.frameLayout('%sHeadFrame' % self.viewName, mw=self._headMargins[0], mh=self._headMargins[1], lv=False, bv=False) as self._headFrame:
         self.buildHeader()
     with pm.frameLayout('%sFrame' % self.viewName, mw=self._bodyMargins[0], mh=self._bodyMargins[1], lv=False, bv=False) as self._bodyFrame:
         self.buildBody()
     utils.layoutForm(self._layout, (0, 1), spacing=2, vertical=True)
Exemplo n.º 2
0
 def frameItem(self, l='', c=None, ann='', bgc=None, en=True, mw=4, mh=4, bs='etchedIn'):
     """Create a small frame with no label and a button with a description"""
     with pm.frameLayout(lv=False, mw=mw, mh=mh, bs=bs) as frame:
         with pm.formLayout(en=en) as form:
             btn = pm.button(l=l, c=c, ann=ann, w=self._frameItemWidth)
             if bgc != None: btn.setBackgroundColor(bgc)
             if c != None: btn.setCommand(c)
             txt = pm.text(l=ann, al='center')
         utils.layoutForm(form, (0, 1), vertical=True)
     return frame, form, btn, txt
Exemplo n.º 3
0
 def buildBody(self):
     self._iconSize = self.gui.iconSize
     self.minSize = 128
     self.maxSize = 512
     self.tempFileName = 'mayaIcon{0}.png'
     self.gui.window.setToolbox(True)
     self.camera = self.newCamera()
     with pm.formLayout() as form:
         with pm.columnLayout():
             kw = dict(w=128, h=128)
             with pm.frameLayout(lv=False, bv=False, **kw) as self.editorFrame:
                 self.panel = pm.modelPanel(cam=self.camera, mbv=False, l='Icon Capture View')
                 self.setupModelEditor(self.panel.getModelEditor())
                 bar = self.panel.getBarLayout()
                 pm.layout(bar, e=True, m=False)
         with pm.formLayout() as form2:
             self.buildFooter()
             utils.layoutForm(form2, 1)
         utils.layoutForm(form, (0, 1), vertical=True)
     self.updateEditorFrame()
     pm.refresh()