mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-24 15:13:56 -06:00
No longer use deprecated MaterialManager when asking for available materials
Use the ContainerTree structure instead. That's what it's for. Contributes to issue CURA-6600.
This commit is contained in:
parent
7f84145c9a
commit
5738af4bb8
2 changed files with 5 additions and 11 deletions
|
@ -168,7 +168,7 @@ class MaterialManager(QObject):
|
|||
# MaterialNodes from the ContainerTree that are available for the given
|
||||
# printer and variant.
|
||||
def getAvailableMaterials(self, definition_id: str, nozzle_name: Optional[str]) -> Dict[str, MaterialNode]:
|
||||
return ContainerTree.getInstance().machines[definition_id].variants.get(nozzle_name, "empty_variant").materials
|
||||
return ContainerTree.getInstance().machines[definition_id].variants[nozzle_name].materials
|
||||
|
||||
#
|
||||
# A convenience function to get available materials for the given machine with the extruder position.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue