From 3c4d2a09d0d81d6afa87b160dcb21d0e09337a77 Mon Sep 17 00:00:00 2001 From: Trevor SANDY Date: Mon, 8 May 2023 15:09:04 +0200 Subject: [PATCH] Fade and highlight - model LPubFadeHighlight setup #710 --- builds/linux/obs/PKGBUILD | 2 +- builds/linux/obs/alldeps/PKGBUILD | 2 +- builds/linux/obs/alldeps/debian/changelog | 6 +++--- builds/linux/obs/alldeps/debian/lpub3d.dsc | 2 +- builds/linux/obs/alldeps/lpub3d.spec | 4 ++-- builds/linux/obs/debian/changelog | 6 +++--- builds/linux/obs/debian/lpub3d.dsc | 2 +- builds/linux/obs/lpub3d.spec | 4 ++-- builds/utilities/version.info | 2 +- gitversion.pri | 6 +++--- lclib/common/lc_model.cpp | 20 +++++++++++++------- lclib/common/piece.cpp | 9 ++++++++- mainApp/docs/README.txt | 2 +- mainApp/docs/RELEASE_NOTES.html | 2 +- mainApp/extras/LPub3D_Npp_UDL.xml | 4 ++-- 15 files changed, 43 insertions(+), 30 deletions(-) diff --git a/builds/linux/obs/PKGBUILD b/builds/linux/obs/PKGBUILD index ebcda4eba..6f2db2b98 100755 --- a/builds/linux/obs/PKGBUILD +++ b/builds/linux/obs/PKGBUILD @@ -2,7 +2,7 @@ # Last Update: July 19, 2020 # Copyright (C) 2017 - 2023 by Trevor SANDY pkgname=lpub3d -pkgver=2.4.6.3327 +pkgver=2.4.6.3328 pkgrel=1 pkgdesc="An LDraw Building Instruction Editor" url="https://github.com/trevorsandy/lpub3d.git" diff --git a/builds/linux/obs/alldeps/PKGBUILD b/builds/linux/obs/alldeps/PKGBUILD index 9e12c7451..78d176d98 100644 --- a/builds/linux/obs/alldeps/PKGBUILD +++ b/builds/linux/obs/alldeps/PKGBUILD @@ -2,7 +2,7 @@ # Last Update: July 19, 2020 # Copyright (C) 2017 - 2023 by Trevor SANDY pkgname=lpub3d -pkgver=2.4.6.3327 +pkgver=2.4.6.3328 pkgrel=1 pkgdesc="An LDraw Building Instruction Editor" url="https://github.com/trevorsandy/lpub3d.git" diff --git a/builds/linux/obs/alldeps/debian/changelog b/builds/linux/obs/alldeps/debian/changelog index 0b041ac9d..9995c2c73 100644 --- a/builds/linux/obs/alldeps/debian/changelog +++ b/builds/linux/obs/alldeps/debian/changelog @@ -1,5 +1,5 @@ -lpub3d (2.4.6.3327) debian; urgency=medium +lpub3d (2.4.6.3328) debian; urgency=medium - * LPub3D version 2.4.6.216.3327_20230508 for Linux + * LPub3D version 2.4.6.217.3328_20230508 for Linux - -- Trevor SANDY Mon, 08 May 2023 15:08:34 +0200 + -- Trevor SANDY Mon, 08 May 2023 15:09:04 +0200 diff --git a/builds/linux/obs/alldeps/debian/lpub3d.dsc b/builds/linux/obs/alldeps/debian/lpub3d.dsc index 3a4df5304..d424cdb3d 100644 --- a/builds/linux/obs/alldeps/debian/lpub3d.dsc +++ b/builds/linux/obs/alldeps/debian/lpub3d.dsc @@ -2,7 +2,7 @@ Format: 1.0 Source: lpub3d Binary: lpub3d Architecture: any -Version: 2.4.6.3327 +Version: 2.4.6.3328 Maintainer: Trevor SANDY Homepage: https://trevorsandy.github.io/lpub3d/ Standards-Version: 3.9.7 diff --git a/builds/linux/obs/alldeps/lpub3d.spec b/builds/linux/obs/alldeps/lpub3d.spec index adbd848e9..ef3acc541 100644 --- a/builds/linux/obs/alldeps/lpub3d.spec +++ b/builds/linux/obs/alldeps/lpub3d.spec @@ -120,7 +120,7 @@ BuildRequires: fdupes Summary: An LDraw Building Instruction Editor Name: lpub3d Icon: lpub3d.xpm -Version: 2.4.6.3327 +Version: 2.4.6.3328 Release: %{?dist} URL: https://trevorsandy.github.io/lpub3d Vendor: Trevor SANDY @@ -797,7 +797,7 @@ update-desktop-database || true %endif %changelog -* Mon May 08 2023 - trevor.dot.sandy.at.gmail.dot.com 2.4.6.3327 +* Mon May 08 2023 - trevor.dot.sandy.at.gmail.dot.com 2.4.6.3328 - 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 diff --git a/builds/linux/obs/debian/changelog b/builds/linux/obs/debian/changelog index 0210883d6..eee4cd1cd 100644 --- a/builds/linux/obs/debian/changelog +++ b/builds/linux/obs/debian/changelog @@ -1,5 +1,5 @@ -lpub3d (2.4.6.3327) debian; urgency=medium +lpub3d (2.4.6.3328) debian; urgency=medium - * LPub3D version 2.4.6.216.3327_20230508 for Linux + * LPub3D version 2.4.6.217.3328_20230508 for Linux - -- Trevor SANDY Mon, 08 May 2023 15:08:36 +0200 + -- Trevor SANDY Mon, 08 May 2023 15:09:06 +0200 diff --git a/builds/linux/obs/debian/lpub3d.dsc b/builds/linux/obs/debian/lpub3d.dsc index 1111a7d4e..a87966ea6 100755 --- a/builds/linux/obs/debian/lpub3d.dsc +++ b/builds/linux/obs/debian/lpub3d.dsc @@ -2,7 +2,7 @@ Format: 1.0 Source: lpub3d Binary: lpub3d Architecture: any -Version: 2.4.6.3327 +Version: 2.4.6.3328 Maintainer: Trevor SANDY Homepage: https://trevorsandy.github.io/lpub3d/ Standards-Version: 3.9.7 diff --git a/builds/linux/obs/lpub3d.spec b/builds/linux/obs/lpub3d.spec index 08cfffb61..87935578e 100755 --- a/builds/linux/obs/lpub3d.spec +++ b/builds/linux/obs/lpub3d.spec @@ -82,7 +82,7 @@ BuildRequires: fdupes Summary: An LDraw Building Instruction Editor Name: lpub3d Icon: lpub3d.xpm -Version: 2.4.6.3327 +Version: 2.4.6.3328 Release: 1%{?dist} URL: https://trevorsandy.github.io/lpub3d Vendor: Trevor SANDY @@ -313,7 +313,7 @@ update-desktop-database || true %endif %changelog -* Mon May 08 2023 - trevor.dot.sandy.at.gmail.dot.com 2.4.6.3327 +* Mon May 08 2023 - trevor.dot.sandy.at.gmail.dot.com 2.4.6.3328 - 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 diff --git a/builds/utilities/version.info b/builds/utilities/version.info index 2a0ba4798..60f296cc2 100755 --- a/builds/utilities/version.info +++ b/builds/utilities/version.info @@ -1 +1 @@ -2 4 6 216 3327 9877f5e67 +2 4 6 217 3328 42e543b6b diff --git a/gitversion.pri b/gitversion.pri index 63cb38c28..25a715729 100644 --- a/gitversion.pri +++ b/gitversion.pri @@ -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 = 216 + GIT_REVISION = 217 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} @@ -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 = 3327 + GIT_COMMIT = 3328 message("~~~ ERROR! GIT_COMMIT NOT DEFINED, USING $$GIT_COMMIT ~~~") } @@ -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}.216.3327.9877f5e67 + GIT_VERSION = $${VERSION}.217.3328.42e543b6b message("~~~ GIT_DIR [$$GIT_DIR_ENV, USING VERSION] $$GIT_VERSION ~~~") GIT_VERSION ~= s/\./" " } diff --git a/lclib/common/lc_model.cpp b/lclib/common/lc_model.cpp index 918fc9ef9..04eb97d92 100644 --- a/lclib/common/lc_model.cpp +++ b/lclib/common/lc_model.cpp @@ -611,8 +611,9 @@ void lcModel::LoadLDraw(QIODevice& Device, Project* Project) Preferences.mHighlightNewParts = false; } } + else /*** LPub3D Mod end ***/ - else if (Token == QLatin1String("FILE")) + if (Token == QLatin1String("FILE")) { QString Name = LineStream.readAll().trimmed(); @@ -1376,30 +1377,35 @@ void lcModel::GetScene(lcScene* Scene, const lcCamera* ViewCamera, bool AllowHig if (mPieceInfo) mPieceInfo->AddRenderMesh(*Scene); +/*** LPub3D Mod - lpub fade highlight ***/ + bool LPubFade = gApplication->LPubFadeHighlight(); +/*** LPub3D Mod - export ***/ + for (const lcPiece* Piece : mPieces) { if (Piece->IsVisible(mCurrentStep)) { /*** LPub3D Mod - lpub fade highlight ***/ - bool LPubFade = gApplication->LPubFadeHighlight(); + bool Fade = AllowFade; + bool Highlight = AllowHighlight; /*** LPub3D Mod - export ***/ if (lcGetActiveProject()->IsExportingHTML()) { const lcStep StepShow = Piece->GetStepShow(); - AllowFade &= StepShow < mCurrentStep; - AllowHighlight &= StepShow == mCurrentStep; + Fade &= StepShow < mCurrentStep; + Highlight &= StepShow == mCurrentStep; } /*** LPub3D Mod end ***/ else if (!LPubFade) { - AllowFade &= Piece->GetLPubFade(); - AllowHighlight &= Piece->GetLPubHighlight(); + Fade &= Piece->GetLPubFade(); + Highlight &= Piece->GetLPubHighlight(); } else { LPubFade &= Piece->GetLPubFade(); } - Piece->AddMainModelRenderMeshes(Scene, AllowHighlight, AllowFade, LPubFade); + Piece->AddMainModelRenderMeshes(Scene, Highlight, Fade, LPubFade); /*** LPub3D Mod end ***/ } } diff --git a/lclib/common/piece.cpp b/lclib/common/piece.cpp index f9315a107..1d29e1485 100644 --- a/lclib/common/piece.cpp +++ b/lclib/common/piece.cpp @@ -34,6 +34,10 @@ lcPiece::lcPiece(PieceInfo* Info) /*** LPub3D Mod end ***/ /*** LPub3D Mod - Piece modified ***/ mPieceModified = 0; +/*** LPub3D Mod end ***/ +/*** LPub3D Mod - lpub fade highlight ***/ + mLPubFade = false; + mLPubHighlight = false; /*** LPub3D Mod end ***/ mPivotMatrix = lcMatrix44Identity(); } @@ -58,7 +62,10 @@ lcPiece::lcPiece(const lcPiece& Other) /*** LPub3D Mod - Selected Parts ***/ mLineTypeIndex = -1; /*** LPub3D Mod end ***/ - +/*** LPub3D Mod - lpub fade highlight ***/ + mLPubFade = false; + mLPubHighlight = false; +/*** LPub3D Mod end ***/ mPivotMatrix = Other.mPivotMatrix; mPivotPointValid = Other.mPivotPointValid; diff --git a/mainApp/docs/README.txt b/mainApp/docs/README.txt index eac90c5e5..7a398dfb1 100755 --- a/mainApp/docs/README.txt +++ b/mainApp/docs/README.txt @@ -1,4 +1,4 @@ -LPub3D 2.4.6.216.3327 (08 05 2023 15:08:36) +LPub3D 2.4.6.217.3328 (08 05 2023 15:09:06) Features, enhancements, fixes and changes ------------ diff --git a/mainApp/docs/RELEASE_NOTES.html b/mainApp/docs/RELEASE_NOTES.html index 54445c711..2bcce0605 100644 --- a/mainApp/docs/RELEASE_NOTES.html +++ b/mainApp/docs/RELEASE_NOTES.html @@ -18,7 +18,7 @@
-

LPub3D 2.4.6.216.3327 (08 05 2023 15:08:36)

+

LPub3D 2.4.6.217.3328 (08 05 2023 15:09:06)


LPub3D Official release.
diff --git a/mainApp/extras/LPub3D_Npp_UDL.xml b/mainApp/extras/LPub3D_Npp_UDL.xml index c94b3d5ad..ed0a101dd 100644 --- a/mainApp/extras/LPub3D_Npp_UDL.xml +++ b/mainApp/extras/LPub3D_Npp_UDL.xml @@ -14,8 +14,8 @@ ;; ;; Author......: Trevor SANDY ;; Name........: LPub3D_Npp_UDL.xml -;; Version.....: 2.4.6.216.3327 -;; Last Update.: Mon, 08 May 2023 15:08:36 +0200 +;; Version.....: 2.4.6.217.3328 +;; Last Update.: Mon, 08 May 2023 15:09:06 +0200 ;; License.....: GPLv3 ;; Homepage....: https://trevorsandy.github.io/lpub3d ;; Copyright (C) 2021 - 2023 by Trevor SANDY