The compatible setting is now serialized correctly

CURA-2940
This commit is contained in:
Jaime van Kessel 2016-11-18 15:43:32 +01:00
parent a9169a4d6b
commit c1650125e9

View file

@ -211,6 +211,16 @@ class XmlMaterialProfile(UM.Settings.InstanceContainer):
builder.start("hotend", {"id": variant_containers[0].getName()})
# Compatible is a special case, as it's added as a meta data entry (instead of an instance).
compatible = hotend.getMetaDataEntry("compatible")
if compatible is not None:
builder.start("setting", {"key": "hardware compatible"})
if compatible:
builder.data("yes")
else:
builder.data("no")
builder.end("setting")
for instance in hotend.findInstances():
if container.getInstance(instance.definition.key) and container.getProperty(instance.definition.key, "value") == instance.value:
# If the settings match that of the machine profile, just skip since we inherit the machine profile.