mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-09 15:57:52 -06:00
Also don't add any materials added later if there are no materials
Keeps it consistent. Contributes to issue CURA-6600.
This commit is contained in:
parent
6f77c8735c
commit
999e19940e
1 changed files with 3 additions and 0 deletions
|
@ -85,10 +85,13 @@ class VariantNode(ContainerNode):
|
||||||
def _materialAdded(self, container: ContainerInterface):
|
def _materialAdded(self, container: ContainerInterface):
|
||||||
if container.getMetaDataEntry("type") != "material":
|
if container.getMetaDataEntry("type") != "material":
|
||||||
return # Not interested.
|
return # Not interested.
|
||||||
|
if not self.machine.has_materials:
|
||||||
|
return # We won't add any materials.
|
||||||
material_definition = container.getMetaDataEntry("definition")
|
material_definition = container.getMetaDataEntry("definition")
|
||||||
if not self.machine.has_machine_materials:
|
if not self.machine.has_machine_materials:
|
||||||
if material_definition != "fdmprinter":
|
if material_definition != "fdmprinter":
|
||||||
return
|
return
|
||||||
|
|
||||||
base_file = container.getMetaDataEntry("base_file")
|
base_file = container.getMetaDataEntry("base_file")
|
||||||
if base_file in self.machine.exclude_materials:
|
if base_file in self.machine.exclude_materials:
|
||||||
return # Material is forbidden for this printer.
|
return # Material is forbidden for this printer.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue