From 1f698fd6645d442fcf7a4faad0879a0209efaa39 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Tue, 23 Jun 2020 13:13:49 +0200 Subject: [PATCH] Further simplify the getUsedExtruderStacks function Should be a tiny bit faster CURA-7106 --- cura/Settings/ExtruderManager.py | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/cura/Settings/ExtruderManager.py b/cura/Settings/ExtruderManager.py index 045da07cc3..cd3121fe75 100755 --- a/cura/Settings/ExtruderManager.py +++ b/cura/Settings/ExtruderManager.py @@ -206,16 +206,9 @@ class ExtruderManager(QObject): return [] # Get the extruders of all printable meshes in the scene - nodes = [node for node in DepthFirstIterator(scene_root) if isinstance(node, SceneNode) and node.isSelectable()] #type: ignore #Ignore type error because iter() should get called automatically by Python syntax. + nodes = [node for node in DepthFirstIterator(scene_root) if node.isSelectable() and not node.callDecoration("isAntiOverhangMesh") and not node.callDecoration("isSupportMesh")] #type: ignore #Ignore type error because iter() should get called automatically by Python syntax. - # Exclude anti-overhang meshes - node_list = [] for node in nodes: - if node.callDecoration("isAntiOverhangMesh") or node.callDecoration("isSupportMesh"): - continue - node_list.append(node) - - for node in node_list: extruder_stack_id = node.callDecoration("getActiveExtruder") if not extruder_stack_id: # No per-object settings for this node