mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-07 06:57:28 -06:00
Added label property to XML profile (as per 1.2 spec)
CURA-1968
This commit is contained in:
parent
aa28ecca37
commit
a904067d7a
2 changed files with 10 additions and 2 deletions
|
@ -117,6 +117,10 @@ class XmlMaterialProfile(UM.Settings.InstanceContainer):
|
|||
builder.data(metadata.pop("color_name", ""))
|
||||
builder.end("color")
|
||||
|
||||
builder.start("label")
|
||||
builder.data(self._name)
|
||||
builder.end("label")
|
||||
|
||||
builder.end("name")
|
||||
## End Name Block
|
||||
|
||||
|
@ -235,8 +239,12 @@ class XmlMaterialProfile(UM.Settings.InstanceContainer):
|
|||
brand = entry.find("./um:brand", self.__namespaces)
|
||||
material = entry.find("./um:material", self.__namespaces)
|
||||
color = entry.find("./um:color", self.__namespaces)
|
||||
label = entry.find("./um:label", self.__namespaces)
|
||||
|
||||
self.setName(self._profile_name(material.text, color.text))
|
||||
if label:
|
||||
self.setName(label.text)
|
||||
else:
|
||||
self.setName(self._profile_name(material.text, color.text))
|
||||
|
||||
self.addMetaDataEntry("brand", brand.text)
|
||||
self.addMetaDataEntry("material", material.text)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue