Skip to content

Commit

Permalink
Blender LDraw Render - cleanup command calls #416
Browse files Browse the repository at this point in the history
  • Loading branch information
trevorsandy committed May 8, 2023
1 parent fbfa67a commit d82597e
Show file tree
Hide file tree
Showing 15 changed files with 36 additions and 36 deletions.
2 changes: 1 addition & 1 deletion builds/linux/obs/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Last Update: July 19, 2020
# Copyright (C) 2017 - 2023 by Trevor SANDY
pkgname=lpub3d
pkgver=2.4.6.3352
pkgver=2.4.6.3353
pkgrel=1
pkgdesc="An LDraw Building Instruction Editor"
url="https://github.com/trevorsandy/lpub3d.git"
Expand Down
2 changes: 1 addition & 1 deletion builds/linux/obs/alldeps/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Last Update: July 19, 2020
# Copyright (C) 2017 - 2023 by Trevor SANDY
pkgname=lpub3d
pkgver=2.4.6.3352
pkgver=2.4.6.3353
pkgrel=1
pkgdesc="An LDraw Building Instruction Editor"
url="https://github.com/trevorsandy/lpub3d.git"
Expand Down
6 changes: 3 additions & 3 deletions builds/linux/obs/alldeps/debian/changelog
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
lpub3d (2.4.6.3352) debian; urgency=medium
lpub3d (2.4.6.3353) debian; urgency=medium

* LPub3D version 2.4.6.241.3352_20230508 for Linux
* LPub3D version 2.4.6.242.3353_20230508 for Linux

-- Trevor SANDY <[email protected]> Mon, 08 May 2023 15:19:37 +0200
-- Trevor SANDY <[email protected]> Mon, 08 May 2023 15:20:02 +0200
2 changes: 1 addition & 1 deletion builds/linux/obs/alldeps/debian/lpub3d.dsc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Format: 1.0
Source: lpub3d
Binary: lpub3d
Architecture: any
Version: 2.4.6.3352
Version: 2.4.6.3353
Maintainer: Trevor SANDY <[email protected]>
Homepage: https://trevorsandy.github.io/lpub3d/
Standards-Version: 3.9.7
Expand Down
4 changes: 2 additions & 2 deletions builds/linux/obs/alldeps/lpub3d.spec
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ BuildRequires: fdupes
Summary: An LDraw Building Instruction Editor
Name: lpub3d
Icon: lpub3d.xpm
Version: 2.4.6.3352
Version: 2.4.6.3353
Release: <B_CNT>%{?dist}
URL: https://trevorsandy.github.io/lpub3d
Vendor: Trevor SANDY
Expand Down Expand Up @@ -797,7 +797,7 @@ update-desktop-database || true
%endif

%changelog
* Mon May 08 2023 - trevor.dot.sandy.at.gmail.dot.com 2.4.6.3352
* Mon May 08 2023 - trevor.dot.sandy.at.gmail.dot.com 2.4.6.3353
- LPub3D 2.4.4 enhancements and fixes - see RELEASE_NOTES for details

* Tue May 31 2022 - trevor dot sandy at gmail dot com 2.4.4.2670
Expand Down
6 changes: 3 additions & 3 deletions builds/linux/obs/debian/changelog
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
lpub3d (2.4.6.3352) debian; urgency=medium
lpub3d (2.4.6.3353) debian; urgency=medium

* LPub3D version 2.4.6.241.3352_20230508 for Linux
* LPub3D version 2.4.6.242.3353_20230508 for Linux

-- Trevor SANDY <[email protected]> Mon, 08 May 2023 15:19:39 +0200
-- Trevor SANDY <[email protected]> Mon, 08 May 2023 15:20:04 +0200
2 changes: 1 addition & 1 deletion builds/linux/obs/debian/lpub3d.dsc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Format: 1.0
Source: lpub3d
Binary: lpub3d
Architecture: any
Version: 2.4.6.3352
Version: 2.4.6.3353
Maintainer: Trevor SANDY <[email protected]>
Homepage: https://trevorsandy.github.io/lpub3d/
Standards-Version: 3.9.7
Expand Down
4 changes: 2 additions & 2 deletions builds/linux/obs/lpub3d.spec
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ BuildRequires: fdupes
Summary: An LDraw Building Instruction Editor
Name: lpub3d
Icon: lpub3d.xpm
Version: 2.4.6.3352
Version: 2.4.6.3353
Release: 1%{?dist}
URL: https://trevorsandy.github.io/lpub3d
Vendor: Trevor SANDY
Expand Down Expand Up @@ -313,7 +313,7 @@ update-desktop-database || true
%endif

%changelog
* Mon May 08 2023 - trevor.dot.sandy.at.gmail.dot.com 2.4.6.3352
* Mon May 08 2023 - trevor.dot.sandy.at.gmail.dot.com 2.4.6.3353
- LPub3D 2.4.4 enhancements and fixes - see RELEASE_NOTES for details

* Tue May 31 2022 - trevor dot sandy at gmail dot com 2.4.4.2670
Expand Down
2 changes: 1 addition & 1 deletion builds/utilities/version.info
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2 4 6 241 3352 1c89a9758
2 4 6 242 3353 fbfa67a3a
6 changes: 3 additions & 3 deletions gitversion.pri
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ equals(GIT_DIR, undefined) {

# Check if we do not have a valid version number (i.e. no version tag found)
isEmpty(GIT_VERSION) {
GIT_REVISION = 241
GIT_REVISION = 242
GIT_SHA = $$system($$GIT_BASE_COMMAND rev-parse --short HEAD 2> $$NULL_DEVICE)
GIT_COMMIT = $$system($$GIT_BASE_COMMAND rev-list --count HEAD 2> $$NULL_DEVICE)
GIT_VERSION = v$${VERSION}-$${GIT_REVISION}-$${GIT_SHA}
Expand Down Expand Up @@ -69,7 +69,7 @@ equals(GIT_DIR, undefined) {
# Get commit count
GIT_COMMIT = $$system($$GIT_BASE_COMMAND rev-list --count HEAD 2> $$NULL_DEVICE)
isEmpty(GIT_COMMIT) {
GIT_COMMIT = 3352
GIT_COMMIT = 3353
message("~~~ ERROR! GIT_COMMIT NOT DEFINED, USING $$GIT_COMMIT ~~~")
}

Expand Down Expand Up @@ -117,7 +117,7 @@ if (equals(USE_GIT_VER_FILE, true)|equals(USE_VERSION_INFO_VAR, true)) {
GIT_VERSION = $$cat($$GIT_VER_FILE, lines)
} else {
message("~~~ ERROR! $$GIT_DIR_ENV VERSION_INFO FILE $$GIT_VER_FILE NOT FOUND ~~~")
GIT_VERSION = $${VERSION}.241.3352.1c89a9758
GIT_VERSION = $${VERSION}.242.3353.fbfa67a3a
message("~~~ GIT_DIR [$$GIT_DIR_ENV, USING VERSION] $$GIT_VERSION ~~~")
GIT_VERSION ~= s/\./" "
}
Expand Down
8 changes: 4 additions & 4 deletions mainApp/blenderpreferences.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1482,9 +1482,9 @@ void BlenderPreferences::configureBlender(bool testBlender)
// Setup
enum ProcEnc { PR_OK, PR_FAIL, PR_WAIT, PR_INSTALL, PR_TEST };
QString const blenderExe = QDir::toNativeSeparators(blenderFile);
QString const blenderDir = QString("%1/Blender").arg(Preferences::lpub3d3rdPartyConfigDir);
QString const blenderSetupDir = QString("%1/setup").arg(blenderDir);
QString const blenderConfigDir = QString("%1/config").arg(blenderDir);
QString const blenderDir = QDir::toNativeSeparators(QString("%1/Blender").arg(Preferences::lpub3d3rdPartyConfigDir));
QString const blenderSetupDir = QDir::toNativeSeparators(QString("%1/setup").arg(blenderDir));
QString const blenderConfigDir = QDir::toNativeSeparators(QString("%1/config").arg(blenderDir));
QString const blenderExeCompare = QDir::toNativeSeparators(Preferences::blenderExe).toLower();
QString const blenderInstallFile = QDir::toNativeSeparators(QString("%1/%2").arg(blenderDir).arg(VER_BLENDER_ADDON_INSTALL_FILE));
QString const blenderTestString = QLatin1String("###TEST_BLENDER###");
Expand Down Expand Up @@ -1533,7 +1533,7 @@ void BlenderPreferences::configureBlender(bool testBlender)
#endif
}

if (! process->waitForStarted()) {
if (!process->waitForStarted()) {
message = tr("Cannot start Blender %1 process.\n%2")
.arg(processAction)
.arg(QString(process->readAllStandardError()));
Expand Down
2 changes: 1 addition & 1 deletion mainApp/docs/README.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
LPub3D 2.4.6.241.3352 (08 05 2023 15:19:39)
LPub3D 2.4.6.242.3353 (08 05 2023 15:20:04)

Features, enhancements, fixes and changes
------------
Expand Down
2 changes: 1 addition & 1 deletion mainApp/docs/RELEASE_NOTES.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<table class="tg">
<tr>
<th class="tg-0pky">
<h4><a id="LPub3D_0"></a>LPub3D 2.4.6.241.3352 (08 05 2023 15:19:39)</h4>
<h4><a id="LPub3D_0"></a>LPub3D 2.4.6.242.3353 (08 05 2023 15:20:04)</h4>
<hr>
<p>
<span class="tg-1pky">LPub3D Official release.</span><br>
Expand Down
4 changes: 2 additions & 2 deletions mainApp/extras/LPub3D_Npp_UDL.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
;;
;; Author......: Trevor SANDY
;; Name........: LPub3D_Npp_UDL.xml
;; Version.....: 2.4.6.241.3352
;; Last Update.: Mon, 08 May 2023 15:19:39 +0200
;; Version.....: 2.4.6.242.3353
;; Last Update.: Mon, 08 May 2023 15:20:04 +0200
;; License.....: GPLv3
;; Homepage....: https://trevorsandy.github.io/lpub3d
;; Copyright (C) 2021 - 2023 by Trevor SANDY
Expand Down
20 changes: 10 additions & 10 deletions mainApp/renderdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -566,10 +566,10 @@ void RenderDialog::on_RenderButton_clicked()
if (mImportOnly) {
pythonExpression.append(", import_only=True");

Arguments << QString("--window-geometry");
Arguments << QString("200 100 1440 900");
Arguments << QLatin1String("--window-geometry");
Arguments << QLatin1String("200 100 1440 900");
} else {
Arguments << QString("--background");
Arguments << QLatin1String("--background");
lpub->getAct("blenderRenderAct.4")->setEnabled(false);
}

Expand All @@ -589,9 +589,9 @@ void RenderDialog::on_RenderButton_clicked()
if (QFileInfo(scriptDir).exists()) {

#ifdef Q_OS_WIN
scriptName = "render_ldraw_model.bat";
scriptName = QLatin1String("render_ldraw_model.bat");
#else
scriptName = "render_ldraw_model.sh";
scriptName = QLatin1String("render_ldraw_model.sh");
#endif
scriptCommand = QString("%1 %2").arg(Preferences::blenderExe).arg(Arguments.join(" "));

Expand All @@ -602,15 +602,15 @@ void RenderDialog::on_RenderButton_clicked()
emit gui->messageSig(LOG_INFO, message);
#endif
if (mImportOnly)
scriptCommand.append(QString(" > %1").arg(GetLogFileName(true/*stdOut*/)));
scriptCommand.append(QString(" > %1").arg(QDir::toNativeSeparators(GetLogFileName(true/*stdOut*/))));

script.setFileName(QString("%1/%2").arg(scriptDir).arg(scriptName));
if(script.open(QIODevice::WriteOnly | QIODevice::Text)) {
QTextStream stream(&script);
#ifdef Q_OS_WIN
stream << "@ECHO OFF &SETLOCAL" << lpub_endl;
stream << QLatin1String("@ECHO OFF &SETLOCAL") << lpub_endl;
#else
stream << "#!/bin/bash" << lpub_endl;
stream << QLatin1String("#!/bin/bash") << lpub_endl;
#endif
stream << scriptCommand << lpub_endl;
script.close();
Expand All @@ -636,9 +636,9 @@ void RenderDialog::on_RenderButton_clicked()
QThread::sleep(2);

#ifdef Q_OS_WIN
shellProgram = "cmd.exe";
shellProgram = QLatin1String("cmd.exe");
#else
shellProgram = "/bin/sh";
shellProgram = QLatin1String("/bin/sh");
#endif

mProcess = new RenderProcess(this);
Expand Down

0 comments on commit d82597e

Please sign in to comment.