mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-19 12:47:49 -06:00
Further simplify the getUsedExtruderStacks function
Should be a tiny bit faster CURA-7106
This commit is contained in:
parent
1d9c92c47f
commit
1f698fd664
1 changed files with 1 additions and 8 deletions
|
@ -206,16 +206,9 @@ class ExtruderManager(QObject):
|
||||||
return []
|
return []
|
||||||
|
|
||||||
# Get the extruders of all printable meshes in the scene
|
# 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:
|
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")
|
extruder_stack_id = node.callDecoration("getActiveExtruder")
|
||||||
if not extruder_stack_id:
|
if not extruder_stack_id:
|
||||||
# No per-object settings for this node
|
# No per-object settings for this node
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue