mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-07 15:07:28 -06:00
Ensure an XML material always has a description and adhesion_info metadata entry
Contributes to CURA-342
This commit is contained in:
parent
8e63016ef3
commit
571523e0ef
1 changed files with 6 additions and 0 deletions
|
@ -241,6 +241,12 @@ class XmlMaterialProfile(UM.Settings.InstanceContainer):
|
||||||
|
|
||||||
self.addMetaDataEntry(tag_name, entry.text)
|
self.addMetaDataEntry(tag_name, entry.text)
|
||||||
|
|
||||||
|
if not "description" in self.getMetaData():
|
||||||
|
self.addMetaDataEntry("description", "")
|
||||||
|
|
||||||
|
if not "adhesion_info" in self.getMetaData():
|
||||||
|
self.addMetaDataEntry("adhesion_info", "")
|
||||||
|
|
||||||
property_values = {}
|
property_values = {}
|
||||||
properties = data.iterfind("./um:properties/*", self.__namespaces)
|
properties = data.iterfind("./um:properties/*", self.__namespaces)
|
||||||
for entry in properties:
|
for entry in properties:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue