コード例 #1
0
ファイル: ToolBoxIII.py プロジェクト: yazici/damgteam
    def __init__(self, dock=True):
        if dock:
            parent = getDock()
        else:
            deleteDock()

            try:
                cmds.deleteUI('LightingManager')
            except:
                logger.debug('No previous UI exists')

            parent = QtWidgets.QDialog(parent=getMayaMainWindow())
            parent.setObjectName('LightingManager')
            parent.setWindowTitle('Lighting Manager')

            dlgLayout = QtWidgets.QVBoxLayout(parent)

        super(toolBoxIII, self).__init__(parent=parent)

        self.setWindowTitle('Lighting Manager')

        self.buildUI()

        self.populate()

        self.parent().layout().addWidget(self)

        if not dock:
            parent.show()

        self.userAppDir = cmds.internalVar(userAppDir=True)
        self.userLibaryDir = self.userAppDir + 'userLibrary'
        if not os.path.exists(self.userLibaryDir):
            os.mkdir(self.userLibaryDir)
コード例 #2
0
ファイル: ToolBoxIII.py プロジェクト: yazici/damgteam
    def buildUI(self):
        self.layout = QtWidgets.QGridLayout(self)
        pluginLights = typeMgr.pluginLights()
        self.mayaLights = sorted(typeMgr.mayaLights())
        self.vrayLights = sorted(
            [f for f in pluginLights if f.startswith("VRay")])
        self.renderManLights = sorted(
            [f for f in pluginLights if f.startswith("Pxr")])
        self.arnoldLights = sorted(
            [f for f in pluginLights if f.startswith("ai")])

        iconBtnWidget = QtWidgets.QWidget()
        self.iconBtnLayout = QtWidgets.QHBoxLayout(iconBtnWidget)
        self.layout.addWidget(iconBtnWidget, 0, 0)
        self.iconBtnLayout.addWidget(QtWidgets.QLabel("maya: "))

        # self.mayaLightTB = QtWidgets.QToolBar('Maya_tk Light')
        self.getMayaLight()

        self.getVrayLight()

        self.getRenderManLight()

        # self.getArnoldLight()

        self.lightLibraryUI()

        scrollWidget = QtWidgets.QWidget()
        scrollWidget.setSizePolicy(QtWidgets.QSizePolicy.Maximum,
                                   QtWidgets.QSizePolicy.Maximum)
        self.scrollLayout = QtWidgets.QVBoxLayout(scrollWidget)

        scrollArea = QtWidgets.QScrollArea()
        scrollArea.setWidgetResizable(True)
        scrollArea.setWidget(scrollWidget)
        self.layout.addWidget(scrollArea, 1, 0, 1, 5)