def getShot(): """ Returns the shot from the environment. Returns: (str or None): Shot, or None if no shot is found. """ return jobTls.shotName()
def initUI(self): # self.setMinimumSize(200, 100) self.ui = ui.loadUiWidgetFromPyFile(__file__, parent=self) # layout self.setLayout(QtGui.QVBoxLayout()) self.layout().addWidget(self.ui) self.layout().setSpacing(0) self.layout().setContentsMargins(2, 2, 2, 2) # fill UI info isValid = self.isValidContext() if isValid: self.ui.cb_job.addItem(jobTls.jobName()) self.ui.cb_scene.addItem(jobTls.sceneName()) self.ui.cb_shot.addItem(jobTls.shotName()) self.ui.cb_playblast.addItems(self.getCurrentJobPlayblastPathsShot()) self.ui.cb_colors.addItems(["256", "128", "64", "32", "16", "8"]) self.ui.cb_colors.setCurrentIndex(1) else: self.ui.setEnabled(False) cmds.confirmDialog(t="Alert", message="You must job in a shot to use this tool", button=["OK"], icon="warning") # add signals to the ui elements self.ui.pb_createGIF.clicked.connect(self.createGIF)
def getPlayblastPath(): jobName = jobTls.jobName() sceneName = jobTls.sceneName() shotName = jobTls.shotName() if jobName and sceneName and shotName: return ("/jobs/" + jobName + "/" + sceneName + "/" + shotName + "/maya/playblasts/") else: return None