Filter materials by the (approximate) material diameter of the printer

If a machine defines material diameter of 2.85mm, there is no use to show the 1.75mm materials and vice-versa
This commit is contained in:
fieldOfView 2017-04-12 23:03:58 +02:00
parent e0b927b53c
commit e92aaca7b6
3 changed files with 22 additions and 2 deletions

View file

@ -118,6 +118,7 @@ class XmlMaterialProfile(InstanceContainer):
metadata.pop("variant", "")
metadata.pop("type", "")
metadata.pop("base_file", "")
metadata.pop("approximate_diameter", "")
## Begin Name Block
builder.start("name")
@ -437,6 +438,7 @@ class XmlMaterialProfile(InstanceContainer):
Logger.log("d", "Unsupported material setting %s", key)
self._cached_values = global_setting_values
meta_data["approximate_diameter"] = round(diameter)
meta_data["compatible"] = global_compatibility
self.setMetaData(meta_data)
self._dirty = False