Ejemplo n.º 1
0
    def accept(self):
        """
        Check the connection.
        """

        _fu = fu_controller()

        if not _fu.status(True):
            log.error("Fusion not running.", True)
            return

        if os.path.isfile(self.COMP_FILEPATH):
            ret = QMessageBox.information(
                self, "Question",
                "Composition does already exist.\nOverwrite '{0}'".format(
                    os.path.basename(self.COMP_FILEPATH)),
                QMessageBox.Yes | QMessageBox.No)
            if ret == QMessageBox.No:
                return

        cur_project = self.cmbProject.currentText()
        cur_shot = self.cmbShot.currentText()

        ret = _fu.save_comp(self.COMP_FILEPATH, {
            "project": str(cur_project),
            "shot": str(cur_shot)
        })

        if not ret[0]:
            log.error(ret[1], True)
            return

        log.info("Saved Comp to {0}".format(self.COMP_FILEPATH))
        self.hide()

        if self.chkUpdateSavers.isChecked():
            ret = _fu.update_savers(self.spnVersion.value())

        if self.chkFormat.isChecked():
            _fu.set_format(project_format_object(cur_project))

        osplus.set_env("EPP_CURPROJECT", self.cmbProject.currentText())
        osplus.set_env("EPP_CURSHOT", self.cmbShot.currentText())

        COMP_ROOT_DIR = os.path.dirname(self.COMP_FILEPATH)
        if os.path.isdir(COMP_ROOT_DIR):
            res = _fu.set_pathmap("Comps:", COMP_ROOT_DIR)
            log.info("Setting Comps: PathMap to {0} ({1})".format(
                COMP_ROOT_DIR, res[1]))

        super(SaveAsDialog, self).accept()
Ejemplo n.º 2
0
    def accept(self):
        """
        Check the connection.
        """

        _fu = fu_controller()

        if not _fu.status(True):
            QMessageBox.critical(self, "Error", "Fusion not running.")
            return

        if os.path.isfile(self.COMP_FILEPATH):
            ret = QMessageBox.information(
                self, "Question",
                "Composition does already exist.\nOverwrite '{0}'".format(
                    os.path.basename(self.COMP_FILEPATH)),
                QMessageBox.Yes | QMessageBox.No)
            if ret == QMessageBox.No:
                return

        cur_project = self.cmbProject.currentText()
        cur_shot = self.cmbShot.currentText()

        ret = _fu.save_comp(self.COMP_FILEPATH, {
            "project": str(cur_project),
            "shot": str(cur_shot)
        })

        if not ret[0]:
            QMessageBox.critical(self, "Error", ret[1])
            return

        self.hide()

        if self.chkUpdateSavers.isChecked():
            ret = _fu.update_savers(self.spnVersion.value())

        if self.chkFormat.isChecked():
            _fu.set_format(project_format_object(cur_project))

        osplus.set_env("EPP_CURPROJECT", self.cmbProject.currentText())
        osplus.set_env("EPP_CURSHOT", self.cmbShot.currentText())

        super(SaveAsDialog, self).accept()
Ejemplo n.º 3
0
    def accept(self):
        """
        Check the connection.
        """

        _fu = fu_controller()

        if not _fu.status(True):
            log.error("Fusion not running.", True)
            return

        if os.path.isfile(self.COMP_FILEPATH):
            ret = QMessageBox.information(self, "Question", "Composition does already exist.\nOverwrite '{0}'".format(os.path.basename(self.COMP_FILEPATH)), QMessageBox.Yes | QMessageBox.No)
            if ret == QMessageBox.No:
                return

        cur_project = self.cmbProject.currentText()
        cur_shot = self.cmbShot.currentText()

        ret = _fu.save_comp(self.COMP_FILEPATH, {"project": str(cur_project), "shot": str(cur_shot)})

        if not ret[0]:
            log.error(ret[1], True)
            return

        log.info("Saved Comp to {0}".format(self.COMP_FILEPATH))
        self.hide()

        if self.chkUpdateSavers.isChecked():
            ret = _fu.update_savers(self.spnVersion.value())

        if self.chkFormat.isChecked():
            _fu.set_format(project_format_object(cur_project))

        osplus.set_env("EPP_CURPROJECT", self.cmbProject.currentText())
        osplus.set_env("EPP_CURSHOT", self.cmbShot.currentText())

        COMP_ROOT_DIR = os.path.dirname(self.COMP_FILEPATH)
        if os.path.isdir(COMP_ROOT_DIR):
            res = _fu.set_pathmap("Comps:", COMP_ROOT_DIR)
            log.info("Setting Comps: PathMap to {0} ({1})".format(COMP_ROOT_DIR, res[1]))

        super(SaveAsDialog, self).accept()
Ejemplo n.º 4
0
    def accept(self):
        """
        Check the connection.
        """

        _fu = fu_controller()

        if not _fu.status(True):
            QMessageBox.critical(self, "Error", "Fusion not running.")
            return

        if os.path.isfile(self.COMP_FILEPATH):
            ret = QMessageBox.information(self, "Question", "Composition does already exist.\nOverwrite '{0}'".format(os.path.basename(self.COMP_FILEPATH)), QMessageBox.Yes | QMessageBox.No)
            if ret == QMessageBox.No:
                return

        cur_project = self.cmbProject.currentText()
        cur_shot = self.cmbShot.currentText()

        ret = _fu.save_comp(self.COMP_FILEPATH, {"project": str(cur_project), "shot": str(cur_shot)})

        if not ret[0]:
            QMessageBox.critical(self, "Error", ret[1])
            return

        self.hide()

        if self.chkUpdateSavers.isChecked():
            ret = _fu.update_savers(self.spnVersion.value())

        if self.chkFormat.isChecked():
            _fu.set_format(project_format_object(cur_project))

        osplus.set_env("EPP_CURPROJECT", self.cmbProject.currentText())
        osplus.set_env("EPP_CURSHOT", self.cmbShot.currentText())

        super(SaveAsDialog, self).accept()