From f8a15ea29e9cc0cbff23805b33a5d0f3de0fb775 Mon Sep 17 00:00:00 2001 From: Kostas Karmas Date: Mon, 10 Aug 2020 15:00:08 +0200 Subject: [PATCH] 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 --- plugins/3MFReader/ThreeMFWorkspaceReader.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/plugins/3MFReader/ThreeMFWorkspaceReader.py b/plugins/3MFReader/ThreeMFWorkspaceReader.py index 49173d4864..b775d0055c 100755 --- a/plugins/3MFReader/ThreeMFWorkspaceReader.py +++ b/plugins/3MFReader/ThreeMFWorkspaceReader.py @@ -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 # their extruder position 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 try: