예제 #1
0
파일: add_shot.py 프로젝트: dszybala/epp
    def accept(self):
        """
        Check the connection.
        """
        if not self._gen.status(True):
            log.error("Could not establish connection with Generation. Make sure it is running.", True)
            return

        # Need edit rights for this one!
        if not self._gen.allow_changes(True):
            return 
        
        ret, msg = control.add_shot(self.PROJECTNAME, self.plugName.text(), self.cmbDirStructure.currentText()+".xml", self._gen, self.cmbInsertPosition.currentIndex())

        if not ret:
            log.error(msg, True)
            return

        # Keep the dialog.
        if not self.chkAnother.isChecked():
            super(AddShotDialog, self).accept()
        else:
            shot_dir = os.path.join(self.SHOTDIR, self.plugName.text())
            self.plugName.setText("")
            self.lblStatus.setText("<html><head><style type=text/css>a {{ color: white; }}\n a:link {{color:white; text-decoration:none; }}\n a:hover {{ color:#ffcc00; text-decoration:underline; }}</style></head><body><font color='#00ee00'>Shot successfully created:</font> <a href='file:///{0}'>{0}</a></body></html>".format(shot_dir, shot_dir.replace("\\", "/")))
            self._status_fade.setDirection(QAbstractAnimation.Forward)
            self._status_fade.start()
            self.plugName.setFocus()
예제 #2
0
def add_shot_from_media(projectname, shotname, template, gen, insertpos, clip):
    """docstring for add_shot_from_media"""
    return epp_addshot.add_shot(projectname, shotname, template, gen, insertpos, clip)
예제 #3
0
def add_shot_from_media(projectname, shotname, template, gen, insertpos, clip):
    """docstring for add_shot_from_media"""
    return epp_addshot.add_shot(projectname, shotname, template, gen,
                                insertpos, clip)