Exemple #1
0
    def __init__(self, mainUI):
        """
        Instantiates the class, getting the QSettings and then calling on the function to build the UI for the tool.

        :param mainUI: The instance of the Rig Creator UI that this class was called from.

        .. seealso:: ART_BuildProgressUI.buildUI

        """

        # get the directory path of the tools
        settings = QtCore.QSettings("Epic Games", "ARTv2")
        self.toolsPath = settings.value("toolsPath")
        self.projectPath = settings.value("projectPath")
        self.iconsPath = settings.value("iconPath")

        self.mainUI = mainUI
        self.rigData = []
        self.warnings = 0
        self.errors = 0

        # images
        self.imageBkgrd = utils.returnFriendlyPath(os.path.join(self.iconsPath, "System/toolbar_background.png"))
        self.imageBtnBkrd = utils.returnFriendlyPath(os.path.join(self.iconsPath, "System/blue_field_background.png"))
        self.frameBackground = utils.returnFriendlyPath(os.path.join(self.iconsPath, "System/field_background.png"))

        # build the UI
        if cmds.window("ART_BuildProgressWin", exists=True):
            cmds.deleteUI("ART_BuildProgressWin", wnd=True)

        self.buildUI()
Exemple #2
0
    def getInfo(self):

        #need to eventually swap this with the real file
        request = urllib2.Request(
            "https://raw.githubusercontent.com/epicernst/Test/master/ARTv2_VersionInfo.json"
        )
        base64String = base64.encodestring(
            '%s:%s' % (self.credentials[0], self.credentials[1])).replace(
                '\n', '')
        request.add_header("Authorization", "Basic %s" % base64String)
        try:
            result = urllib2.urlopen(request)
        except Exception, e:
            self.infoText.setTextColor(QtGui.QColor(249, 241, 12))
            self.infoText.append(str(e))
            self.infoText.append(
                "Your Github login credentials may be invalid or you do not have access to this repo.\n\n"
            )
            self.infoText.setTextColor(QtGui.QColor(255, 255, 255))

            settings = QtCore.QSettings("Epic Games", "ARTv2")
            settings.remove("gitUser")
            settings.remove("gitPass")

            return
Exemple #3
0
    def __init__(self, animPickerUI, showUI, parent=None):

        super(ART_SelectControls, self).__init__()

        # get the directory path of the tools
        settings = QtCore.QSettings("Epic Games", "ARTv2")
        self.toolsPath = settings.value("toolsPath")
        self.iconsPath = settings.value("iconPath")
        self.scriptPath = settings.value("scriptPath")
        self.projectPath = settings.value("projectPath")

        self.pickerUI = animPickerUI
        self.showUI = showUI

        # write out qss based on user settings
        stylesheetDir = utils.returnNicePath(self.scriptPath,
                                             "Interfaces/StyleSheets/")
        stylesheets = os.listdir(stylesheetDir)

        for sheet in stylesheets:
            interfaceUtils.writeQSS(os.path.join(stylesheetDir, sheet))

        # build the UI or just go straight to selecting all controls
        if self.showUI:
            self.buildUI()
        else:
            self.selectControls()
Exemple #4
0
    def __init__(self, mainUI):

        #get the directory path of the tools
        settings = QtCore.QSettings("Epic Games", "ARTv2")
        self.toolsPath = settings.value("toolsPath")
        self.iconsPath = settings.value("iconPath")
        self.scriptPath = settings.value("scriptPath")
        self.projectPath = settings.value("projectPath")

        self.mainUI = mainUI
        self.rigData = []
        self.warnings = 0
        self.errors = 0

        #images
        self.imageBkgrd = utils.returnFriendlyPath(
            os.path.join(self.iconsPath, "System/toolbar_background.png"))
        self.imageBtnBkrd = utils.returnFriendlyPath(
            os.path.join(self.iconsPath, "System/blue_field_background.png"))
        self.frameBackground = utils.returnFriendlyPath(
            os.path.join(self.iconsPath, "System/field_background.png"))

        #build the UI
        if cmds.window("ART_RigHistWin", exists=True):
            cmds.deleteUI("ART_RigHistWin", wnd=True)

        self.buildUI()
    def __init__(self, animPickerUI, modulesToAdd, parent=None):

        super(ART_MovePickerToTab, self).__init__()
        #get the directory path of the tools
        settings = QtCore.QSettings("Epic Games", "ARTv2")
        self.toolsPath = settings.value("toolsPath")
        self.iconsPath = settings.value("iconPath")
        self.scriptPath = settings.value("scriptPath")
        self.projectPath = settings.value("projectPath")

        self.pickerUI = animPickerUI
        self.modulesToAdd = modulesToAdd

        #assign close event
        self.closeEvent = self.closeWin

        #build the UI
        self.buildUI()
Exemple #6
0
    def __init__(self, mainUI):
        """
        Instantiates the class, getting the QSettings and then calling on ART_BakeOffsetsUI.buildBakeOffsetsUI to
        create the interface.

        :param mainUI: The instance of the Rig Creator UI where this class was called from.

        .. seealso:: ART_BakeOffsetsUI.buildBakeOffsetsUI

        """

        # get the directory path of the tools
        settings = QtCore.QSettings("Epic Games", "ARTv2")
        self.toolsPath = settings.value("toolsPath")
        self.iconsPath = settings.value("iconPath")
        self.mainUI = mainUI

        # build the UI
        self.buildBakeOffsetsUI()
Exemple #7
0
    def __init__(self, parent=None):

        super(ART_Updater, self).__init__(parent)

        #get the directory path of the tools
        settings = QtCore.QSettings("Epic Games", "ARTv2")

        self.toolsPath = settings.value("toolsPath")
        self.scriptPath = settings.value("scriptPath")
        self.iconsPath = settings.value("iconPath")
        self.projPath = settings.value("projectPath")

        #get github credentials
        self.credentials = git.getGitCreds()
        if self.credentials == None:
            git.gitCredsUI(self)
            self.credentials = git.getGitCreds()

        #build the UI
        self.buildSettingsUi()
Exemple #8
0
    def fbxFileBrowse(self):

        settings = QtCore.QSettings("Epic Games", "ARTv2")
        path = settings.value("ImportPath")
        if path == None:
            path = self.projectPath

        #see if export node exists, and if it does, see if there is an existing export path
        try:
            path = cmds.fileDialog2(fm=1,
                                    okc="Import FBX",
                                    dir=path,
                                    ff="*.fbx")
            nicePath = utils.returnFriendlyPath(path[0])

            self.fbxFilePath.setText(nicePath)
            settings.setValue("ImportPath", nicePath)

        except:
            pass
Exemple #9
0
    def __init__(self, mainUI, moviePath):
        #Original Author: Jeremy Ernst

        #get the directory path of the tools
        settings = QtCore.QSettings("Epic Games", "ARTv2")
        self.toolsPath = settings.value("toolsPath")
        self.projectPath = settings.value("projectPath")
        self.iconsPath = settings.value("iconPath")
        self.mainUI = mainUI

        #images
        self.imageBkgrd = utils.returnFriendlyPath(
            os.path.join(self.iconsPath, "System/toolbar_background.png"))
        self.imageBtnBkrd = utils.returnFriendlyPath(
            os.path.join(self.iconsPath, "System/blue_field_background.png"))
        self.frameBackground = utils.returnFriendlyPath(
            os.path.join(self.iconsPath, "System/field_background.png"))

        #build the UI
        if cmds.window("ART_HelpMovieWin", exists=True):
            cmds.deleteUI("ART_HelpMovieWin", wnd=True)

        self.buildHelpMovieUI(moviePath)
Exemple #10
0
    def __init__(self, moduleInst, rigUiInst, parent = None):


        super(ART_SetMirrorModule_UI, self).__init__(parent)

        #get the directory path of the tools
        settings = QtCore.QSettings("Epic Games", "ARTv2")
        self.toolsPath = settings.value("toolsPath")
        self.iconsPath = settings.value("iconPath")

        #create class variables
        self.modInst = moduleInst
        self.rigUiInst = rigUiInst


        #load stylesheet
        styleSheetFile = utils.returnNicePath(self.toolsPath, "Core/Scripts/Interfaces/StyleSheets/mainScheme.qss")
        f = open(styleSheetFile, "r")
        style = f.read()
        f.close()

        self.setStyleSheet(style)

        #size policies
        mainSizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed)

        #create the main widget
        self.mainWidget = QtWidgets.QWidget()
        self.setCentralWidget(self.mainWidget)

        #set qt object name
        self.setObjectName(windowObject)
        self.setWindowTitle(windowTitle)

        #create the mainLayout for the rig creator UI
        self.mainLayout = QtWidgets.QVBoxLayout(self.mainWidget)
        self.mainLayout.setContentsMargins(0, 0, 0, 0)

        self.setSizePolicy(mainSizePolicy)
        self.setMinimumSize(QtCore.QSize( 250, 200 ))
        self.setMaximumSize(QtCore.QSize( 250, 200 ))

        #create the background image
        self.frame = QtWidgets.QFrame()
        self.mainLayout.addWidget(self.frame)

        #create the layout for the widgets
        self.widgetLayout = QtWidgets.QVBoxLayout(self.frame)


        label = QtWidgets.QLabel("Choose Mirror Module:")
        self.widgetLayout.addWidget(label)
        font = QtGui.QFont()
        font.setBold(True)

        self.moduleList = QtWidgets.QListWidget()
        self.moduleList.addItem("None")
        self.widgetLayout.addWidget(self.moduleList)


        #add items to comboBox
        networkNode = self.modInst.returnNetworkNode
        modules = utils.returnRigModules()
        for mod in modules:
            modName = cmds.getAttr(mod + ".moduleName")
            modType = cmds.getAttr(mod + ".moduleType")

            if modType == cmds.getAttr(networkNode + ".moduleType"):
                if mod != networkNode:
                    self.moduleList.addItem(modName)

        self.moduleList.setCurrentRow(0)



        spacerItem1 = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding)
        self.widgetLayout.addItem(spacerItem1)


        #update button
        self.updateBtn = QtWidgets.QPushButton("UPDATE")
        self.widgetLayout.addWidget(self.updateBtn)
        self.updateBtn.setMinimumSize(QtCore.QSize(230, 40))
        self.updateBtn.setMaximumSize(QtCore.QSize(230, 40))
        self.updateBtn.setSizePolicy(mainSizePolicy)
        font = QtGui.QFont()
        font.setPointSize(12)
        self.updateBtn.setFont(font)
        self.updateBtn.setObjectName("blueButton")

        #hookup signal/slot on create button
        self.updateBtn.clicked.connect(self.setMirrorModule)