Browse Source

Merge remote-tracking branch 'origin/3.6'

Lipu Fei 6 years ago
parent
commit
50d92df8a8

+ 7 - 4
plugins/ChangeLogPlugin/ChangeLog.txt

@@ -26,14 +26,17 @@ Fullscreen mode can be toggled using the View menu or with the keyboard shortcut
 *Configuration error message
 In previous versions, Ultimaker Cura would display an error dialog explaining when something happened to user configuration files, including the option to reset to factory defaults. This would not warn about losing the current printer and print profile settings, so this information has been added.
 
-*Materials in the Toolbox
-A new tab has been added to the Toolbox that includes downloadable material profiles, to quickly and easily prepare models for a range of third-party materials.
+*Rename Toolbox to Marketplace
+The entry points to the Toolbox are now renamed to Marketplace.
+
+*Materials in the Marketplace
+A new tab has been added to the Marketplace that includes downloadable material profiles, to quickly and easily prepare models for a range of third-party materials.
 
 *New third-party definitions
-New profiles added for Anycube 4MAx and Tizyx K25.
+New profiles added for Anycube 4MAx and Tizyx K25. Contributed by jscurtu and ValentinPitre respectively.
 
 *Improved definitions for Ender-3
-The Ender-3 build plate size has been adjusted to the correct size of 235 x 235 mm, corrected the start-up sequence, and the printhead position has been adjusted when prints are purged or completed.
+The Ender-3 build plate size has been adjusted to the correct size of 235 x 235 mm, corrected the start-up sequence, and the printhead position has been adjusted when prints are purged or completed. Contributed by stelgenhof.
 
 *Add mesh names to slicing message
 Added comment generation to indicate which mesh the GCODE after this comment is constructing. Contributed by paukstelis.

+ 1 - 1
plugins/Toolbox/resources/qml/Toolbox.qml

@@ -10,7 +10,7 @@ Window
 {
     id: base
     property var selection: null
-    title: catalog.i18nc("@title", "Toolbox")
+    title: catalog.i18nc("@title", "Marketplace")
     modality: Qt.ApplicationModal
     flags: Qt.Dialog | Qt.CustomizeWindowHint | Qt.WindowTitleHint | Qt.WindowCloseButtonHint
 

+ 1 - 1
plugins/Toolbox/resources/qml/ToolboxDownloadsShowcaseTile.qml

@@ -1,5 +1,5 @@
 // Copyright (c) 2018 Ultimaker B.V.
-// Toolbox is released under the terms of the LGPLv3 or higher.
+// Cura is released under the terms of the LGPLv3 or higher.
 
 import QtQuick 2.7
 import QtQuick.Controls 1.4

+ 1 - 1
plugins/Toolbox/src/PackagesModel.py

@@ -52,7 +52,7 @@ class PackagesModel(ListModel):
         items = []
 
         if self._metadata is None:
-            Logger.logException("w", "Failed to load packages for Toolbox")
+            Logger.logException("w", "Failed to load packages for Marketplace")
             self.setItems(items)
             return
 

+ 12 - 12
plugins/Toolbox/src/Toolbox.py

@@ -245,7 +245,7 @@ class Toolbox(QObject, Extension):
             self._dialog = self._createDialog("Toolbox.qml")
 
         if not self._dialog:
-            Logger.log("e", "Unexpected error trying to create the 'Toolbox' dialog.")
+            Logger.log("e", "Unexpected error trying to create the 'Marketplace' dialog.")
             return
 
         self._dialog.show()
@@ -254,7 +254,7 @@ class Toolbox(QObject, Extension):
         self.enabledChanged.emit()
 
     def _createDialog(self, qml_name: str) -> Optional[QObject]:
-        Logger.log("d", "Toolbox: Creating dialog [%s].", qml_name)
+        Logger.log("d", "Marketplace: Creating dialog [%s].", qml_name)
         plugin_path = PluginRegistry.getInstance().getPluginPath(self.getPluginId())
         if not plugin_path:
             return None
@@ -262,7 +262,7 @@ class Toolbox(QObject, Extension):
         
         dialog = self._application.createQmlComponent(path, {"toolbox": self})
         if not dialog:
-            raise Exception("Failed to create toolbox dialog")
+            raise Exception("Failed to create Marketplace dialog")
         return dialog
 
     def _convertPluginMetadata(self, plugin: Dict[str, Any]) -> Dict[str, Any]:
@@ -578,7 +578,7 @@ class Toolbox(QObject, Extension):
     # Make API Calls
     # --------------------------------------------------------------------------
     def _makeRequestByType(self, type: str) -> None:
-        Logger.log("i", "Toolbox: Requesting %s metadata from server.", type)
+        Logger.log("i", "Marketplace: Requesting %s metadata from server.", type)
         request = QNetworkRequest(self._request_urls[type])
         request.setRawHeader(*self._request_header)
         if self._network_manager:
@@ -586,7 +586,7 @@ class Toolbox(QObject, Extension):
 
     @pyqtSlot(str)
     def startDownload(self, url: str) -> None:
-        Logger.log("i", "Toolbox: Attempting to download & install package from %s.", url)
+        Logger.log("i", "Marketplace: Attempting to download & install package from %s.", url)
         url = QUrl(url)
         self._download_request = QNetworkRequest(url)
         if hasattr(QNetworkRequest, "FollowRedirectsAttribute"):
@@ -603,7 +603,7 @@ class Toolbox(QObject, Extension):
 
     @pyqtSlot()
     def cancelDownload(self) -> None:
-        Logger.log("i", "Toolbox: User cancelled the download of a package.")
+        Logger.log("i", "Marketplace: User cancelled the download of a package.")
         self.resetDownload()
 
     def resetDownload(self) -> None:
@@ -690,7 +690,7 @@ class Toolbox(QObject, Extension):
 
                             return
                         except json.decoder.JSONDecodeError:
-                            Logger.log("w", "Toolbox: Received invalid JSON for %s.", type)
+                            Logger.log("w", "Marketplace: Received invalid JSON for %s.", type)
                             break
                     else:
                         self.setViewPage("errored")
@@ -717,10 +717,10 @@ class Toolbox(QObject, Extension):
                 self._onDownloadComplete(file_path)
 
     def _onDownloadComplete(self, file_path: str) -> None:
-        Logger.log("i", "Toolbox: Download complete.")
+        Logger.log("i", "Marketplace: Download complete.")
         package_info = self._package_manager.getPackageInfo(file_path)
         if not package_info:
-            Logger.log("w", "Toolbox: Package file [%s] was not a valid CuraPackage.", file_path)
+            Logger.log("w", "Marketplace: Package file [%s] was not a valid CuraPackage.", file_path)
             return
 
         license_content = self._package_manager.getPackageLicense(file_path)
@@ -819,7 +819,7 @@ class Toolbox(QObject, Extension):
     @pyqtSlot(str, str, str)
     def filterModelByProp(self, model_type: str, filter_type: str, parameter: str) -> None:
         if not self._models[model_type]:
-            Logger.log("w", "Toolbox: Couldn't filter %s model because it doesn't exist.", model_type)
+            Logger.log("w", "Marketplace: Couldn't filter %s model because it doesn't exist.", model_type)
             return
         self._models[model_type].setFilter({filter_type: parameter})
         self.filterChanged.emit()
@@ -827,7 +827,7 @@ class Toolbox(QObject, Extension):
     @pyqtSlot(str, "QVariantMap")
     def setFilters(self, model_type: str, filter_dict: dict) -> None:
         if not self._models[model_type]:
-            Logger.log("w", "Toolbox: Couldn't filter %s model because it doesn't exist.", model_type)
+            Logger.log("w", "Marketplace: Couldn't filter %s model because it doesn't exist.", model_type)
             return
         self._models[model_type].setFilter(filter_dict)
         self.filterChanged.emit()
@@ -835,7 +835,7 @@ class Toolbox(QObject, Extension):
     @pyqtSlot(str)
     def removeFilters(self, model_type: str) -> None:
         if not self._models[model_type]:
-            Logger.log("w", "Toolbox: Couldn't remove filters on %s model because it doesn't exist.", model_type)
+            Logger.log("w", "Marketplace: Couldn't remove filters on %s model because it doesn't exist.", model_type)
             return
         self._models[model_type].setFilter({})
         self.filterChanged.emit()

+ 3 - 2
plugins/UM3NetworkPrinting/resources/qml/PrintJobContextMenu.qml

@@ -33,6 +33,7 @@ Item {
         hoverEnabled: true;
         onClicked: parent.switchPopupState();
         text: "\u22EE"; //Unicode; Three stacked points.
+        visible: printJob.state == "queued" || running ? true : false;
         width: 35 * screenScaleFactor; // TODO: Theme!
     }
 
@@ -101,7 +102,7 @@ Item {
 
             PrintJobContextMenuItem {
                 enabled: {
-                    if (printJob && !running) {
+                    if (printJob && printJob.state == "queued") {
                         if (OutputDevice && OutputDevice.queuedPrintJobs[0]) {
                             return OutputDevice.queuedPrintJobs[0].key != printJob.key;
                         }
@@ -116,7 +117,7 @@ Item {
             }
 
             PrintJobContextMenuItem {
-                enabled: printJob && !running;
+                enabled: printJob && printJob.state == "queued";
                 onClicked: {
                     deleteConfirmationDialog.visible = true;
                     popup.close();

+ 22 - 1
plugins/UM3NetworkPrinting/resources/qml/PrinterCard.qml

@@ -48,11 +48,12 @@ Item {
         Column {
             height: childrenRect.height;
             width: parent.width;
+            spacing: UM.Theme.getSize("default_margin").height;
 
             // Main card
             Item {
                 id: mainCard;
-                height: 60 * screenScaleFactor + 2 * UM.Theme.getSize("default_margin").width;
+                height: 60 * screenScaleFactor + UM.Theme.getSize("default_margin").width;
                 width: parent.width;
 
                 // Machine icon
@@ -223,6 +224,16 @@ Item {
                 }
             }
 
+            HorizontalLine {
+                anchors {
+                    left: parent.left;
+                    leftMargin: UM.Theme.getSize("default_margin").width;
+                    right: parent.right;
+                    rightMargin: UM.Theme.getSize("default_margin").width;
+                }
+                visible: root.printer;
+            }
+
             // Detailed card
             PrinterCardDetails {
                 collapsed: root.collapsed;
@@ -230,6 +241,16 @@ Item {
                 visible: root.printer;
             }
 
+            CameraButton {
+                id: showCameraButton;
+                anchors {
+                    left: parent.left;
+                    leftMargin: UM.Theme.getSize("default_margin").width;
+                }
+                iconSource: "../svg/camera-icon.svg";
+                visible: root.printer && root.printJob;
+            }
+
             // Progress bar
             PrinterCardProgressBar {
                 visible: printer && printer.activePrintJob != null;

+ 0 - 15
plugins/UM3NetworkPrinting/resources/qml/PrinterCardDetails.qml

@@ -32,8 +32,6 @@ Item {
         spacing: UM.Theme.getSize("default_margin").height;
         width: parent.width;
 
-        HorizontalLine {}
-
         PrinterInfoBlock {
             printer: root.printer;
             printJob: root.printer ? root.printer.activePrintJob : null;
@@ -61,7 +59,6 @@ Item {
                 visible: printJob;
             }
         }
-        
 
         PrintJobPreview {
             anchors.horizontalCenter: parent.horizontalCenter;
@@ -69,16 +66,4 @@ Item {
             visible: root.printJob;
         }
     }
-
-    CameraButton {
-        id: showCameraButton;
-        anchors {
-            bottom: contentColumn.bottom;
-            bottomMargin: Math.round(1.5 * UM.Theme.getSize("default_margin").height);
-            left: contentColumn.left;
-            leftMargin: Math.round(0.5 * UM.Theme.getSize("default_margin").width);
-        }
-        iconSource: "../svg/camera-icon.svg";
-        visible: root.printJob;
-    }
 }

+ 104 - 32
resources/bundled_packages/cura.json

@@ -753,8 +753,8 @@
             "package_type": "material",
             "display_name": "Generic ABS",
             "description": "The generic ABS profile which other profiles can be based upon.",
-            "package_version": "1.0.0",
-            "sdk_version": 6,
+            "package_version": "1.1.0",
+            "sdk_version": 5,
             "website": "https://github.com/Ultimaker/fdm_materials",
             "author": {
                 "author_id": "Generic",
@@ -771,8 +771,44 @@
             "package_type": "material",
             "display_name": "Generic BAM",
             "description": "The generic BAM profile which other profiles can be based upon.",
+            "package_version": "1.1.0",
+            "sdk_version": 5,
+            "website": "https://github.com/Ultimaker/fdm_materials",
+            "author": {
+                "author_id": "Generic",
+                "display_name": "Generic",
+                "email": "materials@ultimaker.com",
+                "website": "https://github.com/Ultimaker/fdm_materials",
+                "description": "Professional 3D printing made accessible."
+            }
+        }
+    },
+    "GenericCFFCPE": {
+        "package_info": {
+            "package_id": "GenericCFFCPE",
+            "package_type": "material",
+            "display_name": "Generic CFF CPE",
+            "description": "The generic CFF CPE profile which other profiles can be based upon.",
             "package_version": "1.0.0",
-            "sdk_version": 6,
+            "sdk_version": 5,
+            "website": "https://github.com/Ultimaker/fdm_materials",
+            "author": {
+                "author_id": "Generic",
+                "display_name": "Generic",
+                "email": "materials@ultimaker.com",
+                "website": "https://github.com/Ultimaker/fdm_materials",
+                "description": "Professional 3D printing made accessible."
+            }
+        }
+    },
+    "GenericCFFPA": {
+        "package_info": {
+            "package_id": "GenericCFFPA",
+            "package_type": "material",
+            "display_name": "Generic CFF PA",
+            "description": "The generic CFF PA profile which other profiles can be based upon.",
+            "package_version": "1.0.0",
+            "sdk_version": 5,
             "website": "https://github.com/Ultimaker/fdm_materials",
             "author": {
                 "author_id": "Generic",
@@ -789,8 +825,8 @@
             "package_type": "material",
             "display_name": "Generic CPE",
             "description": "The generic CPE profile which other profiles can be based upon.",
-            "package_version": "1.0.0",
-            "sdk_version": 6,
+            "package_version": "1.1.0",
+            "sdk_version": 5,
             "website": "https://github.com/Ultimaker/fdm_materials",
             "author": {
                 "author_id": "Generic",
@@ -807,8 +843,44 @@
             "package_type": "material",
             "display_name": "Generic CPE+",
             "description": "The generic CPE+ profile which other profiles can be based upon.",
+            "package_version": "1.1.0",
+            "sdk_version": 5,
+            "website": "https://github.com/Ultimaker/fdm_materials",
+            "author": {
+                "author_id": "Generic",
+                "display_name": "Generic",
+                "email": "materials@ultimaker.com",
+                "website": "https://github.com/Ultimaker/fdm_materials",
+                "description": "Professional 3D printing made accessible."
+            }
+        }
+    },
+    "GenericGFFCPE": {
+        "package_info": {
+            "package_id": "GenericGFFCPE",
+            "package_type": "material",
+            "display_name": "Generic GFF CPE",
+            "description": "The generic GFF CPE profile which other profiles can be based upon.",
+            "package_version": "1.0.0",
+            "sdk_version": 5,
+            "website": "https://github.com/Ultimaker/fdm_materials",
+            "author": {
+                "author_id": "Generic",
+                "display_name": "Generic",
+                "email": "materials@ultimaker.com",
+                "website": "https://github.com/Ultimaker/fdm_materials",
+                "description": "Professional 3D printing made accessible."
+            }
+        }
+    },
+    "GenericGFFPA": {
+        "package_info": {
+            "package_id": "GenericGFFPA",
+            "package_type": "material",
+            "display_name": "Generic GFF PA",
+            "description": "The generic GFF PA profile which other profiles can be based upon.",
             "package_version": "1.0.0",
-            "sdk_version": 6,
+            "sdk_version": 5,
             "website": "https://github.com/Ultimaker/fdm_materials",
             "author": {
                 "author_id": "Generic",
@@ -826,7 +898,7 @@
             "display_name": "Generic HIPS",
             "description": "The generic HIPS profile which other profiles can be based upon.",
             "package_version": "1.0.0",
-            "sdk_version": 6,
+            "sdk_version": 5,
             "website": "https://github.com/Ultimaker/fdm_materials",
             "author": {
                 "author_id": "Generic",
@@ -843,8 +915,8 @@
             "package_type": "material",
             "display_name": "Generic Nylon",
             "description": "The generic Nylon profile which other profiles can be based upon.",
-            "package_version": "1.0.0",
-            "sdk_version": 6,
+            "package_version": "1.1.0",
+            "sdk_version": 5,
             "website": "https://github.com/Ultimaker/fdm_materials",
             "author": {
                 "author_id": "Generic",
@@ -861,8 +933,8 @@
             "package_type": "material",
             "display_name": "Generic PC",
             "description": "The generic PC profile which other profiles can be based upon.",
-            "package_version": "1.0.0",
-            "sdk_version": 6,
+            "package_version": "1.1.0",
+            "sdk_version": 5,
             "website": "https://github.com/Ultimaker/fdm_materials",
             "author": {
                 "author_id": "Generic",
@@ -880,7 +952,7 @@
             "display_name": "Generic PETG",
             "description": "The generic PETG profile which other profiles can be based upon.",
             "package_version": "1.0.0",
-            "sdk_version": 6,
+            "sdk_version": 5,
             "website": "https://github.com/Ultimaker/fdm_materials",
             "author": {
                 "author_id": "Generic",
@@ -897,8 +969,8 @@
             "package_type": "material",
             "display_name": "Generic PLA",
             "description": "The generic PLA profile which other profiles can be based upon.",
-            "package_version": "1.0.0",
-            "sdk_version": 6,
+            "package_version": "1.1.0",
+            "sdk_version": 5,
             "website": "https://github.com/Ultimaker/fdm_materials",
             "author": {
                 "author_id": "Generic",
@@ -915,8 +987,8 @@
             "package_type": "material",
             "display_name": "Generic PP",
             "description": "The generic PP profile which other profiles can be based upon.",
-            "package_version": "1.0.0",
-            "sdk_version": 6,
+            "package_version": "1.1.0",
+            "sdk_version": 5,
             "website": "https://github.com/Ultimaker/fdm_materials",
             "author": {
                 "author_id": "Generic",
@@ -933,8 +1005,8 @@
             "package_type": "material",
             "display_name": "Generic PVA",
             "description": "The generic PVA profile which other profiles can be based upon.",
-            "package_version": "1.0.0",
-            "sdk_version": 6,
+            "package_version": "1.1.0",
+            "sdk_version": 5,
             "website": "https://github.com/Ultimaker/fdm_materials",
             "author": {
                 "author_id": "Generic",
@@ -951,8 +1023,8 @@
             "package_type": "material",
             "display_name": "Generic Tough PLA",
             "description": "The generic Tough PLA profile which other profiles can be based upon.",
-            "package_version": "1.0.0",
-            "sdk_version": 6,
+            "package_version": "1.0.1",
+            "sdk_version": 5,
             "website": "https://github.com/Ultimaker/fdm_materials",
             "author": {
                 "author_id": "Generic",
@@ -969,8 +1041,8 @@
             "package_type": "material",
             "display_name": "Generic TPU",
             "description": "The generic TPU profile which other profiles can be based upon.",
-            "package_version": "1.0.0",
-            "sdk_version": 6,
+            "package_version": "1.1.0",
+            "sdk_version": 5,
             "website": "https://github.com/Ultimaker/fdm_materials",
             "author": {
                 "author_id": "Generic",
@@ -1225,7 +1297,7 @@
             "package_type": "material",
             "display_name": "Ultimaker ABS",
             "description": "Example package for material and quality profiles for Ultimaker materials.",
-            "package_version": "1.0.0",
+            "package_version": "1.1.0",
             "sdk_version": 5,
             "website": "https://ultimaker.com/products/materials/abs",
             "author": {
@@ -1244,7 +1316,7 @@
             "package_type": "material",
             "display_name": "Ultimaker Breakaway",
             "description": "Example package for material and quality profiles for Ultimaker materials.",
-            "package_version": "1.0.0",
+            "package_version": "1.1.0",
             "sdk_version": 5,
             "website": "https://ultimaker.com/products/materials/breakaway",
             "author": {
@@ -1263,7 +1335,7 @@
             "package_type": "material",
             "display_name": "Ultimaker CPE",
             "description": "Example package for material and quality profiles for Ultimaker materials.",
-            "package_version": "1.0.0",
+            "package_version": "1.1.0",
             "sdk_version": 5,
             "website": "https://ultimaker.com/products/materials/abs",
             "author": {
@@ -1282,7 +1354,7 @@
             "package_type": "material",
             "display_name": "Ultimaker CPE+",
             "description": "Example package for material and quality profiles for Ultimaker materials.",
-            "package_version": "1.0.0",
+            "package_version": "1.1.0",
             "sdk_version": 5,
             "website": "https://ultimaker.com/products/materials/cpe",
             "author": {
@@ -1301,7 +1373,7 @@
             "package_type": "material",
             "display_name": "Ultimaker Nylon",
             "description": "Example package for material and quality profiles for Ultimaker materials.",
-            "package_version": "1.0.0",
+            "package_version": "1.1.0",
             "sdk_version": 5,
             "website": "https://ultimaker.com/products/materials/abs",
             "author": {
@@ -1320,7 +1392,7 @@
             "package_type": "material",
             "display_name": "Ultimaker PC",
             "description": "Example package for material and quality profiles for Ultimaker materials.",
-            "package_version": "1.0.0",
+            "package_version": "1.1.0",
             "sdk_version": 5,
             "website": "https://ultimaker.com/products/materials/pc",
             "author": {
@@ -1339,7 +1411,7 @@
             "package_type": "material",
             "display_name": "Ultimaker PLA",
             "description": "Example package for material and quality profiles for Ultimaker materials.",
-            "package_version": "1.0.0",
+            "package_version": "1.1.0",
             "sdk_version": 5,
             "website": "https://ultimaker.com/products/materials/abs",
             "author": {
@@ -1358,7 +1430,7 @@
             "package_type": "material",
             "display_name": "Ultimaker PP",
             "description": "Example package for material and quality profiles for Ultimaker materials.",
-            "package_version": "1.0.0",
+            "package_version": "1.1.0",
             "sdk_version": 5,
             "website": "https://ultimaker.com/products/materials/pp",
             "author": {
@@ -1377,7 +1449,7 @@
             "package_type": "material",
             "display_name": "Ultimaker PVA",
             "description": "Example package for material and quality profiles for Ultimaker materials.",
-            "package_version": "1.0.0",
+            "package_version": "1.1.0",
             "sdk_version": 5,
             "website": "https://ultimaker.com/products/materials/abs",
             "author": {
@@ -1396,7 +1468,7 @@
             "package_type": "material",
             "display_name": "Ultimaker TPU 95A",
             "description": "Example package for material and quality profiles for Ultimaker materials.",
-            "package_version": "1.0.0",
+            "package_version": "1.1.0",
             "sdk_version": 5,
             "website": "https://ultimaker.com/products/materials/tpu-95a",
             "author": {

+ 1 - 1
resources/qml/Actions.qml

@@ -423,7 +423,7 @@ Item
     Action
     {
         id: browsePackagesAction
-        text: catalog.i18nc("@action:menu", "Browse packages...")
+        text: catalog.i18nc("@action:menu", "Open Marketplace...")
         iconName: "plugins_browse"
     }
 

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