Display only the relevant materials when opening a project

Ignore the materials of the extruders that are not visible when opening a project file with a CFFF.

CURA-7646
This commit is contained in:
Kostas Karmas 2020-08-10 15:00:08 +02:00
parent 61cc8c9a95
commit f8a15ea29e

View file

@ -502,6 +502,9 @@ class ThreeMFWorkspaceReader(WorkspaceReader):
# Now we know which material is in which extruder. Let's use that to sort the material_labels according to # Now we know which material is in which extruder. Let's use that to sort the material_labels according to
# their extruder position # their extruder position
material_labels = [material_name for pos, material_name in sorted(materials_in_extruders_dict.items())] material_labels = [material_name for pos, material_name in sorted(materials_in_extruders_dict.items())]
machine_extruder_count = self._getMachineExtruderCount()
if machine_extruder_count:
material_labels = material_labels[:machine_extruder_count]
num_visible_settings = 0 num_visible_settings = 0
try: try: