mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-24 07:03:56 -06:00
Don't load any materials for printers that don't have them
For instance the Ultimaker 2 shouldn't display any materials. Contributes to issue CURA-6600.
This commit is contained in:
parent
295ad564c0
commit
6f77c8735c
2 changed files with 5 additions and 0 deletions
|
@ -38,6 +38,10 @@ class VariantNode(ContainerNode):
|
|||
## (Re)loads all materials under this variant.
|
||||
def _loadAll(self):
|
||||
container_registry = ContainerRegistry.getInstance()
|
||||
|
||||
if not self.machine.has_materials:
|
||||
return # There should not be any materials loaded for this printer.
|
||||
|
||||
# Find all the materials for this variant's name.
|
||||
if not self.machine.has_machine_materials: # Printer has no specific materials. Look for all fdmprinter materials.
|
||||
materials = container_registry.findInstanceContainersMetadata(type = "material", definition = "fdmprinter") # These are ONLY the base materials.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue