From 7ec62315e0a5ca5e79bcb9219c10951a0a81af08 Mon Sep 17 00:00:00 2001 From: Lipu Fei Date: Thu, 13 Sep 2018 10:54:19 +0200 Subject: [PATCH 01/16] Remove shortcut for About CURA-5642 It has conflict with "&Add Printer". --- resources/i18n/cura.pot | 2 +- resources/i18n/de_DE/cura.po | 4 ++-- resources/i18n/es_ES/cura.po | 4 ++-- resources/i18n/fi_FI/cura.po | 4 ++-- resources/i18n/fr_FR/cura.po | 4 ++-- resources/i18n/it_IT/cura.po | 4 ++-- resources/i18n/ja_JP/cura.po | 2 +- resources/i18n/ko_KR/cura.po | 2 +- resources/i18n/nl_NL/cura.po | 4 ++-- resources/i18n/pl_PL/cura.po | 4 ++-- resources/i18n/pt_BR/cura.po | 4 ++-- resources/i18n/pt_PT/cura.po | 4 ++-- resources/i18n/ru_RU/cura.po | 2 +- resources/i18n/tr_TR/cura.po | 4 ++-- resources/i18n/zh_CN/cura.po | 4 ++-- resources/i18n/zh_TW/cura.po | 4 ++-- resources/qml/Actions.qml | 2 +- 17 files changed, 29 insertions(+), 29 deletions(-) diff --git a/resources/i18n/cura.pot b/resources/i18n/cura.pot index 71c55ffc21..4235f75461 100644 --- a/resources/i18n/cura.pot +++ b/resources/i18n/cura.pot @@ -3955,7 +3955,7 @@ msgstr "" #: /home/ruben/Projects/Cura/resources/qml/Actions.qml:225 msgctxt "@action:inmenu menubar:help" -msgid "&About..." +msgid "About..." msgstr "" #: /home/ruben/Projects/Cura/resources/qml/Actions.qml:232 diff --git a/resources/i18n/de_DE/cura.po b/resources/i18n/de_DE/cura.po index 645082a2bb..9428eef444 100644 --- a/resources/i18n/de_DE/cura.po +++ b/resources/i18n/de_DE/cura.po @@ -3802,8 +3802,8 @@ msgstr "&Fehler melden" #: /home/ruben/Projects/Cura/resources/qml/Actions.qml:225 msgctxt "@action:inmenu menubar:help" -msgid "&About..." -msgstr "&Über..." +msgid "About..." +msgstr "Über..." #: /home/ruben/Projects/Cura/resources/qml/Actions.qml:232 #: /home/ruben/Projects/Cura/resources/qml/Actions.qml:242 diff --git a/resources/i18n/es_ES/cura.po b/resources/i18n/es_ES/cura.po index 88b8e779ff..66968f77ab 100644 --- a/resources/i18n/es_ES/cura.po +++ b/resources/i18n/es_ES/cura.po @@ -3814,8 +3814,8 @@ msgstr "Informar de un &error" #: /home/ruben/Projects/Cura/resources/qml/Actions.qml:225 msgctxt "@action:inmenu menubar:help" -msgid "&About..." -msgstr "&Acerca de..." +msgid "About..." +msgstr "Acerca de..." #: /home/ruben/Projects/Cura/resources/qml/Actions.qml:232 #: /home/ruben/Projects/Cura/resources/qml/Actions.qml:242 diff --git a/resources/i18n/fi_FI/cura.po b/resources/i18n/fi_FI/cura.po index 4684ff69d8..eb2d6ef7fb 100644 --- a/resources/i18n/fi_FI/cura.po +++ b/resources/i18n/fi_FI/cura.po @@ -3821,8 +3821,8 @@ msgstr "Ilmoita &virheestä" #: /home/ruben/Projects/Cura/resources/qml/Actions.qml:225 msgctxt "@action:inmenu menubar:help" -msgid "&About..." -msgstr "Ti&etoja..." +msgid "About..." +msgstr "Tietoja..." #: /home/ruben/Projects/Cura/resources/qml/Actions.qml:232 #: /home/ruben/Projects/Cura/resources/qml/Actions.qml:242 diff --git a/resources/i18n/fr_FR/cura.po b/resources/i18n/fr_FR/cura.po index 6591073c98..980cb7fa3a 100644 --- a/resources/i18n/fr_FR/cura.po +++ b/resources/i18n/fr_FR/cura.po @@ -3802,8 +3802,8 @@ msgstr "Notifier un &bug" #: /home/ruben/Projects/Cura/resources/qml/Actions.qml:225 msgctxt "@action:inmenu menubar:help" -msgid "&About..." -msgstr "&À propos de..." +msgid "About..." +msgstr "À propos de..." #: /home/ruben/Projects/Cura/resources/qml/Actions.qml:232 #: /home/ruben/Projects/Cura/resources/qml/Actions.qml:242 diff --git a/resources/i18n/it_IT/cura.po b/resources/i18n/it_IT/cura.po index 361a65c542..e8d84822b8 100644 --- a/resources/i18n/it_IT/cura.po +++ b/resources/i18n/it_IT/cura.po @@ -3800,8 +3800,8 @@ msgstr "Se&gnala un errore" #: /home/ruben/Projects/Cura/resources/qml/Actions.qml:225 msgctxt "@action:inmenu menubar:help" -msgid "&About..." -msgstr "I&nformazioni..." +msgid "About..." +msgstr "Informazioni..." #: /home/ruben/Projects/Cura/resources/qml/Actions.qml:232 #: /home/ruben/Projects/Cura/resources/qml/Actions.qml:242 diff --git a/resources/i18n/ja_JP/cura.po b/resources/i18n/ja_JP/cura.po index 5bfcf0af02..3f002a6346 100644 --- a/resources/i18n/ja_JP/cura.po +++ b/resources/i18n/ja_JP/cura.po @@ -3806,7 +3806,7 @@ msgstr "報告&バグ" #: /home/ruben/Projects/Cura/resources/qml/Actions.qml:225 msgctxt "@action:inmenu menubar:help" -msgid "&About..." +msgid "About..." msgstr "アバウト..." # can’t enter japanese text diff --git a/resources/i18n/ko_KR/cura.po b/resources/i18n/ko_KR/cura.po index a3bd842bd3..77e12af28e 100644 --- a/resources/i18n/ko_KR/cura.po +++ b/resources/i18n/ko_KR/cura.po @@ -3798,7 +3798,7 @@ msgstr "버그 리포트" #: /home/ruben/Projects/Cura/resources/qml/Actions.qml:225 msgctxt "@action:inmenu menubar:help" -msgid "&About..." +msgid "About..." msgstr "소개..." #: /home/ruben/Projects/Cura/resources/qml/Actions.qml:232 diff --git a/resources/i18n/nl_NL/cura.po b/resources/i18n/nl_NL/cura.po index 24e27c09b5..8d21c5a805 100644 --- a/resources/i18n/nl_NL/cura.po +++ b/resources/i18n/nl_NL/cura.po @@ -3800,8 +3800,8 @@ msgstr "Een &Bug Rapporteren" #: /home/ruben/Projects/Cura/resources/qml/Actions.qml:225 msgctxt "@action:inmenu menubar:help" -msgid "&About..." -msgstr "&Over..." +msgid "About..." +msgstr "Over..." #: /home/ruben/Projects/Cura/resources/qml/Actions.qml:232 #: /home/ruben/Projects/Cura/resources/qml/Actions.qml:242 diff --git a/resources/i18n/pl_PL/cura.po b/resources/i18n/pl_PL/cura.po index acfcc54f76..722826cc8b 100644 --- a/resources/i18n/pl_PL/cura.po +++ b/resources/i18n/pl_PL/cura.po @@ -3836,8 +3836,8 @@ msgstr "Zgłoś błąd" #: /home/ruben/Projects/Cura/resources/qml/Actions.qml:225 msgctxt "@action:inmenu menubar:help" -msgid "&About..." -msgstr "&O..." +msgid "About..." +msgstr "O..." #: /home/ruben/Projects/Cura/resources/qml/Actions.qml:232 #: /home/ruben/Projects/Cura/resources/qml/Actions.qml:242 diff --git a/resources/i18n/pt_BR/cura.po b/resources/i18n/pt_BR/cura.po index a6a93bb2a3..34e842eb55 100644 --- a/resources/i18n/pt_BR/cura.po +++ b/resources/i18n/pt_BR/cura.po @@ -3839,8 +3839,8 @@ msgstr "Relatar um &Bug" #: /home/ruben/Projects/Cura/resources/qml/Actions.qml:225 msgctxt "@action:inmenu menubar:help" -msgid "&About..." -msgstr "Sobre (&A)..." +msgid "About..." +msgstr "Sobre..." #: /home/ruben/Projects/Cura/resources/qml/Actions.qml:232 #: /home/ruben/Projects/Cura/resources/qml/Actions.qml:242 diff --git a/resources/i18n/pt_PT/cura.po b/resources/i18n/pt_PT/cura.po index fe8d44d361..8a8ff0a769 100644 --- a/resources/i18n/pt_PT/cura.po +++ b/resources/i18n/pt_PT/cura.po @@ -3918,8 +3918,8 @@ msgstr "Reportar um &erro" #: /home/ruben/Projects/Cura/resources/qml/Actions.qml:225 msgctxt "@action:inmenu menubar:help" -msgid "&About..." -msgstr "&Sobre..." +msgid "About..." +msgstr "Sobre..." #: /home/ruben/Projects/Cura/resources/qml/Actions.qml:232 #: /home/ruben/Projects/Cura/resources/qml/Actions.qml:242 diff --git a/resources/i18n/ru_RU/cura.po b/resources/i18n/ru_RU/cura.po index 7622349423..acc35df94f 100644 --- a/resources/i18n/ru_RU/cura.po +++ b/resources/i18n/ru_RU/cura.po @@ -3806,7 +3806,7 @@ msgstr "Отправить отчёт об ошибке" #: /home/ruben/Projects/Cura/resources/qml/Actions.qml:225 msgctxt "@action:inmenu menubar:help" -msgid "&About..." +msgid "About..." msgstr "О Cura..." #: /home/ruben/Projects/Cura/resources/qml/Actions.qml:232 diff --git a/resources/i18n/tr_TR/cura.po b/resources/i18n/tr_TR/cura.po index 6c216b7d1c..b6eb498620 100644 --- a/resources/i18n/tr_TR/cura.po +++ b/resources/i18n/tr_TR/cura.po @@ -3800,8 +3800,8 @@ msgstr "Hata Bildir" #: /home/ruben/Projects/Cura/resources/qml/Actions.qml:225 msgctxt "@action:inmenu menubar:help" -msgid "&About..." -msgstr "&Hakkında..." +msgid "About..." +msgstr "Hakkında..." #: /home/ruben/Projects/Cura/resources/qml/Actions.qml:232 #: /home/ruben/Projects/Cura/resources/qml/Actions.qml:242 diff --git a/resources/i18n/zh_CN/cura.po b/resources/i18n/zh_CN/cura.po index aab579ac0b..019f8bc7c3 100644 --- a/resources/i18n/zh_CN/cura.po +++ b/resources/i18n/zh_CN/cura.po @@ -3836,8 +3836,8 @@ msgstr "BUG 反馈(&B)" #: /home/ruben/Projects/Cura/resources/qml/Actions.qml:225 msgctxt "@action:inmenu menubar:help" -msgid "&About..." -msgstr "关于(&A)…" +msgid "About..." +msgstr "关于…" #: /home/ruben/Projects/Cura/resources/qml/Actions.qml:232 #: /home/ruben/Projects/Cura/resources/qml/Actions.qml:242 diff --git a/resources/i18n/zh_TW/cura.po b/resources/i18n/zh_TW/cura.po index 8d8b7c97d6..5667b643a8 100644 --- a/resources/i18n/zh_TW/cura.po +++ b/resources/i18n/zh_TW/cura.po @@ -3837,8 +3837,8 @@ msgstr "BUG 回報(&B)" #: /home/ruben/Projects/Cura/resources/qml/Actions.qml:225 msgctxt "@action:inmenu menubar:help" -msgid "&About..." -msgstr "關於(&A)…" +msgid "About..." +msgstr "關於…" #: /home/ruben/Projects/Cura/resources/qml/Actions.qml:232 #: /home/ruben/Projects/Cura/resources/qml/Actions.qml:242 diff --git a/resources/qml/Actions.qml b/resources/qml/Actions.qml index 1b2f636f3e..82c177951d 100644 --- a/resources/qml/Actions.qml +++ b/resources/qml/Actions.qml @@ -222,7 +222,7 @@ Item Action { id: aboutAction; - text: catalog.i18nc("@action:inmenu menubar:help","&About..."); + text: catalog.i18nc("@action:inmenu menubar:help","About..."); iconName: "help-about"; } From e629ea89ffe7e30c1f766bcf65492bf3b5be443b Mon Sep 17 00:00:00 2001 From: Lipu Fei Date: Thu, 13 Sep 2018 10:55:33 +0200 Subject: [PATCH 02/16] Improve shortcut check script CURA-5642 More information in the output. --- scripts/check_shortcut_keys.py | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/scripts/check_shortcut_keys.py b/scripts/check_shortcut_keys.py index 2796002c3f..a47a8143f7 100644 --- a/scripts/check_shortcut_keys.py +++ b/scripts/check_shortcut_keys.py @@ -85,10 +85,12 @@ class ShortcutKeysChecker: msg_section = data_dict[self.MSGCTXT] keys_dict = shortcut_dict[msg_section] if shortcut_key not in keys_dict: - keys_dict[shortcut_key] = dict() - existing_data_dict = keys_dict[shortcut_key] + keys_dict[shortcut_key] = {"shortcut_key": shortcut_key, + "section": msg_section, + "existing_lines": dict(), + } + existing_data_dict = keys_dict[shortcut_key]["existing_lines"] existing_data_dict[start_line] = {"message": msg, - "shortcut_key": shortcut_key, } def _get_shortcut_key(self, text: str) -> Optional[str]: @@ -105,16 +107,18 @@ class ShortcutKeysChecker: has_duplicates = False for keys_dict in shortcut_dict.values(): for shortcut_key, data_dict in keys_dict.items(): - if len(data_dict) == 1: + if len(data_dict["existing_lines"]) == 1: continue has_duplicates = True print("") print("The following messages have the same shortcut key '%s':" % shortcut_key) - for line, msg in data_dict.items(): + print(" shortcut: '%s'" % data_dict["shortcut_key"]) + print(" section : '%s'" % data_dict["section"]) + for line, msg in data_dict["existing_lines"].items(): relative_filename = (filename.rsplit("..", 1)[-1])[1:] - print(" - [%s] L%7d : [%s]" % (relative_filename, line, msg)) + print(" - [%s] L%7d : '%s'" % (relative_filename, line, msg["message"])) return has_duplicates From 7a3e61e8f113b4285d04db27d69631aa347596a3 Mon Sep 17 00:00:00 2001 From: Lipu Fei Date: Thu, 13 Sep 2018 10:56:27 +0200 Subject: [PATCH 03/16] chmod a+x check_shortcut_keys.py CURA-5642 --- scripts/check_shortcut_keys.py | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 scripts/check_shortcut_keys.py diff --git a/scripts/check_shortcut_keys.py b/scripts/check_shortcut_keys.py old mode 100644 new mode 100755 From b39d6c7d8738d08b13b02b269d7d3ec31b11397f Mon Sep 17 00:00:00 2001 From: Lipu Fei Date: Thu, 13 Sep 2018 13:27:21 +0200 Subject: [PATCH 04/16] Package upgrade should also check SDK version --- plugins/Toolbox/src/Toolbox.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/plugins/Toolbox/src/Toolbox.py b/plugins/Toolbox/src/Toolbox.py index 9488b50e4e..9e9fdd6f29 100644 --- a/plugins/Toolbox/src/Toolbox.py +++ b/plugins/Toolbox/src/Toolbox.py @@ -488,7 +488,17 @@ class Toolbox(QObject, Extension): local_version = Version(local_package["package_version"]) remote_version = Version(remote_package["package_version"]) - return remote_version > local_version + + can_upgrade = False + if remote_version > local_version: + can_upgrade = True + # A package with the same version can be built to have different SDK versions. So, for a package with the same + # version, we also need to check if the current one has a lower SDK version. If so, this package should also + # be upgradable. + elif remote_version == local_version and local_package.get("sdk_version", 0) < int(self._getSDKVersion()): + can_upgrade = True + + return can_upgrade @pyqtSlot(str, result = bool) def canDowngrade(self, package_id: str) -> bool: From 9627f216b2d852b585263b544f7e18314c8bc7b8 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Thu, 13 Sep 2018 16:22:36 +0200 Subject: [PATCH 05/16] Actually ensure that walls don't get slower than 1 mm/s CURA-5724 --- resources/variants/ultimaker2_plus_0.4.inst.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/variants/ultimaker2_plus_0.4.inst.cfg b/resources/variants/ultimaker2_plus_0.4.inst.cfg index d9d982ef11..3b54e0cdef 100644 --- a/resources/variants/ultimaker2_plus_0.4.inst.cfg +++ b/resources/variants/ultimaker2_plus_0.4.inst.cfg @@ -12,5 +12,5 @@ hardware_type = nozzle machine_nozzle_size = 0.4 machine_nozzle_tip_outer_diameter = 1.05 speed_wall = =round(speed_print / 1.25, 1) -speed_wall_0 = =min(speed_wall - 10, 1) +speed_wall_0 = =max(speed_wall - 10, 1) speed_topbottom = =round(speed_print / 2.25, 1) From 572afb052e9a0d38ed874b1282a2f4b14a30bf47 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Fri, 14 Sep 2018 11:30:25 +0200 Subject: [PATCH 06/16] Remove unused import This import was actually causing the test to fail on my computer due to a dependency on the order of importing libArcus vs. PyQt. --- .../VersionUpgrade26to27/VersionUpgrade26to27.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/plugins/VersionUpgrade/VersionUpgrade26to27/VersionUpgrade26to27.py b/plugins/VersionUpgrade/VersionUpgrade26to27/VersionUpgrade26to27.py index 2037a0211d..dfa436e5bd 100644 --- a/plugins/VersionUpgrade/VersionUpgrade26to27/VersionUpgrade26to27.py +++ b/plugins/VersionUpgrade/VersionUpgrade26to27/VersionUpgrade26to27.py @@ -1,11 +1,10 @@ -# Copyright (c) 2017 Ultimaker B.V. +# Copyright (c) 2018 Ultimaker B.V. # Cura is released under the terms of the LGPLv3 or higher. import configparser #To parse the files we need to upgrade and write the new files. import io #To serialise configparser output to a string. from UM.VersionUpgrade import VersionUpgrade -from cura.CuraApplication import CuraApplication # a dict of renamed quality profiles: : _renamed_quality_profiles = { From 2e6401b7dc69436306fc8dc27b1a71d52f6ae81f Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Fri, 14 Sep 2018 11:36:31 +0200 Subject: [PATCH 07/16] Don't depend on the name of resource folders not changing If we choose to rename the resource folders, then this plug-in should still look in the old resource folders. So hard-code these resource folders in the state that they were in at version 2.5 so that we can freely change them in a modern version. --- .../VersionUpgrade25to26/VersionUpgrade25to26.py | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/plugins/VersionUpgrade/VersionUpgrade25to26/VersionUpgrade25to26.py b/plugins/VersionUpgrade/VersionUpgrade25to26/VersionUpgrade25to26.py index 54b561c847..2430b35ea0 100644 --- a/plugins/VersionUpgrade/VersionUpgrade25to26/VersionUpgrade25to26.py +++ b/plugins/VersionUpgrade/VersionUpgrade25to26/VersionUpgrade25to26.py @@ -1,4 +1,4 @@ -# Copyright (c) 2017 Ultimaker B.V. +# Copyright (c) 2018 Ultimaker B.V. # Cura is released under the terms of the LGPLv3 or higher. import configparser #To parse the files we need to upgrade and write the new files. @@ -9,8 +9,6 @@ from urllib.parse import quote_plus from UM.Resources import Resources from UM.VersionUpgrade import VersionUpgrade -from cura.CuraApplication import CuraApplication - _removed_settings = { #Settings that were removed in 2.5. "start_layers_at_same_position", "sub_div_rad_mult" @@ -152,7 +150,7 @@ class VersionUpgrade25to26(VersionUpgrade): ## Acquires the next unique extruder stack index number for the Custom FDM Printer. def _acquireNextUniqueCustomFdmPrinterExtruderStackIdIndex(self): - extruder_stack_dir = Resources.getPath(CuraApplication.ResourceTypes.ExtruderStack) + extruder_stack_dir = os.path.join(Resources.getDataStoragePath(), "extruders") file_name_list = os.listdir(extruder_stack_dir) file_name_list = [os.path.basename(file_name) for file_name in file_name_list] while True: @@ -173,7 +171,7 @@ class VersionUpgrade25to26(VersionUpgrade): def _checkCustomFdmPrinterHasExtruderStack(self, machine_id): # go through all extruders and make sure that this custom FDM printer has extruder stacks. - extruder_stack_dir = Resources.getPath(CuraApplication.ResourceTypes.ExtruderStack) + extruder_stack_dir = os.path.join(Resources.getDataStoragePath(), "extruders") has_extruders = False for item in os.listdir(extruder_stack_dir): file_path = os.path.join(extruder_stack_dir, item) @@ -245,9 +243,9 @@ class VersionUpgrade25to26(VersionUpgrade): parser.write(extruder_output) extruder_filename = quote_plus(stack_id) + ".extruder.cfg" - extruder_stack_dir = Resources.getPath(CuraApplication.ResourceTypes.ExtruderStack) - definition_changes_dir = Resources.getPath(CuraApplication.ResourceTypes.DefinitionChangesContainer) - user_settings_dir = Resources.getPath(CuraApplication.ResourceTypes.UserInstanceContainer) + extruder_stack_dir = os.path.join(Resources.getDataStoragePath(), "extruders") + definition_changes_dir = os.path.join(Resources.getDataStoragePath(), "definition_changes") + user_settings_dir = os.path.join(Resources.getDataStoragePath(), "user") with open(os.path.join(definition_changes_dir, definition_changes_filename), "w", encoding = "utf-8") as f: f.write(definition_changes_output.getvalue()) From f8da8c14e5a1fcdcab0b7d4bf2ea2f083b02e961 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Fri, 14 Sep 2018 11:38:14 +0200 Subject: [PATCH 08/16] Fix running tests with PyQt 5.11 This was causing the test runner to crash. --- tests/conftest.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/conftest.py b/tests/conftest.py index 77d215815a..ad0bc609ee 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -6,6 +6,8 @@ import unittest.mock import pytest +import Arcus #Prevents error: "PyCapsule_GetPointer called with incorrect name" with conflicting SIP configurations between Arcus and PyQt: Import Arcus and Savitar first! +import Savitar from UM.Qt.QtApplication import QtApplication #QtApplication import is required, even though it isn't used. from cura.CuraApplication import CuraApplication from cura.MachineActionManager import MachineActionManager From e9cdd47a03b1d30524ed46ebf2254935a3c59fa9 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Fri, 14 Sep 2018 12:38:16 +0200 Subject: [PATCH 09/16] Fix types of getGlobalContainerStack call results We know in these places that there must be a global stack at this point. So to hide the type error we'll cast it here. Of course, the danger in this is that someone might call this function that doesn't know about this requirement and calls it when there is potentially no global stack yet. Hopefully they'll discover this crash when that happens then. --- cura/Settings/ExtruderManager.py | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/cura/Settings/ExtruderManager.py b/cura/Settings/ExtruderManager.py index 230759e775..26a030ffde 100755 --- a/cura/Settings/ExtruderManager.py +++ b/cura/Settings/ExtruderManager.py @@ -15,12 +15,11 @@ from UM.Settings.SettingFunction import SettingFunction from UM.Settings.ContainerStack import ContainerStack from UM.Settings.PropertyEvaluationContext import PropertyEvaluationContext -from typing import Optional, TYPE_CHECKING, Dict, List, Any +from typing import Any, cast, Dict, List, Optional, TYPE_CHECKING if TYPE_CHECKING: from cura.Settings.ExtruderStack import ExtruderStack from cura.Settings.GlobalStack import GlobalStack - from UM.Scene.SceneNode import SceneNode ## Manages all existing extruder stacks. @@ -377,7 +376,7 @@ class ExtruderManager(QObject): # If no extruder has the value, the list will contain the global value. @staticmethod def getExtruderValues(key: str) -> List[Any]: - global_stack = cura.CuraApplication.CuraApplication.getInstance().getGlobalContainerStack() + global_stack = cast(GlobalStack, cura.CuraApplication.CuraApplication.getInstance().getGlobalContainerStack()) #We know that there must be a global stack by the time you're requesting setting values. result = [] for extruder in ExtruderManager.getInstance().getActiveExtruderStacks(): @@ -412,7 +411,7 @@ class ExtruderManager(QObject): # If no extruder has the value, the list will contain the global value. @staticmethod def getDefaultExtruderValues(key: str) -> List[Any]: - global_stack = cura.CuraApplication.CuraApplication.getInstance().getGlobalContainerStack() + global_stack = cast(GlobalStack, cura.CuraApplication.CuraApplication.getInstance().getGlobalContainerStack()) #We know that there must be a global stack by the time you're requesting setting values. context = PropertyEvaluationContext(global_stack) context.context["evaluate_from_container_index"] = 1 # skip the user settings container context.context["override_operators"] = { @@ -479,7 +478,7 @@ class ExtruderManager(QObject): value = value(extruder) else: # Just a value from global. - value = cura.CuraApplication.CuraApplication.getInstance().getGlobalContainerStack().getProperty(key, "value") + value = cast(GlobalStack, cura.CuraApplication.CuraApplication.getInstance().getGlobalContainerStack()).getProperty(key, "value") return value @@ -508,7 +507,7 @@ class ExtruderManager(QObject): if isinstance(value, SettingFunction): value = value(extruder, context = context) else: # Just a value from global. - value = cura.CuraApplication.CuraApplication.getInstance().getGlobalContainerStack().getProperty(key, "value", context = context) + value = cast(GlobalStack, cura.CuraApplication.CuraApplication.getInstance().getGlobalContainerStack()).getProperty(key, "value", context = context) return value @@ -521,7 +520,7 @@ class ExtruderManager(QObject): # \return The effective value @staticmethod def getResolveOrValue(key: str) -> Any: - global_stack = cura.CuraApplication.CuraApplication.getInstance().getGlobalContainerStack() + global_stack = cast(GlobalStack, cura.CuraApplication.CuraApplication.getInstance().getGlobalContainerStack()) resolved_value = global_stack.getProperty(key, "value") return resolved_value @@ -535,7 +534,7 @@ class ExtruderManager(QObject): # \return The effective value @staticmethod def getDefaultResolveOrValue(key: str) -> Any: - global_stack = cura.CuraApplication.CuraApplication.getInstance().getGlobalContainerStack() + global_stack = cast(GlobalStack, cura.CuraApplication.CuraApplication.getInstance().getGlobalContainerStack()) context = PropertyEvaluationContext(global_stack) context.context["evaluate_from_container_index"] = 1 # skip the user settings container context.context["override_operators"] = { From fb9c21e9149b421440ad8ae77640f68a55b108d7 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Fri, 14 Sep 2018 12:41:03 +0200 Subject: [PATCH 10/16] Fix imports --- cura/Settings/ExtruderManager.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cura/Settings/ExtruderManager.py b/cura/Settings/ExtruderManager.py index 26a030ffde..ed7f6dd4f8 100755 --- a/cura/Settings/ExtruderManager.py +++ b/cura/Settings/ExtruderManager.py @@ -5,6 +5,7 @@ from PyQt5.QtCore import pyqtSignal, pyqtProperty, QObject, QVariant # For comm from UM.FlameProfiler import pyqtSlot import cura.CuraApplication # To get the global container stack to find the current machine. +from cura.Settings.GlobalStack import GlobalStack from UM.Logger import Logger from UM.Scene.Iterator.DepthFirstIterator import DepthFirstIterator from UM.Scene.SceneNode import SceneNode @@ -19,7 +20,6 @@ from typing import Any, cast, Dict, List, Optional, TYPE_CHECKING if TYPE_CHECKING: from cura.Settings.ExtruderStack import ExtruderStack - from cura.Settings.GlobalStack import GlobalStack ## Manages all existing extruder stacks. From 5c739219439f8bc8b2865bdfbbbea1df8f56d228 Mon Sep 17 00:00:00 2001 From: Remco Burema Date: Fri, 14 Sep 2018 14:35:10 +0200 Subject: [PATCH 11/16] [CURA-5725] Revert "Set simulation path to 0 after updating layer" This reverts commit 3da6e3c4535db85a921bf5770903bd1a729946e1. --- plugins/SimulationView/SimulationView.qml | 1 - 1 file changed, 1 deletion(-) diff --git a/plugins/SimulationView/SimulationView.qml b/plugins/SimulationView/SimulationView.qml index 8d671dcb56..b4ca9584c7 100644 --- a/plugins/SimulationView/SimulationView.qml +++ b/plugins/SimulationView/SimulationView.qml @@ -670,7 +670,6 @@ Item onCurrentLayerChanged: { playButton.pauseSimulation() - pathSlider.setHandleValue(0) // After updating the layer set Path slider to 0 layerSlider.setUpperValue(UM.SimulationView.currentLayer) } } From 4c460b6fa552bf1888bd3e57003d88163ac8dd76 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Fri, 14 Sep 2018 16:15:56 +0200 Subject: [PATCH 12/16] Prevent crash if sdk_version is "dev" --- plugins/Toolbox/src/Toolbox.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/plugins/Toolbox/src/Toolbox.py b/plugins/Toolbox/src/Toolbox.py index 9e9fdd6f29..4c1cd94b4f 100644 --- a/plugins/Toolbox/src/Toolbox.py +++ b/plugins/Toolbox/src/Toolbox.py @@ -488,14 +488,17 @@ class Toolbox(QObject, Extension): local_version = Version(local_package["package_version"]) remote_version = Version(remote_package["package_version"]) - + if self._getSDKVersion() == "dev": + sdk_version = int(self._plugin_registry.APIVersion) + else: + sdk_version = int(self._getSDKVersion()) can_upgrade = False if remote_version > local_version: can_upgrade = True # A package with the same version can be built to have different SDK versions. So, for a package with the same # version, we also need to check if the current one has a lower SDK version. If so, this package should also # be upgradable. - elif remote_version == local_version and local_package.get("sdk_version", 0) < int(self._getSDKVersion()): + elif remote_version == local_version and local_package.get("sdk_version", 0) < sdk_version: can_upgrade = True return can_upgrade From ade2b565bcec08e2b7fce6ce106ff375bfdae513 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Mon, 17 Sep 2018 10:30:08 +0200 Subject: [PATCH 13/16] Add 3.5 change log Contributes to issue CURA-5710. --- plugins/ChangeLogPlugin/ChangeLog.txt | 96 +++++++++++++++++++++++++++ 1 file changed, 96 insertions(+) diff --git a/plugins/ChangeLogPlugin/ChangeLog.txt b/plugins/ChangeLogPlugin/ChangeLog.txt index aefeb92ce5..9075d9be7d 100755 --- a/plugins/ChangeLogPlugin/ChangeLog.txt +++ b/plugins/ChangeLogPlugin/ChangeLog.txt @@ -1,3 +1,99 @@ +[3.5.0] +*Monitor page +The monitor page of Ultimaker Cura has been remodeled for better consistency with the Cura Connect ‘Print jobs’ interface. This means less switching between interfaces, and more control from within Ultimaker Cura. + +*Open recent projects +Project files can now be found in the ‘Open Recent’ menu. + +*New tool hotkeys +New hotkeys have been assigned for quick toggling between the translate (T), scale (S), rotate (R) and mirror (M) tools. + +*Project files use 3MF only +A 3MF extension is now used for project files. The ‘.curaproject’ extension is no longer used. + +*Camera maximum zoom +The maximum zoom has been adjusted to scale with the size of the selected printer. This fixes third-party printers with huge build volumes to be correctly visible. + +*Corrected width of layer number box +The layer number indicator in the layer view now displays numbers above 999 correctly. + +*Materials preferences +This screen has been redesigned to improve user experience. Materials can now be set as a favorites, so they can be easily accessed in the material selection panel at the top-right of the screen. + +*Installed packages checkmark +Packages that are already installed in the Toolbox are now have a checkmark for easy reference. + +*Mac OSX save dialog +The save dialog has been restored to its native behavior and bugs have been fixed. + +*Removed .gz extension +Saving compressed g-code files from the save dialog has been removed because of incompatibility with MacOS. If sending jobs over Wi-Fi, g-code is still compressed. + +*Updates to Chinese translations +Improved and updated Chinese translations. Contributed by MarmaladeForMeat. + +*Save project +Saving the project no longer triggers the project to reslice. + +*Improved processing of overhang walls +Overhang walls are detected and printed with different speeds. It will not start a perimeter on an overhanging wall. The quality of overhanging walls may be improved by printing those at a different speed. Contributed by smartavionics. + +*Prime tower reliability +The prime tower has been improved for better reliability. This is especially useful when printing with two materials that do not adhere well. + +*Support infill line direction +The support infill lines can now be rotated to increase the supporting capabilities and reduce artifacts on the model. This setting rotates existing patterns, like triangle support infill. Contributed by fieldOfView. + +*Minimum polygon circumference +Polygons in sliced layers that have a circumference smaller than the setting value will be filtered out. Lower values lead to higher resolution meshes at the cost of increased slicing time. This setting is ideal for very tiny prints with a lot of detail, or for SLA printers. Contributed by cubiq. + +*Initial layer support line distance. This setting enables the user to reduce or increase the density of the support initial layer in order to increase or reduce adhesion to the build plate and the overall strength. + +*Extra infill wall line count +Adds extra walls around infill. Contributed by BagelOrb. + +*Multiply infill +Creates multiple infill lines on the same pattern for sturdier infill. Contributed by BagelOrb. + +*Connected infill polygons +Connecting infill lines now also works with concentric and cross infill patterns. The benefit would be stronger infill and more consistent material flow/saving retractions. Contributed by BagelOrb. + +*Fan speed override +New setting to modify the fan speed of bridged areas. This setting can be found in Support settings > Fan Speed Override when support is enabled. Contributed by smartavionics. + +*Minimum wall flow +New setting to define a minimum flow for thin printed walls. Contributed by smartavionics. + +*Custom support +A tool similar to the support blocker that adds cubes of support to the model manually by clicking parts of it. Contributed by Lokster. + +*Quickly toggle autoslicing +Adds a pause/play button to the progress bar to quickly toggle autoslicing. Contributed by fieldOfview. + +*Cura-DuetRRFPlugin +Adds output devices for a Duet RepRapFirmware printer: "Print", "Simulate", and "Upload". Contributed by Kriechi. + +*Dremel 3D20 +This plugin adds the Dremel printer to Ultimaker Cura. Contributed by Kriechi. + +*Bug fixes +- Removed extra M109 commands. Older versions would generate superfluous M109 commands. This has been fixed for better temperature stability when printing. +- Fixed minor mesh handling bugs. A few combinations of modifier meshes now lead to expected behavior. +- Removed unnecessary travels. Connected infill lines are now always printed completely connected, without unnecessary travel moves. +- Removed concentric 3D infill. This infill type has been removed due to lack of reliability. +- Extra skin wall count. Fixed an issue that caused extra print moves with this setting enabled. +- Concentric skin. Small gaps in concentric skin are now filled correctly. +- Order of printed models. The order of a large batch of printed models is now more consistent, instead of random. + +*Third party printers +- TiZYX +- Winbo +- Tevo Tornado +- Creality CR-10S +- Wanhao Duplicator +- Deltacomb (update) +- Dacoma (update) + [3.4.1] *Bug fixes - Fixed an issue that would occasionally cause an unnecessary extra skin wall to be printed, which increased print time. From 8a94042a1f4490c75bf83db5840878866983574b Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Mon, 17 Sep 2018 10:51:56 +0200 Subject: [PATCH 14/16] Fix icon name role The icons were not displaying in the context menu of the settings. --- cura/Settings/SidebarCustomMenuItemsModel.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cura/Settings/SidebarCustomMenuItemsModel.py b/cura/Settings/SidebarCustomMenuItemsModel.py index ec926363f5..7177d26923 100644 --- a/cura/Settings/SidebarCustomMenuItemsModel.py +++ b/cura/Settings/SidebarCustomMenuItemsModel.py @@ -18,7 +18,7 @@ class SidebarCustomMenuItemsModel(ListModel): self.addRoleName(self.name_role, "name") self.addRoleName(self.actions_role, "actions") self.addRoleName(self.menu_item_role, "menu_item") - self.addRoleName(self.menu_item_icon_name_role, "iconName") + self.addRoleName(self.menu_item_icon_name_role, "icon_name") self._updateExtensionList() def _updateExtensionList(self)-> None: From 093c5487bff2509797d14f5ebba1ffb956ee98cb Mon Sep 17 00:00:00 2001 From: Orel Date: Wed, 12 Sep 2018 11:26:59 +0200 Subject: [PATCH 15/16] - Rename Dagoma Magis profile. - Remove machine_gcode_flavor definition as the default value fits the needs. --- .../{dagoma_neva_magis.def.json => dagoma_magis.def.json} | 7 ++----- resources/definitions/dagoma_neva.def.json | 3 --- ...xtruder_0.def.json => dagoma_magis_extruder_0.def.json} | 2 +- .../quality/dagoma/dagoma_neva_magis_pla_fast.inst.cfg | 2 +- .../quality/dagoma/dagoma_neva_magis_pla_fine.inst.cfg | 2 +- .../quality/dagoma/dagoma_neva_magis_pla_standard.inst.cfg | 2 +- 6 files changed, 6 insertions(+), 12 deletions(-) rename resources/definitions/{dagoma_neva_magis.def.json => dagoma_magis.def.json} (92%) rename resources/extruders/{dagoma_neva_magis_extruder_0.def.json => dagoma_magis_extruder_0.def.json} (90%) diff --git a/resources/definitions/dagoma_neva_magis.def.json b/resources/definitions/dagoma_magis.def.json similarity index 92% rename from resources/definitions/dagoma_neva_magis.def.json rename to resources/definitions/dagoma_magis.def.json index 0b7b50cb5f..75e6e449cd 100644 --- a/resources/definitions/dagoma_neva_magis.def.json +++ b/resources/definitions/dagoma_magis.def.json @@ -1,5 +1,5 @@ { - "name": "Dagoma NEVA Magis", + "name": "Dagoma Magis", "version": 2, "inherits": "fdmprinter", "metadata": { @@ -13,7 +13,7 @@ "has_materials": true, "machine_extruder_trains": { - "0": "dagoma_neva_magis_extruder_0" + "0": "dagoma_magis_extruder_0" } }, "overrides": { @@ -43,9 +43,6 @@ "machine_shape": { "default_value": "elliptic" }, - "machine_gcode_flavor": { - "default_value": "RepRap" - }, "machine_start_gcode": { "default_value": ";Gcode by Cura\nG90\nG28\nM107\nM109 R100\nG29\nM109 S{material_print_temperature_layer_0} U-55 X55 V-85 Y-85 W0.26 Z0.26\nM82\nG92 E0\nG1 F200 E6\nG92 E0\nG1 F200 E-3.5\nG0 Z0.15\nG0 X10\nG0 Z3\nG1 F6000\n" }, diff --git a/resources/definitions/dagoma_neva.def.json b/resources/definitions/dagoma_neva.def.json index cdd5725765..67c8795678 100644 --- a/resources/definitions/dagoma_neva.def.json +++ b/resources/definitions/dagoma_neva.def.json @@ -43,9 +43,6 @@ "machine_shape": { "default_value": "elliptic" }, - "machine_gcode_flavor": { - "default_value": "RepRap" - }, "machine_start_gcode": { "default_value": ";Gcode by Cura\nG90\nG28\nM107\nM109 R100\nG29\nM109 S{material_print_temperature_layer_0} U-55 X55 V-85 Y-85 W0.26 Z0.26\nM82\nG92 E0\nG1 F200 E6\nG92 E0\nG1 F200 E-3.5\nG0 Z0.15\nG0 X10\nG0 Z3\nG1 F6000\n" }, diff --git a/resources/extruders/dagoma_neva_magis_extruder_0.def.json b/resources/extruders/dagoma_magis_extruder_0.def.json similarity index 90% rename from resources/extruders/dagoma_neva_magis_extruder_0.def.json rename to resources/extruders/dagoma_magis_extruder_0.def.json index 0d5fd3c9b4..0a5850f2ed 100644 --- a/resources/extruders/dagoma_neva_magis_extruder_0.def.json +++ b/resources/extruders/dagoma_magis_extruder_0.def.json @@ -3,7 +3,7 @@ "name": "Extruder 1", "inherits": "fdmextruder", "metadata": { - "machine": "dagoma_neva_magis", + "machine": "dagoma_magis", "position": "0" }, diff --git a/resources/quality/dagoma/dagoma_neva_magis_pla_fast.inst.cfg b/resources/quality/dagoma/dagoma_neva_magis_pla_fast.inst.cfg index e52cba165c..d87c913eb6 100644 --- a/resources/quality/dagoma/dagoma_neva_magis_pla_fast.inst.cfg +++ b/resources/quality/dagoma/dagoma_neva_magis_pla_fast.inst.cfg @@ -1,7 +1,7 @@ [general] version = 4 name = Fast -definition = dagoma_neva_magis +definition = dagoma_magis [metadata] setting_version = 5 diff --git a/resources/quality/dagoma/dagoma_neva_magis_pla_fine.inst.cfg b/resources/quality/dagoma/dagoma_neva_magis_pla_fine.inst.cfg index 033cfbc8fa..d046726e0e 100644 --- a/resources/quality/dagoma/dagoma_neva_magis_pla_fine.inst.cfg +++ b/resources/quality/dagoma/dagoma_neva_magis_pla_fine.inst.cfg @@ -1,7 +1,7 @@ [general] version = 4 name = Fine -definition = dagoma_neva_magis +definition = dagoma_magis [metadata] setting_version = 5 diff --git a/resources/quality/dagoma/dagoma_neva_magis_pla_standard.inst.cfg b/resources/quality/dagoma/dagoma_neva_magis_pla_standard.inst.cfg index d07d5b58d5..39961ea93b 100644 --- a/resources/quality/dagoma/dagoma_neva_magis_pla_standard.inst.cfg +++ b/resources/quality/dagoma/dagoma_neva_magis_pla_standard.inst.cfg @@ -1,7 +1,7 @@ [general] version = 4 name = Standard -definition = dagoma_neva_magis +definition = dagoma_magis [metadata] setting_version = 5 From 58c7524164d01df5e31a366429ad275e170f21d8 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Mon, 17 Sep 2018 11:38:51 +0200 Subject: [PATCH 16/16] Also rename dagoma_neva_magis profiles to dagoma_magis --- ...eva_magis_pla_fast.inst.cfg => dagoma_magis_pla_fast.inst.cfg} | 0 ...eva_magis_pla_fine.inst.cfg => dagoma_magis_pla_fine.inst.cfg} | 0 ...s_pla_standard.inst.cfg => dagoma_magis_pla_standard.inst.cfg} | 0 3 files changed, 0 insertions(+), 0 deletions(-) rename resources/quality/dagoma/{dagoma_neva_magis_pla_fast.inst.cfg => dagoma_magis_pla_fast.inst.cfg} (100%) rename resources/quality/dagoma/{dagoma_neva_magis_pla_fine.inst.cfg => dagoma_magis_pla_fine.inst.cfg} (100%) rename resources/quality/dagoma/{dagoma_neva_magis_pla_standard.inst.cfg => dagoma_magis_pla_standard.inst.cfg} (100%) diff --git a/resources/quality/dagoma/dagoma_neva_magis_pla_fast.inst.cfg b/resources/quality/dagoma/dagoma_magis_pla_fast.inst.cfg similarity index 100% rename from resources/quality/dagoma/dagoma_neva_magis_pla_fast.inst.cfg rename to resources/quality/dagoma/dagoma_magis_pla_fast.inst.cfg diff --git a/resources/quality/dagoma/dagoma_neva_magis_pla_fine.inst.cfg b/resources/quality/dagoma/dagoma_magis_pla_fine.inst.cfg similarity index 100% rename from resources/quality/dagoma/dagoma_neva_magis_pla_fine.inst.cfg rename to resources/quality/dagoma/dagoma_magis_pla_fine.inst.cfg diff --git a/resources/quality/dagoma/dagoma_neva_magis_pla_standard.inst.cfg b/resources/quality/dagoma/dagoma_magis_pla_standard.inst.cfg similarity index 100% rename from resources/quality/dagoma/dagoma_neva_magis_pla_standard.inst.cfg rename to resources/quality/dagoma/dagoma_magis_pla_standard.inst.cfg