def __init__(self, parent=getMayaWindow()):
        super(PlayblasterSettingsWnd, self).__init__(parent)
        flat.FlatWindow.__init__(self, PlayblasterSettingsWnd)
        uic.loadUi('settings.ui', self)

        self.settings = fn.loadSettings(fileName)
        if 'display' in self.settings:
            self.displayUserEdit.setText(self.settings['display'])

        # get shotgun user
        self.shotgun = sh.studioShotgun(
            "https://oamedia.shotgunstudio.com", 'maya',
            '9e9d3222407460dfbf5383906a5a241b4020d79a25ba8c6b2411787ab6aa3974',
            67)

        self.userList = self.shotgun.getAllUsers()
        self.userList = [x['name'] for x in self.userList]
        self.userList.sort()
        if self.userList:
            self.shotgunUserCombo.addItems(self.userList)

        if 'shotgun' in self.settings:
            if self.settings['shotgun'] in self.userList:
                num = self.userList.index(self.settings['shotgun'])
                self.shotgunUserCombo.setCurrentIndex(num)

        self.connect(self.saveButton, SIGNAL("released()"),
                     self.saveButtonClick)
    def __init__(self, parent=getMayaWindow()):
        super(PlayblasterSettingsWnd, self).__init__(parent)
        flat.FlatWindow.__init__(self, PlayblasterSettingsWnd)
        uic.loadUi("settings.ui", self)

        self.settings = fn.loadSettings(fileName)
        if "display" in self.settings:
            self.displayUserEdit.setText(self.settings["display"])

        # get shotgun user
        self.shotgun = sh.studioShotgun(
            "https://oamedia.shotgunstudio.com",
            "maya",
            "9e9d3222407460dfbf5383906a5a241b4020d79a25ba8c6b2411787ab6aa3974",
            67,
        )

        self.userList = self.shotgun.getAllUsers()
        self.userList = [x["name"] for x in self.userList]
        self.userList.sort()
        if self.userList:
            self.shotgunUserCombo.addItems(self.userList)

        if "shotgun" in self.settings:
            if self.settings["shotgun"] in self.userList:
                num = self.userList.index(self.settings["shotgun"])
                self.shotgunUserCombo.setCurrentIndex(num)

        self.connect(self.saveButton, SIGNAL("released()"), self.saveButtonClick)
Exemple #3
0
    def __init__(self, resolution=[1920, 1080, 1.0], range=[]):
        self.userName = "******"
        self.resolution = resolution
        self.curPanel = cmds.getPanel(wf=True)

        self.userName = "******"
        self.settings = fn.loadSettings(fileName)
        if "display" in self.settings:
            self.userName = self.settings["display"]

        curDate = time.localtime()
        self.curTime = "%02d:%02d %02d.%02d.%04d" % (
            curDate.tm_hour,
            curDate.tm_min,
            curDate.tm_mday,
            curDate.tm_mon,
            curDate.tm_year,
        )

        if range:
            self.range = range
        else:
            self.range = [cmds.playbackOptions(q=True, min=True), cmds.playbackOptions(q=True, max=True)]
        self.duration = int(self.range[1] - self.range[0] + 1)

        self.getFileName()
        self.getFPS()
Exemple #4
0
    def __init__(self, resolution=[1920, 1080, 1.0], range=[]):
        self.userName = '******'
        self.resolution = resolution
        self.curPanel = cmds.getPanel(wf=True)

        self.userName = '******'
        self.settings = fn.loadSettings(fileName)
        if 'display' in self.settings:
            self.userName = self.settings['display']

        curDate = time.localtime()
        self.curTime = '%02d:%02d %02d.%02d.%04d' % (
            curDate.tm_hour, curDate.tm_min, curDate.tm_mday, curDate.tm_mon,
            curDate.tm_year)

        if range:
            self.range = range
        else:
            self.range = [
                cmds.playbackOptions(q=True, min=True),
                cmds.playbackOptions(q=True, max=True)
            ]
        self.duration = int(self.range[1] - self.range[0] + 1)

        self.getFileName()
        self.getFPS()
Exemple #5
0
    def __init__(self, fname, parent=getMayaWindow()):
        super(PlayblasterFinalWnd, self).__init__(parent)
        uic.loadUi('final.ui', self)
        flat.FlatWindow.__init__(self, PlayblasterFinalWnd)

        self.fileName = fname

        # get shotgun user
        self.shotgun = sh.studioShotgun("https:<your_site>.com",
                                        '<key_name>',
                                        '<key_id>',
                                        '<int project_id>')

        self.userList = self.shotgun.getAllUsers()
       
        self.userName = '******'
        self.settings = fn.loadSettings(fileName)
        if 'shotgun' in self.settings:
            self.userName = self.settings['shotgun']
            for name in self.userList:
                if name['name'] == self.userName:
                    self.userName = name['login']
                    self.userId =   name['id']

        self.shotgunCheck.setText('Create Shotgun Version ( ' + self.userName + ' )')

        # get shotgun shot
        curName = self.fileName.split('/')[-2]
        episodeNum = self.fileName.split('/')[2].split('_')[-1]
        self.curShot = self.shotgun.findShotByName('ep'+episodeNum, curName)
        taskNames = [x['name'] for x in self.curShot['tasks']]
        self.tasks = dict([(x['name'],x['id']) for x in self.curShot['tasks']])
        self.shotgunTaskCombo.addItems(taskNames)

        # set perforce
        self.perforce = pf.studioPerforce('', '')

        self.connect(self.perforceCheck, SIGNAL("stateChanged(int)"), self.checkBtnState)
        self.connect(self.shotgunCheck,  SIGNAL("stateChanged(int)"), self.checkBtnState)
        self.connect(self.saveButton,    SIGNAL("released()"),        self.saveButtonClick)