mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-22 22:23:57 -06:00
Use proper method to check for excluded materials
CURA-11501
This commit is contained in:
parent
83fc0b764c
commit
1e5fa8523f
2 changed files with 4 additions and 5 deletions
|
@ -14,7 +14,6 @@ from cura.Machines.QualityChangesGroup import QualityChangesGroup # To construc
|
|||
from cura.Machines.QualityGroup import QualityGroup # To construct groups of quality profiles that belong together.
|
||||
from cura.Machines.QualityNode import QualityNode
|
||||
from cura.Machines.VariantNode import VariantNode
|
||||
from cura.Machines.MaterialNode import MaterialNode
|
||||
import UM.FlameProfiler
|
||||
|
||||
|
||||
|
@ -168,10 +167,10 @@ class MachineNode(ContainerNode):
|
|||
|
||||
return self.global_qualities.get(self.preferred_quality_type, next(iter(self.global_qualities.values())))
|
||||
|
||||
def isExcludedMaterial(self, material: MaterialNode) -> bool:
|
||||
def isExcludedMaterial(self, material_base_file: str) -> bool:
|
||||
"""Returns whether the material should be excluded from the list of materials."""
|
||||
for exclude_material in self.exclude_materials:
|
||||
if exclude_material in material["id"]:
|
||||
if exclude_material in material_base_file:
|
||||
return True
|
||||
return False
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue