Browse Source

Merge branch '5.7' into add_cad_plugin

Erwan MATHIEU 11 months ago
parent
commit
b424b22114

+ 5 - 5
conandata.yml

@@ -1,9 +1,9 @@
-version: "5.7.0-beta.0"
+version: "5.7.0-beta.1"
 requirements:
 requirements:
-  - "uranium/(latest)@ultimaker/stable"
-  - "curaengine/(latest)@ultimaker/stable"
-  - "cura_binary_data/(latest)@ultimaker/stable"
-  - "fdm_materials/(latest)@ultimaker/stable"
+  - "uranium/5.7.0-beta.1"
+  - "curaengine/5.7.0-beta.1"
+  - "cura_binary_data/5.7.0-beta.1"
+  - "fdm_materials/5.7.0-beta.1"
   - "curaengine_plugin_gradual_flow/0.1.0-beta.3"
   - "curaengine_plugin_gradual_flow/0.1.0-beta.3"
   - "dulcificum/latest@ultimaker/testing"
   - "dulcificum/latest@ultimaker/testing"
   - "pysavitar/5.3.0"
   - "pysavitar/5.3.0"

+ 1 - 1
cura/ApplicationMetadata.py

@@ -14,7 +14,7 @@ DEFAULT_CURA_LATEST_URL = "https://software.ultimaker.com/latest.json"
 # Each release has a fixed SDK version coupled with it. It doesn't make sense to make it configurable because, for
 # Each release has a fixed SDK version coupled with it. It doesn't make sense to make it configurable because, for
 # example Cura 3.2 with SDK version 6.1 will not work. So the SDK version is hard-coded here and left out of the
 # example Cura 3.2 with SDK version 6.1 will not work. So the SDK version is hard-coded here and left out of the
 # CuraVersion.py.in template.
 # CuraVersion.py.in template.
-CuraSDKVersion = "8.6.0"
+CuraSDKVersion = "8.7.0"
 
 
 try:
 try:
     from cura.CuraVersion import CuraLatestURL
     from cura.CuraVersion import CuraLatestURL

+ 1 - 1
cura/CuraApplication.py

@@ -138,7 +138,7 @@ class CuraApplication(QtApplication):
     # SettingVersion represents the set of settings available in the machine/extruder definitions.
     # SettingVersion represents the set of settings available in the machine/extruder definitions.
     # You need to make sure that this version number needs to be increased if there is any non-backwards-compatible
     # You need to make sure that this version number needs to be increased if there is any non-backwards-compatible
     # changes of the settings.
     # changes of the settings.
-    SettingVersion = 22
+    SettingVersion = 23
 
 
     Created = False
     Created = False
 
 

+ 5 - 1
plugins/3MFReader/SpecificSettingsModel.py

@@ -1,7 +1,7 @@
 # Copyright (c) 2024 Ultimaker B.V.
 # Copyright (c) 2024 Ultimaker B.V.
 # Cura is released under the terms of the LGPLv3 or higher.
 # Cura is released under the terms of the LGPLv3 or higher.
 
 
-from PyQt6.QtCore import Qt
+from PyQt6.QtCore import Qt, pyqtSignal
 
 
 from UM.Logger import Logger
 from UM.Logger import Logger
 from UM.Settings.SettingDefinition import SettingDefinition
 from UM.Settings.SettingDefinition import SettingDefinition
@@ -22,6 +22,8 @@ class SpecificSettingsModel(ListModel):
         self._i18n_catalog = None
         self._i18n_catalog = None
         self._update()
         self._update()
 
 
+    modelChanged = pyqtSignal()
+
 
 
     def addSettingsFromStack(self, stack, category, settings):
     def addSettingsFromStack(self, stack, category, settings):
         for setting, value in settings.items():
         for setting, value in settings.items():
@@ -39,8 +41,10 @@ class SpecificSettingsModel(ListModel):
                 "label": stack.getProperty(setting, "label"),
                 "label": stack.getProperty(setting, "label"),
                 "value": value
                 "value": value
             })
             })
+            self.modelChanged.emit()
 
 
     def _update(self):
     def _update(self):
         Logger.debug(f"Updating {self.__class__.__name__}")
         Logger.debug(f"Updating {self.__class__.__name__}")
         self.setItems([])
         self.setItems([])
