XmlMaterialValidator.py 594 B

12345678910111213141516171819202122232425
  1. # Copyright (c) 2017 Ultimaker B.V.
  2. # Cura is released under the terms of the LGPLv3 or higher.
  3. class XmlMaterialValidator():
  4. @classmethod
  5. def validateMaterialMetaData(cls, validation_metadata):
  6. if validation_metadata.get("GUID") is None:
  7. return "Missing GUID"
  8. if validation_metadata.get("brand") is None:
  9. return "Missing Brand"
  10. if validation_metadata.get("material") is None:
  11. return "Missing Material"
  12. if validation_metadata.get("version") is None:
  13. return "Missing Version"
  14. return None