From e05feb642fcc63bc13b64274e6184269242eee07 Mon Sep 17 00:00:00 2001 From: Randy Zwitch Date: Sat, 15 Jul 2023 13:18:31 -0400 Subject: [PATCH 01/18] Update PULL_REQUEST_TEMPLATE.md When clicked from PR, the link is broken (Chrome, Windows 11). It appears that GitHub might be case-sensitive w.r.t URLs. --- .github/PULL_REQUEST_TEMPLATE.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index a6327de3b6..8a014c17bc 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -28,6 +28,6 @@ This fixes... OR This improves... --> - [ ] My code follows the style guidelines of this project as described in [UltiMaker Meta](https://github.com/Ultimaker/Meta) and [Cura QML best practices](https://github.com/Ultimaker/Cura/wiki/QML-Best-Practices) -- [ ] I have read the [Contribution guide](https://github.com/Ultimaker/Cura/blob/main/contributing.md) +- [ ] I have read the [Contribution guide](https://github.com/Ultimaker/Cura/blob/main/CONTRIBUTING.md) - [ ] I have commented my code, particularly in hard-to-understand areas -- [ ] I have uploaded any files required to test this change \ No newline at end of file +- [ ] I have uploaded any files required to test this change From 4d99dabefcae552affff698725f887f666bf5db3 Mon Sep 17 00:00:00 2001 From: "saumya.jain" Date: Mon, 17 Jul 2023 10:42:07 +0200 Subject: [PATCH 02/18] Discription added in the tooltip about skirt presence even after disabling it CURA-10758 --- .../Recommended/RecommendedAdhesionSelector.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/qml/PrintSetupSelector/Recommended/RecommendedAdhesionSelector.qml b/resources/qml/PrintSetupSelector/Recommended/RecommendedAdhesionSelector.qml index 2183ef7d5e..07e9c1ffaa 100644 --- a/resources/qml/PrintSetupSelector/Recommended/RecommendedAdhesionSelector.qml +++ b/resources/qml/PrintSetupSelector/Recommended/RecommendedAdhesionSelector.qml @@ -17,7 +17,7 @@ RecommendedSettingSection enableSectionSwitchVisible: platformAdhesionType.properties.enabled === "True" enableSectionSwitchChecked: platformAdhesionType.properties.value !== "skirt" && platformAdhesionType.properties.value !== "none" enableSectionSwitchEnabled: recommendedPrintSetup.settingsEnabled - tooltipText: catalog.i18nc("@label", "Enable printing a brim or raft. This will add a flat area around or under your object which is easy to cut off afterwards.") + tooltipText: catalog.i18nc("@label", "Enable printing a brim or raft. This will add a flat area around or under your object which is easy to cut off afterwards. Disabling it results in a skirt around object by default.") property var curaRecommendedMode: Cura.RecommendedMode {} From 62d3e1cf40863064a4a2186a5562f30a3d5a37fa Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Mon, 17 Jul 2023 12:55:52 +0200 Subject: [PATCH 03/18] Automatically scroll down in crash handler It was reaaaaaly annoying me that people would post screenshots all the time. Those screenshots would never include the info you need, because it would only capture the top of the exception / logs. --- cura/CrashHandler.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cura/CrashHandler.py b/cura/CrashHandler.py index e6214d7073..e2f20355c7 100644 --- a/cura/CrashHandler.py +++ b/cura/CrashHandler.py @@ -22,7 +22,7 @@ except ImportError: from PyQt6.QtCore import QT_VERSION_STR, PYQT_VERSION_STR, QUrl from PyQt6.QtWidgets import QDialog, QDialogButtonBox, QVBoxLayout, QLabel, QTextEdit, QGroupBox, QCheckBox, QPushButton -from PyQt6.QtGui import QDesktopServices +from PyQt6.QtGui import QDesktopServices, QTextCursor from UM.Application import Application from UM.Logger import Logger @@ -309,7 +309,7 @@ class CrashHandler: trace = "".join(trace_list) text_area.setText(trace) text_area.setReadOnly(True) - + text_area.moveCursor(QTextCursor.MoveOperation.End) # Move cursor to end, so we see last bit of the exception layout.addWidget(text_area) group.setLayout(layout) @@ -400,7 +400,7 @@ class CrashHandler: text_area.setText(logdata) text_area.setReadOnly(True) - + text_area.moveCursor(QTextCursor.MoveOperation.End) # Move cursor to end, so we see last bit of the log layout.addWidget(text_area) group.setLayout(layout) From 228a3e821e3e9e295130904844f800fe287cc27f Mon Sep 17 00:00:00 2001 From: MariMakes <40423138+MariMakes@users.noreply.github.com> Date: Tue, 18 Jul 2023 12:06:26 +0200 Subject: [PATCH 04/18] Add Support Structure to Basic We show this setting in recommended, so it's safe to say we can show it in basic. --- resources/setting_visibility/basic.cfg | 1 + 1 file changed, 1 insertion(+) diff --git a/resources/setting_visibility/basic.cfg b/resources/setting_visibility/basic.cfg index 927989fee3..0193eb26ba 100644 --- a/resources/setting_visibility/basic.cfg +++ b/resources/setting_visibility/basic.cfg @@ -45,6 +45,7 @@ support_extruder_nr support_type support_angle support_offset +support_structure [platform_adhesion] prime_blob_enable From 1e240e32292557fb4b5bbdb3eb3011894260a2e2 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Fri, 21 Jul 2023 10:57:39 +0200 Subject: [PATCH 05/18] Let intent selection use the quality_definition instead of direct def The issue was that sometimes intents are also shared. CURA-10788 --- cura/Machines/Models/IntentSelectionModel.py | 19 ++++++++++--------- cura/Settings/CuraContainerStack.py | 4 ++-- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/cura/Machines/Models/IntentSelectionModel.py b/cura/Machines/Models/IntentSelectionModel.py index 603244a12b..3df94e4ad8 100644 --- a/cura/Machines/Models/IntentSelectionModel.py +++ b/cura/Machines/Models/IntentSelectionModel.py @@ -71,15 +71,15 @@ class IntentSelectionModel(ListModel): def _update(self) -> None: Logger.log("d", "Updating {model_class_name}.".format(model_class_name = self.__class__.__name__)) - - global_stack = cura.CuraApplication.CuraApplication.getInstance().getGlobalContainerStack() + cura_application = cura.CuraApplication.CuraApplication.getInstance() + global_stack = cura_application.getGlobalContainerStack() if global_stack is None: self.setItems([]) Logger.log("d", "No active GlobalStack, set quality profile model as empty.") return # Check for material compatibility - if not cura.CuraApplication.CuraApplication.getInstance().getMachineManager().activeMaterialsCompatible(): + if not cura_application.getMachineManager().activeMaterialsCompatible(): Logger.log("d", "No active material compatibility, set quality profile model as empty.") self.setItems([]) return @@ -101,17 +101,18 @@ class IntentSelectionModel(ListModel): else: # There can be multiple intents with the same category, use one of these # intent-metadata's for the icon/description defintions for the intent - intent_metadata = cura.CuraApplication.CuraApplication \ - .getInstance() \ - .getContainerRegistry() \ - .findContainersMetadata(type="intent", definition=global_stack.definition.getId(), - intent_category=category)[0] + + + + intent_metadata = cura_application.getContainerRegistry().findContainersMetadata(type="intent", + definition=global_stack.findInstanceContainerDefinitionId(global_stack.definition), + intent_category=category)[0] intent_name = intent_metadata.get("name", category.title()) icon = intent_metadata.get("icon", None) description = intent_metadata.get("description", None) - if icon is not None: + if icon is not None and icon != '': try: icon = QUrl.fromLocalFile( Resources.getPath(cura.CuraApplication.CuraApplication.ResourceTypes.ImageFiles, icon)) diff --git a/cura/Settings/CuraContainerStack.py b/cura/Settings/CuraContainerStack.py index 41502f8874..b5b8a1b721 100755 --- a/cura/Settings/CuraContainerStack.py +++ b/cura/Settings/CuraContainerStack.py @@ -359,7 +359,7 @@ class CuraContainerStack(ContainerStack): return self.definition @classmethod - def _findInstanceContainerDefinitionId(cls, machine_definition: DefinitionContainerInterface) -> str: + def findInstanceContainerDefinitionId(cls, machine_definition: DefinitionContainerInterface) -> str: """Find the ID that should be used when searching for instance containers for a specified definition. This handles the situation where the definition specifies we should use a different definition when @@ -379,7 +379,7 @@ class CuraContainerStack(ContainerStack): Logger.log("w", "Unable to find parent definition {parent} for machine {machine}", parent = quality_definition, machine = machine_definition.id) #type: ignore return machine_definition.id #type: ignore - return cls._findInstanceContainerDefinitionId(definitions[0]) + return cls.findInstanceContainerDefinitionId(definitions[0]) def getExtruderPositionValueWithDefault(self, key): """getProperty for extruder positions, with translation from -1 to default extruder number""" From 8b8e96429339f7543c7cd0f50c710a3539b74258 Mon Sep 17 00:00:00 2001 From: MariMakes <40423138+MariMakes@users.noreply.github.com> Date: Fri, 21 Jul 2023 11:34:02 +0200 Subject: [PATCH 06/18] Fix wrong licenses These seem to be wrong by accident. Let's update them to reflect the rest of Cura which falls under the LGPLv3 or higher. --- plugins/PostProcessingPlugin/PostProcessingPlugin.py | 2 +- plugins/PostProcessingPlugin/PostProcessingPlugin.qml | 2 +- plugins/PostProcessingPlugin/Script.py | 2 +- plugins/PostProcessingPlugin/scripts/ChangeAtZ.py | 2 +- plugins/PostProcessingPlugin/scripts/ColorMix.py | 2 +- plugins/PostProcessingPlugin/scripts/FilamentChange.py | 2 +- plugins/PostProcessingPlugin/scripts/RetractContinue.py | 2 +- plugins/PostProcessingPlugin/scripts/SearchAndReplace.py | 2 +- plugins/PostProcessingPlugin/scripts/Stretch.py | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/plugins/PostProcessingPlugin/PostProcessingPlugin.py b/plugins/PostProcessingPlugin/PostProcessingPlugin.py index fbb4214021..b3ef761af5 100644 --- a/plugins/PostProcessingPlugin/PostProcessingPlugin.py +++ b/plugins/PostProcessingPlugin/PostProcessingPlugin.py @@ -1,5 +1,5 @@ # Copyright (c) 2018 Jaime van Kessel, Ultimaker B.V. -# The PostProcessingPlugin is released under the terms of the AGPLv3 or higher. +# The PostProcessingPlugin is released under the terms of the LGPLv3 or higher. import configparser # The script lists are stored in metadata as serialised config files. import importlib.util diff --git a/plugins/PostProcessingPlugin/PostProcessingPlugin.qml b/plugins/PostProcessingPlugin/PostProcessingPlugin.qml index a80f304aaa..0f379479ba 100644 --- a/plugins/PostProcessingPlugin/PostProcessingPlugin.qml +++ b/plugins/PostProcessingPlugin/PostProcessingPlugin.qml @@ -1,5 +1,5 @@ // Copyright (c) 2022 Jaime van Kessel, Ultimaker B.V. -// The PostProcessingPlugin is released under the terms of the AGPLv3 or higher. +// The PostProcessingPlugin is released under the terms of the LGPLv3 or higher. import QtQuick 2.2 import QtQuick.Controls 2.15 diff --git a/plugins/PostProcessingPlugin/Script.py b/plugins/PostProcessingPlugin/Script.py index 1cc9b59c9c..be661e0889 100644 --- a/plugins/PostProcessingPlugin/Script.py +++ b/plugins/PostProcessingPlugin/Script.py @@ -1,6 +1,6 @@ # Copyright (c) 2015 Jaime van Kessel # Copyright (c) 2018 Ultimaker B.V. -# The PostProcessingPlugin is released under the terms of the AGPLv3 or higher. +# The PostProcessingPlugin is released under the terms of the LGPLv3 or higher. from typing import Optional, Any, Dict, TYPE_CHECKING, List from UM.Signal import Signal, signalemitter diff --git a/plugins/PostProcessingPlugin/scripts/ChangeAtZ.py b/plugins/PostProcessingPlugin/scripts/ChangeAtZ.py index 91b36389f3..2930623a93 100644 --- a/plugins/PostProcessingPlugin/scripts/ChangeAtZ.py +++ b/plugins/PostProcessingPlugin/scripts/ChangeAtZ.py @@ -1,7 +1,7 @@ # ChangeAtZ script - Change printing parameters at a given height # This script is the successor of the TweakAtZ plugin for legacy Cura. # It contains code from the TweakAtZ plugin V1.0-V4.x and from the ExampleScript by Jaime van Kessel, Ultimaker B.V. -# It runs with the PostProcessingPlugin which is released under the terms of the AGPLv3 or higher. +# It runs with the PostProcessingPlugin which is released under the terms of the LGPLv3 or higher. # This script is licensed under the Creative Commons - Attribution - Share Alike (CC BY-SA) terms # Authors of the ChangeAtZ plugin / script: diff --git a/plugins/PostProcessingPlugin/scripts/ColorMix.py b/plugins/PostProcessingPlugin/scripts/ColorMix.py index dacb40e905..534c0208cf 100644 --- a/plugins/PostProcessingPlugin/scripts/ColorMix.py +++ b/plugins/PostProcessingPlugin/scripts/ColorMix.py @@ -1,6 +1,6 @@ # ColorMix script - 2-1 extruder color mix and blending # This script is specific for the Geeetech A10M dual extruder but should work with other Marlin printers. -# It runs with the PostProcessingPlugin which is released under the terms of the AGPLv3 or higher. +# It runs with the PostProcessingPlugin which is released under the terms of the LGPLv3 or higher. # This script is licensed under the Creative Commons - Attribution - Share Alike (CC BY-SA) terms #Authors of the 2-1 ColorMix plug-in / script: diff --git a/plugins/PostProcessingPlugin/scripts/FilamentChange.py b/plugins/PostProcessingPlugin/scripts/FilamentChange.py index d3c1e60192..93941c0992 100644 --- a/plugins/PostProcessingPlugin/scripts/FilamentChange.py +++ b/plugins/PostProcessingPlugin/scripts/FilamentChange.py @@ -1,5 +1,5 @@ # Copyright (c) 2023 Ultimaker B.V. -# The PostProcessingPlugin is released under the terms of the AGPLv3 or higher. +# The PostProcessingPlugin is released under the terms of the LGPLv3 or higher. # Modification 06.09.2020 # add checkbox, now you can choose and use configuration from the firmware itself. diff --git a/plugins/PostProcessingPlugin/scripts/RetractContinue.py b/plugins/PostProcessingPlugin/scripts/RetractContinue.py index b5ea4d4eda..eaa15e0942 100644 --- a/plugins/PostProcessingPlugin/scripts/RetractContinue.py +++ b/plugins/PostProcessingPlugin/scripts/RetractContinue.py @@ -1,5 +1,5 @@ # Copyright (c) 2023 UltiMaker B.V. -# The PostProcessingPlugin is released under the terms of the AGPLv3 or higher. +# The PostProcessingPlugin is released under the terms of the LGPLv3 or higher. from ..Script import Script diff --git a/plugins/PostProcessingPlugin/scripts/SearchAndReplace.py b/plugins/PostProcessingPlugin/scripts/SearchAndReplace.py index 40a56ace57..7a12c229cc 100644 --- a/plugins/PostProcessingPlugin/scripts/SearchAndReplace.py +++ b/plugins/PostProcessingPlugin/scripts/SearchAndReplace.py @@ -1,5 +1,5 @@ # Copyright (c) 2017 Ghostkeeper -# The PostProcessingPlugin is released under the terms of the AGPLv3 or higher. +# The PostProcessingPlugin is released under the terms of the LGPLv3 or higher. import re #To perform the search and replace. diff --git a/plugins/PostProcessingPlugin/scripts/Stretch.py b/plugins/PostProcessingPlugin/scripts/Stretch.py index 8d35f68822..ab964d160a 100644 --- a/plugins/PostProcessingPlugin/scripts/Stretch.py +++ b/plugins/PostProcessingPlugin/scripts/Stretch.py @@ -1,4 +1,4 @@ -# This PostProcessingPlugin script is released under the terms of the AGPLv3 or higher. +# This PostProcessingPlugin script is released under the terms of the LGPLv3 or higher. """ Copyright (c) 2017 Christophe Baribaud 2017 Python implementation of https://github.com/electrocbd/post_stretch From 08748b1a336b4bb5a40e55b05bd6f4937621f7ac Mon Sep 17 00:00:00 2001 From: MariMakes <40423138+MariMakes@users.noreply.github.com> Date: Fri, 21 Jul 2023 13:53:36 +0200 Subject: [PATCH 07/18] Update description for Hole Horizontal expansion Clarify relation with Hole Horizontal Expansion and ole Horizontal Expansion Max Diameter --- resources/definitions/fdmprinter.def.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/definitions/fdmprinter.def.json b/resources/definitions/fdmprinter.def.json index 915a550a33..d1c532a32d 100644 --- a/resources/definitions/fdmprinter.def.json +++ b/resources/definitions/fdmprinter.def.json @@ -1289,7 +1289,7 @@ "hole_xy_offset": { "label": "Hole Horizontal Expansion", - "description": "Amount of offset applied to all holes in each layer. Positive values increase the size of the holes, negative values reduce the size of the holes.", + "description": "When greater than zero, the Hole Horizontal Expansion is the amount of offset applied to all holes in each layer. Positive values increase the size of the holes, negative values reduce the size of the holes. When this setting is enabled it can be further tuned with Hole Horizontal Expansion Max Diameter.", "unit": "mm", "type": "float", "minimum_value_warning": "-1", From 56b8205ce04c30ff954dba03ab453e64499d9a85 Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Sun, 23 Jul 2023 17:48:11 +0200 Subject: [PATCH 08/18] Revert "Fix wrong licenses" This reverts commit 8b8e96429339f7543c7cd0f50c710a3539b74258. --- plugins/PostProcessingPlugin/PostProcessingPlugin.py | 2 +- plugins/PostProcessingPlugin/PostProcessingPlugin.qml | 2 +- plugins/PostProcessingPlugin/Script.py | 2 +- plugins/PostProcessingPlugin/scripts/ChangeAtZ.py | 2 +- plugins/PostProcessingPlugin/scripts/ColorMix.py | 2 +- plugins/PostProcessingPlugin/scripts/FilamentChange.py | 2 +- plugins/PostProcessingPlugin/scripts/RetractContinue.py | 2 +- plugins/PostProcessingPlugin/scripts/SearchAndReplace.py | 2 +- plugins/PostProcessingPlugin/scripts/Stretch.py | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/plugins/PostProcessingPlugin/PostProcessingPlugin.py b/plugins/PostProcessingPlugin/PostProcessingPlugin.py index b3ef761af5..fbb4214021 100644 --- a/plugins/PostProcessingPlugin/PostProcessingPlugin.py +++ b/plugins/PostProcessingPlugin/PostProcessingPlugin.py @@ -1,5 +1,5 @@ # Copyright (c) 2018 Jaime van Kessel, Ultimaker B.V. -# The PostProcessingPlugin is released under the terms of the LGPLv3 or higher. +# The PostProcessingPlugin is released under the terms of the AGPLv3 or higher. import configparser # The script lists are stored in metadata as serialised config files. import importlib.util diff --git a/plugins/PostProcessingPlugin/PostProcessingPlugin.qml b/plugins/PostProcessingPlugin/PostProcessingPlugin.qml index 0f379479ba..a80f304aaa 100644 --- a/plugins/PostProcessingPlugin/PostProcessingPlugin.qml +++ b/plugins/PostProcessingPlugin/PostProcessingPlugin.qml @@ -1,5 +1,5 @@ // Copyright (c) 2022 Jaime van Kessel, Ultimaker B.V. -// The PostProcessingPlugin is released under the terms of the LGPLv3 or higher. +// The PostProcessingPlugin is released under the terms of the AGPLv3 or higher. import QtQuick 2.2 import QtQuick.Controls 2.15 diff --git a/plugins/PostProcessingPlugin/Script.py b/plugins/PostProcessingPlugin/Script.py index be661e0889..1cc9b59c9c 100644 --- a/plugins/PostProcessingPlugin/Script.py +++ b/plugins/PostProcessingPlugin/Script.py @@ -1,6 +1,6 @@ # Copyright (c) 2015 Jaime van Kessel # Copyright (c) 2018 Ultimaker B.V. -# The PostProcessingPlugin is released under the terms of the LGPLv3 or higher. +# The PostProcessingPlugin is released under the terms of the AGPLv3 or higher. from typing import Optional, Any, Dict, TYPE_CHECKING, List from UM.Signal import Signal, signalemitter diff --git a/plugins/PostProcessingPlugin/scripts/ChangeAtZ.py b/plugins/PostProcessingPlugin/scripts/ChangeAtZ.py index 2930623a93..91b36389f3 100644 --- a/plugins/PostProcessingPlugin/scripts/ChangeAtZ.py +++ b/plugins/PostProcessingPlugin/scripts/ChangeAtZ.py @@ -1,7 +1,7 @@ # ChangeAtZ script - Change printing parameters at a given height # This script is the successor of the TweakAtZ plugin for legacy Cura. # It contains code from the TweakAtZ plugin V1.0-V4.x and from the ExampleScript by Jaime van Kessel, Ultimaker B.V. -# It runs with the PostProcessingPlugin which is released under the terms of the LGPLv3 or higher. +# It runs with the PostProcessingPlugin which is released under the terms of the AGPLv3 or higher. # This script is licensed under the Creative Commons - Attribution - Share Alike (CC BY-SA) terms # Authors of the ChangeAtZ plugin / script: diff --git a/plugins/PostProcessingPlugin/scripts/ColorMix.py b/plugins/PostProcessingPlugin/scripts/ColorMix.py index 534c0208cf..dacb40e905 100644 --- a/plugins/PostProcessingPlugin/scripts/ColorMix.py +++ b/plugins/PostProcessingPlugin/scripts/ColorMix.py @@ -1,6 +1,6 @@ # ColorMix script - 2-1 extruder color mix and blending # This script is specific for the Geeetech A10M dual extruder but should work with other Marlin printers. -# It runs with the PostProcessingPlugin which is released under the terms of the LGPLv3 or higher. +# It runs with the PostProcessingPlugin which is released under the terms of the AGPLv3 or higher. # This script is licensed under the Creative Commons - Attribution - Share Alike (CC BY-SA) terms #Authors of the 2-1 ColorMix plug-in / script: diff --git a/plugins/PostProcessingPlugin/scripts/FilamentChange.py b/plugins/PostProcessingPlugin/scripts/FilamentChange.py index 93941c0992..d3c1e60192 100644 --- a/plugins/PostProcessingPlugin/scripts/FilamentChange.py +++ b/plugins/PostProcessingPlugin/scripts/FilamentChange.py @@ -1,5 +1,5 @@ # Copyright (c) 2023 Ultimaker B.V. -# The PostProcessingPlugin is released under the terms of the LGPLv3 or higher. +# The PostProcessingPlugin is released under the terms of the AGPLv3 or higher. # Modification 06.09.2020 # add checkbox, now you can choose and use configuration from the firmware itself. diff --git a/plugins/PostProcessingPlugin/scripts/RetractContinue.py b/plugins/PostProcessingPlugin/scripts/RetractContinue.py index eaa15e0942..b5ea4d4eda 100644 --- a/plugins/PostProcessingPlugin/scripts/RetractContinue.py +++ b/plugins/PostProcessingPlugin/scripts/RetractContinue.py @@ -1,5 +1,5 @@ # Copyright (c) 2023 UltiMaker B.V. -# The PostProcessingPlugin is released under the terms of the LGPLv3 or higher. +# The PostProcessingPlugin is released under the terms of the AGPLv3 or higher. from ..Script import Script diff --git a/plugins/PostProcessingPlugin/scripts/SearchAndReplace.py b/plugins/PostProcessingPlugin/scripts/SearchAndReplace.py index 7a12c229cc..40a56ace57 100644 --- a/plugins/PostProcessingPlugin/scripts/SearchAndReplace.py +++ b/plugins/PostProcessingPlugin/scripts/SearchAndReplace.py @@ -1,5 +1,5 @@ # Copyright (c) 2017 Ghostkeeper -# The PostProcessingPlugin is released under the terms of the LGPLv3 or higher. +# The PostProcessingPlugin is released under the terms of the AGPLv3 or higher. import re #To perform the search and replace. diff --git a/plugins/PostProcessingPlugin/scripts/Stretch.py b/plugins/PostProcessingPlugin/scripts/Stretch.py index ab964d160a..8d35f68822 100644 --- a/plugins/PostProcessingPlugin/scripts/Stretch.py +++ b/plugins/PostProcessingPlugin/scripts/Stretch.py @@ -1,4 +1,4 @@ -# This PostProcessingPlugin script is released under the terms of the LGPLv3 or higher. +# This PostProcessingPlugin script is released under the terms of the AGPLv3 or higher. """ Copyright (c) 2017 Christophe Baribaud 2017 Python implementation of https://github.com/electrocbd/post_stretch From 0c7d0540b9cc05ee37ce5e2d9f4991065ed6490c Mon Sep 17 00:00:00 2001 From: "saumya.jain" Date: Tue, 25 Jul 2023 11:20:58 +0200 Subject: [PATCH 09/18] Cura about dialog when shaked gives extra info CURA-10770 --- .gitignore | 1 + AboutDialogVersionsList.qml.jinja | 61 +++++++++++++++++++++++++++ conanfile.py | 24 +++++++++++ resources/qml/Dialogs/AboutDialog.qml | 45 +++++++++++++++++++- 4 files changed, 129 insertions(+), 2 deletions(-) create mode 100644 AboutDialogVersionsList.qml.jinja diff --git a/.gitignore b/.gitignore index 45cf4400f6..048bb915c7 100644 --- a/.gitignore +++ b/.gitignore @@ -101,3 +101,4 @@ graph_info.json Ultimaker-Cura.spec .run/ /printer-linter/src/printerlinter.egg-info/ +/resources/qml/Dialogs/AboutDialogVersionsList.qml diff --git a/AboutDialogVersionsList.qml.jinja b/AboutDialogVersionsList.qml.jinja new file mode 100644 index 0000000000..0503469660 --- /dev/null +++ b/AboutDialogVersionsList.qml.jinja @@ -0,0 +1,61 @@ +import QtQuick 2.2 +import QtQuick.Controls 2.9 + +import UM 1.6 as UM +import Cura 1.5 as Cura + + +ListView +{ + id: projectBuildInfoList + visible: false + anchors.top: creditsNotes.bottom + anchors.topMargin: UM.Theme.getSize("default_margin").height + width: parent.width + height: base.height - y - (2 * UM.Theme.getSize("default_margin").height + closeButton.height) + + ScrollBar.vertical: UM.ScrollBar + { + id: projectBuildInfoListScrollBar + } + + delegate: Row + { + spacing: UM.Theme.getSize("narrow_margin").width + UM.Label + { + text: (model.name) + width: (projectBuildInfoList.width* 0.4) | 0 + elide: Text.ElideRight + } + UM.Label + { + text: (model.version) + width: (projectBuildInfoList.width *0.6) | 0 + elide: Text.ElideRight + } + + } + model: ListModel + { + id: developerInfo + } + Component.onCompleted: + { + var conan_installs = {{ conan_installs }}; + var python_installs = {{ python_installs }}; + developerInfo.append({ name : "

Conan Installs

", version : '' }); + for (var n in conan_installs) + { + developerInfo.append({ name : conan_installs[n][0], version : conan_installs[n][1] }); + } + developerInfo.append({ name : '', version : '' }); + developerInfo.append({ name : "

Python Installs

", version : '' }); + for (var n in python_installs) + { + developerInfo.append({ name : python_installs[n][0], version : python_installs[n][1] }); + } + + } +} + diff --git a/conanfile.py b/conanfile.py index 46e143cc10..d75b2bc6bf 100644 --- a/conanfile.py +++ b/conanfile.py @@ -138,6 +138,29 @@ class CuraConan(ConanFile): return "'x86_64'" return "None" + def _generate_about_versions(self, location): + with open(os.path.join(self.recipe_folder, "AboutDialogVersionsList.qml.jinja"), "r") as f: + cura_version_py = Template(f.read()) + + conan_installs = [] + python_installs = [] + + # list of conan installs + for _, dependency in self.dependencies.host.items(): + conan_installs.append([dependency.ref.name,dependency.ref.version]) + + #list of python installs + import pkg_resources + for package in pkg_resources.working_set: + python_installs.append([package.key, package.version]) + + with open(os.path.join(location, "AboutDialogVersionsList.qml"), "w") as f: + f.write(cura_version_py.render( + conan_installs = conan_installs, + python_installs = python_installs + )) + + def _generate_cura_version(self, location): with open(os.path.join(self.recipe_folder, "CuraVersion.py.jinja"), "r") as f: cura_version_py = Template(f.read()) @@ -307,6 +330,7 @@ class CuraConan(ConanFile): vr.generate() self._generate_cura_version(os.path.join(self.source_folder, "cura")) + self._generate_about_versions(os.path.join(self.source_folder, "resources/qml/Dialogs")) if self.options.devtools: entitlements_file = "'{}'".format(os.path.join(self.source_folder, "packaging", "MacOS", "cura.entitlements")) diff --git a/resources/qml/Dialogs/AboutDialog.qml b/resources/qml/Dialogs/AboutDialog.qml index 4ccf58d0b4..361e19a45d 100644 --- a/resources/qml/Dialogs/AboutDialog.qml +++ b/resources/qml/Dialogs/AboutDialog.qml @@ -1,10 +1,10 @@ // Copyright (c) 2022 UltiMaker // Cura is released under the terms of the LGPLv3 or higher. -import QtQuick 2.2 +import QtQuick 2.4 import QtQuick.Controls 2.9 -import UM 1.5 as UM +import UM 1.6 as UM import Cura 1.5 as Cura UM.Dialog @@ -21,6 +21,22 @@ UM.Dialog backgroundColor: UM.Theme.getColor("main_background") + property real dialogX: base.x + property real dialogY: base.y + property int shakeDetected: (shakeDetector.shakeIsdetected) + property UM.ShakeDetector shakeDetector: UM.ShakeDetector{ } + + readonly property Timer timer : Timer + { + interval: 100 // Update interval in milliseconds (adjust as needed) + running: onDialogXChanged || onDialogYChanged + repeat: true + onTriggered: + { + shakeDetector.checkForShake(dialogX, dialogY) + } + } + Rectangle { id: header @@ -181,6 +197,31 @@ UM.Dialog } } + AboutDialogVersionsList{ + id: projectBuildInfoList + + } + + onShakeDetectedChanged: + { + if (!projectBuildInfoList.visible) + { + projectsList.visible= false; + projectBuildInfoList.visible = true; + } + else + { + projectsList.visible = true; + projectBuildInfoList.visible = false; + } + } + + onVisibleChanged: + { + projectsList.visible = true; + projectBuildInfoList.visible = false; + } + rightButtons: Cura.TertiaryButton { //: Close about dialog button From afc0f7c615a7b819c331d8a596d76831489c3b43 Mon Sep 17 00:00:00 2001 From: HellAholic Date: Tue, 25 Jul 2023 13:11:43 +0200 Subject: [PATCH 10/18] Update to add sort_by option Added a class attribute "last_updated" for sort_by Added an instance attribute for search_sort Added if statement to add the sort_by string, currently by default. --- plugins/Marketplace/RemotePackageList.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/plugins/Marketplace/RemotePackageList.py b/plugins/Marketplace/RemotePackageList.py index d06d2c64c5..a4c453e25d 100644 --- a/plugins/Marketplace/RemotePackageList.py +++ b/plugins/Marketplace/RemotePackageList.py @@ -21,6 +21,7 @@ catalog = i18nCatalog("cura") class RemotePackageList(PackageList): ITEMS_PER_PAGE = 20 # Pagination of number of elements to download at once. + LAST_UPDATED = "last_updated" # Default value to send for sort_by filter. def __init__(self, parent: Optional["QObject"] = None) -> None: super().__init__(parent) @@ -28,6 +29,7 @@ class RemotePackageList(PackageList): self._package_type_filter = "" self._requested_search_string = "" self._current_search_string = "" + self._search_sort = "sort_by" self._search_type = "search" self._request_url = self._initialRequestUrl() self._ongoing_requests["get_packages"] = None @@ -102,6 +104,8 @@ class RemotePackageList(PackageList): request_url += f"&package_type={self._package_type_filter}" if self._current_search_string != "": request_url += f"&{self._search_type}={self._current_search_string}" + if self._search_sort != "": + request_url += f"&{self._search_sort}={self.LAST_UPDATED}" return request_url def _parseResponse(self, reply: "QNetworkReply") -> None: From 86cb3851fe8091df96613ce91e5c9f5d39321fdc Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Tue, 25 Jul 2023 13:20:26 +0200 Subject: [PATCH 11/18] Force left to right reading direction for numeric textfield CURA-10583 --- resources/qml/MachineSettings/NumericTextFieldWithUnit.qml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/resources/qml/MachineSettings/NumericTextFieldWithUnit.qml b/resources/qml/MachineSettings/NumericTextFieldWithUnit.qml index 64beeb9834..408db66f3a 100644 --- a/resources/qml/MachineSettings/NumericTextFieldWithUnit.qml +++ b/resources/qml/MachineSettings/NumericTextFieldWithUnit.qml @@ -76,6 +76,11 @@ UM.TooltipArea anchors.left: fieldLabel.right anchors.leftMargin: spacing verticalAlignment: Text.AlignVCenter + + // The control is set up for left to right. So we force it to that. If we don't, it will take the OS reading + // direction, which might not be left to right. This will lead to the text overlapping with the unit + horizontalAlignment: TextInput.AlignLeft + selectionColor: UM.Theme.getColor("text_selection") selectedTextColor: UM.Theme.getColor("setting_control_text") padding: 0 From 8c54d44cbb61e80f138fc8de4a708a1b0f432625 Mon Sep 17 00:00:00 2001 From: Casper Lamboo Date: Tue, 25 Jul 2023 13:27:08 +0200 Subject: [PATCH 12/18] Apply suggestions from code review --- plugins/Marketplace/RemotePackageList.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/Marketplace/RemotePackageList.py b/plugins/Marketplace/RemotePackageList.py index a4c453e25d..78f24a72a1 100644 --- a/plugins/Marketplace/RemotePackageList.py +++ b/plugins/Marketplace/RemotePackageList.py @@ -21,7 +21,7 @@ catalog = i18nCatalog("cura") class RemotePackageList(PackageList): ITEMS_PER_PAGE = 20 # Pagination of number of elements to download at once. - LAST_UPDATED = "last_updated" # Default value to send for sort_by filter. + SORT_TYPE = "last_updated" # Default value to send for sort_by filter. def __init__(self, parent: Optional["QObject"] = None) -> None: super().__init__(parent) @@ -105,7 +105,7 @@ class RemotePackageList(PackageList): if self._current_search_string != "": request_url += f"&{self._search_type}={self._current_search_string}" if self._search_sort != "": - request_url += f"&{self._search_sort}={self.LAST_UPDATED}" + request_url += f"&{self._search_sort}={self.SORT_TYPE}" return request_url def _parseResponse(self, reply: "QNetworkReply") -> None: From 7e2fc1ac5b03d2b2d1f7b55314acc5f018cdc289 Mon Sep 17 00:00:00 2001 From: Casper Lamboo Date: Tue, 25 Jul 2023 13:29:22 +0200 Subject: [PATCH 13/18] Update plugins/Marketplace/RemotePackageList.py --- plugins/Marketplace/RemotePackageList.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/Marketplace/RemotePackageList.py b/plugins/Marketplace/RemotePackageList.py index 78f24a72a1..f8826ff395 100644 --- a/plugins/Marketplace/RemotePackageList.py +++ b/plugins/Marketplace/RemotePackageList.py @@ -104,7 +104,7 @@ class RemotePackageList(PackageList): request_url += f"&package_type={self._package_type_filter}" if self._current_search_string != "": request_url += f"&{self._search_type}={self._current_search_string}" - if self._search_sort != "": + if self.SORT_TYPE: request_url += f"&{self._search_sort}={self.SORT_TYPE}" return request_url From 23d79de4b982e05952138e425bb62f6ea22af1ab Mon Sep 17 00:00:00 2001 From: Casper Lamboo Date: Tue, 25 Jul 2023 13:34:29 +0200 Subject: [PATCH 14/18] Make show custom button more visible in darkmode CURA-10782 --- .../qml/PrintSetupSelector/Recommended/RecommendedPrintSetup.qml | 1 - 1 file changed, 1 deletion(-) diff --git a/resources/qml/PrintSetupSelector/Recommended/RecommendedPrintSetup.qml b/resources/qml/PrintSetupSelector/Recommended/RecommendedPrintSetup.qml index 50b5dc7357..0f4efc8498 100644 --- a/resources/qml/PrintSetupSelector/Recommended/RecommendedPrintSetup.qml +++ b/resources/qml/PrintSetupSelector/Recommended/RecommendedPrintSetup.qml @@ -111,7 +111,6 @@ Flickable anchors.right: parent.right text: catalog.i18nc("@button", "Show Custom") textFont: UM.Theme.getFont("medium_bold") - outlineColor: "transparent" onClicked: onModeChanged() } } From 58048598b413dd8098f8f3be58191b9e21c563a1 Mon Sep 17 00:00:00 2001 From: "saumya.jain" Date: Tue, 25 Jul 2023 15:10:02 +0200 Subject: [PATCH 15/18] fixing Review Comments CURA-10770 --- resources/qml/Dialogs/AboutDialog.qml | 26 +++++--------------------- 1 file changed, 5 insertions(+), 21 deletions(-) diff --git a/resources/qml/Dialogs/AboutDialog.qml b/resources/qml/Dialogs/AboutDialog.qml index 361e19a45d..ae2bd44d74 100644 --- a/resources/qml/Dialogs/AboutDialog.qml +++ b/resources/qml/Dialogs/AboutDialog.qml @@ -23,18 +23,10 @@ UM.Dialog property real dialogX: base.x property real dialogY: base.y - property int shakeDetected: (shakeDetector.shakeIsdetected) - property UM.ShakeDetector shakeDetector: UM.ShakeDetector{ } - - readonly property Timer timer : Timer + property int shakeDetected: shakeDetector.shakeIsdetected + property UM.ShakeDetector shakeDetector: UM.ShakeDetector { - interval: 100 // Update interval in milliseconds (adjust as needed) - running: onDialogXChanged || onDialogYChanged - repeat: true - onTriggered: - { - shakeDetector.checkForShake(dialogX, dialogY) - } + position: Qt.point(base.x, base.y) } Rectangle @@ -204,16 +196,8 @@ UM.Dialog onShakeDetectedChanged: { - if (!projectBuildInfoList.visible) - { - projectsList.visible= false; - projectBuildInfoList.visible = true; - } - else - { - projectsList.visible = true; - projectBuildInfoList.visible = false; - } + projectsList.visible = !projectsList.visible; + projectBuildInfoList.visible = !projectBuildInfoList.visible; } onVisibleChanged: From e5f5011f820530b67992c0d40e119de2298f6e28 Mon Sep 17 00:00:00 2001 From: Casper Lamboo Date: Wed, 26 Jul 2023 11:00:40 +0200 Subject: [PATCH 16/18] Attempt to fix build --- conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conanfile.py b/conanfile.py index d75b2bc6bf..438e3f07b7 100644 --- a/conanfile.py +++ b/conanfile.py @@ -21,7 +21,7 @@ class CuraConan(ConanFile): description = "3D printer / slicing GUI built on top of the Uranium framework" topics = ("conan", "python", "pyqt6", "qt", "qml", "3d-printing", "slicer") build_policy = "missing" - exports = "LICENSE*", "UltiMaker-Cura.spec.jinja", "CuraVersion.py.jinja" + exports = "LICENSE*", "UltiMaker-Cura.spec.jinja", "CuraVersion.py.jinja", "AboutDialogVersionsList.qml.jinja" settings = "os", "compiler", "build_type", "arch" # FIXME: Remove specific branch once merged to main From 3521947fefb72a9524b33e296b3b55cb9d6762a3 Mon Sep 17 00:00:00 2001 From: Casper Lamboo Date: Thu, 27 Jul 2023 13:49:21 +0200 Subject: [PATCH 17/18] Upload packages to jfrog --- .github/workflows/conan-package-create.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/conan-package-create.yml b/.github/workflows/conan-package-create.yml index 701a978cd8..98e207acf3 100644 --- a/.github/workflows/conan-package-create.yml +++ b/.github/workflows/conan-package-create.yml @@ -151,7 +151,9 @@ jobs: - name: Upload the Package(s) if: ${{ always() && inputs.conan_upload_community }} - run: conan upload ${{ inputs.recipe_id_full }} -r cura --all -c + run: | + conan upload ${{ inputs.recipe_id_full }} -r cura --all -c + conan upload "*" -r cura --all -c - name: Upload the Package(s) to the private Artifactory if: ${{ always() && ! inputs.conan_upload_community }} From fa6961a45035e5a0136423439ae23ff9ab5c5eab Mon Sep 17 00:00:00 2001 From: "c.lamboo" Date: Thu, 27 Jul 2023 13:52:15 +0200 Subject: [PATCH 18/18] Revert "Upload packages to jfrog" This reverts commit 3521947fefb72a9524b33e296b3b55cb9d6762a3. --- .github/workflows/conan-package-create.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/conan-package-create.yml b/.github/workflows/conan-package-create.yml index 98e207acf3..701a978cd8 100644 --- a/.github/workflows/conan-package-create.yml +++ b/.github/workflows/conan-package-create.yml @@ -151,9 +151,7 @@ jobs: - name: Upload the Package(s) if: ${{ always() && inputs.conan_upload_community }} - run: | - conan upload ${{ inputs.recipe_id_full }} -r cura --all -c - conan upload "*" -r cura --all -c + run: conan upload ${{ inputs.recipe_id_full }} -r cura --all -c - name: Upload the Package(s) to the private Artifactory if: ${{ always() && ! inputs.conan_upload_community }}