diff options
author | Jaime van Kessel <nallath@gmail.com> | 2022-06-13 14:22:03 +0300 |
---|---|---|
committer | Jaime van Kessel <nallath@gmail.com> | 2022-06-13 14:22:03 +0300 |
commit | 525f96db98a28aeb518f6d8196cf7fb7884ae5b3 (patch) | |
tree | 5a484583f5bf0f3e1f9c87172a06aa5a96804caf /plugins | |
parent | 739749726094488d132d051d2cc75261fc3c05ea (diff) | |
parent | ddb49ddba4345df1bea2e08c56992a08044ac356 (diff) |
Merge branch 'CURA-8610_add_package_metadata' of github.com:Ultimaker/Cura
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/3MFWriter/ThreeMFWriter.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/plugins/3MFWriter/ThreeMFWriter.py b/plugins/3MFWriter/ThreeMFWriter.py index d7d1380f9b..83007177c3 100644 --- a/plugins/3MFWriter/ThreeMFWriter.py +++ b/plugins/3MFWriter/ThreeMFWriter.py @@ -267,10 +267,15 @@ class ThreeMFWriter(MeshWriter): # Don't export materials not in use continue + if package_manager.isMaterialBundled(extruder.material.getFileName(), extruder.material.getMetaDataEntry("GUID")): + # Don't export bundled materials + continue + package_id = package_manager.getMaterialFilePackageId(extruder.material.getFileName(), extruder.material.getMetaDataEntry("GUID")) package_data = package_manager.getInstalledPackageInfo(package_id) if not package_data: + # We failed to find the package for this material message = Message(catalog.i18nc("@error:material", "It was not possible to store material package information in project file: {material}. This project may not open correctly on other systems.".format(material=extruder.getName())), title=catalog.i18nc("@info:title", "Failed to save material package information"), @@ -278,9 +283,6 @@ class ThreeMFWriter(MeshWriter): message.show() continue - if package_data.get("is_bundled"): - continue - material_metadata = {"id": package_id, "display_name": package_data.get("display_name") if package_data.get("display_name") else "", "package_version": package_data.get("package_version") if package_data.get("package_version") else "", |