mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-06 14:37:29 -06:00
Material container validation
CURA-4851
This commit is contained in:
parent
e5c72cfdc5
commit
a446ca2759
1 changed files with 31 additions and 0 deletions
31
plugins/XmlMaterialProfile/XmlMaterialValidator.py
Normal file
31
plugins/XmlMaterialProfile/XmlMaterialValidator.py
Normal file
|
@ -0,0 +1,31 @@
|
|||
# Copyright (c) 2017 Ultimaker B.V.
|
||||
# Cura is released under the terms of the LGPLv3 or higher.
|
||||
|
||||
|
||||
|
||||
class XmlMaterialValidater():
|
||||
|
||||
@classmethod
|
||||
def validateMaterialMetaDate(cls, validation_metadata):
|
||||
|
||||
if validation_metadata.get("GUID") is None:
|
||||
return "Missing GUID"
|
||||
|
||||
if validation_metadata.get("brand") is None:
|
||||
return "Missing Brand"
|
||||
|
||||
if validation_metadata.get("material") is None:
|
||||
return "Missing Material"
|
||||
|
||||
if validation_metadata.get("version") is None:
|
||||
return "Missing Version"
|
||||
|
||||
if validation_metadata.get("description") is None:
|
||||
return "Missing Description"
|
||||
|
||||
if validation_metadata.get("adhesion_info") is None:
|
||||
return "Missing Adhesion Info"
|
||||
|
||||
return None
|
||||
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue