Require Blender 2.82

This commit is contained in:
Luke Street 2020-04-14 02:52:01 -04:00
parent 906c476139
commit c17561c6b0
4 changed files with 7 additions and 6 deletions

View File

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

View File

@ -284,7 +284,7 @@ void MainWindow::onBinaryDownloaded(QuaZip& file) {
m_ui->downloadErrorLabel->setText(tr("Download successful - Press 'Extract' to continue."), true);
}
if (!err && !m_ui->sysReqTable->isBlenderVersionOk()) {
m_ui->downloadErrorLabel->setText(tr("Blender 2.81+ must be installed. Please download via Steam or blender.org."));
m_ui->downloadErrorLabel->setText(tr("Blender 2.82 must be installed. Please download via Steam or blender.org."));
}
}
@ -327,7 +327,7 @@ void MainWindow::enableOperations() {
}
if (!m_ui->sysReqTable->isBlenderVersionOk()) {
insertContinueNote(tr("Blender 2.81+ must be installed. Please download via Steam or blender.org."));
insertContinueNote(tr("Blender 2.82 must be installed. Please download via Steam or blender.org."));
} else if (m_ui->launchBtn->isEnabled()) {
insertContinueNote(tr("Package complete - Press 'Launch' to start URDE."));
} else if (m_ui->packageBtn->isEnabled()) {
@ -552,6 +552,7 @@ void MainWindow::insertContinueNote(const QString& text) {
m_cursor.insertBlock();
m_ui->processOutput->ensureCursorVisible();
}
void MainWindow::onUpdateTrackChanged(int index) {
qDebug() << "Track changed from " << m_settings.value(QStringLiteral("update_track")) << " to "
<< skUpdateTracks[index];

View File

@ -125,7 +125,7 @@ SysReqTableModel::SysReqTableModel(QObject* parent) : QAbstractTableModel(parent
m_osVersion = tr("Linux");
#endif
hecl::blender::FindBlender(m_blendMajor, m_blendMinor);
if (m_blendMajor) {
if (m_blendMajor != 0) {
m_blendVersionStr = tr("Blender %1.%2").arg(QString::number(m_blendMajor), QString::number(m_blendMinor));
} else {
m_blendVersionStr = tr("Not Found");
@ -200,7 +200,7 @@ QVariant SysReqTableModel::data(const QModelIndex& index, int role) const {
return {};
#endif
case 5:
return tr("Blender 2.81");
return tr("Blender 2.82");
}
} else if (index.column() == 1) {
/* Your System */

View File

@ -31,7 +31,7 @@ public:
int columnCount(const QModelIndex& parent = QModelIndex()) 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;
bool isBlenderVersionOk() const { return m_blendMajor > 2 || (m_blendMajor == 2 && m_blendMinor >= 81); }
bool isBlenderVersionOk() const { return m_blendMajor == 2 && m_blendMinor == 82; }
void updateFreeDiskSpace(const QString& path);
};