mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-06 22:47:29 -06:00
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:
parent
e0b927b53c
commit
e92aaca7b6
3 changed files with 22 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue