Example #1
0
    def saveas_func(self, *args):
        success, filepath = simple_file_dialog(
            "save",
            "choose new location to save project",
            filter="Premiere project (*.prproj)")
        if not success:
            return
        if os.path.isfile(filepath):
            os.remove(filepath)
        pymiere.objects.app.project.saveAs(filepath)


if __name__ == "__main__":
    # handle pyqt silent exceptions
    sys._excepthook = sys.excepthook

    def exception_hook(exctype, value, traceback):
        print(exctype, value, traceback)
        sys._excepthook(exctype, value, traceback)
        sys.exit(1)

    sys.excepthook = exception_hook

    app = QApplication([])
    pymiere_ui = PymiereControl()
    if not WINDOWS_SYSTEM:
        pymiere_ui.ui_id = app.applicationPid()
    pymiere_ui.show()
    app.exec_()