diff options
-rw-r--r-- | plugins/USBPrinting/USBPrinterOutputDevice.py | 4 | ||||
-rw-r--r-- | plugins/XmlMaterialProfile/XmlMaterialProfile.py | 4 | ||||
-rw-r--r-- | plugins/XmlMaterialProfile/__init__.py | 3 |
3 files changed, 3 insertions, 8 deletions
diff --git a/plugins/USBPrinting/USBPrinterOutputDevice.py b/plugins/USBPrinting/USBPrinterOutputDevice.py index 060b795fde..6c92d5a93a 100644 --- a/plugins/USBPrinting/USBPrinterOutputDevice.py +++ b/plugins/USBPrinting/USBPrinterOutputDevice.py @@ -88,9 +88,7 @@ class USBPrinterOutputDevice(PrinterOutputDevice): self._firmware_name_requested = False self._firmware_updater = AvrFirmwareUpdater(self) - from .USBPrinterOutputDeviceManager import USBPrinterOutputDeviceManager - plugin_id = USBPrinterOutputDeviceManager.getInstance().getPluginId() - plugin_path = PluginRegistry.getInstance().getPluginPath(plugin_id) + plugin_path = PluginRegistry.getInstance().getPluginPath("USBPrinting") self._monitor_view_qml_path = os.path.join(plugin_path, "MonitorItem.qml") CuraApplication.getInstance().getOnExitCallbackManager().addCallback(self._checkActivePrintingUponAppExit) diff --git a/plugins/XmlMaterialProfile/XmlMaterialProfile.py b/plugins/XmlMaterialProfile/XmlMaterialProfile.py index f4cef3a46d..2228cd4993 100644 --- a/plugins/XmlMaterialProfile/XmlMaterialProfile.py +++ b/plugins/XmlMaterialProfile/XmlMaterialProfile.py @@ -20,7 +20,6 @@ from UM.ConfigurationErrorMessage import ConfigurationErrorMessage from cura.CuraApplication import CuraApplication from cura.Machines.ContainerTree import ContainerTree from cura.Machines.VariantType import VariantType -from plugins.XmlMaterialProfile import PluginInfo try: from .XmlMaterialValidator import XmlMaterialValidator @@ -1070,8 +1069,7 @@ class XmlMaterialProfile(InstanceContainer): # This loads the mapping from a file. @classmethod def getProductIdMap(cls) -> Dict[str, List[str]]: - plugin_id = PluginInfo.getInstance().getPluginId() - plugin_path = PluginRegistry.getInstance().getPluginPath(plugin_id) + plugin_path = PluginRegistry.getInstance().getPluginPath("XmlMaterialProfile") product_to_id_file = os.path.join(plugin_path, "product_to_id.json") with open(product_to_id_file, encoding = "utf-8") as f: product_to_id_map = json.load(f) diff --git a/plugins/XmlMaterialProfile/__init__.py b/plugins/XmlMaterialProfile/__init__.py index aa1db90d6d..b3810c97dc 100644 --- a/plugins/XmlMaterialProfile/__init__.py +++ b/plugins/XmlMaterialProfile/__init__.py @@ -1,6 +1,6 @@ # Copyright (c) 2017 Ultimaker B.V. # Cura is released under the terms of the LGPLv3 or higher. -from plugins.XmlMaterialProfile.PluginInfo import PluginInfo + from . import XmlMaterialProfile from . import XmlMaterialUpgrader @@ -46,5 +46,4 @@ def register(app): return {"version_upgrade": upgrader, "settings_container": XmlMaterialProfile.XmlMaterialProfile("default_xml_material_profile"), - "plugin_info": PluginInfo() } |