diff --git a/plugins/UM3NetworkPrinting/ClusterUM3OutputDevice.py b/plugins/UM3NetworkPrinting/ClusterUM3OutputDevice.py index d13706cc4c..4283042bf2 100644 --- a/plugins/UM3NetworkPrinting/ClusterUM3OutputDevice.py +++ b/plugins/UM3NetworkPrinting/ClusterUM3OutputDevice.py @@ -73,6 +73,8 @@ class ClusterUM3OutputDevice(NetworkedPrinterOutputDevice): self._finished_jobs = [] + self._cluster_size = int(properties.get(b"cluster_size", 0)) + def requestWrite(self, nodes, file_name=None, filter_by_machine=False, file_handler=None, **kwargs): # Notify the UI that a switch to the print monitor should happen Application.getInstance().getController().setActiveStage("MonitorStage") @@ -95,6 +97,10 @@ class ClusterUM3OutputDevice(NetworkedPrinterOutputDevice): if self._printer_selection_dialog is not None: self._printer_selection_dialog.show() + @pyqtProperty(int, constant=True) + def clusterSize(self): + return self._cluster_size + @pyqtSlot() @pyqtSlot(str) def sendPrintJob(self, target_printer = ""): diff --git a/plugins/UM3NetworkPrinting/UM3OutputDevicePlugin.py b/plugins/UM3NetworkPrinting/UM3OutputDevicePlugin.py index be62e68f03..c639c25007 100644 --- a/plugins/UM3NetworkPrinting/UM3OutputDevicePlugin.py +++ b/plugins/UM3NetworkPrinting/UM3OutputDevicePlugin.py @@ -240,7 +240,7 @@ class UM3OutputDevicePlugin(OutputDevicePlugin): # or "Legacy" UM3 device. cluster_size = int(properties.get(b"cluster_size", -1)) - if cluster_size > 0: + if cluster_size >= 0: device = ClusterUM3OutputDevice.ClusterUM3OutputDevice(name, address, properties) else: device = LegacyUM3OutputDevice.LegacyUM3OutputDevice(name, address, properties)