mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-07 06:57:28 -06:00
The compatible setting is now serialized correctly
CURA-2940
This commit is contained in:
parent
a9169a4d6b
commit
c1650125e9
1 changed files with 11 additions and 1 deletions
|
@ -209,7 +209,17 @@ class XmlMaterialProfile(UM.Settings.InstanceContainer):
|
||||||
if not variant_containers:
|
if not variant_containers:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
builder.start("hotend", { "id": variant_containers[0].getName() })
|
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():
|
for instance in hotend.findInstances():
|
||||||
if container.getInstance(instance.definition.key) and container.getProperty(instance.definition.key, "value") == instance.value:
|
if container.getInstance(instance.definition.key) and container.getProperty(instance.definition.key, "value") == instance.value:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue