Exemplo n.º 1
0
    def createAssetPrompt(self):
        form = pm.setParent(q=True)
        f = pm.formLayout(form, e=True, width=150)

        col2 = pm.columnLayout(p=f, adjustableColumn=True)
        nsField = pm.textFieldGrp('nsFieldPrompt', l='Name Space', tx='ref')
        refModeField = pm.optionMenuGrp(l='Assemble Mode')
        pm.menuItem(l='reference')
        pm.menuItem(l='cache')
        pm.menuItem(l='import')
        pm.menuItem(l='copy')
        pane = pm.paneLayout(p=col2,
                             configuration='top3',
                             ps=[(1, 20, 80), (2, 80, 80), (3, 100, 20)])
        folderTreeWidget = FolderTreeWidget()
        folderTreeWidget.createFolderTree(pane)
        folderTreeWidget.projectName = self.projectName
        folderTreeWidget.type = 'asset'
        folderTreeWidget.getFolderTree()

        itemListWidget = ItemListBase()
        itemListWidget.projectName = self.projectName
        itemListWidget.createList(pane)
        itemListWidget.refreshList(path=[], task=['uvs', 'rig'])

        infoWidget = InfoWidget()
        infoWidget.createInfo(pane)

        folderTreeWidget.itemListWidget = itemListWidget
        folderTreeWidget.itemListWidget.type = 'asset'
        folderTreeWidget.itemListWidget.task = ['uvs', 'rig']
        itemListWidget.infoWidget = infoWidget

        b1 = pm.button(p=f, l='Cancel', c='pm.layoutDialog( dismiss="Abort" )')
        b2 = pm.button(
            p=f,
            l='OK',
            c=lambda x: self.createAssetCallBack(itemListWidget.selectedItem))

        spacer = 5
        top = 5
        edge = 5
        pm.formLayout(form,
                      edit=True,
                      attachForm=[(col2, 'right', edge), (col2, 'top', top),
                                  (col2, 'left', edge), (b1, 'right', edge),
                                  (b1, 'bottom', edge), (b2, 'left', edge),
                                  (b2, 'bottom', edge)],
                      attachNone=[],
                      attachControl=[],
                      attachPosition=[(b1, 'right', spacer, 90),
                                      (b2, 'left', spacer, 10)])
Exemplo n.º 2
0
        def createAssetPrompt(self):
            form = pm.setParent(q=True)
            f = pm.formLayout(form, e=True, width=150)

            col2 = pm.columnLayout(p=f, adjustableColumn=True)
            pane = pm.paneLayout(p=col2, configuration='top3', ps=[(1, 20, 80), (2, 80, 80), (3, 100, 20)])
            folderTreeWidget = FolderTreeWidget()
            print 'ok'
            folderTreeWidget.createFolderTree(pane)
            print 'ok2'
            folderTreeWidget.projectName = database.getCurrentProject()
            folderTreeWidget.type = 'asset'
            folderTreeWidget.getFolderTree()

            itemListWidget = ItemListBase()
            itemListWidget.projectName = database.getCurrentProject()
            itemListWidget.createList(pane)
            itemListWidget.refreshList(path=[], task='asset')

            infoWidget = InfoWidget()
            infoWidget.createInfo(pane)

            folderTreeWidget.itemListWidget = itemListWidget
            folderTreeWidget.itemListWidget.type = 'asset'
            folderTreeWidget.itemListWidget.task = 'asset'
            itemListWidget.infoWidget = infoWidget

            b1 = pm.button(p=f, l='Cancel', c='pm.layoutDialog( dismiss="Abort" )')
            b2 = pm.button(p=f, l='OK', c=lambda x: self.createAssetCallBack(itemListWidget.selectedItem))

            spacer = 5
            top = 5
            edge = 5
            pm.formLayout(form, edit=True,
                          attachForm=[(col2, 'right', edge), (col2, 'top', top), (col2, 'left', edge), (b1, 'right', edge),
                                      (b1, 'bottom', edge), (b2, 'left', edge), (b2, 'bottom', edge)], attachNone=[],
                          attachControl=[], attachPosition=[(b1, 'right', spacer, 90), (b2, 'left', spacer, 10)])