+        self.modelChanged.emit()
         return
         return

+ 6 - 1
plugins/3MFReader/WorkspaceDialog.py

@@ -77,6 +77,7 @@ class WorkspaceDialog(QObject):
         self._is_compatible_machine = False
         self._is_compatible_machine = False
         self._allow_create_machine = True
         self._allow_create_machine = True
         self._exported_settings_model = SpecificSettingsModel()
         self._exported_settings_model = SpecificSettingsModel()
+        self._exported_settings_model.modelChanged.connect(self.exportedSettingModelChanged.emit)
         self._current_machine_pos_index = 0
         self._current_machine_pos_index = 0
         self._is_ucp = False
         self._is_ucp = False
 
 
@@ -104,6 +105,7 @@ class WorkspaceDialog(QObject):
     missingPackagesChanged = pyqtSignal()
     missingPackagesChanged = pyqtSignal()
     isCompatibleMachineChanged = pyqtSignal()
     isCompatibleMachineChanged = pyqtSignal()
     isUcpChanged = pyqtSignal()
     isUcpChanged = pyqtSignal()
+    exportedSettingModelChanged = pyqtSignal()
 
 
     @pyqtProperty(bool, notify = isPrinterGroupChanged)
     @pyqtProperty(bool, notify = isPrinterGroupChanged)
     def isPrinterGroup(self) -> bool:
     def isPrinterGroup(self) -> bool:
@@ -356,10 +358,13 @@ class WorkspaceDialog(QObject):
     def allowCreateMachine(self):
     def allowCreateMachine(self):
         return self._allow_create_machine
         return self._allow_create_machine
 
 
-    @pyqtProperty(QObject)
+    @pyqtProperty(QObject, notify=exportedSettingModelChanged)
     def exportedSettingModel(self):
     def exportedSettingModel(self):
         return self._exported_settings_model
         return self._exported_settings_model
 
 
+    @pyqtProperty(int, notify=exportedSettingModelChanged)
+    def exportedSettingModelRowCount(self):
+        return self._exported_settings_model.rowCount()
     @pyqtSlot()
     @pyqtSlot()
     def closeBackend(self) -> None:
     def closeBackend(self) -> None:
         """Close the backend: otherwise one could end up with "Slicing..."""
         """Close the backend: otherwise one could end up with "Slicing..."""

+ 15 - 1
plugins/3MFReader/WorkspaceDialog.qml

@@ -35,6 +35,19 @@ UM.Dialog
             anchors.topMargin: UM.Theme.getSize("default_margin").height
             anchors.topMargin: UM.Theme.getSize("default_margin").height
             anchors.leftMargin: UM.Theme.getSize("default_margin").height
             anchors.leftMargin: UM.Theme.getSize("default_margin").height
         }
         }
+
+        Cura.TertiaryButton
+        {
+            id: learnMoreButton
+            visible: manager.isUcp
+            anchors.right: parent.right
+            anchors.topMargin: UM.Theme.getSize("default_margin").height
+            anchors.rightMargin: UM.Theme.getSize("default_margin").height
+            text: catalog.i18nc("@button", "Learn more")
+            iconSource: UM.Theme.getIcon("LinkExternal")
+            isIconOnRightSide: true
+            onClicked: Qt.openUrlExternally("https://support.ultimaker.com/s/article/000002979")
+        }
     }
     }
 
 
     Rectangle
     Rectangle
@@ -171,8 +184,9 @@ UM.Dialog
 
 
                         WorkspaceRow
                         WorkspaceRow
                         {
                         {
+                            id: numberOfOverrides
                             leftLabelText: catalog.i18nc("@action:label", "Settings Loaded from UCP file")
                             leftLabelText: catalog.i18nc("@action:label", "Settings Loaded from UCP file")
-                            rightLabelText: catalog.i18ncp("@action:label", "%1 override", "%1 overrides", manager.exportedSettingModel.rowCount()).arg(manager.exportedSettingModel.rowCount())
+                            rightLabelText: catalog.i18ncp("@action:label", "%1 override", "%1 overrides", manager.exportedSettingModelRowCount).arg(manager.exportedSettingModelRowCount)
                             buttonText: tableViewSpecificSettings.shouldBeVisible ? catalog.i18nc("@action:button", "Hide settings") : catalog.i18nc("@action:button", "Show settings")
                             buttonText: tableViewSpecificSettings.shouldBeVisible ? catalog.i18nc("@action:button", "Hide settings") : catalog.i18nc("@action:button", "Show settings")
                             onButtonClicked: tableViewSpecificSettings.shouldBeVisible = !tableViewSpecificSettings.shouldBeVisible
                             onButtonClicked: tableViewSpecificSettings.shouldBeVisible = !tableViewSpecificSettings.shouldBeVisible
                         }
                         }

+ 1 - 1
plugins/3MFReader/WorkspaceSection.qml

@@ -91,11 +91,11 @@ Item
         }
         }
     }
     }
 
 
-
     Loader
     Loader
     {
     {
         width: parent.width
         width: parent.width
         height: content.height
         height: content.height
+        z: -1
         anchors.top: sectionTitleRow.bottom
         anchors.top: sectionTitleRow.bottom
         sourceComponent: content
         sourceComponent: content
     }
     }

+ 15 - 5
plugins/3MFWriter/UCPDialog.qml

@@ -36,13 +36,23 @@ UM.Dialog
             anchors.leftMargin: UM.Theme.getSize("default_margin").width
             anchors.leftMargin: UM.Theme.getSize("default_margin").width
             anchors.rightMargin: anchors.leftMargin
             anchors.rightMargin: anchors.leftMargin
 
 
-            UM.Label
+            RowLayout
             {
             {
-                id: titleLabel
-                text: catalog.i18nc("@action:title Don't translate 'Universal Cura Project'", "Summary - Universal Cura Project")
-                font: UM.Theme.getFont("large")
+                UM.Label
+                {
+                    id: titleLabel
+                    text: catalog.i18nc("@action:title Don't translate 'Universal Cura Project'", "Summary - Universal Cura Project")
+                    font: UM.Theme.getFont("large")
+                }
+                Cura.TertiaryButton
+                {
+                    id: learnMoreButton
+                    text: catalog.i18nc("@button", "Learn more")
+                    iconSource: UM.Theme.getIcon("LinkExternal")
+                    isIconOnRightSide: true
+                    onClicked: Qt.openUrlExternally("https://support.ultimaker.com/s/article/000002979")
+                }
             }
             }
-
             UM.Label
             UM.Label
             {
             {
                 id: descriptionLabel
                 id: descriptionLabel

+ 1 - 1
plugins/SimulationView/SimulationPass.py

@@ -153,7 +153,7 @@ class SimulationPass(RenderPass):
                         # In the current layer, we show just the indicated paths
                         # In the current layer, we show just the indicated paths
                         if layer == self._layer_view._current_layer_num:
                         if layer == self._layer_view._current_layer_num:
                             # We look for the position of the head, searching the point of the current path
                             # We look for the position of the head, searching the point of the current path
-                            index = int(self._layer_view.getCurrentPath())
+                            index = int(self._layer_view.getCurrentPath()) if self._layer_view.getCurrentPath() else 0
                             for polygon in layer_data.getLayer(layer).polygons:
                             for polygon in layer_data.getLayer(layer).polygons:
                                 # The size indicates all values in the two-dimension array, and the second dimension is
                                 # The size indicates all values in the two-dimension array, and the second dimension is
                                 # always size 3 because we have 3D points.
                                 # always size 3 because we have 3D points.

+ 5 - 0
plugins/VersionUpgrade/VersionUpgrade56to57/VersionUpgrade56to57.py

@@ -68,6 +68,11 @@ class VersionUpgrade56to57(VersionUpgrade):
                 if removed in parser["values"]:
                 if removed in parser["values"]:
                     del parser["values"][removed]
                     del parser["values"][removed]
 
 
+            if "brim_outside_only" in parser["values"]:
+                parser["values"]["brim_location"] = "outside" if parser["values"][
+                                                                     "brim_outside_only"] == "True" else "everywhere"
+                del parser["values"]["brim_outside_only"]
+
         result = io.StringIO()
         result = io.StringIO()
         parser.write(result)
         parser.write(result)
         return [filename], [result.getvalue()]
         return [filename], [result.getvalue()]

Some files were not shown because too many files changed in this diff