Require Blender 2.90 & other fixes

This commit is contained in:
Luke Street 2020-09-04 03:33:46 -04:00
parent 61dbc1628e
commit 362434bea6
3 changed files with 7 additions and 3 deletions

View File

@ -51,7 +51,7 @@ hecl::SystemString FindBlender(int& major, int& minor) {
/* No steam; try default */ /* No steam; try default */
wchar_t progFiles[256]; wchar_t progFiles[256];
if (GetEnvironmentVariableW(L"ProgramFiles", progFiles, 256)) { if (GetEnvironmentVariableW(L"ProgramFiles", progFiles, 256)) {
_snwprintf(BLENDER_BIN_BUF, 2048, L"%s\\Blender Foundation\\Blender 2.83\\blender.exe", progFiles); _snwprintf(BLENDER_BIN_BUF, 2048, L"%s\\Blender Foundation\\Blender 2.90\\blender.exe", progFiles);
blenderBin = BLENDER_BIN_BUF; blenderBin = BLENDER_BIN_BUF;
if (!RegFileExists(blenderBin)) if (!RegFileExists(blenderBin))
blenderBin = nullptr; blenderBin = nullptr;

View File

@ -83,7 +83,8 @@ MainWindow::MainWindow(QWidget* parent)
m_ui->processOutput->setFont(mFont); m_ui->processOutput->setFont(mFont);
m_cursor = QTextCursor(m_ui->processOutput->document()); m_cursor = QTextCursor(m_ui->processOutput->document());
connect(m_ui->saveLogButton, &QPushButton::pressed, this, [this] { connect(m_ui->saveLogButton, &QPushButton::pressed, this, [this] {
QString defaultFileName = QStringLiteral("urde-") + QDateTime::currentDateTime().toString(Qt::DateFormat::ISODate); QString defaultFileName = QStringLiteral("urde-") + QDateTime::currentDateTime().toString(Qt::DateFormat::ISODate) +
QStringLiteral(".log");
defaultFileName.replace(QLatin1Char(':'), QLatin1Char('-')); defaultFileName.replace(QLatin1Char(':'), QLatin1Char('-'));
const QString fileName = const QString fileName =
QFileDialog::getSaveFileName(this, tr("Save Log"), defaultFileName, QStringLiteral("*.log")); QFileDialog::getSaveFileName(this, tr("Save Log"), defaultFileName, QStringLiteral("*.log"));
@ -525,6 +526,9 @@ void MainWindow::initSlots() {
setPath(dialog.selectedFiles().at(0)); setPath(dialog.selectedFiles().at(0));
}); });
connect(m_ui->pathEdit, &QLineEdit::editingFinished, [this]() {
setPath(m_ui->pathEdit->text());
});
connect(m_ui->downloadButton, &QPushButton::clicked, this, &MainWindow::onDownloadPressed); connect(m_ui->downloadButton, &QPushButton::clicked, this, &MainWindow::onDownloadPressed);
} }

View File

@ -31,7 +31,7 @@ public:
int columnCount(const QModelIndex& parent = QModelIndex()) const override; int columnCount(const QModelIndex& parent = QModelIndex()) const override;
QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const override; QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const override;
QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const override; QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const override;
bool isBlenderVersionOk() const { return m_blendMajor == 2 && m_blendMinor == 83; } bool isBlenderVersionOk() const { return m_blendMajor == 2 && m_blendMinor == 90; }
void updateFreeDiskSpace(const QString& path); void updateFreeDiskSpace(const QString& path);
}; };