mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-14 10:17:52 -06:00
Don't get whole container to just get metadata
A performance improvement, especially in the material models. Contributes to issue CURA-6793.
This commit is contained in:
parent
9f84304829
commit
7348c70af6
7 changed files with 14 additions and 15 deletions
|
@ -132,7 +132,7 @@ class MaterialManager(QObject):
|
|||
# Fetch the available materials (ContainerNode) for the current active machine and extruder setup.
|
||||
materials = self.getAvailableMaterials(machine.definition.getId(), nozzle_name)
|
||||
compatible_material_diameter = extruder_stack.getApproximateMaterialDiameter()
|
||||
result = {key: material for key, material in materials.items() if material.container and float(material.container.getMetaDataEntry("approximate_diameter")) == compatible_material_diameter}
|
||||
result = {key: material for key, material in materials.items() if material.container and float(material.getMetaDataEntry("approximate_diameter")) == compatible_material_diameter}
|
||||
return result
|
||||
|
||||
#
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue