diff --git a/cura/Machines/Models/DiscoveredPrintersModel.py b/cura/Machines/Models/DiscoveredPrintersModel.py index a1b68ee1ae..33e0b7a4d9 100644 --- a/cura/Machines/Models/DiscoveredPrintersModel.py +++ b/cura/Machines/Models/DiscoveredPrintersModel.py @@ -75,7 +75,7 @@ class DiscoveredPrinter(QObject): def readableMachineType(self) -> str: from cura.CuraApplication import CuraApplication machine_manager = CuraApplication.getInstance().getMachineManager() - # In NetworkOutputDevice, when it updates a printer information, it updates the machine type using the field + # In LocalClusterOutputDevice, when it updates a printer information, it updates the machine type using the field # "machine_variant", and for some reason, it's not the machine type ID/codename/... but a human-readable string # like "Ultimaker 3". The code below handles this case. if self._hasHumanReadableMachineTypeName(self._machine_type): diff --git a/plugins/ThingiBrowser b/plugins/ThingiBrowser new file mode 120000 index 0000000000..cd517534c1 --- /dev/null +++ b/plugins/ThingiBrowser @@ -0,0 +1 @@ +/home/cterbeke/Code/ChrisTerBeke/ThingiBrowser \ No newline at end of file diff --git a/plugins/UM3NetworkPrinting/src/Network/NetworkOutputDevice.py b/plugins/UM3NetworkPrinting/src/Network/LocalClusterOutputDevice.py similarity index 99% rename from plugins/UM3NetworkPrinting/src/Network/NetworkOutputDevice.py rename to plugins/UM3NetworkPrinting/src/Network/LocalClusterOutputDevice.py index 7f6b2f54b3..f8cf652114 100644 --- a/plugins/UM3NetworkPrinting/src/Network/NetworkOutputDevice.py +++ b/plugins/UM3NetworkPrinting/src/Network/LocalClusterOutputDevice.py @@ -23,7 +23,7 @@ from ..UltimakerNetworkedPrinterOutputDevice import UltimakerNetworkedPrinterOut I18N_CATALOG = i18nCatalog("cura") -class NetworkOutputDevice(UltimakerNetworkedPrinterOutputDevice): +class LocalClusterOutputDevice(UltimakerNetworkedPrinterOutputDevice): activeCameraUrlChanged = pyqtSignal() diff --git a/plugins/UM3NetworkPrinting/src/Network/NetworkOutputDeviceManager.py b/plugins/UM3NetworkPrinting/src/Network/LocalClusterOutputDeviceManager.py similarity index 95% rename from plugins/UM3NetworkPrinting/src/Network/NetworkOutputDeviceManager.py rename to plugins/UM3NetworkPrinting/src/Network/LocalClusterOutputDeviceManager.py index 6efb41a59d..6f48fa26a4 100644 --- a/plugins/UM3NetworkPrinting/src/Network/NetworkOutputDeviceManager.py +++ b/plugins/UM3NetworkPrinting/src/Network/LocalClusterOutputDeviceManager.py @@ -12,7 +12,7 @@ from cura.Settings.GlobalStack import GlobalStack from .ZeroConfClient import ZeroConfClient from .ClusterApiClient import ClusterApiClient -from .NetworkOutputDevice import NetworkOutputDevice +from .LocalClusterOutputDevice import LocalClusterOutputDevice from ..CloudFlowMessage import CloudFlowMessage from ..Models.Http.PrinterSystemStatus import PrinterSystemStatus @@ -20,8 +20,8 @@ from ..Models.Http.PrinterSystemStatus import PrinterSystemStatus I18N_CATALOG = i18nCatalog("cura") -## The NetworkOutputDeviceManager is responsible for discovering and managing local networked clusters. -class NetworkOutputDeviceManager: +## The LocalClusterOutputDeviceManager is responsible for discovering and managing local networked clusters. +class LocalClusterOutputDeviceManager: META_NETWORK_KEY = "um_network_key" @@ -37,7 +37,7 @@ class NetworkOutputDeviceManager: def __init__(self) -> None: # Persistent dict containing the networked clusters. - self._discovered_devices = {} # type: Dict[str, NetworkOutputDevice] + self._discovered_devices = {} # type: Dict[str, LocalClusterOutputDevice] self._output_device_manager = CuraApplication.getInstance().getOutputDeviceManager() # Hook up ZeroConf client. @@ -152,7 +152,7 @@ class NetworkOutputDeviceManager: if cluster_size == -1: return - device = NetworkOutputDevice(key, address, properties) + device = LocalClusterOutputDevice(key, address, properties) CuraApplication.getInstance().getDiscoveredPrintersModel().addDiscoveredPrinter( ip_address=address, key=device.getId(), @@ -167,7 +167,7 @@ class NetworkOutputDeviceManager: ## Remove a device. def _onDiscoveredDeviceRemoved(self, device_id: str) -> None: - device = self._discovered_devices.pop(device_id, None) # type: Optional[NetworkOutputDevice] + device = self._discovered_devices.pop(device_id, None) # type: Optional[LocalClusterOutputDevice] if not device: return device.close() diff --git a/plugins/UM3NetworkPrinting/src/SendMaterialJob.py b/plugins/UM3NetworkPrinting/src/SendMaterialJob.py index 50705efa8e..697ba33a6b 100644 --- a/plugins/UM3NetworkPrinting/src/SendMaterialJob.py +++ b/plugins/UM3NetworkPrinting/src/SendMaterialJob.py @@ -13,7 +13,7 @@ from .Models.ClusterMaterial import ClusterMaterial from .Models.LocalMaterial import LocalMaterial if TYPE_CHECKING: - from .Network.NetworkOutputDevice import NetworkOutputDevice + from .Network.LocalClusterOutputDevice import LocalClusterOutputDevice ## Asynchronous job to send material profiles to the printer. @@ -21,9 +21,9 @@ if TYPE_CHECKING: # This way it won't freeze up the interface while sending those materials. class SendMaterialJob(Job): - def __init__(self, device: "NetworkOutputDevice") -> None: + def __init__(self, device: "LocalClusterOutputDevice") -> None: super().__init__() - self.device = device # type: NetworkOutputDevice + self.device = device # type: LocalClusterOutputDevice ## Send the request to the printer and register a callback def run(self) -> None: diff --git a/plugins/UM3NetworkPrinting/src/UM3OutputDevicePlugin.py b/plugins/UM3NetworkPrinting/src/UM3OutputDevicePlugin.py index 416c60006b..64180491fe 100644 --- a/plugins/UM3NetworkPrinting/src/UM3OutputDevicePlugin.py +++ b/plugins/UM3NetworkPrinting/src/UM3OutputDevicePlugin.py @@ -7,7 +7,7 @@ from cura.CuraApplication import CuraApplication from UM.OutputDevice.OutputDeviceManager import ManualDeviceAdditionAttempt from UM.OutputDevice.OutputDevicePlugin import OutputDevicePlugin -from .Network.NetworkOutputDeviceManager import NetworkOutputDeviceManager +from .Network.LocalClusterOutputDeviceManager import LocalClusterOutputDeviceManager from .Cloud.CloudOutputDeviceManager import CloudOutputDeviceManager @@ -18,7 +18,7 @@ class UM3OutputDevicePlugin(OutputDevicePlugin): super().__init__() # Create a network output device manager that abstracts all network connection logic away. - self._network_output_device_manager = NetworkOutputDeviceManager() + self._network_output_device_manager = LocalClusterOutputDeviceManager() # Create a cloud output device manager that abstracts all cloud connection logic away. self._cloud_output_device_manager = CloudOutputDeviceManager()