mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-16 03:07:53 -06:00
Before this change packages were only being checked if they were bundled after loading the package_id. However only installed packages were being loaded so this would always be false.
The solution here is to check first if a material file is inside "secure_paths" (these are install directory resource paths). If it is, it must be a bundled material. CURA-8610
This commit is contained in:
parent
de8a58f0d7
commit
71a817697b
2 changed files with 25 additions and 3 deletions
|
@ -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 "",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue