Fix serialising materials with Ultimaker S5 in it

Contributes to issue CURA-5787.
This commit is contained in:
Ghostkeeper 2019-02-14 17:45:25 +01:00
parent d6f116b156
commit cc94441b54
No known key found for this signature in database
GPG key ID: 86BEF881AE2CF276
2 changed files with 3 additions and 0 deletions

View file

@ -1167,6 +1167,8 @@ class XmlMaterialProfile(InstanceContainer):
with open(product_to_id_file, encoding = "utf-8") as f:
product_to_id_map = json.load(f)
product_to_id_map = {key: [value] for key, value in product_to_id_map.items()}
#This also loads "Ultimaker S5" -> "ultimaker_s5" even though that is not strictly necessary with the default to change spaces into underscores.
#However it is not always loaded with that default; this mapping is also used in serialize() without that default.
return product_to_id_map
## Parse the value of the "material compatible" property.

View file

@ -6,6 +6,7 @@
"Ultimaker 2+": "ultimaker2_plus",
"Ultimaker 3": "ultimaker3",
"Ultimaker 3 Extended": "ultimaker3_extended",
"Ultimaker S5": "ultimaker_s5",
"Ultimaker Original": "ultimaker_original",
"Ultimaker Original+": "ultimaker_original_plus",
"Ultimaker Original Dual Extrusion": "ultimaker_original_dual",