diff options
author | Nino van Hooff <ninovanhooff@gmail.com> | 2019-12-30 14:04:41 +0300 |
---|---|---|
committer | Nino van Hooff <ninovanhooff@gmail.com> | 2019-12-30 14:04:41 +0300 |
commit | 9aa5c3cd24dd903a9954008ff40f8b78d43b63f3 (patch) | |
tree | f9b2f667b385b85d8d9e1983323e3cee0ad771b3 /plugins/XmlMaterialProfile | |
parent | 8ae7459ea741da41fc4b03158268f1008aa603d1 (diff) |
Hardcode plugin id for UsbPrinter and XmlMaterialProfile
Previous solution was more defensive but also introduced dependencies
and extra files for minor benefit
CURA-6255
Diffstat (limited to 'plugins/XmlMaterialProfile')
-rw-r--r-- | plugins/XmlMaterialProfile/XmlMaterialProfile.py | 4 | ||||
-rw-r--r-- | plugins/XmlMaterialProfile/__init__.py | 3 |
2 files changed, 2 insertions, 5 deletions
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() } |